Skip to content

Commit 3c1d215

Browse files
authoredOct 30, 2023
feat: babel-plugin-react-intl to babel-plugin-formatjs migration (#404)
* feat: babel-plugin-react-intl to babel-plugin-formatjs migration * fix: upgraded frontend-build to fix security issue * fix: upgraded frontend-build to fix security issue * fix: upgraded frontend build again * refactor: upgraded to latest frontend-build and resolved vulnerabilities
1 parent 48b22ea commit 3c1d215

File tree

4 files changed

+266
-169
lines changed

4 files changed

+266
-169
lines changed
 

‎Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ i18n = ./src/i18n
66
transifex_input = $(i18n)/transifex_input.json
77

88
# This directory must match .babelrc .
9-
transifex_temp = ./temp/babel-plugin-react-intl
9+
transifex_temp = ./temp/babel-plugin-formatjs
1010

1111
build:
1212
rm -rf ./dist
@@ -17,7 +17,7 @@ build:
1717
@rm -rf dist/__mocks__
1818

1919
requirements:
20-
npm install
20+
npm ci
2121

2222
i18n.extract:
2323
# Pulling display strings from .jsx files into .json files...

‎package-lock.json

+260-164
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"scripts": {
1010
"build": "make build",
11-
"i18n_extract": "BABEL_ENV=i18n fedx-scripts babel src --quiet > /dev/null",
11+
"i18n_extract": "fedx-scripts formatjs extract",
1212
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
1313
"snapshot": "fedx-scripts jest --updateSnapshot",
1414
"start": "fedx-scripts webpack-dev-server --progress",
@@ -35,7 +35,7 @@
3535
"devDependencies": {
3636
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
3737
"@edx/browserslist-config": "^1.1.1",
38-
"@edx/frontend-build": "12.9.17",
38+
"@edx/frontend-build": "13.0.3",
3939
"@edx/frontend-platform": "6.0.2",
4040
"@edx/reactifex": "^2.1.1",
4141
"@testing-library/dom": "9.3.3",

‎src/Menu/Menu.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ MenuTrigger.defaultProps = {
1414
tag: 'div',
1515
className: null,
1616
};
17-
const MenuTriggerType = <MenuTrigger />.type;
17+
const MenuTriggerComp = <MenuTrigger />;
18+
const MenuTriggerType = MenuTriggerComp.type;
1819

1920
const MenuContent = ({ tag, className, ...attributes }) => React.createElement(tag, {
2021
className: ['menu-content', className].join(' '),

0 commit comments

Comments
 (0)
Please sign in to comment.