mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 05:50:31 +00:00
## Summary
- Switch bundler from `@vercel/ncc` to `rollup` with
`@rollup/plugin-commonjs`, `@rollup/plugin-node-resolve`,
`@rollup/plugin-json`, and `@rollup/plugin-typescript`
- Add `"type": "module"` to `package.json` for ESM support
- Upgrade all `@actions/*` dependencies to their latest major versions
(`@actions/core` v3, `@actions/exec` v3, `@actions/cache` v6,
`@actions/glob` v0.6, `@actions/io` v3)
- Remove old ncc artifacts (`dist/licenses.txt`,
`dist/sourcemap-register.js`)
## Why
The `@actions/toolkit` packages v3+ are ESM-only and can't be bundled by
ncc (which uses webpack with CJS `require()`). This is what's blocking
#435 (renovate `@actions/exec` v3 upgrade). The official
`actions/typescript-action` template has already migrated to rollup.
## Test plan
- [ ] CI passes (`npm run all` — format, lint, package)
- [ ] `check-dist` workflow passes (dist/index.js matches build output)
- [ ] Integration tests pass on all platforms (ubuntu, macos, windows,
alpine)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the action’s build/bundling pipeline
and module format (CJS→ESM), which can break runtime execution or
dependency resolution if the generated `dist/` output differs across
environments.
>
> **Overview**
> Migrates the GitHub Action build from `@vercel/ncc` (CommonJS) to a
Rollup-based ESM bundle, adding `rollup.config.ts` and updating
TypeScript settings to `NodeNext` to support ESM output.
>
> Updates `package.json` to `"type": "module"`, switches the packaging
script to Rollup, and upgrades `@actions/*` dependencies to their latest
major (ESM-only) versions. The checked-in `dist/` artifacts are
regenerated accordingly (including license output) and legacy
ncc-specific artifacts are removed.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
59e728e570. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
62 lines
1.7 KiB
JSON
62 lines
1.7 KiB
JSON
{
|
|
"name": "mise-action",
|
|
"description": "mise tool setup action",
|
|
"version": "4.0.1",
|
|
"author": "jdx",
|
|
"type": "module",
|
|
"private": true,
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/jdx/mise-action.git"
|
|
},
|
|
"keywords": [
|
|
"actions",
|
|
"mise",
|
|
"setup"
|
|
],
|
|
"exports": {
|
|
".": "./dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"all": "npm run format:write && npm run lint && npm run package",
|
|
"bundle": "npm run format:write && npm run package",
|
|
"format:check": "prettier --check **/*.ts",
|
|
"format:write": "prettier --write **/*.ts",
|
|
"lint": "eslint . && npm run format:check",
|
|
"package": "rimraf ./dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
"package:watch": "npm run package -- --watch",
|
|
"version": "./scripts/version.sh",
|
|
"prepare": "husky"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@actions/cache": "^4.0.0",
|
|
"@actions/core": "^3.0.0",
|
|
"@actions/exec": "^3.0.0",
|
|
"@actions/glob": "^0.6.0",
|
|
"@actions/io": "^3.0.0",
|
|
"@types/handlebars": "^4.0.40",
|
|
"handlebars": "^4.7.8"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/eslintrc": "^3.2.0",
|
|
"@eslint/js": "^10.0.0",
|
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
"@rollup/plugin-json": "^6.1.0",
|
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
"@rollup/plugin-typescript": "^12.0.0",
|
|
"@types/eslint__js": "^8.42.3",
|
|
"@types/node": "^24",
|
|
"eslint": "^10.0.0",
|
|
"globals": "^17.0.0",
|
|
"husky": "^9.1.7",
|
|
"jest": "^30",
|
|
"js-yaml": "^4.1.0",
|
|
"prettier": "^3.4.1",
|
|
"rimraf": "^6.0.0",
|
|
"rollup": "^4.0.0",
|
|
"rollup-plugin-license": "^3.7.1",
|
|
"typescript": "^5.7.2",
|
|
"typescript-eslint": "^8.16.0"
|
|
}
|
|
}
|