Skip to content

Commit

Permalink
feat: replace @edx/paragon with @openedx/paragon
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
- replace @edx/paragon in favor of @openedx/paragon because @edx/paragon is moved https://www.npmjs.com/package/@edx/paragon
- remove react-intl. It should use intl from @edx/frontend-platform
  • Loading branch information
leangseu-edx committed Mar 22, 2024
1 parent b84a138 commit 3c55da3
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 174 deletions.
6 changes: 3 additions & 3 deletions module.config.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module.exports = {
**********************************************************************************************/

// { moduleName: '@edx/brand', dir: '../brand-openedx' }, // replace with your brand checkout
// { moduleName: '@edx/paragon/scss/core', dir: '../paragon', dist: 'scss/core' },
// { moduleName: '@edx/paragon/icons', dir: '../paragon', dist: 'icons' },
// { moduleName: '@edx/paragon', dir: '../paragon', dist: 'dist' },
// { moduleName: '@openedx/paragon/scss/core', dir: '../paragon', dist: 'scss/core' },
// { moduleName: '@openedx/paragon/icons', dir: '../paragon', dist: 'icons' },
// { moduleName: '@openedx/paragon', dir: '../paragon', dist: 'dist' },
// { moduleName: '@edx/frontend-platform', dir: '../frontend-platform', dist: 'dist' },
],
};
175 changes: 20 additions & 155 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"peerDependencies": {
"@edx/frontend-platform": "^4.3.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"@edx/paragon": "20.46.0",
"@openedx/paragon": "^21.0.0 || ^22.0.0",
"@reduxjs/toolkit": "1.8.1",
"react": "16.14.0 || ^17.0.0",
"react-dom": "16.14.0 || ^17.0.0",
Expand All @@ -67,8 +67,8 @@
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-build": "13.0.0",
"@edx/frontend-platform": "^7.1.2",
"@edx/paragon": "20.46.0",
"@edx/reactifex": "^2.1.1",
"@openedx/paragon": "^22.1.1",
"@reduxjs/toolkit": "1.8.1",
"@testing-library/jest-dom": "^6.0.1",
"@testing-library/react": "^12.1.5",
Expand All @@ -78,7 +78,6 @@
"jest": "29.6.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "^5.25.0",
"react-redux": "7.2.9",
"react-router": "6.15.0",
"react-router-dom": "6.15.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/APIError/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
import { useEffect, useRef } from 'react';
import { useDispatch } from 'react-redux';
import { Alert } from '@edx/paragon';
import { Info } from '@edx/paragon/icons';
import { Alert } from '@openedx/paragon';
import { Info } from '@openedx/paragon/icons';
import {
clearApiError,
} from '../../data/thunks';
Expand Down
4 changes: 2 additions & 2 deletions src/components/Disclosure/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import PropTypes from 'prop-types';
import React from 'react';

import { Hyperlink, Icon } from '@edx/paragon';
import { Chat } from '@edx/paragon/icons';
import { Hyperlink, Icon } from '@openedx/paragon';
import { Chat } from '@openedx/paragon/icons';
import { getConfig } from '@edx/frontend-platform/config';

import './Disclosure.scss';
Expand Down
4 changes: 2 additions & 2 deletions src/components/MessageForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
import React, { useEffect, useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';

import { Button, Form, Icon } from '@edx/paragon';
import { Send } from '@edx/paragon/icons';
import { Button, Form, Icon } from '@openedx/paragon';
import { Send } from '@openedx/paragon/icons';

import {
acknowledgeDisclosure,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
Button,
Icon,
IconButton,
} from '@edx/paragon';
import { Close } from '@edx/paragon/icons';
} from '@openedx/paragon';
import { Close } from '@openedx/paragon/icons';

import APIError from '../APIError';
import ChatBox from '../ChatBox';
Expand Down
4 changes: 2 additions & 2 deletions src/components/ToggleXpertButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
IconButton,
ModalCloseButton,
ModalPopup,
} from '@edx/paragon';
import { Close } from '@edx/paragon/icons';
} from '@openedx/paragon';
import { Close } from '@openedx/paragon/icons';

import { ReactComponent as XpertLogo } from '../../assets/xpert-logo.svg';
import './index.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { messages as paragonMessages } from '@edx/paragon';
import { messages as paragonMessages } from '@openedx/paragon';

import arMessages from './messages/ar.json';
import caMessages from './messages/ca.json';
Expand Down
2 changes: 1 addition & 1 deletion src/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "@edx/brand/paragon/fonts.scss";
@import "@edx/brand/paragon/variables.scss";
@import "@edx/paragon/scss/core/core.scss";
@import "@openedx/paragon/scss/core/core.scss";
@import "@edx/brand/paragon/overrides.scss";
2 changes: 1 addition & 1 deletion src/utils/utils.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { render } from '@testing-library/react';
import { configureStore } from '@reduxjs/toolkit';
import { Provider } from 'react-redux';
import { IntlProvider } from 'react-intl';
import { IntlProvider } from '@edx/frontend-platform/intl';

Check failure on line 7 in src/utils/utils.test.jsx

View workflow job for this annotation

GitHub Actions / test

Unable to resolve path to module '@edx/frontend-platform/intl'
import { reducer as learningAssistantReducer } from '../data/slice';

function renderWithProviders(
Expand Down

0 comments on commit 3c55da3

Please sign in to comment.