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 #4275

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
14,490 changes: 12,390 additions & 2,100 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"url": "https://github.com/magento/pwa-studio/issues"
},
"scripts": {
"build": "yarn venia run build",
"build": "set NODE_OPTIONS=--openssl-legacy-provider && yarn venia run build",
"build:dev": "yarn venia run build:dev",
"clean:all": "yarn workspaces run -s clean && rimraf ./node_modules",
"clean:dist": "yarn workspaces run clean",
Expand All @@ -46,7 +46,11 @@
"watch:venia": "yarn venia run watch"
},
"dependencies": {
"caniuse-lite": "~1.0.30001335"
"caniuse-lite": "~1.0.30001335",
"react-scripts": "~5.0.1",
"setimmediate": "^1.0.5",
"ts-jest": "^29.1.4",
"webpack": "^5.91.0"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "~7.4.4",
Expand Down Expand Up @@ -98,7 +102,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 @@ -13,6 +13,10 @@ const sortByFilename = (a, b) =>
(b._talonModule.file > a._talonModule.file && -1) ||
0;

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const serializeTransforms = interceptorSet => {
return [...interceptorSet.allModules]
.sort(sortByFilename)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import "setimmediate";
global.setImmediate;

const {
buildModuleWith,
mockBuildBus,
mockTargetProvider
} = require('@magento/pwa-buildpack');

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const declare = require('../peregrine-declare');
const intercept = require('../peregrine-intercept');
const targetSerializer = require('../JestPeregrineTargetSerializer');
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 @@ -10,6 +10,10 @@ const devcert = require('devcert');
const { configureHost } = require('../');
const execa = require('execa');

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const fakeCertPair = {
key: Buffer.from('fakeKey'),
cert: Buffer.from('fakeCert')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'setimmediate';
jest.mock('../../util/klaw-bound-fs');
const walk = require('../../util/klaw-bound-fs');
const createProject = require('../createProject');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const webpack = require('webpack');
const LocalizationPlugin = require('../LocalizationPlugin');
const VirtualModulesPlugin = require('webpack-virtual-modules');

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const virtualModules = new VirtualModulesPlugin();

const singleLocaleMultipleModules = join(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const basic1PageProjectDir = join(
'__fixtures__/basic-project-1-page'
);

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const compile = config =>
new Promise((resolve, reject) => {
config.mode = 'production';
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"
}
}
4 changes: 4 additions & 0 deletions packages/venia-concept/_buildpack/__tests__/create.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import "setimmediate";
global.setImmediate;

jest.mock('child_process');
const { execSync } = require('child_process');

Expand Down Expand Up @@ -102,6 +105,7 @@ test('copies files and writes new file structure, ignoring ignores', async () =>
});

test('outputs custom package.json', async () => {
global.setImmediate;
const fs = mockFs({
'/repo/packages/me/package.json': JSON.stringify({
browser: './browser.lol',
Expand Down
2 changes: 1 addition & 1 deletion packages/venia-concept/package.json
Original file line number Diff line number Diff line change
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 @@ -9,6 +9,10 @@ const declare = require('../venia-ui-declare');
const intercept = require('../venia-ui-intercept');
const { DefinePlugin } = require('webpack');

const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

const thisDep = {
name: '@magento/venia-ui',
declare,
Expand Down
Loading