Skip to content

Commit

Permalink
feat: require nodejs 16 or above
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

require nodejs 16 or above
  • Loading branch information
egoist committed Jun 16, 2023
1 parent e2e70e8 commit 45832d9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [14.x, 16.x]
node-version: [16.x, 18.x]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@
}
},
"engines": {
"node": ">=14.18"
"node": ">=16.14"
}
}
9 changes: 3 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const normalizeOptions = async (
}

if (!options.target) {
options.target = 'node14'
options.target = 'node16'
}

return options as NormalizedOptions
Expand Down Expand Up @@ -238,12 +238,9 @@ export async function build(_options: Options) {
// .d.ts files are removed in the `dtsTask` instead
// `dtsTask` is a separate process, which might start before `mainTasks`
if (options.dts) {
extraPatterns.unshift('!**/*.d.ts');
extraPatterns.unshift('!**/*.d.ts')
}
await removeFiles(
['**/*', ...extraPatterns],
options.outDir
)
await removeFiles(['**/*', ...extraPatterns], options.outDir)
logger.info('CLI', 'Cleaning output folder')
}

Expand Down
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export type Options = {
/**
* Compile target
*
* default to `node14`
* default to `node16`
*/
target?: Target | Target[]
minify?: boolean | 'terser'
Expand Down

0 comments on commit 45832d9

Please sign in to comment.