Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 application-templates/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@commercetools-uikit/spacings": "^11.2.0",
"@commercetools-uikit/text": "^11.2.0",
"prop-types": "15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "5.15.7",
"react-redux": "7.2.3",
"react-router-dom": "5.2.0",
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"prepare": "husky install",
"postinstall": "manypkg check && preconstruct dev && yarn compile-css-modules && yarn --cwd website && yarn --cwd website-components-playground",
"postinstall": "manypkg check && preconstruct dev && yarn compile-css-modules",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

"auth": "npm_config_registry=https://registry.npmjs.org npm whoami",
"clean": "manypkg exec rm -rf build dist test-utils/dist experimental/dist task/dist add-commands/dist",
"extract-intl": "formatjs extract --format=$(pwd)/packages/i18n/transifex-transformer.js --out-file=$(pwd)/packages/i18n/data/core.json 'packages/**/*messages.ts'",
Expand Down Expand Up @@ -65,7 +65,9 @@
"packages-backend/*",
"application-templates/*",
"playground",
"visual-testing-app"
"visual-testing-app",
"website",
"website-components-playground"
]
},
"preconstruct": {
Expand Down Expand Up @@ -127,13 +129,12 @@
"@types/jquery": "3.5.5",
"@types/node": "14.14.37",
"@types/puppeteer": "5.4.3",
"@types/react": "16.14.5",
"@types/react-dom": "16.9.12",
"@types/react": "17.0.3",
"@types/react-dom": "17.0.2",
"@types/react-redux": "7.1.16",
"@types/react-router": "5.1.13",
"@types/react-router-dom": "5.1.7",
"@types/uuid": "8.3.0",
"@types/webpack": "4.41.27",
"@types/webpack-env": "1.16.0",
"apollo-server-errors": "2.4.2",
"autoprefixer": "10.2.5",
Expand Down Expand Up @@ -178,9 +179,10 @@
"vfile-message": "2.0.4"
},
"resolutions": {
"@types/react": "16.14.5",
"@types/react-router": "5.1.13",
"graphql": "14.7.0",
"@babel/core": "7.13.10",
"@types/react": "17.0.3",
"@types/react-router": "5.1.12",
"graphql": "15.5.0",
"pretty-format": "26.6.2",
"intl-messageformat-parser": "6.4.4",
"**/intl-messageformat-parser": "6.4.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/actions-global/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
"redux-thunk": "2.3.0"
},
"devDependencies": {
"@types/react": "16.14.5",
"@types/react": "17.0.3",
"@types/react-redux": "7.1.16",
"react": "16.14.0",
"react": "17.0.2",
"react-redux": "7.2.3",
"redux": "4.0.5"
},
"peerDependencies": {
"@types/react": "16.x",
"@types/react": "17.x",
"@types/react-redux": "7.x",
"react": ">=16.8.0",
"react": ">=17.0.0",
"react-redux": "7.x",
"redux": "4.x"
}
Expand Down
16 changes: 8 additions & 8 deletions packages/application-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@
},
"devDependencies": {
"@commercetools-frontend/ui-kit": "11.3.0",
"@types/react": "16.14.5",
"@types/react-dom": "16.9.12",
"react": "16.14.0",
"react-dom": "16.14.0",
"@types/react": "17.0.3",
"@types/react-dom": "17.0.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "5.15.7"
},
"peerDependencies": {
"@commercetools-frontend/ui-kit": "11.x",
"@types/react": "16.x",
"@types/react-dom": "16.x",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"@types/react": "17.x",
"@types/react-dom": "17.x",
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"react-intl": "3.x || 4.x || 5.x"
}
}
10 changes: 5 additions & 5 deletions packages/application-shell-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
"@emotion/react": "11.1.5",
"@types/lodash": "^4.14.167",
"@types/prop-types": "^15.7.3",
"graphql": "14.7.0",
"graphql": "15.5.0",
"lodash": "4.17.21",
"moment-timezone": "^0.5.32",
"prop-types": "15.7.2"
},
"devDependencies": {
"@apollo/client": "3.3.13",
"@testing-library/react": "11.2.6",
"@types/react": "16.14.5",
"react": "16.14.0"
"@types/react": "17.0.3",
"react": "17.0.2"
},
"peerDependencies": {
"@apollo/client": "3.x",
"@types/react": "16.x",
"react": ">=16.8.0"
"@types/react": "17.x",
"react": ">=17.0.0"
},
"engines": {
"node": ">=8",
Expand Down
18 changes: 9 additions & 9 deletions packages/application-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"debounce-async": "0.0.2",
"downshift": "6.1.2",
"fuse.js": "6.4.6",
"graphql": "14.7.0",
"graphql": "15.5.0",
"history": "4.10.1",
"is-retina": "1.0.3",
"jwt-decode": "3.1.2",
Expand All @@ -97,14 +97,14 @@
"@commercetools-frontend/ui-kit": "11.3.0",
"@testing-library/react": "11.2.6",
"@types/prop-types": "^15.7.3",
"@types/react": "16.14.5",
"@types/react-dom": "16.9.12",
"@types/react": "17.0.3",
"@types/react-dom": "17.0.2",
"@types/react-redux": "7.1.16",
"@types/react-router": "5.1.13",
"@types/react-router-dom": "5.1.7",
"msw": "0.28.1",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "5.15.7",
"react-redux": "7.2.3",
"react-router-dom": "5.2.0",
Expand All @@ -116,13 +116,13 @@
"@commercetools-frontend/ui-kit": "11.x",
"@testing-library/react": "9.x || 10.x || 11.x",
"@types/prop-types": "15.x",
"@types/react": "16.x",
"@types/react-dom": "16.x",
"@types/react": "17.x",
"@types/react-dom": "17.x",
"@types/react-redux": "7.x",
"@types/react-router": "5.x",
"@types/react-router-dom": "5.x",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"react-intl": "3.x || 4.x || 5.x",
"react-redux": "7.x",
"react-router-dom": "5.x",
Expand Down
8 changes: 4 additions & 4 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
"prop-types": "15.7.2"
},
"devDependencies": {
"@types/react": "16.14.5",
"@types/react": "17.0.3",
"intl-messageformat-parser": "6.4.4",
"react": "16.14.0",
"react": "17.0.2",
"react-intl": "5.15.7"
},
"peerDependencies": {
"@types/react": "16.x",
"react": ">=16.8.0",
"@types/react": "17.x",
"react": ">=17.0.0",
"react-intl": "3.x || 4.x || 5.x"
}
}
8 changes: 4 additions & 4 deletions packages/l10n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
},
"devDependencies": {
"@testing-library/react-hooks": "5.1.1",
"@types/react": "16.14.5",
"@types/react": "17.0.3",
"chalk": "4.1.0",
"cldr": "6.0.0",
"deep-diff": "1.0.2",
"moment-timezone": "^0.5.32",
"node-fetch": "2.6.1",
"react": "16.14.0",
"react": "17.0.2",
"rimraf": "3.0.2",
"shelljs": "0.8.4"
},
"peerDependencies": {
"@types/react": "16.x",
"react": ">=16.8.0"
"@types/react": "17.x",
"react": ">=17.0.0"
}
}
15 changes: 6 additions & 9 deletions packages/mc-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@
"autoprefixer": "10.2.5",
"babel-loader": "8.2.2",
"browserslist": "4.16.3",
"clean-webpack-plugin": "3.0.0",
"core-js": "3.10.0",
"css-loader": "5.2.0",
"cssnano": "4.1.10",
"file-loader": "6.2.0",
"fs-extra": "9.1.0",
"graphql-tag": "^2.11.0",
"html-webpack-plugin": "4.5.2",
"html-webpack-plugin": "5.3.1",
"json-loader": "0.5.7",
"mini-css-extract-plugin": "1.4.0",
"moment-locales-webpack-plugin": "1.2.0",
Expand All @@ -60,7 +58,7 @@
"postcss-custom-media": "8.0.0",
"postcss-custom-properties": "11.0.0",
"postcss-import": "14.0.1",
"postcss-loader": "4.2.0",
"postcss-loader": "5.2.0",
"postcss-reporter": "7.0.2",
"postcss-safe-parser": "5.0.2",
"react-dev-utils": "11.0.4",
Expand All @@ -70,13 +68,12 @@
"shelljs": "0.8.4",
"style-loader": "2.0.0",
"svg-url-loader": "7.1.1",
"terser-webpack-plugin": "4.2.3",
"terser-webpack-plugin": "5.1.1",
"thread-loader": "3.0.1",
"url-loader": "4.1.1",
"webpack": "4.46.0",
"webpack": "5.28.0",
"webpack-bundle-analyzer": "4.4.0",
"webpack-dev-server": "3.11.2",
"webpackbar": "4.0.0"
"webpack-dev-server": "4.0.0-beta.1",
"webpackbar": "5.0.0-3"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "7.13.10",
Expand Down
4 changes: 3 additions & 1 deletion packages/mc-scripts/src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ const fs = require('fs-extra');
const webpack = require('webpack');
const chalk = require('react-dev-utils/chalk');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
// FIXME: reuse normal import after CRA supports Webpack v5.
// const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError');
const formatWebpackMessages = require('./patches/react-dev-utils/formatWebpackMessages');
const paths = require('./config/paths');
const createWebpackConfigForProduction = require('./config/create-webpack-config-for-production');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
runtimeChunk: {
name: (entrypoint) => `runtime-${entrypoint.name}`,
},
moduleIds: 'named',
},

resolve: {
Expand Down Expand Up @@ -168,9 +169,6 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
const LocalHtmlWebpackPlugin = require('../webpack-plugins/local-html-webpack-plugin');
return new LocalHtmlWebpackPlugin();
})(),
// Add module names to factory functions so they appear in browser profiler.
// https://webpack.js.org/guides/caching/
new webpack.NamedModulesPlugin(),
// Strip all locales except `en`, `de`
// (`en` is built into Moment and can't be removed).
new MomentLocalesPlugin({
Expand Down Expand Up @@ -199,8 +197,6 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
strictExportPresence: true,

rules: [
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },
// For svg icons, we want to get them transformed into React components
// when we import them.
{
Expand Down Expand Up @@ -265,7 +261,7 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
// A missing `test` is equivalent to a match.
{
test: /\.png$/,
use: [require.resolve('url-loader')],
type: 'asset/resource',
},
// "postcss" loader applies autoprefixer to our CSS
// "css" loader resolves paths in CSS and adds assets as dependencies.
Expand Down Expand Up @@ -327,7 +323,7 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
{
// For all other vendor CSS, do not use "postcss" loader.
include: /node_modules/,
loaders: [
use: [
require.resolve('style-loader'),
require.resolve('css-loader'),
],
Expand All @@ -339,6 +335,10 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
{
test: /\.mjs$/,
type: 'javascript/auto',
resolve: {
// https://webpack.js.org/configuration/module/#resolvefullyspecified
fullySpecified: false,
},
},
// Process JS with Babel.
{
Expand Down Expand Up @@ -380,6 +380,8 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
},
],
include: mergedOptions.sourceFolders.concat(vendorsToTranspile),
// Disable require.ensure as it's not a standard language feature.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

parser: { requireEnsure: false },
},
// Allow to import `*.graphql` SDL files.
{
Expand All @@ -389,19 +391,6 @@ module.exports = function createWebpackConfigForDevelopment(options = {}) {
},
],
},

// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
module: 'empty',
dgram: 'empty',
dns: 'mock',
fs: 'empty',
http2: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,
Expand Down
Loading