Migrate to ESM and upgrade dependencies#752
Open
priyagupta108 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the action’s TypeScript codebase to ESM (NodeNext) and updates the toolchain/configuration to support ESM linting and testing, alongside a broad dependency refresh.
Changes:
- Switch TypeScript compilation to
NodeNextand update internal imports /__dirnameusage for ESM. - Replace legacy ESLint/Jest/Prettier configs with ESM-friendly equivalents and update tests to ESM mocking patterns.
- Bump runtime/dev dependencies and refresh
licensedmetadata to match new dependency graph.
Reviewed changes
Copilot reviewed 67 out of 78 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Switch TS module system to NodeNext |
| tsconfig.eslint.json | Add dedicated TS config for ESLint |
| src/setup-dotnet.ts | Update imports and ESM path resolution |
| src/installer.ts | Update imports and ESM path resolution |
| src/cache-utils.ts | Update relative import to .js specifier |
| src/cache-save.ts | Update relative imports to .js specifiers |
| src/cache-restore.ts | Update relative imports to .js specifiers |
| package.json | Mark package as ESM; bump deps/scripts |
| jest.config.ts | New TS-based Jest config for ESM + ts-jest |
| jest.config.js | Remove legacy CommonJS Jest config |
| eslint.config.mjs | New flat ESLint config for ESM/TS |
| dist/setup/package.json | Mark bundled setup output as ESM |
| dist/cache-save/package.json | Mark bundled post step output as ESM |
| .prettierrc.json | Add JSON-based Prettier config |
| .prettierrc.js | Remove legacy CommonJS Prettier config |
| .licenses/npm/yallist.dep.yml | Remove outdated licensed entry |
| .licenses/npm/wrappy.dep.yml | Remove outdated licensed entry |
| .licenses/npm/universal-user-agent.dep.yml | Update licensed metadata for new version |
| .licenses/npm/semver.dep.yml | Update licensed metadata for new version |
| .licenses/npm/semver-7.6.0.dep.yml | Remove outdated licensed entry |
| .licenses/npm/once.dep.yml | Remove outdated licensed entry |
| .licenses/npm/ms.dep.yml | Update licensed metadata for new version |
| .licenses/npm/minimatch-3.1.5.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/minimatch-10.2.5.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/lru-cache.dep.yml | Remove outdated licensed entry |
| .licenses/npm/json-with-bigint.dep.yml | Update licensed metadata for dependency change |
| .licenses/npm/fast-xml-parser.dep.yml | Update licensed metadata for new version |
| .licenses/npm/deprecation.dep.yml | Remove outdated licensed entry |
| .licenses/npm/debug.dep.yml | Update licensed metadata for new version |
| .licenses/npm/content-type.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/brace-expansion-5.0.6.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/brace-expansion-1.1.15.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/before-after-hook.dep.yml | Update licensed metadata for new version |
| .licenses/npm/balanced-match-4.0.4.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/balanced-match-1.0.2.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/@typespec/ts-http-runtime.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/types.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/types-13.10.0.dep.yml | Remove outdated licensed entry |
| .licenses/npm/@octokit/request.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/request-error.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/plugin-paginate-rest.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/openapi-types.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/graphql.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/endpoint.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/core.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@octokit/auth-token.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/storage-common.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/storage-blob.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/core-xml.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/core-rest-pipeline.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/core-http-compat.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/core-client.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@azure/abort-controller.dep.yml | Add licensed metadata for dependency |
| .licenses/npm/@actions/io.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/http-client-4.0.1.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/glob-0.7.0.dep.yml | Correct/update licensed metadata entry |
| .licenses/npm/@actions/glob-0.6.1.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/github.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/exec.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/core.dep.yml | Update licensed metadata for new version |
| .licenses/npm/@actions/cache.dep.yml | Update licensed metadata for new version |
| .licensed.yml | Allow/review new licenses introduced by bumps |
| .eslintrc.js | Remove legacy ESLint config |
| .eslintignore | Remove legacy ESLint ignore file |
| tests/setup-dotnet.test.ts | Convert tests to ESM module mocking/imports |
| tests/latest-version.test.ts | Convert tests to ESM module mocking/imports |
| tests/installer.test.ts | Convert tests to ESM module mocking/imports |
| tests/installation-scripts.test.ts | Fix __dirname usage for ESM tests |
| tests/csc.test.ts | Update JSON import + TS indexing workaround |
| tests/cache-utils.test.ts | Convert tests to ESM module mocking/imports |
| tests/cache-save.test.ts | Convert tests to ESM module mocking/imports |
| tests/cache-restore.test.ts | Convert tests to ESM module mocking/imports |
| tests/authutil.test.ts | Fix __dirname usage + ESM import specifiers |
| tests/snapshots/authutil.test.ts.snap | Update snapshot header text |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
716782d to
876a438
Compare
|
This should fix #731 |
5 tasks
|
https://github.com/actions/setup-dotnet/actions/runs/28232146400/job/83638225574#step:9:1 Reports 18 moderate severity vulns so would be good to fix those as well. |
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:
Convert to ESM, update imports/tests/configs for ESM, and bump dependencies.
Related issue:
Add link to the related issue.
Check list: