Skip to content

Commit

Permalink
build(node): require >=16.20.0 <20.6.0 || >20.6.0
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Sep 9, 2023
1 parent 53f2198 commit c7be6f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { defineBuildConfig, type Config } from '#src'
import pathe from '@flex-development/pathe'
import { at } from '@flex-development/tutils'
import pkg from './package.json' assert { type: 'json' }
import tsconfig from './tsconfig.build.json' assert { type: 'json' }

Expand Down Expand Up @@ -64,7 +65,7 @@ const config: Config = defineBuildConfig({
minifySyntax: true,
sourceRoot: 'file' + pathe.delimiter + pathe.sep.repeat(2),
target: [
pkg.engines.node.replace(/^\D+/, 'node'),
'node' + at(/([\d.]+)/.exec(pkg.engines.node), 0, ''),
tsconfig.compilerOptions.target
],
tsconfig: 'tsconfig.build.json'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"esbuild": "0.19.2"
},
"engines": {
"node": ">=16.20.0",
"node": ">=16.20.0 <20.6.0 || >20.6.0",
"yarn": "4.0.0-rc.50"
},
"packageManager": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/internal/__tests__/create-context.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('unit:internal/createContext', () => {
ignore: ['cli/**'],
sourcemap: true,
sourcesContent: false,
target: pkg.engines.node.replace(/^\D+/, 'node'),
target: 'node16.20.0',
tsconfig: 'tsconfig.build.json'
}

Expand Down

0 comments on commit c7be6f0

Please sign in to comment.