Skip to content

Commit

Permalink
fix(build): npm updates for platform (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Apr 20, 2021
1 parent 685828b commit 76b746c
Show file tree
Hide file tree
Showing 25 changed files with 42 additions and 58 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
"@patternfly/react-styles": "4.7.29",
"@patternfly/react-table": "4.20.15",
"@patternfly/react-tokens": "4.9.26",
"@redhat-cloud-services/frontend-components": "2.5.10",
"@redhat-cloud-services/frontend-components-notifications": "2.2.4",
"@redhat-cloud-services/frontend-components-utilities": "2.2.9",
"@redhat-cloud-services/frontend-components": "3.0.6",
"@redhat-cloud-services/frontend-components-notifications": "3.0.3",
"@redhat-cloud-services/frontend-components-utilities": "3.0.3",
"axios": "^0.21.1",
"classnames": "^2.2.6",
"i18next": "^19.8.7",
Expand Down
2 changes: 1 addition & 1 deletion src/components/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { NotificationsPortal } from '@redhat-cloud-services/frontend-components-notifications/cjs';
import { NotificationsPortal } from '@redhat-cloud-services/frontend-components-notifications';
import { connectRouter, reduxActions } from '../redux';
import { helpers } from '../common/helpers';
import { I18n } from './i18n/i18n';
Expand Down
4 changes: 2 additions & 2 deletions src/components/authentication/authentication.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { BinocularsIcon } from '@patternfly/react-icons';
import { Maintenance } from '@redhat-cloud-services/frontend-components/components/cjs/Maintenance';
import { NotAuthorized } from '@redhat-cloud-services/frontend-components/components/cjs/NotAuthorized';
import { Maintenance } from '@redhat-cloud-services/frontend-components/components/Maintenance';
import { NotAuthorized } from '@redhat-cloud-services/frontend-components/components/NotAuthorized';
import { connectRouter, reduxActions, reduxSelectors } from '../../redux';
import { rhsmApiTypes } from '../../types';
import { helpers } from '../../common';
Expand Down
2 changes: 1 addition & 1 deletion src/components/inventoryList/inventoryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import _isEqual from 'lodash/isEqual';
import { SortByDirection, TableVariant } from '@patternfly/react-table';
import { Bullseye, Card, CardActions, CardBody, CardFooter, CardHeader, CardHeaderMain } from '@patternfly/react-core';
import { TableToolbar } from '@redhat-cloud-services/frontend-components/components/cjs/TableToolbar';
import { TableToolbar } from '@redhat-cloud-services/frontend-components/components/TableToolbar';
import _camelCase from 'lodash/camelCase';
import { helpers } from '../../common';
import { connect, reduxActions, reduxSelectors, reduxTypes, store } from '../../redux';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import _isEqual from 'lodash/isEqual';
import { SortByDirection, TableVariant } from '@patternfly/react-table';
import { Bullseye, Card, CardActions, CardBody, CardFooter, CardHeader } from '@patternfly/react-core';
import { TableToolbar } from '@redhat-cloud-services/frontend-components/components/cjs/TableToolbar';
import { TableToolbar } from '@redhat-cloud-services/frontend-components/components/TableToolbar';
import _camelCase from 'lodash/camelCase';
import { helpers } from '../../common';
import { connect, reduxActions, reduxSelectors, reduxTypes, store } from '../../redux';
Expand Down
4 changes: 2 additions & 2 deletions src/components/loader/loader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/components/cjs/Skeleton';
import { Spinner } from '@redhat-cloud-services/frontend-components/components/cjs/Spinner';
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/components/Skeleton';
import { Spinner } from '@redhat-cloud-services/frontend-components/components/Spinner';
import { TableVariant } from '@patternfly/react-table';
import { PageHeader, PageLayout } from '../pageLayout/pageLayout';
import { TableSkeleton } from '../table/tableSkeleton';
Expand Down
2 changes: 1 addition & 1 deletion src/components/openshiftView/openshiftView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
chart_color_blue_300 as chartColorBlueDark
} from '@patternfly/react-tokens';
import { Button, Label as PfLabel } from '@patternfly/react-core';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/cjs/DateFormat';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/DateFormat';
import moment from 'moment';
import { PageLayout, PageHeader, PageMessages, PageSection, PageToolbar } from '../pageLayout/pageLayout';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageLayout/pageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import {
PageHeader as RcsPageHeader,
PageHeaderTitle
} from '@redhat-cloud-services/frontend-components/components/cjs/PageHeader';
} from '@redhat-cloud-services/frontend-components/components/PageHeader';
import { Button, Flex, FlexItem, Label as PfLabel } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { helpers } from '../../common';
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageLayout/pageMessages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Section } from '@redhat-cloud-services/frontend-components/components/cjs/Section';
import { Section } from '@redhat-cloud-services/frontend-components/components/Section';

/**
* Render a platform toolbar section.
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageLayout/pageSection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Section } from '@redhat-cloud-services/frontend-components/components/cjs/Section';
import { Section } from '@redhat-cloud-services/frontend-components/components/Section';

/**
* Render a platform page section.
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageLayout/pageToolbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Section } from '@redhat-cloud-services/frontend-components/components/cjs/Section';
import { Section } from '@redhat-cloud-services/frontend-components/components/Section';

/**
* Render a platform toolbar section.
Expand Down
2 changes: 1 addition & 1 deletion src/components/productView/productViewSatellite.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
chart_color_purple_300 as chartColorPurpleDark
} from '@patternfly/react-tokens';
import { Button, Label as PfLabel } from '@patternfly/react-core';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/cjs/DateFormat';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/DateFormat';
import moment from 'moment';
import {
RHSM_API_QUERY_SORT_DIRECTION_TYPES as SORT_DIRECTION_TYPES,
Expand Down
2 changes: 1 addition & 1 deletion src/components/rhelView/rhelView.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
chart_color_purple_300 as chartColorPurpleDark
} from '@patternfly/react-tokens';
import { Button, Label as PfLabel } from '@patternfly/react-core';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/cjs/DateFormat';
import { DateFormat } from '@redhat-cloud-services/frontend-components/components/DateFormat';
import moment from 'moment';
import { PageLayout, PageHeader, PageMessages, PageSection, PageToolbar } from '../pageLayout/pageLayout';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/tableEmpty.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { EmptyState, EmptyStateIcon, EmptyStateBody, EmptyStateVariant, Title } from '@patternfly/react-core';
import { EmptyTable as PlatformEmptyTableWrapper } from '@redhat-cloud-services/frontend-components/components/cjs/EmptyTable';
import { EmptyTable as PlatformEmptyTableWrapper } from '@redhat-cloud-services/frontend-components/components/EmptyTable';

/**
* Render an empty table.
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/tableSkeleton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { cellWidth, TableVariant } from '@patternfly/react-table';
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/components/cjs/Skeleton';
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/components/Skeleton';
import Table from './table';
import { translate } from '../i18n/i18n';

Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { BrowserRouter } from 'react-router-dom';
import { baseName } from './components/router/routerHelpers';
import { store } from './redux';
import App from './components/app';
import '@redhat-cloud-services/frontend-components/index.css';
import '@redhat-cloud-services/frontend-components-notifications/index.css';
import './styles/index.scss';

render(
Expand Down
2 changes: 1 addition & 1 deletion src/redux/actions/platformActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
addNotification as RcsAddNotification,
removeNotification as RcsRemoveNotification,
clearNotifications as RcsClearNotifications
} from '@redhat-cloud-services/frontend-components-notifications/cjs';
} from '@redhat-cloud-services/frontend-components-notifications';
import { platformTypes } from '../types';
import { platformServices } from '../../services/platformServices';

Expand Down
2 changes: 1 addition & 1 deletion src/redux/middleware/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createLogger } from 'redux-logger';
import promiseMiddleware from 'redux-promise-middleware';
import thunkMiddleware from 'redux-thunk';
import { notificationsMiddleware } from '@redhat-cloud-services/frontend-components-notifications/cjs';
import { notificationsMiddleware } from '@redhat-cloud-services/frontend-components-notifications';
import { multiActionMiddleware } from './multiActionMiddleware';
import { statusMiddleware } from './statusMiddleware';
import { actionRecordMiddleware } from './actionRecordMiddleware';
Expand Down
2 changes: 1 addition & 1 deletion src/redux/reducers/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { combineReducers } from 'redux';
import { notifications } from '@redhat-cloud-services/frontend-components-notifications/cjs';
import { notifications } from '@redhat-cloud-services/frontend-components-notifications';
import graphReducer from './graphReducer';
import inventoryReducer from './inventoryReducer';
import messagesReducer from './messagesReducer';
Expand Down
2 changes: 1 addition & 1 deletion src/redux/types/platformTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ADD_NOTIFICATION,
REMOVE_NOTIFICATION,
CLEAR_NOTIFICATIONS
} from '@redhat-cloud-services/frontend-components-notifications/cjs';
} from '@redhat-cloud-services/frontend-components-notifications';

const PLATFORM_ADD_NOTIFICATION = ADD_NOTIFICATION;
const PLATFORM_REMOVE_NOTIFICATION = REMOVE_NOTIFICATION;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Framework
@import '~@redhat-cloud-services/frontend-components-utilities/files/Utilities/_all';
@import '~@redhat-cloud-services/frontend-components-utilities/index';
/**
* FixMe: Variables break Sass compiler
* Sass compiler throws an error when coming across the following syntax in
Expand Down
6 changes: 0 additions & 6 deletions tests/__snapshots__/dist.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ Array [
"./build/locales/en-US.json",
"./build/locales/en.json",
"./build/locales/locales.json",
"./build/static/css/0*chunk*map",
"./build/static/css/0*chunk.css",
"./build/static/css/4*chunk*map",
"./build/static/css/4*chunk.css",
"./build/static/css/5*chunk*map",
"./build/static/css/5*chunk.css",
"./build/static/css/main*chunk*map",
"./build/static/css/main*chunk.css",
"./build/static/js/0*chunk*map",
Expand All @@ -30,8 +26,6 @@ Array [
"./build/static/js/7*chunk.js",
"./build/static/js/8*chunk*map",
"./build/static/js/8*chunk.js",
"./build/static/js/9*chunk*map",
"./build/static/js/9*chunk.js",
"./build/static/js/main*chunk*map",
"./build/static/js/main*chunk.js",
"./build/static/js/runtime-main*js",
Expand Down
12 changes: 2 additions & 10 deletions tests/__snapshots__/platform.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ Array [
exports[`Platform Configuration, Build should use direct imports for platform components, with exceptions: direct import exceptions, components 1`] = `Array []`;
exports[`Platform Configuration, Build should use direct imports for platform components, with exceptions: import exceptions, notifications 1`] = `
Array [
"index.js:9:import '@redhat-cloud-services/frontend-components-notifications/index.css';",
]
`;
exports[`Platform Configuration, Build should use direct imports for platform components, with exceptions: import exceptions, notifications 1`] = `Array []`;
exports[`Platform Configuration, Build should use direct imports for platform components, with exceptions: import exceptions, utilities 1`] = `
Array [
"styles/index.scss:2:@import '~@redhat-cloud-services/frontend-components-utilities/files/Utilities/_all';",
]
`;
exports[`Platform Configuration, Build should use direct imports for platform components, with exceptions: import exceptions, utilities 1`] = `Array []`;
6 changes: 3 additions & 3 deletions tests/platform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Platform Configuration, Build', () => {
.toString()
.trim()
.split(/[\n\r]/g)
.filter(str => !/\/(cjs|esm)\//.test(str))
.filter(str => /\/(import\s{[\d\D]+})\//.test(str))
).toMatchSnapshot('direct import exceptions, components');

const notificationsOutput = execSync(
Expand All @@ -54,7 +54,7 @@ describe('Platform Configuration, Build', () => {
.toString()
.trim()
.split(/[\n\r]/g)
.filter(str => !/\/(cjs|esm)/.test(str))
.filter(str => /\/(import\s{[\d\D]+})\//.test(str))
).toMatchSnapshot('import exceptions, notifications');

const utilitiesOutput = execSync(
Expand All @@ -66,7 +66,7 @@ describe('Platform Configuration, Build', () => {
.toString()
.trim()
.split(/[\n\r]/g)
.filter(str => !/\/(cjs|esm)/.test(str))
.filter(str => /\/(import\s{[\d\D]+})\//.test(str))
).toMatchSnapshot('import exceptions, utilities');
});
});
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1714,10 +1714,10 @@
schema-utils "^2.6.5"
source-map "^0.7.3"

"@redhat-cloud-services/frontend-components-notifications@2.2.4":
version "2.2.4"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components-notifications/-/frontend-components-notifications-2.2.4.tgz#0ac2e0afd1ff192478cf0e8496efb4609f1a6eb0"
integrity sha512-FmUf77Z0XP7UaOfiE+a2nn1DjWxnOlo1B6HIOjnRoToHAKSuMEtuxHxMGIv02ru2NL0Pc1GhFLr+IJ+L2BeTaQ==
"@redhat-cloud-services/frontend-components-notifications@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components-notifications/-/frontend-components-notifications-3.0.3.tgz#b83ef396d2a7d65889d5554a3346039683d90516"
integrity sha512-H3wLzn05GA5ntLDAxGGneAEtsjcFQoaG+WUz3RPQBEZBnFrd3bcDU42ucXEqH9GaDy/zZf1l0SXbVK/efpLJtQ==
dependencies:
"@redhat-cloud-services/frontend-components-utilities" "*"

Expand All @@ -1732,23 +1732,23 @@
commander ">=2.20.0"
react-content-loader ">=3.4.1"

"@redhat-cloud-services/frontend-components-utilities@2.2.9":
version "2.2.9"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components-utilities/-/frontend-components-utilities-2.2.9.tgz#ae3fd5623178d037ab55e17de24fee1fabafa673"
integrity sha512-+rtCdi/fi89+DE1RO8Jvq9Vh026u9qStKagGFO+wZUspvDwAxkT3CvsOksQadocwj4J4d9znm8URHSDumBYeSw==
"@redhat-cloud-services/frontend-components-utilities@3.0.3", "@redhat-cloud-services/frontend-components-utilities@>=3.0.0":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components-utilities/-/frontend-components-utilities-3.0.3.tgz#160ceccc3eb70215505307dafeb5b4333e4090ce"
integrity sha512-5tV0iFuM15f5Q+TJJp97r0mCaSwffFwlh5Ey7v9MhKjv1AXU1/GCEeRmoN2B1wT1Yh1i1zPKqj423i+y5RzoPA==
dependencies:
"@sentry/browser" "^5.4.0"
awesome-debounce-promise "^2.1.0"
axios "^0.21.1"
commander ">=2.20.0"
react-content-loader ">=3.4.1"

"@redhat-cloud-services/frontend-components@2.5.10":
version "2.5.10"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components/-/frontend-components-2.5.10.tgz#644b459066c9ab30730f7251133e464579ec9879"
integrity sha512-/1BW2jwdEyD9p2jF53RPmZhtucdaoB6//sCxBy9PvZnfVMYlT1sf+EAOdj+q7Nd4agfItKnM8Tg3IFkIfpeOUw==
"@redhat-cloud-services/frontend-components@3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components/-/frontend-components-3.0.6.tgz#036cd9656a18616d8ed4cff6a56ce5e9c4030984"
integrity sha512-SBl4fskO4BwqiJvsXJBZyxqWECIpgwFOgSD0rpma4lD+d+Fq28gjH+UMgukpGD5tgNJrbmsG/9ZTwqSbt1+1BA==
dependencies:
"@redhat-cloud-services/frontend-components-utilities" "*"
"@redhat-cloud-services/frontend-components-utilities" ">=3.0.0"
"@scalprum/core" "0.0.10"
"@scalprum/react-core" "0.0.13"
sanitize-html "^1.25.0"
Expand Down

0 comments on commit 76b746c

Please sign in to comment.