Skip to content

Commit

Permalink
chore: More Node 18 bumps (#36640)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Sep 20, 2022
1 parent 9e3f160 commit 5b3b565
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/gatsby-cli/src/__tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const setup = (version?: string): ReturnType<typeof getCLI> => {
}

describe(`error handling`, () => {
// TODO(v5): Update test to handle Node 18
it(`panics on Node < 14.15.0`, () => {
;[`6.0.0`, `8.0.0`, `12.13.0`, `13.0.0`].forEach(version => {
const { reporter } = setup(version)
Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ if (os.platform() === `win32`) {
// Check if update is available
updateNotifier({ pkg }).notify({ isGlobal: true })

const MIN_NODE_VERSION = `14.15.0`
// @ts-ignore - TODO: Remove _CFLAGS_ again
const MIN_NODE_VERSION = _CFLAGS_.GATSBY_MAJOR === `5` ? `18.0.0` : `14.15.0`
// const NEXT_MIN_NODE_VERSION = `10.13.0`

const { version } = process
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/parcel/compile-gatsby-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function constructParcel(siteRoot: string, cache?: Cache): Parcel {
includeNodeModules: false,
sourceMap: false,
engines: {
node: `>= 14.15.0`,
node: _CFLAGS_.GATSBY_MAJOR === `5` ? `>= 18.0.0` : `>= 14.15.0`,
},
distDir: `${siteRoot}/${COMPILED_CACHE_DIR}`,
},
Expand Down

0 comments on commit 5b3b565

Please sign in to comment.