fix: upgrade @actions/* and devDependencies to ESM-compatible latest versions#557
Merged
Conversation
- Update @actions/core, exec, http-client, io, tool-cache to latest (v3/v4 are ESM-only packages) - Add "type": "module" to package.json to enable ESM - Update tsconfig.json: target ES2022, module ESNext, moduleResolution bundler - Replace __dirname with import.meta.dirname in test file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update @biomejs/biome 1.7 → 2.4, @types/node 18 → 25, @vercel/ncc 0.38.0 → 0.38.4, typescript 5.2 → 6.0, vitest 1.6 → 4.1 - Migrate biome.json: files.ignore → files.includes with negation patterns (Biome 2 API change) - Fix lint:fix script: --apply → --write (Biome 2 API change) - Fix noUnusedPrivateClassMembers: rename WindowsInstaller.platform to _platform (kept for future use) - Fix import order in src files (auto-fixed by Biome) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The
@actions/core,@actions/exec,@actions/http-client,@actions/io, and@actions/tool-cachepackages released major versions (v3/v4) that are ESM-only, dropping CommonJS support. Continuing to use the old versions would leave the action on unmaintained releases that no longer receive security patches or new features.To adopt these packages, the project needed to move from CommonJS to ESM. This required adding
"type": "module"topackage.jsonand updating the TypeScript configuration to target ES2022 withmodule: ESNextandmoduleResolution: bundler, which is the correct mode for bundler-based builds usingncc. The test file was also updated to replace the CommonJS-only__dirnameglobal withimport.meta.dirname, available in Node.js 21 and later.All devDependencies were updated to their latest versions at the same time. Biome 2 introduced a breaking change in its configuration schema, renaming
files.ignoretofiles.includeswith negation-prefixed patterns, and renaming the--applyCLI flag to--write. Both were updated. Biome 2 also introduced a new rule that flags unused private class members; the unusedplatformfield inWindowsInstallerwas renamed to_platformto retain the value for potential future use while satisfying the linter.