Skip to content

Commit

Permalink
chore: bump to node20
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- committed Sep 5, 2023
1 parent bfa6cfe commit 2172959
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ 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 }}
uses: actions/setup-node@v3
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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -24,7 +22,7 @@ async function bundle(externalDeps, format, outDir) {
format: format,
external: externalDeps,
platform: "node",
target: nodeTarget,
target: "node18",
treeShaking: true,
});
}
Expand All @@ -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();
Expand All @@ -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}`);
Expand Down

0 comments on commit 2172959

Please sign in to comment.