diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 783ff4f..6307790 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -18,8 +18,6 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: npm - - name: Use NPM 8 - run: npm i -g npm@8 - run: npm ci - name: types run: npm run check:types @@ -47,7 +45,7 @@ jobs: - name: Use Node.js lts uses: actions/setup-node@v3 with: - node-version: lts/* + node-version: 20.x cache: npm - run: npm ci - name: test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d48f86..e9f3605 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,8 @@ jobs: - name: Use Node.js lts uses: actions/setup-node@v3 with: - node-version: lts/* + node-version: 20.x + cache: npm registry-url: https://registry.npmjs.org - run: npm ci - name: types diff --git a/esbuild.config.mjs b/esbuild.config.mjs index fa15e76..1becf9b 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -4,8 +4,6 @@ import { readFile } from "fs/promises"; import path from "path"; import { fileURLToPath } from "url"; -const nodeTarget = "node16"; - const __dirname = path.dirname(fileURLToPath(import.meta.url)); const packageJsonPath = path.resolve(__dirname, "package.json"); @@ -24,7 +22,7 @@ async function bundle(externalDeps, format, outDir) { format: format, external: externalDeps, platform: "node", - target: nodeTarget, + target: "node18", treeShaking: true, }); } @@ -34,8 +32,8 @@ async function bundle(externalDeps, format, outDir) { const startTime = Date.now(); console.info( chalk.bold( - `๐Ÿš€ ${chalk.blueBright("rollup-plugin-conditional-exec")} Build\n` - ) + `๐Ÿš€ ${chalk.blueBright("rollup-plugin-conditional-exec")} Build\n`, + ), ); const externalDeps = await getExternals(); @@ -51,14 +49,14 @@ async function bundle(externalDeps, format, outDir) { console.info(`๐Ÿ“ Bundle Analysis:${analysis}`); console.info( - chalk.bold(chalk.greenBright(`โœ” Bundling ${format} completed!\n`)) + chalk.bold(chalk.greenBright(`โœ” Bundling ${format} completed!\n`)), ); } console.info( `${chalk.bold.green("โœ” Bundled package successfully!")} (${ Date.now() - startTime - }ms)` + }ms)`, ); } catch (error) { console.error(`๐Ÿงจ ${chalk.red.bold("Failed:")} ${error.message}`);