Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace @edx/paragon and @edx/frontend-build #377

Closed
wants to merge 4 commits into from
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');

const config = createConfig('eslint', {
rules: {
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');

module.exports = createConfig('babel');
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');

module.exports = createConfig('jest', {
setupFilesAfterEnv: [
Expand Down
8,856 changes: 3,651 additions & 5,205 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
],
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-footer": "12.2.0",
"@edx/frontend-component-header": "4.6.0",
"@edx/frontend-platform": "5.5.4",
"@edx/frontend-component-footer": "13.0.2",
"@edx/frontend-component-header": "5.0.2",
"@edx/frontend-platform": "7.1.0",
"@edx/openedx-atlas": "^0.6.0",
"@edx/paragon": "20.45.0",
"@edx/react-unit-test-utils": "1.7.1",
"@openedx/paragon": "21.11.3",
"@edx/react-unit-test-utils": "2.0.0",
"@edx/reactifex": "^2.1.1",
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-brands-svg-icons": "^5.11.2",
Expand Down Expand Up @@ -67,7 +67,7 @@
},
"devDependencies": {
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-build": "13.0.1",
"@openedx/frontend-build": "13.0.28",
"@testing-library/react": "12.1.5",
"axios": "0.21.2",
"axios-mock-adapter": "^1.17.0",
Expand Down
2 changes: 1 addition & 1 deletion src/App.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// frontend-app-*/src/index.scss
@import "~@edx/brand/paragon/fonts";
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@openedx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";

$fa-font-path: "~font-awesome/fonts";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { connect } from 'react-redux';

import { Alert } from '@edx/paragon';
import { Alert } from '@openedx/paragon';

import selectors from 'data/selectors';
import messages from './messages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { Alert } from '@edx/paragon';
import { Alert } from '@openedx/paragon';
import { FormattedMessage } from '@edx/frontend-platform/i18n';

import selectors from 'data/selectors';
Expand All @@ -12,7 +12,7 @@ jest.mock('@edx/frontend-platform/i18n', () => ({
defineMessages: m => m,
FormattedMessage: () => 'FormattedMessage',
}));
jest.mock('@edx/paragon', () => ({
jest.mock('@openedx/paragon', () => ({
Alert: () => 'Alert',
}));
jest.mock('data/selectors', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

import { DataTable } from '@edx/paragon';
import { DataTable } from '@openedx/paragon';

import { bulkManagementColumns } from 'data/constants/app';
import selectors from 'data/selectors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable import/no-named-as-default */
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { DataTable } from '@edx/paragon';
import { DataTable } from '@openedx/paragon';

import selectors from 'data/selectors';
import { bulkManagementColumns } from 'data/constants/app';

import ResultsSummary from './ResultsSummary';
import { HistoryTable, mapStateToProps } from './HistoryTable';

jest.mock('@edx/paragon', () => ({ DataTable: () => 'DataTable' }));
jest.mock('@openedx/paragon', () => ({ DataTable: () => 'DataTable' }));

jest.mock('@edx/frontend-platform/i18n', () => ({
defineMessages: m => m,
Expand Down
4 changes: 2 additions & 2 deletions src/components/BulkManagementHistoryView/ResultsSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Hyperlink, Icon } from '@edx/paragon';
import { Download } from '@edx/paragon/icons';
import { Hyperlink, Icon } from '@openedx/paragon';
import { Download } from '@openedx/paragon/icons';

import lms from 'data/services/lms';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import { Download } from '@edx/paragon/icons';
import { Download } from '@openedx/paragon/icons';

import lms from 'data/services/lms';
import ResultsSummary from './ResultsSummary';

jest.mock('@edx/paragon', () => ({
jest.mock('@openedx/paragon', () => ({
Hyperlink: () => 'Hyperlink',
Icon: () => 'Icon',
}));
jest.mock('@edx/paragon/icons', () => ({
jest.mock('@openedx/paragon/icons', () => ({
Download: 'DownloadIcon',
}));
jest.mock('data/services/lms', () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/EdxHeader/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Hyperlink } from '@edx/paragon';
import { Hyperlink } from '@openedx/paragon';
import { getConfig } from '@edx/frontend-platform';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/EdxHeader/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getConfig } from '@edx/frontend-platform';

import Header from '.';

jest.mock('@edx/paragon', () => ({
jest.mock('@openedx/paragon', () => ({
Hyperlink: () => 'Hyperlink',
}));
jest.mock('@edx/frontend-platform', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

import { useIntl } from '@edx/frontend-platform/i18n';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import useAssignmentGradeFilterData from './hooks';
import messages from '../messages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import PercentGroup from '../PercentGroup';
import useAssignmentGradeFilterData from './hooks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';

import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';

import messages from '../messages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import PercentGroup from '../PercentGroup';
import useCourseGradeFilterData from './hooks';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookFilters/PercentGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

const PercentGroup = ({
id,
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookFilters/SelectGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

const SelectGroup = ({
id,
Expand Down
4 changes: 2 additions & 2 deletions src/components/GradebookFilters/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
Icon,
IconButton,
Form,
} from '@edx/paragon';
import { Close } from '@edx/paragon/icons';
} from '@openedx/paragon';
import { Close } from '@openedx/paragon/icons';
import { useIntl } from '@edx/frontend-platform/i18n';

import messages from './messages';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookFilters/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import { useIntl } from '@edx/frontend-platform/i18n';
import { Collapsible } from '@edx/paragon';
import { Collapsible } from '@openedx/paragon';

import { formatMessage } from 'testUtils';

Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookHeader/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { useIntl } from '@edx/frontend-platform/i18n';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import { instructorDashboardUrl } from 'data/services/lms/urls';
import useGradebookHeaderData from './hooks';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradebookHeader/index.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import { formatMessage } from 'testUtils';
import { instructorDashboardUrl } from 'data/services/lms/urls';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

import useAdjustedGradeInputData from './hooks';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

import useAdjustedGradeInputData from './hooks';
import AdjustedGradeInput from '.';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

import useReasonInputData from './hooks';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import { Form } from '@edx/paragon';
import { Form } from '@openedx/paragon';

import useReasonInputData from './hooks';
import ReasonInput from '.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useReasonInputData from './hooks';
import ReasonInput, { controlTestId } from '.';

jest.unmock('react');
jest.unmock('@edx/paragon');
jest.unmock('@openedx/paragon');
jest.mock('./hooks', () => ({ __esModule: true, default: jest.fn() }));

const focus = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/sort-comp, react/button-has-type, import/no-named-as-default */
import React from 'react';

import { DataTable } from '@edx/paragon';
import { DataTable } from '@openedx/paragon';

import { formatDateForDisplay } from 'utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import { DataTable } from '@edx/paragon';
import { DataTable } from '@openedx/paragon';

import { formatDateForDisplay } from 'utils';

Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/EditModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Alert,
ModalDialog,
ActionRow,
} from '@edx/paragon';
} from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';

import OverrideTable from './OverrideTable';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/EditModal/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { shallow } from '@edx/react-unit-test-utils';
import {
ActionRow,
ModalDialog,
} from '@edx/paragon';
} from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';

import { formatMessage } from 'testUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/FilterBadges/FilterBadge.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';

import { selectors } from 'data/redux/hooks';
Expand Down
4 changes: 2 additions & 2 deletions src/components/GradesView/FilterBadges/FilterBadge.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { shallow } from '@edx/react-unit-test-utils';
import { useIntl } from '@edx/frontend-platform/i18n';

import { formatMessage } from 'testUtils';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';
import { selectors } from 'data/redux/hooks';
import FilterBadge from './FilterBadge';

jest.mock('@edx/paragon', () => ({
jest.mock('@openedx/paragon', () => ({
Button: () => 'Button',
}));
jest.mock('data/redux/hooks', () => ({
Expand Down
4 changes: 2 additions & 2 deletions src/components/GradesView/FilterMenuToggle/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';

import { Button, Icon } from '@edx/paragon';
import { Button, Icon } from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import { FilterAlt } from '@edx/paragon/icons';
import { FilterAlt } from '@openedx/paragon/icons';

import { thunkActions } from 'data/redux/hooks';

Expand Down
2 changes: 1 addition & 1 deletion src/components/GradesView/GradebookTable/GradeButton.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

import { selectors, thunkActions } from 'data/redux/hooks';
import transforms from 'data/redux/transforms';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Icon,
OverlayTrigger,
Tooltip,
} from '@edx/paragon';
} from '@openedx/paragon';

import { StrictDict } from 'utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';
import { getLocale } from '@edx/frontend-platform/i18n';

import { OverlayTrigger } from '@edx/paragon';
import { OverlayTrigger } from '@openedx/paragon';

import LabelReplacements from './LabelReplacements';

Expand All @@ -12,7 +12,7 @@ const {
MastersOnlyLabelReplacement,
} = LabelReplacements;

jest.mock('@edx/paragon', () => ({
jest.mock('@openedx/paragon', () => ({
Icon: () => 'Icon',
OverlayTrigger: () => 'OverlayTrigger',
Tooltip: () => 'Tooltip',
Expand Down
Loading
Loading