Skip to content

Commit

Permalink
Merge branch 'trunk' into rnmobile/ensure-contact-info-text-visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan committed Nov 16, 2023
2 parents 6af7179 + c92668f commit a815003
Show file tree
Hide file tree
Showing 1,236 changed files with 18,194 additions and 16,593 deletions.
35 changes: 0 additions & 35 deletions .github/files/e2e-tests/e2e-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ const projects = [
suite: '',
buildGroup: 'jetpack-sync',
},
{
project: 'Jetpack blocks',
path: 'projects/plugins/jetpack/tests/e2e',
testArgs: [ 'specs/blocks', '--retries=1' ],
targets: [ 'plugins/jetpack' ],
suite: '',
buildGroup: 'jetpack-core',
},
{
project: 'Jetpack Boost - Base',
path: 'projects/plugins/boost/tests/e2e',
Expand Down Expand Up @@ -125,33 +117,6 @@ switch ( process.env.GITHUB_EVENT_NAME ) {
const refName = process.env.REF_NAME;
const refType = process.env.REF_TYPE;

if ( repoName === 'jetpack-production' ) {
projects.push( {
project: 'Blocks with latest Gutenberg',
path: 'projects/plugins/jetpack/tests/e2e',
testArgs: [ 'blocks', '--retries=1' ],
suite: 'gutenberg',
} );

if ( refType === 'tag' || refName === 'trunk' ) {
projects.push( {
project: 'Jetpack on Atomic',
path: 'projects/plugins/jetpack/tests/e2e',
testArgs: [ 'blocks', '--retries=1' ],
suite: 'atomic',
} );
}

if ( refName === 'trunk' ) {
projects.push( {
project: 'Jetpack on VIP',
path: 'projects/plugins/jetpack/tests/e2e',
testArgs: [ 'blocks', '--retries=1' ],
suite: 'vip',
} );
}
}

for ( const project of projects ) {
const packageJson = JSON.parse(
fs.readFileSync( `${ project.path }/package.json`, 'utf8' )
Expand Down
11 changes: 1 addition & 10 deletions .github/files/generate-ci-matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,14 @@
);
}

// PHP 5.6 support was dropped in WP 6.3. Remove this (and everything elsewhere related to PHP 5.6) when we drop support for earlier versions.
$matrix[] = array(
'name' => 'PHP tests: PHP 5.6 WP previous',
'script' => 'test-php',
'php' => '5.6',
'wp' => 'previous',
'timeout' => 20, // 2022-01-25: 5.6 tests have started timing out at 15 minutes. Previously: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 trunk run, ~5.5-6 for 7.x and 8.0.
);

foreach ( array( 'previous', 'trunk' ) as $wp ) {
$phpver = $versions['PHP_VERSION'];
$matrix[] = array(
'name' => "PHP tests: PHP {$phpver} WP $wp",
'script' => 'test-php',
'php' => $phpver,
'wp' => $wp,
'timeout' => 15, // 2021-01-18: Successful runs seem to take ~8 minutes for PHP 5.6 and for the 7.4 trunk run, ~5.5-6 for 7.x and 8.0.
'timeout' => 15, // 2021-01-18: Successful runs seem to take ~8 minutes for the 7.4 trunk run, ~5.5-6 for 7.x and 8.0.
);
}

Expand Down
29 changes: 8 additions & 21 deletions .github/files/lint-project-structure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ for PROJECT in projects/*; do
fi
done

ROOT_PACKAGE_JSON_ENGINES="$(jq '.engines | .pnpm |= empty' package.json)"

for PROJECT in projects/*/*; do
SLUG="${PROJECT#projects/}"
TYPE="${SLUG%/*}"
Expand All @@ -97,25 +95,6 @@ for PROJECT in projects/*/*; do
echo "::error file=$PROJECT/.gitattributes::$PROJECT/.github/ should have git attribute export-ignore."
fi

# - package.json engines should match monorepo root package.json engines
if [[ -e "$PROJECT/package.json" ]]; then
PACKAGE_JSON_ENGINES="$(jq '.engines' "$PROJECT/package.json")"
if [[ "$PACKAGE_JSON_ENGINES" != "$ROOT_PACKAGE_JSON_ENGINES" ]]; then
EXIT=1
LINE=$(jq --stream --arg obj "$PACKAGE_JSON_ENGINES" 'if length == 1 then .[0][:-1] else .[0] end | if . == ["engines"] then input_line_number - ( $obj | gsub( "[^\n]"; "" ) | length ) else empty end' "$PROJECT/package.json")
if [[ -n "$LINE" ]]; then
echo "---" # Bracket message containing newlines for better visibility in GH's logs.
echo "::error file=$PROJECT/package.json,line=$LINE::Engines must match those in the monorepo root package.json (but omitting \"pnpm\").%0A \"engines\": ${ROOT_PACKAGE_JSON_ENGINES//$'\n'/%0A }"
echo "---"
else
LINE=$(wc -l < "$PROJECT/package.json")
echo "---" # Bracket message containing newlines for better visibility in GH's logs.
echo "::error file=$PROJECT/package.json,line=$LINE::Engines must be specified, matching those in the monorepo root package.json (but omitting \"pnpm\").%0A \"engines\": ${ROOT_PACKAGE_JSON_ENGINES//$'\n'/%0A }"
echo "---"
fi
fi
fi

# - package.json for js modules should look like a library to renovate.
if [[ "$PROJECT" == projects/js-packages/* && -e "$PROJECT/package.json" ]]; then
! IFS= read -r INDEX < <( ls -- "$PROJECT"/index.{js,jsx,cjs,mjs,ts,tsx,d.ts} 2>/dev/null )
Expand Down Expand Up @@ -200,6 +179,14 @@ for PROJECT in projects/*/*; do
fi
fi

# Should have only one of jsconfig.json or tsconfig.json.
# @todo Having neither is ok in some cases. Can we determine when one is needed to flag that it should be added?
if [[ -e "$PROJECT/jsconfig.json" && -e "$PROJECT/tsconfig.json" ]]; then
EXIT=1
echo "::error file=$PROJECT/jsconfig.json::The project should have either jsconfig.json or tsconfig.json, not both. Keep tsconfig if the project uses TypeScript, or jsconfig if the project is JS-only."
echo "::error file=$PROJECT/tsconfig.json::The project should have either jsconfig.json or tsconfig.json, not both. Keep tsconfig if the project uses TypeScript, or jsconfig if the project is JS-only."
fi

# - composer.json must exist.
if [[ ! -e "$PROJECT/composer.json" ]]; then
EXIT=1
Expand Down
2 changes: 1 addition & 1 deletion .github/files/setup-wordpress-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case "$WP_BRANCH" in
previous)
# We hard-code the version here because there's a time near WP releases where
# we've dropped the old 'previous' but WP hasn't actually released the new 'latest'
TAG=6.2
TAG=6.3
;;
*)
echo "Unrecognized value for WP_BRANCH: $WP_BRANCH" >&2
Expand Down
2 changes: 1 addition & 1 deletion .github/versions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Versions of tools to use in CI.
PHP_VERSION=8.2
COMPOSER_VERSION=2.6.5
NODE_VERSION=18.17.0
NODE_VERSION=20.8.1
PNPM_VERSION=8.6.8

# Other useful version numbers.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:
echo "TEST_SITE=${SITE}" >> $GITHUB_ENV
# Wait for the site to pick up latest tag version (DISPATCH_REF_NAME)
TEST_SITE="${SITE}" node "$GITHUB_WORKSPACE/tools/e2e-commons/bin/update-beta-version.cjs" $DISPATCH_REF_TYPE $DISPATCH_REF_NAME
TEST_SITE="${SITE}" node "$GITHUB_WORKSPACE/tools/e2e-commons/bin/update-beta-version.js" $DISPATCH_REF_TYPE $DISPATCH_REF_NAME
- name: Set up VIP site
if: ${{ matrix.suite == 'vip' }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.0
20.8.1
4 changes: 2 additions & 2 deletions .phpcs.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<!-- This file configures everything except the list of rules. -->
<!-- The separation is so .github/files/phpcompatibility-dev-phpcs.xml can use the same config with a different rule set. -->
<ruleset>
<config name="minimum_supported_wp_version" value="6.2" />
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="6.3" />
<config name="testVersion" value="7.0-"/>

<!-- Use our custom filter for `.phpcsignore` and `.phpcs.dir.xml` support. -->
<arg name="filter" value="vendor/automattic/jetpack-phpcs-filter/src/PhpcsFilter.php" />
Expand Down
6 changes: 6 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ function fixDeps( pkg ) {
pkg.peerDependencies.react = '^18';
}

// Unnecessary dep, should be a dev dep.
// https://github.com/WordPress/gutenberg/pull/56091
if ( pkg.name === '@wordpress/components' && pkg.dependencies[ '@ariakit/test' ] ) {
delete pkg.dependencies[ '@ariakit/test' ];
}

// Turn @wordpress/eslint-plugin's eslint plugin deps into peer deps.
// https://github.com/WordPress/gutenberg/issues/39810
if ( pkg.name === '@wordpress/eslint-plugin' ) {
Expand Down
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,16 @@
"**/.cache/**",
"**/jetpack_vendor/**/jetpack_vendor/**",
"**/jetpack_vendor/**"
]
],
"phpCodeSniffer.autoExecutable": true,
"phpCodeSniffer.standard": "Automatic",
"phpCodeSniffer.exclude": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/.cache/**",
"**/jetpack_vendor/**",
"**/vendor/**",
],
"prettier.prettierPath": "tools/js-tools/node_modules/prettier/index.cjs"
}
1 change: 0 additions & 1 deletion docs/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ See PCYsg-xsv-p2#mirror-repo-secrets for details.

Note the following will also be done by the build process:

* In `package.json`, the `.engines` will be deleted. If there is a `.publish_engines`, it will be renamed to `.engines`.
* Entries will be prepended to `.npmignore` to ignore `.github` and `composer.json` during the NPM publish. This file will be created if not present.

Before you create the first release tag, you may want to check out the mirror and run `npm publish --dry-run` to ensure that only the files you want published will be published.
Expand Down
68 changes: 0 additions & 68 deletions docs/yarn-upgrade.md

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"jetpack-js-tools": "workspace:*"
},
"engines": {
"node": "^18.13.0",
"pnpm": "^8.6.2",
"yarn": "use pnpm instead - see docs/yarn-upgrade.md"
"node": "^20.8.1",
"pnpm": "^8.6.2"
}
}
Loading

0 comments on commit a815003

Please sign in to comment.