mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-16 23:36:11 +08:00
fix: bundle as CJS to support @actions/* packages
The @actions/* packages use CJS require() for Node.js builtins, which fails with "Dynamic require of 'os' is not supported" when bundled as ESM. Switch esbuild output to CJS format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
282
dist/index.js
vendored
282
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@10.32.1",
|
||||
"scripts": {
|
||||
"build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=esm --minify --outfile=dist/index.js --loader:.json=json",
|
||||
"build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --minify --outfile=dist/index.js --loader:.json=json",
|
||||
"build": "pnpm run build:bundle",
|
||||
"start": "pnpm run build && sh ./run.sh"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user