Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 7015516

Browse files
committed
fix: use cjs instead esm
1 parent 6a671d2 commit 7015516

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

Diff for: dist/index.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "setup-rusty-toolchain",
33
"description": "Automates the installation of the complete Rust toolchain, empowering you to effortlessly build, test, and deploy Rust projects. Simplify your development workflow and start coding in Rust seamlessly.",
44
"version": "1.0.0",
5-
"type": "module",
65
"main": "dist/index.js",
76
"types": "dist/index.d.ts",
87
"private": false,

Diff for: src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { download } from "./rustup";
22

33
// Download rustup
4-
await download();
4+
(async () => {
5+
await download();
6+
})();

Diff for: tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
// Language and Environment
3636
"emitDecoratorMetadata": true,
3737
"experimentalDecorators": true,
38+
"lib": ["ESNext"],
3839
"target": "ESNext",
3940
"useDefineForClassFields": true
4041
},

Diff for: tsup.config.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from "tsup";
2+
import packageJson from "./package.json" assert { type: "json" };
23

34
export function createTsupConfig({
45
entry = ["src/index.ts"],
@@ -37,15 +38,11 @@ export function createTsupConfig({
3738
}
3839

3940
export default createTsupConfig({
40-
noExternal: [
41-
"@actions/core",
42-
"@actions/exec",
43-
"@actions/tool-cache",
44-
"@actions/cache",
45-
],
41+
noExternal: Object.keys(packageJson.dependencies),
4642
skipNodeModulesBundle: false,
4743
minify: true,
4844
dts: false,
4945
sourcemap: false,
46+
format: ["cjs"],
5047
platform: "node",
5148
});

0 commit comments

Comments
 (0)