Skip to content

Commit

Permalink
[Build] Bump Node.js target from 12 to 14 (#6229)
Browse files Browse the repository at this point in the history
* bump from 12 to 14

* update core-js snapshot
  • Loading branch information
jtoar authored Aug 18, 2022
1 parent a54f9ee commit dc6aa2d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const packageJSON = require(path.join(__dirname, 'package.json'))

// RedwoodJS targets Node.js 12.x because this is the default version
// for Netlify's functions.
const TARGETS_NODE = '12.16'
const TARGETS_NODE = '14.20'

// Run `npx browserslist "defaults, not IE 11, not IE_Mob 11"` to see a list
// of target browsers.
Expand Down
2 changes: 0 additions & 2 deletions packages/internal/src/__tests__/build_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ test('core-js polyfill list', () => {
*/
expect(list).toMatchInlineSnapshot(`
Array [
"es.math.hypot",
"es.typed-array.set",
"esnext.aggregate-error",
"esnext.array.last-index",
Expand Down Expand Up @@ -586,7 +585,6 @@ test('core-js polyfill list', () => {
"esnext.set.union",
"esnext.string.at",
"esnext.string.code-points",
"esnext.string.match-all",
"esnext.string.replace-all",
"esnext.symbol.dispose",
"esnext.symbol.observable",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/build/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const transpileApi = (files: string[], options = {}) => {
absWorkingDir: rwjsPaths.api.base,
entryPoints: files,
platform: 'node',
target: 'node12', // Netlify defaults NodeJS 12: https://answers.netlify.com/t/aws-lambda-now-supports-node-js-14/31789/3
target: 'node14',
format: 'cjs',
bundle: false,
outdir: rwjsPaths.api.dist,
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/build/babel/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
getCommonPlugins,
} from './common'

export const TARGETS_NODE = '12.16'
export const TARGETS_NODE = '14.20'
// Warning! Use the minor core-js version: "corejs: '3.6'", instead of "corejs: 3",
// because we want to include the features added in the minor version.
// https://github.com/zloirock/core-js/blob/master/README.md#babelpreset-env
Expand Down

0 comments on commit dc6aa2d

Please sign in to comment.