This reverts commit dd0cb0f4fa
.
This commit is contained in:
Родитель
648b560935
Коммит
5b2cb68064
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"useBuiltIns": "entry",
|
||||
"corejs": "3"
|
||||
}
|
||||
],
|
||||
"@babel/preset-flow",
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-class-properties"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
"dynamic-import-node"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
module.exports = {
|
||||
// https://babeljs.io/docs/en/assumptions
|
||||
'assumptions': {
|
||||
'setPublicClassFields': true,
|
||||
},
|
||||
'presets': [
|
||||
[
|
||||
// https://babeljs.io/docs/en/babel-preset-env
|
||||
'@babel/preset-env',
|
||||
{
|
||||
// Allow `@babel/preset-env` to import polyfills from core-js as needed.
|
||||
'useBuiltIns': 'usage',
|
||||
// Help `@babel/preset-env` make use of the correct core-js polyfills.
|
||||
'corejs': '3.23',
|
||||
// Perform transforms closest to targets defined in `.browserslistrc`.
|
||||
'bugfixes': true,
|
||||
},
|
||||
],
|
||||
'@babel/preset-flow',
|
||||
// https://babeljs.io/docs/en/babel-preset-react/
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
// When spreading props, use inline object with spread elements directly
|
||||
// instead of Babel's extend helper or Object.assign.
|
||||
'useBuiltIns': true,
|
||||
// FIXME: Upgrade to React 17+
|
||||
// Cannot use React 17 new, lighter, faster JSX Transform
|
||||
// https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
|
||||
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation
|
||||
// 'runtime': 'automatic',
|
||||
}
|
||||
]
|
||||
],
|
||||
'plugins': [],
|
||||
'env': {
|
||||
'test': {
|
||||
'plugins': ['dynamic-import-node'],
|
||||
},
|
||||
},
|
||||
};
|
23
package.json
23
package.json
|
@ -180,7 +180,7 @@
|
|||
"compression": "1.7.4",
|
||||
"config": "3.3.7",
|
||||
"connected-react-router": "5.0.1",
|
||||
"core-js": "3.23.1",
|
||||
"core-js": "3.22.5",
|
||||
"deep-eql": "4.0.1",
|
||||
"deepcopy": "2.1.0",
|
||||
"dompurify": "2.3.8",
|
||||
|
@ -210,6 +210,7 @@
|
|||
"prop-types": "15.8.1",
|
||||
"qhistory": "1.1.0",
|
||||
"qs": "6.10.3",
|
||||
"raf": "3.4.1",
|
||||
"rc-tooltip": "5.1.1",
|
||||
"react": "16.14.0",
|
||||
"react-autosuggest": "10.1.0",
|
||||
|
@ -229,32 +230,38 @@
|
|||
"redux": "4.1.2",
|
||||
"redux-logger": "3.0.6",
|
||||
"redux-saga": "0.16.2",
|
||||
"regenerator-runtime": "0.13.9",
|
||||
"response-time": "2.3.2",
|
||||
"schema-utils": "4.0.0",
|
||||
"serialize-javascript": "6.0.0",
|
||||
"touch": "3.1.0",
|
||||
"typescript": "4.6.3",
|
||||
"ua-parser-js": "1.0.2",
|
||||
"universal-base64url": "1.1.0",
|
||||
"universal-cookie-express": "4.0.3",
|
||||
"url": "0.11.0",
|
||||
"url-loader": "4.1.1",
|
||||
"uuid": "8.3.2",
|
||||
"web-vitals": "2.1.4",
|
||||
"webpack-isomorphic-tools": "4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.18.5",
|
||||
"@babel/eslint-parser": "7.18.2",
|
||||
"@babel/preset-env": "7.18.2",
|
||||
"@babel/preset-flow": "7.17.12",
|
||||
"@babel/preset-react": "7.17.12",
|
||||
"@babel/register": "7.17.7",
|
||||
"@babel/core": "^7.13.8",
|
||||
"@babel/eslint-parser": "^7.15.8",
|
||||
"@babel/plugin-proposal-class-properties": "^7.1.0",
|
||||
"@babel/preset-env": "^7.13.8",
|
||||
"@babel/preset-flow": "^7.12.13",
|
||||
"@babel/preset-react": "^7.12.13",
|
||||
"@babel/register": "^7.13.8",
|
||||
"@emotion/core": "^11.0.0",
|
||||
"@testing-library/dom": "^8.11.3",
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"autoprefixer": "^10.2.4",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-gettext-extractor": "^4.1.3",
|
||||
"babel-jest": "^27.5.1",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-dynamic-import-node": "^2.2.0",
|
||||
"bundle-loader": "^0.5.5",
|
||||
|
@ -297,6 +304,7 @@
|
|||
"node-fetch": "^3.1.1",
|
||||
"node-sass": "^7.0.1",
|
||||
"nodemon": "^2.0.15",
|
||||
"object.values": "^1.0.4",
|
||||
"pino-devtools": "^2.1.0",
|
||||
"pino-pretty": "^7.0.0",
|
||||
"po2json": "mikeedwards/po2json#51e2310485bbe35e9e57f2eee238185459ca0eab",
|
||||
|
@ -321,7 +329,6 @@
|
|||
"terser-webpack-plugin": "^4.0.0",
|
||||
"tmp": "^0.2.0",
|
||||
"tosource": "^1.0.0",
|
||||
"url-loader": "4.1.1",
|
||||
"webpack": "^5.20.0",
|
||||
"webpack-cli": "^4.0.0",
|
||||
"webpack-dev-middleware": "^5.0.0",
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
import 'core-js/stable';
|
||||
import 'regenerator-runtime/runtime';
|
||||
import 'raf/polyfill';
|
||||
import 'isomorphic-fetch';
|
||||
import 'focus-visible';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import sinon from 'sinon';
|
||||
import config from 'config';
|
||||
import areIntlLocalesSupported from 'intl-locales-supported';
|
||||
import values from 'object.values';
|
||||
import Enzyme from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
|
@ -17,6 +18,10 @@ import 'amo/polyfill';
|
|||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
if (!Object.values) {
|
||||
values.shim();
|
||||
}
|
||||
|
||||
class LocalStorageMock {
|
||||
constructor() {
|
||||
this.store = {};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* eslint-disable max-len, no-console, import/no-extraneous-dependencies */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import config from 'config';
|
||||
|
@ -16,13 +17,14 @@ const webpackIsomorphicToolsPlugin = new WebpackIsomorphicToolsPlugin(
|
|||
webpackIsomorphicToolsConfig,
|
||||
);
|
||||
|
||||
const babelConfig = require('./babel.config.js');
|
||||
const babelrc = fs.readFileSync('./.babelrc');
|
||||
const babelrcObject = JSON.parse(babelrc);
|
||||
|
||||
const babelPlugins = babelConfig.plugins || [];
|
||||
const babelPlugins = babelrcObject.plugins || [];
|
||||
const babelDevPlugins = ['react-hot-loader/babel'];
|
||||
|
||||
export const babelOptions = {
|
||||
...babelConfig,
|
||||
...babelrcObject,
|
||||
plugins: localDevelopment
|
||||
? babelPlugins.concat(babelDevPlugins)
|
||||
: babelPlugins,
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-console, import/no-extraneous-dependencies */
|
||||
import fs from 'fs';
|
||||
|
||||
import chalk from 'chalk';
|
||||
import webpack from 'webpack';
|
||||
|
||||
|
@ -11,8 +13,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
const babelConfig = require('./babel.config.js');
|
||||
const babelPlugins = babelConfig.plugins || [];
|
||||
const babelrc = fs.readFileSync('./.babelrc');
|
||||
const babelrcObject = JSON.parse(babelrc);
|
||||
const babelPlugins = babelrcObject.plugins || [];
|
||||
|
||||
// Create UTC creation date in the correct format.
|
||||
const potCreationDate = new Date()
|
||||
|
@ -54,7 +57,7 @@ const babelL10nPlugins = [
|
|||
];
|
||||
|
||||
const babelOptions = {
|
||||
...babelConfig,
|
||||
...babelrcObject,
|
||||
plugins: babelPlugins.concat(babelL10nPlugins),
|
||||
};
|
||||
|
||||
|
|
1438
yarn.lock
1438
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче