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

chore: bumping versions and updating imports to openedx/paragon and openedx/frontend-build #975

Merged
merged 5 commits into from
Feb 28, 2024
Merged
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', {
extends: [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Now quickly check the .env.development file for which services are used by the a

## Serving production builds

During production builds, the NPM script ``npm run build`` is executived, which runs the production Webpack configuration (``webpack.prod.config.js``) to generate output files in the ``dist`` directory. However, these output files cannot be loaded directly into the browser. Instead, to preview a production build locally, these output files must be served via a server that can associate any URL route to the ``index.html`` entry-point of the application. The ``@edx/frontend-build`` package supports a ``serve`` command, which runs the generated production output from Webpack with a Node.js Express server.
During production builds, the NPM script ``npm run build`` is executed, which runs the production Webpack configuration (``webpack.prod.config.js``) to generate output files in the ``dist`` directory. However, these output files cannot be loaded directly into the browser. Instead, to preview a production build locally, these output files must be served via a server that can associate any URL route to the ``index.html`` entry-point of the application. The ``@openedx/frontend-build`` package supports a ``serve`` command, which runs the generated production output from Webpack with a Node.js Express server.

To serve a production build, the build must include the appropriate environment variables. The custom ``webpack.prod.config.js`` file in this project attempts to load all environment variables configured via the Git-ignored ``.env.private`` file, such that the production build can point to localhost URLs, etc.

Expand Down
2 changes: 1 addition & 1 deletion jest.config.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');

process.env.TZ = 'UTC';

Expand Down
8,725 changes: 3,396 additions & 5,329 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
],
"dependencies": {
"@edx/brand": "npm:@openedx/[email protected]",
"@edx/frontend-component-footer": "12.2.0",
"@edx/frontend-enterprise-catalog-search": "^5.6.0",
"@edx/frontend-enterprise-hotjar": "2.0.0",
"@edx/frontend-enterprise-logistration": "^4.1.0",
"@edx/frontend-enterprise-utils": "^4.1.0",
"@edx/frontend-platform": "5.0.0",
"@edx/paragon": "20.45.4",
"@edx/frontend-component-footer": "13.0.2",
"@edx/frontend-enterprise-catalog-search": "7.0.0",
"@edx/frontend-enterprise-hotjar": "4.0.0",
"@edx/frontend-enterprise-logistration": "6.0.0",
"@edx/frontend-enterprise-utils": "6.0.0",
"@edx/frontend-platform": "7.1.0",
"@loadable/component": "5.16.3",
"@openedx/paragon": "^22.1.1",
"@openedx/paragon": "^21.5.7",
katrinan029 marked this conversation as resolved.
Show resolved Hide resolved
"@tanstack/react-query": "4.28.0",
"@tanstack/react-query-devtools": "4.29.0",
"algoliasearch": "4.6.0",
Expand Down Expand Up @@ -60,7 +59,7 @@
},
"devDependencies": {
"@edx/browserslist-config": "1.1.1",
"@edx/frontend-build": "12.9.4",
"@openedx/frontend-build": "13.0.28",
"@tanstack/eslint-plugin-query": "4.29.9",
"@testing-library/jest-dom": "5.11.9",
"@testing-library/react": "12.1.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import { Spinner } from '@edx/paragon';
import { Spinner } from '@openedx/paragon';
import { useEffect, useState } from 'react';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotFoundPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { AppContext } from '@edx/frontend-platform/react';
import { Container } from '@edx/paragon';
import { Container } from '@openedx/paragon';

const NotFoundPage = ({ pageTitle, errorHeading, errorMessage }) => {
const { enterpriseConfig } = useContext(AppContext);
Expand Down
4 changes: 2 additions & 2 deletions src/components/TagCloud/index.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 { Chip } from '@edx/paragon';
import { Close } from '@edx/paragon/icons';
import { Chip } from '@openedx/paragon';
import { Close } from '@openedx/paragon/icons';

const TagCloud = ({ tags, onRemove }) => (
<div className="skills-tag">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Toasts/Toasts.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Toast } from '@edx/paragon';
import { Toast } from '@openedx/paragon';

import { ToastsContext } from './ToastsProvider';

Expand Down
2 changes: 1 addition & 1 deletion src/components/academies/AcademyContentCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Button,
CardGrid,
Spinner,
} from '@edx/paragon';
} from '@openedx/paragon';
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import { camelCaseObject } from '@edx/frontend-platform/utils';
import { v4 as uuidv4 } from 'uuid';
Expand Down
2 changes: 1 addition & 1 deletion src/components/academies/AcademyDetailPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useMemo } from 'react';
import {
Container, Breadcrumb,
Skeleton, Spinner,
} from '@edx/paragon';
} from '@openedx/paragon';
import {
useParams, Link,
} from 'react-router-dom';
Expand Down
2 changes: 1 addition & 1 deletion src/components/academies/SearchAcademyCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext } from 'react';
import {
Card, Hyperlink, Image,
} from '@edx/paragon';
} from '@openedx/paragon';
import PropTypes from 'prop-types';
import { AppContext } from '@edx/frontend-platform/react';

Expand Down
2 changes: 1 addition & 1 deletion src/components/app/AuthenticatedPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useParams, useLocation } from 'react-router-dom';
import { LoginRedirect } from '@edx/frontend-enterprise-logistration';
import { AppContext } from '@edx/frontend-platform/react';
import { getConfig } from '@edx/frontend-platform/config';
import { Hyperlink } from '@edx/paragon';
import { Hyperlink } from '@openedx/paragon';
import { EnterprisePage } from '../enterprise-page';
import { EnterpriseBanner } from '../enterprise-banner';
import { Layout } from '../layout';
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/LoginRefresh.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { AppContext } from '@edx/frontend-platform/react';
import { Container } from '@edx/paragon';
import { Container } from '@openedx/paragon';

import { LoadingSpinner } from '../loading-spinner';
import { loginRefresh } from '../../utils/common';
Expand Down
2 changes: 1 addition & 1 deletion src/components/contact-admin-mailto/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext } from 'react';
import { AppContext } from '@edx/frontend-platform/react';
import { MailtoLink } from '@edx/paragon';
import { MailtoLink } from '@openedx/paragon';
import PropTypes from 'prop-types';
import { getContactEmail } from '../../utils/common';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseAssociatedPrograms.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Hyperlink } from '@edx/paragon';
import { Hyperlink } from '@openedx/paragon';
import { sendEnterpriseTrackEvent } from '@edx/frontend-enterprise-utils';
import { AppContext } from '@edx/frontend-platform/react';

Expand Down
4 changes: 2 additions & 2 deletions src/components/course/CourseEnrollmentFailedAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useContext, useMemo } from 'react';
import PropTypes from 'prop-types';
import { useLocation } from 'react-router-dom';
import { AppContext } from '@edx/frontend-platform/react';
import { Container, Alert } from '@edx/paragon';
import { Error } from '@edx/paragon/icons';
import { Container, Alert } from '@openedx/paragon';
import { Error } from '@openedx/paragon/icons';

import { useRenderContactHelpText } from '../../utils/hooks';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseMainContent.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { breakpoints, Hyperlink, MediaQuery } from '@edx/paragon';
import { breakpoints, Hyperlink, MediaQuery } from '@openedx/paragon';
import { AppContext } from '@edx/frontend-platform/react';

import { PreviewExpand } from '../preview-expand';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseMaterialsButton.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';
import { findUserEnrollmentForCourseRun } from './data/utils';
import { CourseContext } from './CourseContextProvider';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
useLocation, useParams, useNavigate,
} from 'react-router-dom';
import { Helmet } from 'react-helmet';
import { Container } from '@edx/paragon';
import { Container } from '@openedx/paragon';
import { getConfig } from '@edx/frontend-platform/config';
import { AppContext, ErrorPage } from '@edx/frontend-platform/react';
import { hasFeatureFlagEnabled } from '@edx/frontend-enterprise-utils';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseRecommendationCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import cardFallbackImg from '@edx/brand/paragon/images/card-imagecap-fallback.png';
import { useNavigate } from 'react-router-dom';
import { AppContext } from '@edx/frontend-platform/react';
import { Card, Truncate } from '@edx/paragon';
import { Card, Truncate } from '@openedx/paragon';
import { sendEnterpriseTrackEvent } from '@edx/frontend-enterprise-utils';

import { getPrimaryPartnerLogo, isDefinedAndNotNull } from '../../utils/common';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseRecommendations.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { CardGrid } from '@edx/paragon';
import { CardGrid } from '@openedx/paragon';
import { CourseContext } from './CourseContextProvider';
import CourseRecommendationCard from './CourseRecommendationCard';

Expand Down
4 changes: 2 additions & 2 deletions src/components/course/CourseReview.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Col, Container, Icon, Row,
} from '@edx/paragon';
} from '@openedx/paragon';
import React, { useContext, useState } from 'react';
import { StarFilled } from '@edx/paragon/icons';
import { StarFilled } from '@openedx/paragon/icons';
import { fixDecimalNumber } from './data/utils';
import { CourseContext } from './CourseContextProvider';
import { REVIEW_SECTION_CONTENT } from './data/constants';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sendEnterpriseTrackEvent } from '@edx/frontend-enterprise-utils';

import {
AccessTime, Equalizer, Institution, Person, School, Speed, Tag, VideoFile,
} from '@edx/paragon/icons';
} from '@openedx/paragon/icons';
import { AppContext } from '@edx/frontend-platform/react';
import { CourseContext } from './CourseContextProvider';
import CourseSidebarListItem from './CourseSidebarListItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseSidebarListItem.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Col, Icon, Row } from '@edx/paragon';
import { Col, Icon, Row } from '@openedx/paragon';

const CourseSidebarListItem = ({
icon,
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseSidebarPrice.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Skeleton } from '@edx/paragon';
import { Skeleton } from '@openedx/paragon';
import classNames from 'classnames';
import { AppContext } from '@edx/frontend-platform/react';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CourseSkills.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import classNames from 'classnames';
import {
Badge, OverlayTrigger, Popover,
} from '@edx/paragon';
} from '@openedx/paragon';

import { AppContext } from '@edx/frontend-platform/react';
import { CourseContext } from './CourseContextProvider';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/CreatedBy.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext } from 'react';
import { AppContext } from '@edx/frontend-platform/react';
import { Hyperlink } from '@edx/paragon';
import { Hyperlink } from '@openedx/paragon';

import { CourseContext } from './CourseContextProvider';
import { useCoursePartners } from './data/hooks';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/EnrollModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Button, Modal, Spinner } from '@edx/paragon';
import { Button, Modal, Spinner } from '@openedx/paragon';

import { COUPON_CODE_SUBSIDY_TYPE, ENTERPRISE_OFFER_SUBSIDY_TYPE } from './data/constants';
import { ENTERPRISE_OFFER_TYPE } from '../enterprise-user-subsidy/enterprise-offers/data/constants';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/LicenseRequestedAlert.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useContext, useMemo } from 'react';
import { Container, Alert } from '@edx/paragon';
import { Container, Alert } from '@openedx/paragon';
import Cookies from 'universal-cookie';
import PropTypes from 'prop-types';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/SubsidyRequestButton.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {
useContext, useMemo, useState, useCallback,
} from 'react';
import { StatefulButton } from '@edx/paragon';
import { StatefulButton } from '@openedx/paragon';
import { logError } from '@edx/frontend-platform/logging';

import { SubsidyRequestsContext, SUBSIDY_TYPE } from '../enterprise-subsidy-requests';
Expand Down
4 changes: 2 additions & 2 deletions src/components/course/VerifiedCertPitch.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 { Icon } from '@edx/paragon';
import { ContentPasteGo, RocketLaunch } from '@edx/paragon/icons';
import { Icon } from '@openedx/paragon';
import { ContentPasteGo, RocketLaunch } from '@openedx/paragon/icons';

import './styles/VerifiedCertPitch.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/course-header/CourseHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Row,
Col,
Badge,
} from '@edx/paragon';
} from '@openedx/paragon';
import { Link, useLocation } from 'react-router-dom';
import { AppContext } from '@edx/frontend-platform/react';

Expand Down
4 changes: 2 additions & 2 deletions src/components/course/course-header/CoursePreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import loadable from '@loadable/component';

import { PlayCircleFilled } from '@edx/paragon/icons';
import { useToggle, Image, Skeleton } from '@edx/paragon';
import { PlayCircleFilled } from '@openedx/paragon/icons';
import { useToggle, Image, Skeleton } from '@openedx/paragon';
import DelayedFallbackContainer from '../../DelayedFallback/DelayedFallbackContainer';

const VideoPlayer = loadable(() => import(/* webpackChunkName: "videojs" */ '../../video/VideoPlayer'), {
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/course-header/CourseRunCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Card } from '@edx/paragon';
import { Card } from '@openedx/paragon';

import { CourseContext } from '../CourseContextProvider';
import { findUserEnrollmentForCourseRun } from '../data/utils';
Expand Down
4 changes: 2 additions & 2 deletions src/components/course/course-header/CourseRunCardStatus.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 { Card } from '@edx/paragon';
import { Lock } from '@edx/paragon/icons';
import { Card } from '@openedx/paragon';
import { Lock } from '@openedx/paragon/icons';

import { DISABLED_ENROLL_REASON_TYPES } from '../data/constants';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/course-header/CourseRunCards.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { CardGrid } from '@edx/paragon';
import { CardGrid } from '@openedx/paragon';

import { CourseContext } from '../CourseContextProvider';
import CourseRunCard from './CourseRunCard';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,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 { messages } from './data';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stack, Button } from '@edx/paragon';
import { Stack, Button } from '@openedx/paragon';

import { useContext } from 'react';
import StatefulEnroll from '../../../../stateful-enroll';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useMemo } from 'react';
import PropTypes from 'prop-types';
import dayjs from 'dayjs';
import { useLocation } from 'react-router-dom';
import { Card } from '@edx/paragon';
import { Card } from '@openedx/paragon';
import { AppContext } from '@edx/frontend-platform/react';

import EnrollAction from '../../enrollment/EnrollAction';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/data/utils.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { ensureConfig, getConfig } from '@edx/frontend-platform';
import { hasFeatureFlagEnabled } from '@edx/frontend-enterprise-utils';
import { Button, Hyperlink, MailtoLink } from '@edx/paragon';
import { Button, Hyperlink, MailtoLink } from '@openedx/paragon';
import isNil from 'lodash.isnil';
import dayjs from '../../../utils/dayjs';

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/enrollment/common.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';

// Common UI components for enrollment to avoid duplication, consistent styling etc.
// Each enroll component can use the EnrollButtonCta to render the enroll behavior
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button } from '@edx/paragon';
import { Button } from '@openedx/paragon';
import { Link } from 'react-router-dom';

import { useTrackSearchConversionClickHandler } from '../../data/hooks';
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/routes/CourseAbout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext } from 'react';
import {
breakpoints, Container, MediaQuery, Row,
} from '@edx/paragon';
} from '@openedx/paragon';
import { AppContext } from '@edx/frontend-platform/react';
import { Navigate } from 'react-router-dom';

Expand Down
4 changes: 2 additions & 2 deletions src/components/course/routes/ExternalCourseEnrollment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useContext, useEffect, useRef } from 'react';
import { generatePath, useNavigate, useLocation } from 'react-router-dom';
import {
Alert, Button, Col, Container, Hyperlink, Row,
} from '@edx/paragon';
import { CheckCircle } from '@edx/paragon/icons';
} from '@openedx/paragon';
import { CheckCircle } from '@openedx/paragon/icons';

import { getConfig } from '@edx/frontend-platform/config';
import { AppContext } from '@edx/frontend-platform/react';
Expand Down
Loading
Loading