Repository navigation
chore: upgrade workflows and update dependencies - #214
borisonekenobi wants to merge 9 commits into
Conversation
| interval: "weekly" | ||
| day: "sunday" | ||
| time: "09:00" | ||
| timezone: "America/Toronto" |
There was a problem hiding this comment.
Since this project is Europe-based, we should set this to Europe/Berlin
| "module": "commonjs", | ||
| "moduleResolution": "node", | ||
| "module": "node16", | ||
| "moduleResolution": "node16", |
There was a problem hiding this comment.
What is the reason to set this to "node16" specifically?
There was a problem hiding this comment.
Typescript v6 removes node as an available moduleResolution, and the suggested fix by GitHub Copilot was node16, other than that, no opinion on specific module or moduleResolution
| - package-ecosystem: "npm" | ||
| directory: "/src/" | ||
| schedule: | ||
| interval: "weekly" |
There was a problem hiding this comment.
We release this tool in a much larger interval, so I suggest monthly dep updates. Everything shorter than this is highly annoying for maintainers.
|
Thanks for the PR, @borisonekenobi 😊 |
|
Hi @borisonekenobi, thank you so much for this PR and for taking the time to work through the review feedback! 🙏 The code changes are great: the class-based Dependabot is where I have a real stomachache, though. Supply-chain attacks have become a huge problem in the npm ecosystem, and according to GitHub, 66,408 repositories depend on angular-cli-ghpages. Every dependency change I ship ends up in all of those build pipelines, and I take that responsibility seriously. That's why I've deliberately cut down the dependency footprint over time. I even inlined and slimmed down former dependencies so there's less code from third parties in the chain. My approach: outdated dependencies on their own aren't a problem. If there's a security finding, it gets handled right away. Otherwise I update dependencies by hand before each release, alongside Angular/AngularFire, and test everything together. A bot that continuously bumps versions works against that. The devDependencies are also intentionally pinned to the lowest supported Angular version (18), so the build always runs against the minimum the package claims to support (see So would you mind trimming the PR down to the code changes? Concretely:
That leaves the Thanks again, contributions like this are really appreciated! 😊 |
|
Thanks for the detailed feedback. I understand the concern, especially given how many downstream projects use the package and the responsibility that comes with changing its dependency chain. I can trim the PR as requested, but I wanted to point out a few details first. Not all of the dependency updates in this PR are just version bumps. Some of them resolve security vulnerabilities that Dependabot found. The updates reduce the reported vulnerabilities from 83 to 1. (link to resolved vulnerabilities) The remaining vulnerability hasn't been resolved in the upstream packages yet, so there is currently no update that can address it (and, unfortunately, that vulnerability is also what originally prompted me to start this PR). With that in mind, I wanted to suggest a slightly different approach:
If you would still prefer to remove Dependabot completely, that is fine too. I want to flag this before we remove everything, as we may be able to keep the security benefits without continuous dependency updates. Either way, I can make the changes and get the PR into a state you are comfortable merging. |
|
Thanks for the thoughtful reply and for raising the security side before trimming! 1. Vulnerabilities: Most findings come from But security isn't only about users: the maintainers' machines and the CI run with that lockfile too, so the findings do matter. That's why I'll regenerate the lockfile myself before merging, which resolves them. 2. Security-only updates: Good idea, and it fits my approach. I'll enable Dependabot alerts in the repo settings instead, so I get notified without automated PRs. 3. GitHub Actions: I see it differently: the actions run in our npm publish pipeline, so a compromised action could ship a malicious release to every downstream project. I'd rather not bump those automatically. The one-time upgrade in this PR is great, though! So please remove Thanks again, and I'm sorry for the extra work! I'm honestly concerned about the state of the npm ecosystem and the overall security landscape, especially now that AI is finding every little attack vector. |
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4...v8) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 46744f4)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 5d38835)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 0ff1348)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 7. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v7) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit 7c42b37)
…ion tests (cherry picked from commit 57d6a8a)
…it/core dependency in package-lock.json (cherry picked from commit af15032)
|
No worries, and thanks for clarifying! I understand your reasoning around the lockfile and the GitHub Actions. I've made the changes, and the PR is ready for review again! |
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.2.2 to 7.0.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v5.2.2...v7.0.2) --- updated-dependencies: - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This pull request updates the project to support TypeScript 7 and modernizes the GitHub Actions workflows. It also improves type safety in the codebase and updates a test mock for better maintainability.
Dependency and TypeScript updates:
typescriptto version7.0.2inpackage.json,package-lock.json, and added support for platform-specific TypeScript packages. The minimum Node.js version is now16.20.0. (src/package.json,src/package-lock.json, [1] [2] [3] [4]tsconfig.jsonto usemodule: node16andmoduleResolution: node16, aligning with TypeScript 7 requirements. (src/tsconfig.json, src/tsconfig.jsonL3-R4)CI/CD workflow modernization:
actions/checkout@v7,actions/setup-node@v7,actions/upload-artifact@v7,actions/download-artifact@v8). (.github/workflows/main.yml,.github/workflows/npm-publish.yml, [1] [2] [3] [4] [5]Type safety improvements:
beforeAddhook inPublishOptionsto use theGhPagesGittype instead ofunknown, and imported the type accordingly. (src/interfaces.ts, [1] [2]options.projectinngAddto satisfy stricter type checking. (src/ng-add.ts, src/ng-add.tsL23-R23)Testing improvements:
gh-pages/lib/gitin the test file to use a class-based mock, improving clarity and maintainability. (src/engine/engine.gh-pages-integration.spec.ts, src/engine/engine.gh-pages-integration.spec.tsL25-R35)