Skip to content

Commit

Permalink
Update WordPress Monorepo (#50922)
Browse files Browse the repository at this point in the history
* fix(deps): update wordpress monorepo

* Fix test environment for window origin

* Fix eslint config

* Fix lint error related to _blank + rel

* Add dependency on jest-environment-jsdom

* Add COMPONENT_SYSTEM_PHASE to reduce bundle size

* Update wp-env to v4

* Bust GH actions cache

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: sarayourfriend <sarayourfriend@fastmail.com>
Co-authored-by: Sergio Cinos <sergio.cinos@gmail.com>
  • Loading branch information
4 people authored Mar 24, 2021
1 parent 365bf19 commit 241db75
Show file tree
Hide file tree
Showing 28 changed files with 1,862 additions and 2,289 deletions.
16 changes: 2 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,8 @@ module.exports = {
files: [ 'packages/**/*' ],
rules: {
// These two rules are to ensure packages don't import from calypso by accident to avoid circular deps.
'no-restricted-imports': [
'error',
{
patterns: [ 'calypso/*' ],
message: "Packages shouldn't import from calypso",
},
],
'no-restricted-modules': [
'error',
{
patterns: [ 'calypso/*' ],
message: "Packages shouldn't import from calypso",
},
],
'no-restricted-imports': [ 'error', { patterns: [ 'calypso/*' ] } ],
'no-restricted-modules': [ 'error', { patterns: [ 'calypso/*' ] } ],
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/editing-toolkit-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-1

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
Expand Down
60 changes: 30 additions & 30 deletions apps/editing-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,36 @@
"@babel/core": "^7.13.10",
"@testing-library/jest-dom": "^5.9.0",
"@testing-library/react": "^10.0.5",
"@wordpress/a11y": "^2.14.0",
"@wordpress/api-fetch": "^3.21.1",
"@wordpress/base-styles": "^3.3.0",
"@wordpress/block-editor": "^5.2.1",
"@wordpress/blocks": "^6.25.1",
"@wordpress/components": "^12.0.1",
"@wordpress/compose": "^3.23.1",
"@wordpress/data": "^4.26.1",
"@wordpress/data-controls": "^1.20.1",
"@wordpress/date": "^3.13.0",
"@wordpress/dependency-extraction-webpack-plugin": "^2.9.0",
"@wordpress/dom-ready": "^2.12.0",
"@wordpress/e2e-test-utils": "^4.16.1",
"@wordpress/edit-post": "^3.26.1",
"@wordpress/editor": "^9.25.1",
"@wordpress/element": "^2.19.0",
"@wordpress/a11y": "^2.14.3",
"@wordpress/api-fetch": "^3.21.5",
"@wordpress/base-styles": "^3.3.3",
"@wordpress/block-editor": "^5.2.10",
"@wordpress/blocks": "^7.0.6",
"@wordpress/components": "^12.0.8",
"@wordpress/compose": "^3.24.5",
"@wordpress/data": "^4.26.8",
"@wordpress/data-controls": "^1.20.8",
"@wordpress/date": "^3.13.1",
"@wordpress/dependency-extraction-webpack-plugin": "^3.0.1",
"@wordpress/dom-ready": "^2.12.1",
"@wordpress/e2e-test-utils": "^5.0.3",
"@wordpress/edit-post": "^3.26.10",
"@wordpress/editor": "^9.25.10",
"@wordpress/element": "^2.19.1",
"@wordpress/env": "^4.0.0",
"@wordpress/escape-html": "^1.11.0",
"@wordpress/hooks": "^2.11.0",
"@wordpress/html-entities": "^2.10.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.0",
"@wordpress/keycodes": "^2.18.0",
"@wordpress/nux": "^3.24.1",
"@wordpress/plugins": "^2.24.1",
"@wordpress/primitives": "^1.11.0",
"@wordpress/rich-text": "^3.24.1",
"@wordpress/scripts": "^12.5.0",
"@wordpress/server-side-render": "^1.20.1",
"@wordpress/url": "2.21.0",
"@wordpress/escape-html": "^1.11.1",
"@wordpress/hooks": "^2.11.1",
"@wordpress/html-entities": "^2.10.1",
"@wordpress/i18n": "^3.18.0",
"@wordpress/icons": "^2.9.1",
"@wordpress/keycodes": "^2.18.3",
"@wordpress/nux": "^3.24.8",
"@wordpress/plugins": "^2.24.7",
"@wordpress/primitives": "^1.11.1",
"@wordpress/rich-text": "^3.24.8",
"@wordpress/scripts": "^13.0.3",
"@wordpress/server-side-render": "^1.20.8",
"@wordpress/url": "2.21.2",
"classnames": "^2.2.6",
"emotion-theming": "^10.0.27",
"enzyme": "^3.11.0",
Expand All @@ -153,7 +153,7 @@
"devDependencies": {
"@babel/preset-typescript": "^7.13.0",
"@types/wordpress__plugins": "^2.3.7",
"@wordpress/eslint-plugin": "^7.3.0",
"@wordpress/eslint-plugin": "^8.0.2",
"babel-jest": "^26.3.0",
"webpack": "^5.24.4"
}
Expand Down
22 changes: 11 additions & 11 deletions apps/o2-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
},
"dependencies": {
"@automattic/calypso-build": "^7.0.0",
"@wordpress/api-fetch": "^3.21.1",
"@wordpress/base-styles": "^3.3.0",
"@wordpress/block-editor": "^5.2.1",
"@wordpress/blocks": "^6.25.1",
"@wordpress/components": "^12.0.1",
"@wordpress/data": "^4.26.1",
"@wordpress/editor": "^9.25.1",
"@wordpress/element": "^2.19.0",
"@wordpress/hooks": "^2.11.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/primitives": "^1.11.0",
"@wordpress/api-fetch": "^3.21.5",
"@wordpress/base-styles": "^3.3.3",
"@wordpress/block-editor": "^5.2.10",
"@wordpress/blocks": "^7.0.6",
"@wordpress/components": "^12.0.8",
"@wordpress/data": "^4.26.8",
"@wordpress/editor": "^9.25.10",
"@wordpress/element": "^2.19.1",
"@wordpress/hooks": "^2.11.1",
"@wordpress/i18n": "^3.18.0",
"@wordpress/primitives": "^1.11.1",
"classnames": "^2.2.6",
"lodash": "^4.17.21",
"moment": "^2.26.0",
Expand Down
34 changes: 17 additions & 17 deletions apps/wpcom-block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
"wpcom-sync": "./bin/wpcom-watch-and-sync.sh"
},
"dependencies": {
"@wordpress/block-editor": "^5.2.1",
"@wordpress/blocks": "^6.25.1",
"@wordpress/components": "^12.0.1",
"@wordpress/compose": "^3.23.1",
"@wordpress/data": "^4.26.1",
"@wordpress/dom-ready": "^2.12.0",
"@wordpress/editor": "^9.25.1",
"@wordpress/edit-post": "^3.26.1",
"@wordpress/edit-site": "^1.16.1",
"@wordpress/element": "^2.19.0",
"@wordpress/hooks": "^2.11.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.0",
"@wordpress/plugins": "^2.24.1",
"@wordpress/rich-text": "^3.24.1",
"@wordpress/url": "^2.21.0",
"@wordpress/block-editor": "^5.2.10",
"@wordpress/blocks": "^7.0.6",
"@wordpress/components": "^12.0.8",
"@wordpress/compose": "^3.24.5",
"@wordpress/data": "^4.26.8",
"@wordpress/dom-ready": "^2.12.1",
"@wordpress/editor": "^9.25.10",
"@wordpress/edit-post": "^3.26.10",
"@wordpress/edit-site": "^1.16.10",
"@wordpress/element": "^2.19.1",
"@wordpress/hooks": "^2.11.1",
"@wordpress/i18n": "^3.18.0",
"@wordpress/icons": "^2.9.1",
"@wordpress/plugins": "^2.24.7",
"@wordpress/rich-text": "^3.24.8",
"@wordpress/url": "^2.21.2",
"debug": "^4.1.1",
"jquery": "^1.12.3",
"lodash": "^4.17.21",
Expand All @@ -51,7 +51,7 @@
},
"devDependencies": {
"@automattic/calypso-build": "^7.0.0",
"@wordpress/dependency-extraction-webpack-plugin": "^2.9.0",
"@wordpress/dependency-extraction-webpack-plugin": "^3.0.1",
"enzyme": "^3.11.0",
"npm-run-all": "^4.1.5"
}
Expand Down
16 changes: 8 additions & 8 deletions client/components/vertical-nav/item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ class VerticalNavItem extends Component {
};

render() {
if ( this.props.isPlaceholder ) {
const { isPlaceHolder, external, onClick, path, className, children } = this.props;

if ( isPlaceHolder ) {
return this.placeholder();
}

const compactCardClassNames = classNames( 'vertical-nav-item', this.props.className );
const compactCardClassNames = classNames( 'vertical-nav-item', className );

const linkProps = external ? { target: '_blank', rel: 'noreferrer' } : {};

return (
<a
href={ this.props.path }
onClick={ this.props.onClick }
target={ this.props.external ? '_blank' : null }
>
<a href={ path } onClick={ onClick } { ...linkProps }>
<CompactCard className={ compactCardClassNames }>
{ this.getIcon() }
<span>{ this.props.children }</span>
<span>{ children }</span>
</CompactCard>
</a>
);
Expand Down
5 changes: 3 additions & 2 deletions client/layout/sidebar/item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ export default function SidebarItem( props ) {

useEffect( expandSectionIfSelected, [ props.selected ] );

const linkProps = showAsExternal ? { target: '_blank', rel: 'noreferrer' } : {};

return (
<li className={ classes } data-tip-target={ props.tipTarget } data-post-type={ props.postType }>
<a
className="sidebar__menu-link"
onClick={ props.onNavigate }
href={ url }
target={ showAsExternal ? '_blank' : null }
rel={ isExternalLink ? 'noopener noreferrer' : null }
onMouseEnter={ itemPreload }
{ ...linkProps }
>
{ icon && <Gridicon className={ 'sidebar__menu-icon' } icon={ icon } size={ 24 } /> }

Expand Down
10 changes: 10 additions & 0 deletions client/my-sites/checkout/checkout/test/maybe-jetpack-authorize.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import {
} from 'calypso/my-sites/controller';

describe( 'redirectToJetpack', () => {
let origin;
beforeEach( () => {
origin = window.origin;
window.origin = '';
} );

afterEach( () => {
window.origin = origin;
} );

test( 'redirect needed', () => {
const context = { query: { unlinked: '1' } };
const response = { site: { URL: 'https://example.org' } };
Expand Down
62 changes: 31 additions & 31 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,37 +60,37 @@
"@github/webauthn-json": "^0.4.1",
"@testing-library/jest-dom": "^5.9.0",
"@testing-library/react": "^10.0.5",
"@wordpress/a11y": "^2.14.0",
"@wordpress/api-fetch": "^3.21.1",
"@wordpress/base-styles": "^3.3.0",
"@wordpress/block-editor": "^5.2.1",
"@wordpress/block-library": "^2.27.1",
"@wordpress/blocks": "^6.25.1",
"@wordpress/components": "^12.0.1",
"@wordpress/compose": "^3.23.1",
"@wordpress/core-data": "^2.25.1",
"@wordpress/data": "^4.26.1",
"@wordpress/data-controls": "^1.20.1",
"@wordpress/dom": "^2.16.0",
"@wordpress/edit-post": "^3.26.1",
"@wordpress/editor": "^9.25.1",
"@wordpress/element": "^2.19.0",
"@wordpress/format-library": "^1.26.1",
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.0",
"@wordpress/interface": "^0.11.1",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/keycodes": "^2.18.0",
"@wordpress/notices": "^2.12.1",
"@wordpress/nux": "^3.24.1",
"@wordpress/plugins": "^2.24.1",
"@wordpress/redux-routine": "^3.13.0",
"@wordpress/rich-text": "^3.24.1",
"@wordpress/server-side-render": "^1.20.1",
"@wordpress/shortcode": "^2.11.0",
"@wordpress/url": "^2.21.0",
"@wordpress/viewport": "^2.25.1",
"@wordpress/warning": "^1.3.0",
"@wordpress/a11y": "^2.14.3",
"@wordpress/api-fetch": "^3.21.5",
"@wordpress/base-styles": "^3.3.3",
"@wordpress/block-editor": "^5.2.10",
"@wordpress/block-library": "^2.28.7",
"@wordpress/blocks": "^7.0.6",
"@wordpress/components": "^12.0.8",
"@wordpress/compose": "^3.24.5",
"@wordpress/core-data": "^2.25.9",
"@wordpress/data": "^4.26.8",
"@wordpress/data-controls": "^1.20.8",
"@wordpress/dom": "^2.16.2",
"@wordpress/edit-post": "^3.26.10",
"@wordpress/editor": "^9.25.10",
"@wordpress/element": "^2.19.1",
"@wordpress/format-library": "^1.26.10",
"@wordpress/i18n": "^3.18.0",
"@wordpress/icons": "^2.9.1",
"@wordpress/interface": "^1.0.6",
"@wordpress/is-shallow-equal": "^3.0.1",
"@wordpress/keycodes": "^2.18.3",
"@wordpress/notices": "^2.12.8",
"@wordpress/nux": "^3.24.8",
"@wordpress/plugins": "^2.24.7",
"@wordpress/redux-routine": "^3.13.1",
"@wordpress/rich-text": "^3.24.8",
"@wordpress/server-side-render": "^1.20.8",
"@wordpress/shortcode": "^2.12.1",
"@wordpress/url": "^2.21.2",
"@wordpress/viewport": "^2.25.8",
"@wordpress/warning": "^1.3.1",
"archiver": "^3.1.1",
"autosize": "^4.0.2",
"body-parser": "^1.19.0",
Expand Down
1 change: 1 addition & 0 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ const webpackConfig = {
'process.env.NODE_ENV': JSON.stringify( bundleEnv ),
'process.env.NODE_DEBUG': JSON.stringify( process.env.NODE_DEBUG || false ),
'process.env.GUTENBERG_PHASE': JSON.stringify( 1 ),
'process.env.COMPONENT_SYSTEM_PHASE': JSON.stringify( 0 ),
'process.env.FORCE_REDUCED_MOTION': JSON.stringify(
!! process.env.FORCE_REDUCED_MOTION || false
),
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@
"@types/wordpress__editor": "^9.4.5",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"@wordpress/base-styles": "^3.3.0",
"@wordpress/components": "^12.0.1",
"@wordpress/element": "^2.19.0",
"@wordpress/eslint-plugin": "^7.3.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.0",
"@wordpress/jest-preset-default": "^6.5.0",
"@wordpress/npm-package-json-lint-config": "^3.1.0",
"@wordpress/url": "^2.21.0",
"@wordpress/base-styles": "^3.3.3",
"@wordpress/components": "^12.0.8",
"@wordpress/element": "^2.19.1",
"@wordpress/eslint-plugin": "^8.0.2",
"@wordpress/i18n": "^3.18.0",
"@wordpress/icons": "^2.9.1",
"@wordpress/jest-preset-default": "^7.0.1",
"@wordpress/npm-package-json-lint-config": "^4.0.1",
"@wordpress/url": "^2.21.2",
"autoprefixer": "^9.7.3",
"babel-jest": "^26.3.0",
"babel-loader": "^8.2.2",
Expand Down Expand Up @@ -265,6 +265,7 @@
"ignore-loader": "^0.1.2",
"imports-loader": "^0.8.0",
"jest": "^26.4.0",
"jest-environment-jsdom": "^26.6.2",
"jest-enzyme": "^7.1.2",
"jest-junit": "^9.0.0",
"lerna": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/calypso-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"@babel/preset-react": "^7.12.13",
"@babel/preset-typescript": "^7.13.0",
"@types/webpack-env": "^1.16.0",
"@wordpress/babel-plugin-import-jsx-pragma": "^2.7.0",
"@wordpress/browserslist-config": "^2.7.0",
"@wordpress/dependency-extraction-webpack-plugin": "^2.9.0",
"@wordpress/babel-plugin-import-jsx-pragma": "^3.0.1",
"@wordpress/browserslist-config": "^3.0.1",
"@wordpress/dependency-extraction-webpack-plugin": "^3.0.1",
"autoprefixer": "^9.7.3",
"babel-jest": "^26.3.0",
"babel-loader": "^8.2.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/composite-checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"@automattic/react-i18n": "^1.0.0-alpha.0",
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@wordpress/data": "^4.26.1",
"@wordpress/i18n": "^3.17.0",
"@wordpress/data": "^4.26.8",
"@wordpress/i18n": "^3.18.0",
"debug": "^4.1.1",
"emotion-theming": "^10.0.27",
"prop-types": "^15.7.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/data-stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
},
"dependencies": {
"@automattic/format-currency": "^1.0.0-alpha.0",
"@wordpress/api-fetch": "^3.21.1",
"@wordpress/data-controls": "^1.20.1",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/url": "^2.21.0",
"@wordpress/api-fetch": "^3.21.5",
"@wordpress/data-controls": "^1.20.8",
"@wordpress/deprecated": "^2.11.1",
"@wordpress/url": "^2.21.2",
"fast-json-stable-stringify": "^2.1.0",
"i18n-calypso": "^5.0.0",
"qs": "^6.9.1",
Expand Down
Loading

0 comments on commit 241db75

Please sign in to comment.