feat: upgrade and migrate outdated dependencies#187
Draft
scottschreckengaust wants to merge 19 commits intoaws-actions:mainfrom
Draft
feat: upgrade and migrate outdated dependencies#187scottschreckengaust wants to merge 19 commits intoaws-actions:mainfrom
scottschreckengaust wants to merge 19 commits intoaws-actions:mainfrom
Conversation
@actions/github v9+ is ESM-only and incompatible with this project's CommonJS require() usage. v8.0.1 is the latest CJS-compatible release with the same API surface.
Add npm overrides for transitive dependencies pinned by mocha and eslint to versions outside their semver ranges. Run npm audit fix for remaining direct dependency updates. Result: 0 vulnerabilities, all 23 tests passing.
- Add "type": "module" to package.json - Convert all require()/module.exports to import/export - Upgrade @actions/core ^1.10.0 -> ^3.0.0 (ESM-only) - Upgrade @actions/github ^8.0.1 -> ^9.1.0 (ESM-only) - Upgrade uuid ^3.4.0 -> ^9.0.0 (ESM import path) - Upgrade yargs ^15.3.1 -> ^17.7.2 (ESM support) - Upgrade @vercel/ncc ^0.36.1 -> ^0.38.4 (ESM input) - Upgrade chai ^4.2.0 -> ^6.2.2 (ESM-native) - Update ESLint config for ESM (sourceType: module) - Rework test context mutation for ESM live bindings All 23 tests passing, 0 audit vulnerabilities, ncc build succeeds.
ncc v0.38 code-splits ESM output into chunks, which is unreliable for GitHub Actions runners. esbuild produces a single dist/index.js with a createRequire banner shim for CJS interop.
Accept an optional context parameter (defaults to github.context) so tests can pass plain objects instead of mutating the shared @actions/github singleton.
- Replace .eslintrc.json with eslint.config.js (flat config) - Upgrade eslint ^8.43.0 -> ^10.2.0 - Upgrade eslint-config-prettier ^6.10.1 -> ^10.1.8 - Add @eslint/js and globals as dev dependencies - Remove minimatch override (eslint 10 uses minimatch 9.x natively) - Update lint scripts for flat config glob patterns All 23 tests passing, 0 audit vulnerabilities.
Prod deps: - @actions/exec ^1.0.3 -> ^3.0.0 - uuid ^9.0.0 -> ^13.0.0 - yargs ^17.7.2 -> ^18.0.0 Dev deps: - husky ^8.0.3 -> ^9.1.7 (migrated config to .husky/pre-commit) - lint-staged ^13.2.1 -> ^16.4.0 - prettier ^2.0.4 -> ^3.8.2 (reformatted source files) All 23 tests passing, 0 audit vulnerabilities, 0 outdated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Migrate ESLint to v10 flat config and upgrade all remaining outdated dependencies.
What changed
.eslintrc.jsonwitheslint.config.js(flat config format)package.jsonto.husky/pre-commit(husky 9 format)minimatchnpm override — ESLint 10 usesminimatch@9.xnativelyDependencies upgraded
eslint^8.43.0^10.2.0eslint-config-prettier^6.10.1^10.1.8@eslint/js^10.0.1recommendedrules for flat configglobals^17.5.0@actions/exec^1.0.3^3.0.0uuid^9.0.0^13.0.0yargs^17.7.2^18.0.0husky^8.0.3^9.1.7lint-staged^13.2.1^16.4.0prettier^2.0.4^3.8.2Verification
npm run lintcleannpm run buildsucceedsnpm audit— 0 vulnerabilitiesnpm outdated— 0 outdatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: