Skip to content

Commit

Permalink
Merge pull request #725 from Automattic/update/js-packages
Browse files Browse the repository at this point in the history
Update JS packages
  • Loading branch information
alecgeatches authored May 24, 2024
2 parents e1ee3a2 + 180a951 commit 7ea0759
Show file tree
Hide file tree
Showing 23 changed files with 20,617 additions and 25,579 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/e2e-and-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Set up NodeJS 14.x
uses: actions/setup-node@v2
- name: Set up NodeJS 20
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
cache: npm

- name: Build Edit Flow
run: |
Expand All @@ -34,7 +35,7 @@ jobs:
- name: Run Lint JS
run: npm run lint-js

- name: Run JS tests (Jest)
- name: Run Jest tests
run: npm run test-jest

- name: Run E2E tests
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Install wordpress environment
run: npm -g install @wordpress/env
Expand All @@ -39,24 +39,10 @@ jobs:
php-version: ${{ matrix.php }}
tools: composer

- name: Install Composer dependencies (PHP < 8.0 )
if: ${{ matrix.php < 8.0 }}
uses: ramsey/composer-install@v1

- name: Install Composer dependencies (PHP >= 8.0)
if: ${{ matrix.php >= 8.0 || matrix.php == 'latest' }}
uses: ramsey/composer-install@v1
with:
composer-options: --ignore-platform-reqs

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
composer-options: --prefer-dist --no-progress

- name: Setup wp-env
run: wp-env start
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vendor

# Test files
.phpunit.result.cache
artifacts/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/dist/custom-status.build.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions blocks/dist/custom-status.editor.build.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions blocks/dist/custom-status.style.build.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 2 additions & 14 deletions modules/calendar/lib/dist/calendar.react.build.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions modules/calendar/lib/dist/calendar.react.build.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @name match-sorter
* @license MIT license.
* @copyright (c) 2020 Kent C. Dodds
* @author Kent C. Dodds <[email protected]> (https://kentcdodds.com)
*/
7 changes: 7 additions & 0 deletions modules/calendar/lib/dist/calendar.react.editor.build.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/calendar/lib/dist/calendar.react.style.build.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions modules/calendar/lib/react/calendar.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { _n, __, sprintf } from '@wordpress/i18n';
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';

/**
* Internal dependencies
Expand Down Expand Up @@ -122,13 +122,14 @@ filters.push( {
initialValue: EF_CALENDAR.FILTERS.num_weeks,
} );

ReactDOM.render(
const root = createRoot( document.getElementById( 'ef-calendar-navigation-mount' ) );

root.render(
<CalendarHeader
numberOfWeeks={ EF_CALENDAR.FILTERS.num_weeks }
beginningOfWeek={ EF_CALENDAR.BEGINNING_OF_WEEK }
pageUrl={ EF_CALENDAR.PAGE_URL }
filters={ filters }
filterValues={ EF_CALENDAR.FILTERS }
/>,
document.getElementById( 'ef-calendar-navigation-mount' )
/>
);
2 changes: 1 addition & 1 deletion modules/calendar/lib/react/combobox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { BaseControl, Button, IconButton } from '@wordpress/components';
import classnames from 'classnames';
import Downshift from 'downshift';
import matchSorter from 'match-sorter';
import { matchSorter } from 'match-sorter';
import PropTypes from 'prop-types';
import React from 'react';

Expand Down
Loading

0 comments on commit 7ea0759

Please sign in to comment.