Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA-3216::upgarding node 14 to 18 #4279

Merged
merged 5 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is intended to be used with ./docker-compose.yml #
##############################################################

FROM node:14.18.1-alpine as build
FROM node:18.16.1-alpine as build
# working directory
WORKDIR /usr/src/app

Expand Down Expand Up @@ -30,7 +30,7 @@ RUN yarn install --frozen-lockfile
RUN yarn run build

# MULTI-STAGE BUILD
FROM node:14.18.1-alpine
FROM node:18.16.1-alpine
# working directory
WORKDIR /usr/src/app
# node:alpine comes with a configured user and group
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"url": "https://github.com/magento/pwa-studio/issues"
},
"scripts": {
"build": "yarn venia run build",
"build:dev": "yarn venia run build:dev",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && yarn venia run build",
"build:dev": "export NODE_OPTIONS=--openssl-legacy-provider && yarn venia run build:dev",
"clean:all": "yarn workspaces run -s clean && rimraf ./node_modules",
"clean:dist": "yarn workspaces run clean",
"coveralls": "cat ./coverage/lcov.info | coveralls",
Expand All @@ -36,17 +36,18 @@
"stage:venia": "yarn venia start",
"stats:venia": "yarn venia run build:analyze && yarn venia run stats",
"storybook:venia": "yarn workspace @magento/venia-ui run storybook",
"test": "jest",
"test:ci": "jest --no-cache --max-workers=3 --json --outputFile=test-results.json",
"test:debug": "node --inspect-brk node_modules/.bin/jest --no-cache --no-coverage --runInBand --testTimeout 86400",
"test:dev": "jest --watch",
"test": "export NODE_OPTIONS=--openssl-legacy-provider && jest",
"test:ci": "export NODE_OPTIONS=--openssl-legacy-provider && jest --no-cache --max-workers=3 --json --outputFile=test-results.json",
"test:debug": "export NODE_OPTIONS=--openssl-legacy-provider && node --inspect-brk node_modules/.bin/jest --no-cache --no-coverage --runInBand --testTimeout 86400",
"test:dev": "export NODE_OPTIONS=--openssl-legacy-provider && jest --watch",
"validate-queries": "graphql validate --keepClientFields --noStrictFragments",
"venia": "yarn workspace @magento/venia-concept",
"watch:all": "node scripts/watch-all.js",
"watch:venia": "yarn venia run watch"
},
"dependencies": {
"caniuse-lite": "~1.0.30001335"
"caniuse-lite": "~1.0.30001335",
"setimmediate": "^1.0.5"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "~7.4.4",
Expand Down Expand Up @@ -98,7 +99,7 @@
"@graphql-tools/prisma-loader": "6.3.0"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
},
"bundlesize": [
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-peregrine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"react-refresh": "~0.8.3"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ exports[`renders a BannerShimmer component with minHeight 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ exports[`on hover displays button and overlay 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -158,7 +157,6 @@ exports[`on hover displays button and overlay 2`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -346,7 +344,6 @@ exports[`renders a configured collage-left Banner component on mobile 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -540,7 +537,6 @@ exports[`renders an empty Banner component 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ exports[`renders a ButtonItem component 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -53,7 +52,6 @@ exports[`renders a ButtonItem component with all properties configured 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
global.setImmediate;
const {
buildModuleWith,
mockBuildBus,
Expand Down
2 changes: 1 addition & 1 deletion packages/peregrine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"redux-actions": "~2.6.5"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
},
"pwa-studio": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ Object.defineProperty(exports, \\"__esModule\\", {
exports.Checkbox = Checkbox;
var _react = require(\\"react\\");
const _excluded = [\\"classes\\", \\"fieldState\\", \\"id\\", \\"label\\", \\"message\\"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \\"function\\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \\"object\\" && typeof obj !== \\"function\\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \\"default\\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
function _getRequireWildcardCache(e) { if (\\"function\\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \\"object\\" != typeof e && \\"function\\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\\"default\\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const DynamicComponent$3 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/a-third/component'))));
const DynamicBlerg$2 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/another/component'))));
const DynamicBlerg$1 = (0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./path/to/dynamic/component'))));
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-buildpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"workbox-webpack-plugin": "~6.2.4"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
},
"pwa-studio": {
Expand Down
2 changes: 1 addition & 1 deletion packages/upward-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"express": "^4.16.4"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
}
}
2 changes: 1 addition & 1 deletion packages/upward-spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"tape": "~4.10.1"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
}
}
2 changes: 2 additions & 0 deletions packages/venia-concept/_buildpack/__tests__/create.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
jest.mock('child_process');
global.setImmediate;

const { execSync } = require('child_process');

const { dirname, resolve } = require('path');
Expand Down
4 changes: 2 additions & 2 deletions packages/venia-concept/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@magento/venia-drivers": "src/drivers"
},
"scripts": {
"build": "yarn run build:prod",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && yarn run build:prod",
"build:analyze": "yarn run clean && mkdir dist && webpack -p --profile --no-progress --env.mode production --json > dist/build-stats.json && webpack-bundle-analyzer dist/build-stats.json",
"build:debug": "node --inspect-brk ./node_modules/.bin/webpack --no-progress --env.mode development",
"build:dev": "yarn run clean && webpack --no-progress --env.mode development",
Expand Down Expand Up @@ -135,7 +135,7 @@
"sharp": "~0.29.3"
},
"engines": {
"node": ">=14.x",
"node": ">=18.x",
"yarn": ">=1.12.0"
},
"module": "src/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ exports[`Category Root Component error view renders when data is not present and
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
onDragStart={[Function]}
onKey={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -251,7 +250,6 @@ exports[`renders form when shouldShowNewPassword is false 1`] = `
onClick={[MockFunction]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -471,7 +469,6 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
onDragStart={[Function]}
onKey={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -564,7 +561,6 @@ exports[`renders form when shouldShowNewPassword is true 1`] = `
onDragStart={[Function]}
onKey={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ exports[`it disables the submit button while loading 1`] = `
onClick={[MockFunction onCancel]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand All @@ -108,7 +107,6 @@ exports[`it disables the submit button while loading 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -218,7 +216,6 @@ exports[`it renders correctly 1`] = `
onClick={[MockFunction onCancel]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand All @@ -244,7 +241,6 @@ exports[`it renders correctly 1`] = `
onClick={[Function]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ exports[`renders dialog with content 1`] = `
onClick={[MockFunction buttonProps.onClick]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ exports[`renders correctly when there are existing addresses 1`] = `
onClick={[MockFunction handleAddAddress]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -148,7 +147,6 @@ exports[`renders correctly when there are no existing addresses 1`] = `
onClick={[MockFunction handleAddAddress]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -272,7 +270,6 @@ exports[`renders delete confirmation on address that is being deleted 1`] = `
onClick={[MockFunction handleAddAddress]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ exports[`renders a default address 1`] = `
onClick={[MockFunction onEdit]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -166,7 +165,6 @@ exports[`renders a non-default address 1`] = `
onClick={[MockFunction onEdit]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -216,7 +214,6 @@ exports[`renders a non-default address 1`] = `
onClick={[MockFunction onDelete]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -342,7 +339,6 @@ exports[`renders an address with a middle name 1`] = `
onClick={[MockFunction onEdit]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -453,7 +449,6 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
onClick={[MockFunction onEdit]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -506,7 +501,6 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
onClick={[MockFunction onConfirmDelete]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand All @@ -532,7 +526,6 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
onClick={[MockFunction onCancelDelete]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -620,7 +613,6 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
onClick={[MockFunction onEdit]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down Expand Up @@ -673,7 +665,6 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
onClick={[MockFunction onConfirmDelete]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand All @@ -699,7 +690,6 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
onClick={[MockFunction onCancelDelete]}
onDragStart={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
Expand Down
Loading