Skip to content

Commit 193f798

Browse files
committed
Switch action build to ESM for exec v3
Move from CJS to ESM because @actions/exec v3 is ESM‑only and fails to bundle under ncc CJS output. Marking the package as ESM lets ncc emit ESM bundles that Node >=20 is able to run in GitHub Actions. Also renaming the eslint config file to .cjs as adding "type": "module" makes Node treat .js files as ESM, so ESLint can't require() .eslintrc.js unless it’s renamed to .cjs.
1 parent 5170254 commit 193f798

File tree

8 files changed

+42616
-41767
lines changed

8 files changed

+42616
-41767
lines changed
File renamed without changes.

dist/delete/index.js

Lines changed: 5387 additions & 4530 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/delete/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

dist/setup/index.js

Lines changed: 37219 additions & 37234 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "setup-miniconda",
33
"description": "GitHub action for setting up conda from default or custom installers",
4+
"type": "module",
45
"main": "lib/main.js",
56
"scripts": {
67
"build": "ncc build -o dist/setup src/setup.ts && ncc build -o dist/delete src/delete.ts",

tsconfig.eslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"include": [".eslintrc.js"]
2+
"include": [".eslintrc.cjs"]
33
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"allowSyntheticDefaultImports": true,
55
"declaration": false,
66
"esModuleInterop": true,
7-
"module": "commonjs",
8-
"moduleResolution": "node",
7+
"module": "esnext",
8+
"moduleResolution": "bundler",
99
"noEmitOnError": true,
1010
"noImplicitAny": true,
1111
"noUnusedLocals": true,

0 commit comments

Comments
 (0)