Skip to content

Migrate to ESM and upgrade dependencies#752

Open
priyagupta108 wants to merge 3 commits into
actions:mainfrom
priyagupta108:esm-and-dependency-upgrades
Open

Migrate to ESM and upgrade dependencies#752
priyagupta108 wants to merge 3 commits into
actions:mainfrom
priyagupta108:esm-and-dependency-upgrades

Conversation

@priyagupta108

Copy link
Copy Markdown
Contributor

Description:
Convert to ESM, update imports/tests/configs for ESM, and bump dependencies.

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@priyagupta108 priyagupta108 requested a review from a team as a code owner June 26, 2026 07:21
Copilot AI review requested due to automatic review settings June 26, 2026 07:21
@priyagupta108 priyagupta108 self-assigned this Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NodeNext and update internal imports / __dirname usage 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 licensed metadata 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.

Comment thread package.json
Comment thread src/installer.ts Outdated
@priyagupta108 priyagupta108 force-pushed the esm-and-dependency-upgrades branch from 716782d to 876a438 Compare June 26, 2026 07:42
@Frulfump

Copy link
Copy Markdown

This should fix #731
So maybe worth to link with a "Fixes ..." comment?

@Frulfump

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants