Skip to content

Commit 2172959

Browse files
committed
chore: bump to node20
1 parent bfa6cfe commit 2172959

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [14.x, 16.x, 18.x]
13+
node-version: [18.x, 20.x]
1414
steps:
1515
- uses: actions/checkout@v3
1616
- name: Use Node.js ${{ matrix.node-version }}
1717
uses: actions/setup-node@v3
1818
with:
1919
node-version: ${{ matrix.node-version }}
2020
cache: npm
21-
- name: Use NPM 8
22-
run: npm i -g npm@8
2321
- run: npm ci
2422
- name: types
2523
run: npm run check:types
@@ -47,7 +45,7 @@ jobs:
4745
- name: Use Node.js lts
4846
uses: actions/setup-node@v3
4947
with:
50-
node-version: lts/*
48+
node-version: 20.x
5149
cache: npm
5250
- run: npm ci
5351
- name: test

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
- name: Use Node.js lts
2828
uses: actions/setup-node@v3
2929
with:
30-
node-version: lts/*
30+
node-version: 20.x
31+
cache: npm
3132
registry-url: https://registry.npmjs.org
3233
- run: npm ci
3334
- name: types

esbuild.config.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { readFile } from "fs/promises";
44
import path from "path";
55
import { fileURLToPath } from "url";
66

7-
const nodeTarget = "node16";
8-
97
const __dirname = path.dirname(fileURLToPath(import.meta.url));
108
const packageJsonPath = path.resolve(__dirname, "package.json");
119

@@ -24,7 +22,7 @@ async function bundle(externalDeps, format, outDir) {
2422
format: format,
2523
external: externalDeps,
2624
platform: "node",
27-
target: nodeTarget,
25+
target: "node18",
2826
treeShaking: true,
2927
});
3028
}
@@ -34,8 +32,8 @@ async function bundle(externalDeps, format, outDir) {
3432
const startTime = Date.now();
3533
console.info(
3634
chalk.bold(
37-
`🚀 ${chalk.blueBright("rollup-plugin-conditional-exec")} Build\n`
38-
)
35+
`🚀 ${chalk.blueBright("rollup-plugin-conditional-exec")} Build\n`,
36+
),
3937
);
4038

4139
const externalDeps = await getExternals();
@@ -51,14 +49,14 @@ async function bundle(externalDeps, format, outDir) {
5149
console.info(`📝 Bundle Analysis:${analysis}`);
5250

5351
console.info(
54-
chalk.bold(chalk.greenBright(`✔ Bundling ${format} completed!\n`))
52+
chalk.bold(chalk.greenBright(`✔ Bundling ${format} completed!\n`)),
5553
);
5654
}
5755

5856
console.info(
5957
`${chalk.bold.green("✔ Bundled package successfully!")} (${
6058
Date.now() - startTime
61-
}ms)`
59+
}ms)`,
6260
);
6361
} catch (error) {
6462
console.error(`🧨 ${chalk.red.bold("Failed:")} ${error.message}`);

0 commit comments

Comments
 (0)