diff --git a/.github/workflows/deploy-rc.yml b/.github/workflows/deploy-rc.yml index 6c7045b9..dfd40b3a 100644 --- a/.github/workflows/deploy-rc.yml +++ b/.github/workflows/deploy-rc.yml @@ -14,8 +14,8 @@ jobs: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: - version: 8 - - run: pnpm install + version: 9 + - run: pnpm i --frozen-lockfile - run: pnpm package - name: deploy uses: s0/git-publish-subdir-action@develop diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8a2d8bb..3fc6cd84 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,8 +14,8 @@ jobs: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: - version: 8 - - run: pnpm install + version: 9 + - run: pnpm i --frozen-lockfile - run: pnpm package - name: deploy uses: s0/git-publish-subdir-action@develop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76543c0e..02fef88b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ jobs: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: - version: 8 - - run: pnpm install + version: 9 + - run: pnpm i --frozen-lockfile - run: pnpm package - uses: ./dist with: diff --git a/.github/workflows/test_with_target_hash.yml b/.github/workflows/test_with_target_hash.yml index ffe0d2a9..a08738ad 100644 --- a/.github/workflows/test_with_target_hash.yml +++ b/.github/workflows/test_with_target_hash.yml @@ -9,8 +9,8 @@ jobs: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: - version: 8 - - run: pnpm install + version: 9 + - run: pnpm i --frozen-lockfile - run: pnpm package - uses: actions/github-script@v5 id: target diff --git a/package.json b/package.json index 93540c09..a3abf33e 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "private": true, "description": "github actions for reg", "main": "lib/main.js", + "type": "module", "scripts": { "build": "tsc", - "package:cli": "ncc build node_modules/reg-cli/dist/diff.js -o dist/lib && mv dist/lib/index.js dist/lib/diff.js", - "package:resources": "cp node_modules/reg-cli/report dist -r && cp node_modules/reg-cli/template dist -r", - "package": "npm run build && npm run package:cli && npm run package:resources && ncc build --source-map --license licenses.txt -o dist/lib" + "package:entry": "ncc build node_modules/reg-cli/dist/entry.mjs -o dist/lib && mv dist/lib/index.mjs dist/lib/entry.mjs", + "package:worker": "ncc build node_modules/reg-cli/dist/worker.mjs -o dist/lib && mv dist/lib/index.mjs dist/lib/worker.mjs", + "package": "npm run build && npm run package:entry && npm run package:worker && ncc build --source-map --license licenses.txt -o dist/lib" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 34babed2..bdcc1209 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, - "module": "NodeNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ @@ -38,7 +38,7 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - "moduleResolution": "NodeNext", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */