Skip to content

Commit

Permalink
Merge pull request ampproject#7605 from ampproject/bump/nodejs
Browse files Browse the repository at this point in the history
Bump NodeJS from 14 to 18
  • Loading branch information
westonruter authored Sep 1, 2023
2 parents f5304e2 + 00a7241 commit 9bfb5b4
Show file tree
Hide file tree
Showing 8 changed files with 22,589 additions and 19,855 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* WordPress dependencies
*/
const jsdocConfig = require('@wordpress/eslint-plugin/configs/jsdoc');

// Extend jsdoc defined types.
jsdocConfig.rules['jsdoc/no-undefined-types'][1].definedTypes.push('Backbone');

module.exports = {
root: true,
extends: [
Expand Down Expand Up @@ -90,6 +98,8 @@ module.exports = {
},
],
'jsdoc/check-indentation': 'error',
'jsdoc/no-undefined-types':
jsdocConfig.rules['jsdoc/no-undefined-types'],
'@wordpress/dependency-group': 'error',
'@wordpress/react-no-unsafe-timeout': 'error',
},
Expand All @@ -115,6 +125,9 @@ module.exports = {
'jest/prefer-inline-snapshots': 'off',
'jest/prefer-snapshot-hint': 'off',
'jest/no-untyped-mock-factory': 'off',
// Disabling because we are not using typescript.
// @see <https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md>
'jest/unbound-method': 'off',
},
},
{
Expand All @@ -134,6 +147,7 @@ module.exports = {
'jest/no-hooks': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/prefer-inline-snapshots': 'off',
'jest/unbound-method': 'off',
},
},
{
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/build-test-measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,6 @@ jobs:
env:
COMPOSE_INTERACTIVE_NO_CLI: true


# TODO: Remove it once node version in .nvmrc is updated to >=16.
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 16
cache: npm

- name: Run E2E tests
run: npm run test:e2e:ci

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
18
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default (InitialMediaUpload, minImageDimensions) => {
'toolbar:create:featured-image',
function (toolbar) {
/**
* @this wp.media.view.MediaFrame.Select
* @this {wp.media.view.MediaFrame.Select}
*/
this.createSelectToolbar(toolbar, {
text: wp.media.view.l10n.setFeaturedImage,
Expand Down
2 changes: 1 addition & 1 deletion assets/src/common/components/select-media-frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const getSelectMediaFrame = (ToolbarSelect) => {
*
* @param {Object} toolbar
* @param {Object} [options={}]
* @this wp.media.controller.Region
* @this {wp.media.controller.Region}
*/
createSelectToolbar(toolbar, options) {
options = options || this.options.button || {};
Expand Down
10 changes: 5 additions & 5 deletions bin/local-env/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ HOST_PORT=$(dc port $CONTAINER 80 | awk -F : '{printf $2}')

# Wait until the WordPress site is responding to requests.
echo -en $(status_message "Attempting to connect to WordPress...")
until $(curl -L http://localhost:$HOST_PORT -so - 2>&1 | grep -q "WordPress"); do
until $(curl -L http://127.0.0.1:$HOST_PORT -so - 2>&1 | grep -q "WordPress"); do
echo -n '.'
sleep 5
done
Expand Down Expand Up @@ -52,7 +52,7 @@ fi

# Install WordPress.
echo -e $(status_message "Installing WordPress...")
wp core install --title="$SITE_TITLE" --admin_user=admin --admin_password=password [email protected] --skip-email --url=http://localhost:$HOST_PORT --quiet
wp core install --title="$SITE_TITLE" --admin_user=admin --admin_password=password [email protected] --skip-email --url=http://127.0.0.1:$HOST_PORT --quiet

# Create additional users.
echo -e $(status_message "Creating additional users...")
Expand Down Expand Up @@ -92,9 +92,9 @@ fi
# If the 'wordpress' volume wasn't during the down/up earlier, but the post port has changed, we need to update it.
echo -e $(status_message "Checking the site's url...")
CURRENT_URL=$(wp option get siteurl)
if [ "$CURRENT_URL" != "http://localhost:$HOST_PORT" ]; then
wp option update home "http://localhost:$HOST_PORT" --quiet
wp option update siteurl "http://localhost:$HOST_PORT" --quiet
if [ "$CURRENT_URL" != "http://127.0.0.1:$HOST_PORT" ]; then
wp option update home "http://127.0.0.1:$HOST_PORT" --quiet
wp option update siteurl "http://127.0.0.1:$HOST_PORT" --quiet
fi

# Install a dummy favicon to avoid 404 errors.
Expand Down
Loading

0 comments on commit 9bfb5b4

Please sign in to comment.