Skip to content
Closed
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
9 changes: 2 additions & 7 deletions .babelrc-test-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
*/

module.exports = {
"extends": "./.babelrc.js",
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-syntax-dynamic-import",
"dynamic-import-node"
],
extends: './.babelrc.js',
plugins: ['dynamic-import-node'],
};
43 changes: 19 additions & 24 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,31 @@ module.exports = {
// We need to preserve comments as they are used by webpack for
// naming chunks during code-splitting. The compression step during
// bundling will remove them later.
"comments": true,
comments: true,

"presets": [
["@babel/env", {
presets: [
['@babel/env', {
// `targets` property set via `.browserslistrc`
"useBuiltIns": process.env.NO_COREJS_POLYFILL ? false : "usage",
"corejs": 3,
"modules": process.env.BABEL_MODULES ? process.env.BABEL_MODULES === 'false' ? false : process.env.BABEL_MODULES : "commonjs" // babel's default is commonjs
useBuiltIns: process.env.NO_COREJS_POLYFILL ? false : 'usage',
corejs: process.env.NO_COREJS_POLYFILL ? undefined : 3,
modules: process.env.BABEL_MODULES ? process.env.BABEL_MODULES === 'false' ? false : process.env.BABEL_MODULES : 'commonjs' // babel's default is commonjs
}],
["@babel/typescript", { isTSX: true, allExtensions: true }],
"@babel/react"
['@babel/preset-typescript', { isTSX: true, allExtensions: true }],
'@babel/preset-react',
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"pegjs-inline-precompile",
"./scripts/babel/proptypes-from-ts-props",
"./scripts/babel/variables-from-scss",
"add-module-exports",
// stage 3
"@babel/proposal-object-rest-spread",
// stage 2
"@babel/proposal-class-properties",
plugins: [
'pegjs-inline-precompile',
'./scripts/babel/proptypes-from-ts-props',
'./scripts/babel/variables-from-scss',
'add-module-exports',
[
"inline-react-svg",
'inline-react-svg',
{
"ignorePattern": "images/*",
"svgo": {
"plugins": [
{ "cleanupIDs": false },
{ "removeViewBox": false }
ignorePattern: 'images/*',
svgo: {
plugins: [
{ cleanupIDs: false },
{ removeViewBox: false }
]
}
}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- Update caniuse database ([#1046](https://github.com/opensearch-project/oui/pull/1046))
- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879))
- Clean up `react-datepicker` package to remove unnecessary directories and files([#1067](https://github.com/opensearch-project/oui/pull/1067))
- Update Babel related packages ([#1098](https://github.com/opensearch-project/oui/pull/1098))

### 🪛 Refactoring

Expand Down
8 changes: 4 additions & 4 deletions i18ntokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -2653,12 +2653,12 @@
"start": {
"line": 143,
"column": 4,
"index": 4700
"index": 4717
},
"end": {
"line": 148,
"column": 44,
"index": 4885
"index": 4902
}
},
"filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx"
Expand All @@ -2671,12 +2671,12 @@
"start": {
"line": 143,
"column": 4,
"index": 4700
"index": 4717
},
"end": {
"line": 148,
"column": 44,
"index": 4885
"index": 4902
}
},
"filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx"
Expand Down
31 changes: 9 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,8 @@
},
"resolutions": {
"**/semver": "^7.5.3",
"@babel/cli/**/ansi-regex": "^5.0.1",
"@babel/cli/**/minimist": "^1.2.6",
"@babel/cli/chokidar/glob-parent": "^6.0.1",
"@elastic/charts/**/d3-color": "^3.1.0",
"@types/jest/**/ansi-regex": "^5.0.1",
"babel-plugin-add-module-exports/chokidar/glob-parent": "^6.0.1",
"babel-plugin-inline-react-svg/**/ansi-regex": "^5.0.1",
"babel-plugin-inline-react-svg/svgo/js-yaml": "^3.13.1",
"babel-template/**/ansi-regex": "^5.0.1",
"codesandbox/**/ansi-regex": "^5.0.1",
"codesandbox/**/got": "^11.8.5",
"codesandbox/axios": "^0.22.0",
Expand Down Expand Up @@ -133,16 +126,12 @@
},
"devDependencies": {
"@axe-core/puppeteer": "4.6.1",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.12.1",
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.2",
"@babel/template": "^7.22.15",
"@elastic/charts": "^30.2.0",
"@elastic/eslint-config-kibana": "^0.15.0",
"@faker-js/faker": "^8.0.1",
Expand All @@ -163,15 +152,13 @@
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"autoprefixer": "^9.8.6",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Couldn't change this to @babel/eslint-parser because that package won't work with our version of ESLint

"babel-jest": "^24.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-loader": "^8.2.5",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-inline-react-svg": "^1.1.1",
"babel-plugin-inline-react-svg": "^2.0.2",
"babel-plugin-pegjs-inline-precompile": "^0.1.1",
"babel-template": "^6.26.0",
"cache-loader": "^4.1.0",
"chalk": "^4.1.2",
"chokidar": "^3.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@babel/core": "^7.6.0",
"babel-eslint": "^10.0.3",
"babel-eslint": "^10.1.0",
"eslint": "^6.4.0"
}
}
Loading