From 9be2cd4a912098da45804e9af6fd605ef9147c5f Mon Sep 17 00:00:00 2001 From: Leangseu Kim <83240113+leangseu-edx@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:50:55 -0400 Subject: [PATCH] feat: update packages to make publish smaller (#49) * chore: replace @edx/frontend-plugin-framework with @openedx/frontend-plugin-framework in example apps * chore: update dev and peer dependency --- .eslintrc.js | 2 +- Makefile | 2 + README.rst | 14 +- example-plugin-app/.eslintrc.js | 2 +- example-plugin-app/package-lock.json | 42 +++ example-plugin-app/src/DefaultIframe.jsx | 2 +- example-plugin-app/src/PluginIframe.jsx | 2 +- example-plugin-app/webpack.dev.config.js | 2 +- example/.eslintrc.js | 2 +- example/env.config.jsx | 2 +- example/package-lock.json | 69 ++++- example/package.json | 3 +- .../src/pluginSlots/PluginSlotWithInsert.jsx | 2 +- .../PluginSlotWithModifyWrapHide.jsx | 2 +- .../PluginSlotWithModularPlugins.jsx | 2 +- .../pluginSlots/PluginSlotWithoutDefault.jsx | 2 +- example/webpack.dev.config.js | 2 +- package-lock.json | 242 ++++-------------- package.json | 31 +-- 19 files changed, 180 insertions(+), 247 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e4e4a01f..1ea9ce65 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ const config = createConfig('eslint'); config.rules = { 'import/no-unresolved': ['error', { - ignore: ['@edx/frontend-plugin-framework/example*'], + ignore: ['@openedx/frontend-plugin-framework/example*'], }], 'import/no-extraneous-dependencies': ['error', { devDependencies: true, diff --git a/Makefile b/Makefile index 0a959ffe..fb73cf3b 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ precommit: requirements: npm ci + cd example && npm ci && cd .. + cd example-plugin-app && npm ci && cd .. i18n.extract: # Pulling display strings from .jsx files into .json files... diff --git a/README.rst b/README.rst index 1bae188e..e3abef1c 100644 --- a/README.rst +++ b/README.rst @@ -35,17 +35,13 @@ Getting Started Using the Example Apps ---------------------- -1. Run ``npm install`` in the root directory. +1. Run ``make requirements`` in the root directory. -2. In separate terminals, run ``npm install`` inside both example app directories (``/example`` and ``/example-plugin-app``). +2. Run ``npm run start`` in the root directory. -3. Run ``npm run start`` in both directories. +3. Open another terminal and run ``npm run start:example`` to start the example app. You can visit http://localhost:8080 to see the example app. -Alternatively, once the packages are installed in both apps, you can run the apps from the root directory. - -1. ``npm run start`` runs the host MFE (``example``) - -2. ``npm run start:plugins`` runs the child MFE (``example-plugin-app``) +4. Make change to the existing code, everything should be hot reloaded. Add Library Dependency ---------------------- @@ -103,7 +99,7 @@ file as well to define its plugin slots. // env.config.js - import { DIRECT_PLUGIN, IFRAME_PLUGIN, PLUGIN_OPERATIONS } from '@edx/frontend-plugin-framework'; + import { DIRECT_PLUGIN, IFRAME_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework'; // import any additional dependencies or functions to be used for each plugin operation import Sidebar from './widgets/social/Sidebar'; diff --git a/example-plugin-app/.eslintrc.js b/example-plugin-app/.eslintrc.js index fd2c78f2..947f99fa 100644 --- a/example-plugin-app/.eslintrc.js +++ b/example-plugin-app/.eslintrc.js @@ -8,7 +8,7 @@ config.rules = { packageDir: path.join(__dirname, '..'), }], 'import/no-unresolved': ['error', { - ignore: ['@edx/frontend-plugin-framework*'], + ignore: ['@openedx/frontend-plugin-framework*'], }], }; diff --git a/example-plugin-app/package-lock.json b/example-plugin-app/package-lock.json index d9f36a74..e764faf4 100644 --- a/example-plugin-app/package-lock.json +++ b/example-plugin-app/package-lock.json @@ -17,6 +17,48 @@ "regenerator-runtime": "^0.14.1" } }, + "..": { + "name": "@openedx/frontend-plugin-framework", + "version": "1.0.0-semantically-released", + "extraneous": true, + "license": "AGPL-3.0", + "dependencies": { + "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", + "@edx/frontend-component-footer": "13.0.3", + "@edx/frontend-component-header": "5.0.2", + "classnames": "^2.3.2", + "core-js": "3.36.0", + "react-redux": "7.2.9", + "redux": "4.2.1", + "regenerator-runtime": "0.14.1" + }, + "devDependencies": { + "@edx/browserslist-config": "^1.1.1", + "@edx/frontend-platform": "^7.1.3", + "@edx/reactifex": "^2.1.1", + "@openedx/frontend-build": "^13.0.28", + "@openedx/paragon": "^22.2.0", + "@testing-library/dom": "^8.20.1", + "@testing-library/jest-dom": "^6.1.4", + "@testing-library/react": "^12.1.5", + "glob": "7.2.3", + "husky": "7.0.4", + "jest": "29.7.0", + "prop-types": "^15.8.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-error-boundary": "^4.0.13", + "semantic-release": "^22.0.12" + }, + "peerDependencies": { + "@edx/frontend-platform": "^7.0.0", + "@openedx/paragon": "^21.0.0 || ^22.0.0", + "prop-types": "^15.8.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "react-error-boundary": "^4.0.11" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", diff --git a/example-plugin-app/src/DefaultIframe.jsx b/example-plugin-app/src/DefaultIframe.jsx index 01b2a0fa..2f338acd 100644 --- a/example-plugin-app/src/DefaultIframe.jsx +++ b/example-plugin-app/src/DefaultIframe.jsx @@ -1,7 +1,7 @@ /* eslint react/prop-types: off */ import React from 'react'; -import { Plugin } from '@edx/frontend-plugin-framework'; +import { Plugin } from '@openedx/frontend-plugin-framework'; function DefaultComponent() { return ( diff --git a/example-plugin-app/src/PluginIframe.jsx b/example-plugin-app/src/PluginIframe.jsx index 24d8e314..6be2d2c4 100644 --- a/example-plugin-app/src/PluginIframe.jsx +++ b/example-plugin-app/src/PluginIframe.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Plugin } from '@edx/frontend-plugin-framework'; +import { Plugin } from '@openedx/frontend-plugin-framework'; export default function PluginIframe() { return ( diff --git a/example-plugin-app/webpack.dev.config.js b/example-plugin-app/webpack.dev.config.js index 86b51ce4..0792f7f9 100644 --- a/example-plugin-app/webpack.dev.config.js +++ b/example-plugin-app/webpack.dev.config.js @@ -8,7 +8,7 @@ module.exports = createConfig('webpack-dev', { // applications. Because this example app is using code from the parent frontend-plugin-framework // library, it runs into the same issues our applications do when loading libraries from // local source, rather than from their node_modules directory. - '@edx/frontend-plugin-framework': path.resolve(__dirname, '..', 'src/plugins'), + '@openedx/frontend-plugin-framework': path.resolve(__dirname, '..', 'dist'), react: path.resolve(__dirname, 'node_modules', 'react'), 'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'), 'react-router-dom': path.resolve(__dirname, 'node_modules', 'react-router-dom'), diff --git a/example/.eslintrc.js b/example/.eslintrc.js index fd2c78f2..947f99fa 100644 --- a/example/.eslintrc.js +++ b/example/.eslintrc.js @@ -8,7 +8,7 @@ config.rules = { packageDir: path.join(__dirname, '..'), }], 'import/no-unresolved': ['error', { - ignore: ['@edx/frontend-plugin-framework*'], + ignore: ['@openedx/frontend-plugin-framework*'], }], }; diff --git a/example/env.config.jsx b/example/env.config.jsx index 05489d16..de2535e5 100644 --- a/example/env.config.jsx +++ b/example/env.config.jsx @@ -3,7 +3,7 @@ import { DIRECT_PLUGIN, IFRAME_PLUGIN, PLUGIN_OPERATIONS, -} from '@edx/frontend-plugin-framework'; +} from '@openedx/frontend-plugin-framework'; import DefaultDirectWidget from './src/components/DefaultDirectWidget'; import PluginDirect from './src/components/PluginDirect'; import ModularComponent from './src/components/ModularComponent'; diff --git a/example/package-lock.json b/example/package-lock.json index db168eb2..014e1e6d 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -13,13 +13,56 @@ "prop-types": "^15.8.1", "react": "^17.0.0", "react-dom": "^17.0.0", - "react-router-dom": "^6.22.1", + "react-router": "^6.22.3", + "react-router-dom": "^6.22.3", "regenerator-runtime": "^0.14.1" }, "devDependencies": { "@openedx/frontend-build": "^13.0.0" } }, + "..": { + "name": "@openedx/frontend-plugin-framework", + "version": "1.0.0-semantically-released", + "extraneous": true, + "license": "AGPL-3.0", + "dependencies": { + "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", + "@edx/frontend-component-footer": "13.0.3", + "@edx/frontend-component-header": "5.0.2", + "classnames": "^2.3.2", + "core-js": "3.36.0", + "react-redux": "7.2.9", + "redux": "4.2.1", + "regenerator-runtime": "0.14.1" + }, + "devDependencies": { + "@edx/browserslist-config": "^1.1.1", + "@edx/frontend-platform": "^7.1.3", + "@edx/reactifex": "^2.1.1", + "@openedx/frontend-build": "^13.0.28", + "@openedx/paragon": "^22.2.0", + "@testing-library/dom": "^8.20.1", + "@testing-library/jest-dom": "^6.1.4", + "@testing-library/react": "^12.1.5", + "glob": "7.2.3", + "husky": "7.0.4", + "jest": "29.7.0", + "prop-types": "^15.8.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-error-boundary": "^4.0.13", + "semantic-release": "^22.0.12" + }, + "peerDependencies": { + "@edx/frontend-platform": "^7.0.0", + "@openedx/paragon": "^21.0.0 || ^22.0.0", + "prop-types": "^15.8.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "react-error-boundary": "^4.0.11" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -3127,9 +3170,9 @@ "dev": true }, "node_modules/@remix-run/router": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz", - "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", + "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", "engines": { "node": ">=14.0.0" } @@ -13488,11 +13531,11 @@ } }, "node_modules/react-router": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz", - "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", + "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", "dependencies": { - "@remix-run/router": "1.15.2" + "@remix-run/router": "1.15.3" }, "engines": { "node": ">=14.0.0" @@ -13502,12 +13545,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz", - "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", + "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", "dependencies": { - "@remix-run/router": "1.15.2", - "react-router": "6.22.2" + "@remix-run/router": "1.15.3", + "react-router": "6.22.3" }, "engines": { "node": ">=14.0.0" diff --git a/example/package.json b/example/package.json index c9f07e6c..64ab198c 100644 --- a/example/package.json +++ b/example/package.json @@ -16,7 +16,8 @@ "prop-types": "^15.8.1", "react": "^17.0.0", "react-dom": "^17.0.0", - "react-router-dom": "^6.22.1", + "react-router": "^6.22.3", + "react-router-dom": "^6.22.3", "regenerator-runtime": "^0.14.1" }, "devDependencies": { diff --git a/example/src/pluginSlots/PluginSlotWithInsert.jsx b/example/src/pluginSlots/PluginSlotWithInsert.jsx index 3239a544..1006a931 100644 --- a/example/src/pluginSlots/PluginSlotWithInsert.jsx +++ b/example/src/pluginSlots/PluginSlotWithInsert.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { PluginSlot } from '@edx/frontend-plugin-framework'; +import { PluginSlot } from '@openedx/frontend-plugin-framework'; function PluginSlotWithInsert() { return ( diff --git a/example/src/pluginSlots/PluginSlotWithModifyWrapHide.jsx b/example/src/pluginSlots/PluginSlotWithModifyWrapHide.jsx index 95795d9b..cd283078 100644 --- a/example/src/pluginSlots/PluginSlotWithModifyWrapHide.jsx +++ b/example/src/pluginSlots/PluginSlotWithModifyWrapHide.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { PluginSlot } from '@edx/frontend-plugin-framework'; +import { PluginSlot } from '@openedx/frontend-plugin-framework'; import ModularComponent from '../components/ModularComponent'; diff --git a/example/src/pluginSlots/PluginSlotWithModularPlugins.jsx b/example/src/pluginSlots/PluginSlotWithModularPlugins.jsx index 37803c85..02c61de5 100644 --- a/example/src/pluginSlots/PluginSlotWithModularPlugins.jsx +++ b/example/src/pluginSlots/PluginSlotWithModularPlugins.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { PluginSlot } from '@edx/frontend-plugin-framework'; +import { PluginSlot } from '@openedx/frontend-plugin-framework'; import ModularComponent from '../components/ModularComponent'; function PluginSlotWithModularPlugins() { diff --git a/example/src/pluginSlots/PluginSlotWithoutDefault.jsx b/example/src/pluginSlots/PluginSlotWithoutDefault.jsx index b2b496d2..f075afba 100644 --- a/example/src/pluginSlots/PluginSlotWithoutDefault.jsx +++ b/example/src/pluginSlots/PluginSlotWithoutDefault.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import { PluginSlot } from '@edx/frontend-plugin-framework'; +import { PluginSlot } from '@openedx/frontend-plugin-framework'; function PluginSlotWithoutDefault() { return ( diff --git a/example/webpack.dev.config.js b/example/webpack.dev.config.js index 5b25fc71..d2cb2870 100644 --- a/example/webpack.dev.config.js +++ b/example/webpack.dev.config.js @@ -8,7 +8,7 @@ module.exports = createConfig('webpack-dev', { // applications. Because this example app is using code from the parent frontend-plugin-framework // library, it runs into the same issues our applications do when loading libraries from // local source, rather than from their node_modules directory. - '@edx/frontend-plugin-framework': path.resolve(__dirname, '..', 'src/plugins'), + '@openedx/frontend-plugin-framework': path.resolve(__dirname, '..', 'dist'), react: path.resolve(__dirname, 'node_modules', 'react'), 'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'), 'react-router-dom': path.resolve(__dirname, 'node_modules', 'react-router-dom'), diff --git a/package-lock.json b/package-lock.json index 0299485d..9a2e94df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,36 +12,37 @@ "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/frontend-component-footer": "13.0.3", "@edx/frontend-component-header": "5.0.2", - "@edx/frontend-platform": "^7.1.0", - "@fortawesome/fontawesome-svg-core": "1.2.36", - "@fortawesome/free-brands-svg-icons": "5.15.4", - "@fortawesome/free-regular-svg-icons": "5.15.4", - "@fortawesome/free-solid-svg-icons": "5.15.4", - "@fortawesome/react-fontawesome": "0.2.0", - "@openedx/paragon": "^21.0.0", "classnames": "^2.3.2", "core-js": "3.36.0", - "prop-types": "15.8.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-error-boundary": "^4.0.11", "react-redux": "7.2.9", - "react-router": "6.22.2", - "react-router-dom": "6.22.2", "redux": "4.2.1", "regenerator-runtime": "0.14.1" }, "devDependencies": { "@edx/browserslist-config": "^1.1.1", + "@edx/frontend-platform": "^7.1.3", "@edx/reactifex": "^2.1.1", "@openedx/frontend-build": "^13.0.28", + "@openedx/paragon": "^22.2.0", "@testing-library/dom": "^8.20.1", "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^12.1.5", "glob": "7.2.3", "husky": "7.0.4", "jest": "29.7.0", + "prop-types": "^15.8.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-error-boundary": "^4.0.13", "semantic-release": "^22.0.12" + }, + "peerDependencies": { + "@edx/frontend-platform": "^7.0.0", + "@openedx/paragon": "^21.0.0 || ^22.0.0", + "prop-types": "^15.8.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "react-error-boundary": "^4.0.11" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2039,9 +2040,9 @@ } }, "node_modules/@cospired/i18n-iso-languages": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@cospired/i18n-iso-languages/-/i18n-iso-languages-4.1.0.tgz", - "integrity": "sha512-5+JK7YiO9r/FmwtlEPL1tQNt04/9AuN1t9GO/0C2yitqhKwFRa1r7VohNNUnFgB84MW5v4Lwq8ZAUZexuJh1nQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@cospired/i18n-iso-languages/-/i18n-iso-languages-4.2.0.tgz", + "integrity": "sha512-vy8cq1176MTxVwB1X9niQjcIYOH29F8Huxtx8hLmT5Uz3l1ztGDGri8KN/4zE7LV2mCT7JrcAoNV/I9yb+lNUw==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -2320,11 +2321,11 @@ } }, "node_modules/@edx/frontend-platform": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-7.1.0.tgz", - "integrity": "sha512-6fBTni7KQWV087hTAVB/hHOhIIeVejWm/WfuMRSBkNqLcZlOZhUSoCSffszrIQNySiRiJVnrhLppnd8gdmc75w==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-7.1.3.tgz", + "integrity": "sha512-klw0pvFnAo8k8iVPxcR9WCPLaYqV2AFdnz1COF6hJ6gOIFuj2Mb5cuEy9di89INpZFO/0FEHq1IBVojm1rbJcg==", "dependencies": { - "@cospired/i18n-iso-languages": "4.1.0", + "@cospired/i18n-iso-languages": "4.2.0", "@formatjs/intl-pluralrules": "4.3.3", "@formatjs/intl-relativetimeformat": "10.0.1", "axios": "0.27.2", @@ -2341,7 +2342,7 @@ "lodash.merge": "4.6.2", "lodash.snakecase": "4.1.1", "pubsub-js": "1.9.4", - "react-intl": "6.5.5", + "react-intl": "6.6.3", "universal-cookie": "4.0.4" }, "bin": { @@ -2359,84 +2360,6 @@ "redux": "^4.0.4" } }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/ecma402-abstract": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.0.tgz", - "integrity": "sha512-PEVLoa3zBevWSCZzPIM/lvPCi8P5l4G+NXQMc/CjEiaCWgyHieUoo0nM7Bs0n/NbuQ6JpXEolivQ9pKSBHaDlA==", - "dependencies": { - "@formatjs/intl-localematcher": "0.5.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/icu-messageformat-parser": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.7.3.tgz", - "integrity": "sha512-X/jy10V9S/vW+qlplqhMUxR8wErQ0mmIYSq4mrjpjDl9mbuGcCILcI1SUYkL5nlM4PJqpc0KOS0bFkkJNPxYRw==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/icu-skeleton-parser": "1.7.0", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/icu-skeleton-parser": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.7.0.tgz", - "integrity": "sha512-Cfdo/fgbZzpN/jlN/ptQVe0lRHora+8ezrEeg2RfrNjyp+YStwBy7cqDY8k5/z2LzXg6O0AdzAV91XS0zIWv+A==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/intl": { - "version": "2.9.9", - "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.9.9.tgz", - "integrity": "sha512-JI3CNgL2Zdg5lv9ncT2sYKqbAj2RGrCbdzaCckIxMPxn4QuHuOVvYUGmBAXVusBmfG/0sxLmMrnwnBioz+QKdA==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/fast-memoize": "2.2.0", - "@formatjs/icu-messageformat-parser": "2.7.3", - "@formatjs/intl-displaynames": "6.6.4", - "@formatjs/intl-listformat": "7.5.3", - "intl-messageformat": "10.5.8", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "typescript": "5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/intl-displaynames": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-6.6.4.tgz", - "integrity": "sha512-ET8KQ+L9Q0K8x1SnJQa4DNssUcbATlMopWqYvGGR8yAvw5qwAQc1fv+DshCoZNIE9pbcue0IGC4kWNAkWqlFag==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/intl-localematcher": "0.5.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/intl-listformat": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-7.5.3.tgz", - "integrity": "sha512-l7EOr0Yh1m8KagytukB90yw81uyzrM7amKFrgxXqphz4KeSIL0KPa68lPsdtZ+JmQB73GaDQRwLOwUKFZ1VZPQ==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/intl-localematcher": "0.5.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/@formatjs/intl-localematcher": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.2.tgz", - "integrity": "sha512-txaaE2fiBMagLrR4jYhxzFO6wEdEG4TPMqrzBAcbr4HFUYzH/YC+lg6OIzKCHm8WgDdyQevxbAAV1OgcXctuGw==", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@edx/frontend-platform/node_modules/axios": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", @@ -2446,43 +2369,6 @@ "form-data": "^4.0.0" } }, - "node_modules/@edx/frontend-platform/node_modules/intl-messageformat": { - "version": "10.5.8", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.5.8.tgz", - "integrity": "sha512-NRf0jpBWV0vd671G5b06wNofAN8tp7WWDogMZyaU8GUAsmbouyvgwmFJI7zLjfAMpm3zK+vSwRP3jzaoIcMbaA==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/fast-memoize": "2.2.0", - "@formatjs/icu-messageformat-parser": "2.7.3", - "tslib": "^2.4.0" - } - }, - "node_modules/@edx/frontend-platform/node_modules/react-intl": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-6.5.5.tgz", - "integrity": "sha512-cI5UKvBh4tc1zxLIziHBYGMX3dhYWDEFlvUDVN6NfT2i96zTXz/zH2AmM8+2waqgOhwkFUzd+7kK1G9q7fiC2g==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.18.0", - "@formatjs/icu-messageformat-parser": "2.7.3", - "@formatjs/intl": "2.9.9", - "@formatjs/intl-displaynames": "6.6.4", - "@formatjs/intl-listformat": "7.5.3", - "@types/hoist-non-react-statics": "^3.3.1", - "@types/react": "16 || 17 || 18", - "hoist-non-react-statics": "^3.3.2", - "intl-messageformat": "10.5.8", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "react": "^16.6.0 || 17 || 18", - "typescript": "5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/@edx/new-relic-source-map-webpack-plugin": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@edx/new-relic-source-map-webpack-plugin/-/new-relic-source-map-webpack-plugin-2.1.0.tgz", @@ -2707,10 +2593,9 @@ } }, "node_modules/@formatjs/intl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.10.0.tgz", - "integrity": "sha512-X3xT9guVkKDS86EKV80lS0KxoazUglkJTGZO66sKY7otgl0VeStPA8B3u8UkKT47PexVV98fUzjpkchYmbe9nw==", - "peer": true, + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.10.1.tgz", + "integrity": "sha512-dsLG15U7xDi8yzKf4hcAWSsCaez3XrjTO2oaRHPyHtXLm1aEzYbDw6bClo/HMHu+iwS5GbDqT3DV+hYP2ylScg==", "dependencies": { "@formatjs/ecma402-abstract": "1.18.2", "@formatjs/fast-memoize": "2.2.0", @@ -2733,7 +2618,6 @@ "version": "6.6.6", "resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-6.6.6.tgz", "integrity": "sha512-Dg5URSjx0uzF8VZXtHb6KYZ6LFEEhCbAbKoYChYHEOnMFTw/ZU3jIo/NrujzQD2EfKPgQzIq73LOUvW6Z/LpFA==", - "peer": true, "dependencies": { "@formatjs/ecma402-abstract": "1.18.2", "@formatjs/intl-localematcher": "0.5.4", @@ -2744,7 +2628,6 @@ "version": "1.18.2", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "0.5.4", "tslib": "^2.4.0" @@ -2754,7 +2637,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -2763,7 +2645,6 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-7.5.5.tgz", "integrity": "sha512-XoI52qrU6aBGJC9KJddqnacuBbPlb/bXFN+lIFVFhQ1RnFHpzuFrlFdjD9am2O7ZSYsyqzYRpkVcXeT1GHkwDQ==", - "peer": true, "dependencies": { "@formatjs/ecma402-abstract": "1.18.2", "@formatjs/intl-localematcher": "0.5.4", @@ -2774,7 +2655,6 @@ "version": "1.18.2", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "0.5.4", "tslib": "^2.4.0" @@ -2784,7 +2664,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -2821,7 +2700,6 @@ "version": "1.18.2", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "0.5.4", "tslib": "^2.4.0" @@ -2831,7 +2709,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -2841,6 +2718,7 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==", "hasInstallScript": true, + "peer": true, "engines": { "node": ">=6" } @@ -2850,42 +2728,7 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz", "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==", "hasInstallScript": true, - "dependencies": { - "@fortawesome/fontawesome-common-types": "^0.2.36" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/free-brands-svg-icons": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.15.4.tgz", - "integrity": "sha512-f1witbwycL9cTENJegcmcZRYyawAFbm8+c6IirLmwbbpqz46wyjbQYLuxOc7weXFXfB7QR8/Vd2u5R3q6JYD9g==", - "hasInstallScript": true, - "dependencies": { - "@fortawesome/fontawesome-common-types": "^0.2.36" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/free-regular-svg-icons": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz", - "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==", - "hasInstallScript": true, - "dependencies": { - "@fortawesome/fontawesome-common-types": "^0.2.36" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", - "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==", - "hasInstallScript": true, + "peer": true, "dependencies": { "@fortawesome/fontawesome-common-types": "^0.2.36" }, @@ -5192,9 +5035,16 @@ } }, "node_modules/@openedx/paragon": { - "version": "21.13.1", - "resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-21.13.1.tgz", - "integrity": "sha512-sLL+Z3ZWIRM6x+OrKZV0S7/SQpEcSeRcDm7E3FzhsnAWudsJCTELvSW+84uy/8dwV7mJhttsBPqQEtNafbCyYA==", + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-22.2.0.tgz", + "integrity": "sha512-+otYS29OfPvAo0wdMc1uixsAHDmfh3dzM6/WZ9ZcJa58atk8nYCdvSiZBC71JsVVOJYXrt6iYCYSMW0mxOQYkA==", + "workspaces": [ + "example", + "component-generator", + "www", + "icons", + "dependent-usage-analyzer" + ], "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/react-fontawesome": "^0.1.18", @@ -5413,6 +5263,7 @@ "version": "1.15.2", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz", "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==", + "peer": true, "engines": { "node": ">=14.0.0" } @@ -13118,7 +12969,6 @@ "version": "10.5.11", "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.5.11.tgz", "integrity": "sha512-eYq5fkFBVxc7GIFDzpFQkDOZgNayNTQn4Oufe8jw6YY6OHVw70/4pA3FyCsQ0Gb2DnvEJEMmN2tOaXUGByM+kg==", - "peer": true, "dependencies": { "@formatjs/ecma402-abstract": "1.18.2", "@formatjs/fast-memoize": "2.2.0", @@ -13130,7 +12980,6 @@ "version": "1.18.2", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "0.5.4", "tslib": "^2.4.0" @@ -13140,7 +12989,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -22633,6 +22481,7 @@ "version": "4.0.13", "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", + "dev": true, "dependencies": { "@babel/runtime": "^7.12.5" }, @@ -22714,14 +22563,13 @@ } }, "node_modules/react-intl": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-6.6.2.tgz", - "integrity": "sha512-IpW2IkLtGENSFlX3vfH11rjuCIsW0VyjT0Q1pPKMZPtT2z1FxLt4weFT5Ezti2TScT1xiyb3aQBFth9EB7jzAg==", - "peer": true, + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-6.6.3.tgz", + "integrity": "sha512-vLKI0f+Q3pXD5szmCUPikTY7CJDPtxCBMG5YABQZ3IGEKzNB47zlvXyasUFfT25zpgQXeOfhRCdx4q6ubuR6bA==", "dependencies": { "@formatjs/ecma402-abstract": "1.18.2", "@formatjs/icu-messageformat-parser": "2.7.6", - "@formatjs/intl": "2.10.0", + "@formatjs/intl": "2.10.1", "@formatjs/intl-displaynames": "6.6.6", "@formatjs/intl-listformat": "7.5.5", "@types/hoist-non-react-statics": "^3.3.1", @@ -22744,7 +22592,6 @@ "version": "1.18.2", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "0.5.4", "tslib": "^2.4.0" @@ -22754,7 +22601,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -22913,6 +22759,7 @@ "version": "6.22.2", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz", "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==", + "peer": true, "dependencies": { "@remix-run/router": "1.15.2" }, @@ -22927,6 +22774,7 @@ "version": "6.22.2", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz", "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==", + "peer": true, "dependencies": { "@remix-run/router": "1.15.2", "react-router": "6.22.2" diff --git a/package.json b/package.json index f7149bd1..136b4c0f 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "lint": "fedx-scripts eslint --ext .js --ext .jsx .", "lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .", "snapshot": "fedx-scripts jest --updateSnapshot", - "start": "npm --prefix example start", - "start:plugins": "npm --prefix example-plugin-app start", + "start": "./node_modules/.bin/fedx-scripts babel src --watch --out-dir dist --source-maps --ignore **/*.test.jsx,**/*.test.js,**/setupTest.js --copy-files", + "start:example": "npm --prefix example start & npm --prefix example-plugin-app start", "test": "fedx-scripts jest --coverage --passWithNoTests" }, "husky": { @@ -38,35 +38,36 @@ "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/frontend-component-footer": "13.0.3", "@edx/frontend-component-header": "5.0.2", - "@edx/frontend-platform": "^7.1.0", - "@fortawesome/fontawesome-svg-core": "1.2.36", - "@fortawesome/free-brands-svg-icons": "5.15.4", - "@fortawesome/free-regular-svg-icons": "5.15.4", - "@fortawesome/free-solid-svg-icons": "5.15.4", - "@fortawesome/react-fontawesome": "0.2.0", - "@openedx/paragon": "^21.0.0", "classnames": "^2.3.2", "core-js": "3.36.0", - "prop-types": "15.8.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-error-boundary": "^4.0.11", "react-redux": "7.2.9", - "react-router": "6.22.2", - "react-router-dom": "6.22.2", "redux": "4.2.1", "regenerator-runtime": "0.14.1" }, "devDependencies": { "@edx/browserslist-config": "^1.1.1", + "@edx/frontend-platform": "^7.1.3", "@edx/reactifex": "^2.1.1", "@openedx/frontend-build": "^13.0.28", + "@openedx/paragon": "^22.2.0", "@testing-library/dom": "^8.20.1", "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^12.1.5", "glob": "7.2.3", "husky": "7.0.4", "jest": "29.7.0", + "prop-types": "^15.8.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-error-boundary": "^4.0.13", "semantic-release": "^22.0.12" + }, + "peerDependencies": { + "@edx/frontend-platform": "^7.0.0", + "@openedx/paragon": "^21.0.0 || ^22.0.0", + "prop-types": "^15.8.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "react-error-boundary": "^4.0.11" } }