Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into fix/create-root-reac…
Browse files Browse the repository at this point in the history
…t-19-compat
  • Loading branch information
coder-karen committed Jul 24, 2024
2 parents afdc471 + e76e267 commit ec6dbd1
Show file tree
Hide file tree
Showing 276 changed files with 1,140 additions and 891 deletions.
33 changes: 33 additions & 0 deletions .github/files/select-wordpress-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

## Environment used by this script:
#
# Required:
# - WP_BRANCH: Version of WordPress to check out.
#
# Other:
# - GITHUB_ENV: File written to to set environment variables for later steps.

set -eo pipefail

case "$WP_BRANCH" in
trunk)
WORDPRESS_TAG=trunk
;;
latest)
WORDPRESS_TAG=$(php ./tools/get-wp-version.php)
;;
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'
WORDPRESS_TAG=6.5
;;
*)
echo "Unrecognized value for WP_BRANCH: $WP_BRANCH" >&2
exit 1
;;
esac

if [[ -n "$GITHUB_ENV" ]]; then
echo "WORDPRESS_TAG=$WORDPRESS_TAG" >> "$GITHUB_ENV"
fi
19 changes: 1 addition & 18 deletions .github/files/setup-wordpress-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,7 @@ mysql -e "CREATE DATABASE wordpress_tests;"
echo "::endgroup::"

echo "::group::Preparing WordPress from \"$WP_BRANCH\" branch";
case "$WP_BRANCH" in
trunk)
WORDPRESS_TAG=trunk
;;
latest)
WORDPRESS_TAG=$(php ./tools/get-wp-version.php)
;;
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'
WORDPRESS_TAG=6.5
;;
*)
echo "Unrecognized value for WP_BRANCH: $WP_BRANCH" >&2
exit 1
;;
esac
source .github/files/select-wordpress-tag.sh
git clone --depth=1 --branch "$WORDPRESS_TAG" git://develop.git.wordpress.org/ "/tmp/wordpress-$WP_BRANCH"
# We need a built version of WordPress to test against, so download that into the src directory instead of what's in wordpress-develop.
rm -rf "/tmp/wordpress-$WP_BRANCH/src"
Expand All @@ -56,7 +40,6 @@ echo "::endgroup::"
if [[ -n "$GITHUB_ENV" ]]; then
echo "WORDPRESS_DEVELOP_DIR=/tmp/wordpress-$WP_BRANCH" >> "$GITHUB_ENV"
echo "WORDPRESS_DIR=/tmp/wordpress-$WP_BRANCH/src" >> "$GITHUB_ENV"
echo "WORDPRESS_TAG=$WORDPRESS_TAG" >> "$GITHUB_ENV"
fi

# Don't symlink, it breaks when copied later.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
echo "projects=${CHANGED}" >> "$GITHUB_OUTPUT"
echo "any-plugins=${ANY_PLUGINS}" >> "$GITHUB_OUTPUT"
- name: Select WordPress version
if: steps.changed.outputs.any-plugins != 'true' && matrix.wp != 'none'
run: .github/files/select-wordpress-tag.sh

- name: Setup WordPress environment for plugin tests
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions docs/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ We use `composer.json` to hold metadata about projects. Much of our generic tool
* `.extra.autotagger`: Set truthy to enable automatic release-version tagging in the mirror repo. See [Mirror repositories > Autotagger](#autotagger) for details.
* `.extra.changelogger`: Configuration object for [Changelogger](#jetpack-changelogger). See [its documentation](https://github.com/Automattic/jetpack-changelogger#configuration) for details.
* `.extra.changelogger-default-type`: Certain of our tools automatically create Changelogger change entries. This is the value to use for `--type` when doing so. Default type is `changed`.
* `.extra.dependencies.build`: This optional array specifies the "slugs" of any within-monorepo build dependencies that can't otherwise be inferred. The "slug" consists of the two levels of directory under `projects/`, e.g. `plugins/jetpack` or `packages/lazy-images`.
* `.extra.dependencies.test`: This optional array specifies the "slugs" of any within-monorepo testing dependencies that can't otherwise be inferred. The "slug" consists of the two levels of directory under `projects/`, e.g. `plugins/jetpack` or `packages/lazy-images`. See [Testing](#testing) for details.
* `.extra.dependencies.build`: This optional array specifies the "slugs" of any within-monorepo build dependencies that can't otherwise be inferred. The "slug" consists of the two levels of directory under `projects/`, e.g. `plugins/jetpack` or `packages/changelogger`.
* `.extra.dependencies.test`: This optional array specifies the "slugs" of any within-monorepo testing dependencies that can't otherwise be inferred. The "slug" consists of the two levels of directory under `projects/`, e.g. `plugins/jetpack` or `packages/changelogger`. See [Testing](#testing) for details.
* `.extra.dependencies.test-only`: This optional array specifies the "slugs" of any within-monorepo dependencies that are only used for testing and/or static analysis and should be ignored otherwise when analyzing intra-monorepo dependencies.
* `.extra.dev-releases`: Indicate that the plugin will have developer alpha releases. Instead of the mirror repositories showing "VER-alpha", they'll start at "VER-a.0" and you can use the `-a` flag to the release tooling to release "VER-a.1".
* `.extra.mirror-repo`: This specifies the name of the GitHub mirror repo, i.e. the "Automattic/jetpack-_something_" in "<span>https://</span>github.com/Automattic/jetpack-_something_".
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Check description task: Remove general guessing of release dates and code freezes. Add special casing for wpcomsh and mu-wpcom-plugin.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function hasProgressLabel( octokit, owner, repo, number ) {
* @returns {Promise<string>} Promise resolving to info about the release (code freeze, release date).
*/
async function getMilestoneDates( plugin, nextMilestone ) {
let releaseDate;
let releaseDate = 'none scheduled';
let codeFreezeDate;
if ( nextMilestone && nextMilestone.hasOwnProperty( 'due_on' ) && nextMilestone.due_on ) {
releaseDate = moment( nextMilestone.due_on ).format( 'LL' );
Expand All @@ -77,19 +77,11 @@ async function getMilestoneDates( plugin, nextMilestone ) {
// If we have a date and it is valid, use it, otherwise set code freeze to a week before the release.
if ( freezeDateDescription && moment( freezeDateDescription[ 1 ] ).isValid() ) {
codeFreezeDate = moment( freezeDateDescription[ 1 ] ).format( 'LL' );
} else {
codeFreezeDate = moment( nextMilestone.due_on ).subtract( 7, 'd' ).format( 'LL' );
}
} else {
// Fallback to raw math calculation
// Calculate next release date
const firstTuesdayOfMonth = moment().add( 1, 'months' ).startOf( 'month' );
while ( firstTuesdayOfMonth.day() !== 2 ) {
firstTuesdayOfMonth.add( 1, 'day' );
}
releaseDate = firstTuesdayOfMonth.format( 'LL' );
// Calculate next code freeze date
codeFreezeDate = firstTuesdayOfMonth.subtract( 8, 'd' ).format( 'LL' );
} else if ( plugin === 'wpcomsh' ) {
releaseDate = 'on demand (usually Mondays if not sooner)';
} else if ( plugin === 'mu-wpcom' ) {
releaseDate = 'WordPress.com Simple releases happen daily';
}

const capitalizedName = plugin
Expand All @@ -113,8 +105,7 @@ ${
- Releases to self-hosted sites happen monthly. The next release is scheduled for _${ releaseDate }_ (scheduled code freeze on _${ codeFreezeDate }_).`
: `
- Next scheduled release: _${ releaseDate }_.
- Scheduled code freeze: _${ codeFreezeDate }_.
`
${ codeFreezeDate ? `- Scheduled code freeze: _${ codeFreezeDate }_.\n` : '' }`
}
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.
Expand Down
8 changes: 8 additions & 0 deletions projects/js-packages/ai-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.15.0] - 2024-07-22
### Added
- Jetpack AI: Add logo generator codebase to the ai-client package. [#38391]

### Changed
- Update and export askQuestionSync. [#38344]

## [0.14.6] - 2024-07-15
### Added
- AI Client: Filter suggestions starting with llama artifacts [#38208]
Expand Down Expand Up @@ -351,6 +358,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated package dependencies. [#31659]
- Updated package dependencies. [#31785]

[0.15.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.6...v0.15.0
[0.14.6]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.5...v0.14.6
[0.14.5]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.4...v0.14.5
[0.14.4]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.3...v0.14.4
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/ai-client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "@automattic/jetpack-ai-client",
"version": "0.15.0-alpha",
"version": "0.15.0",
"description": "A JS client for consuming Jetpack AI services",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme",
"bugs": {
Expand Down
5 changes: 5 additions & 0 deletions projects/js-packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### This is a list detailing changes for the Jetpack RNA Components package releases.

## [0.55.0] - 2024-07-22
### Removed
- Remove compatibility with WordPress 6.4. [#38386]

## [0.54.4] - 2024-07-18
### Changed
- Internal updates.
Expand Down Expand Up @@ -1087,6 +1091,7 @@
### Changed
- Update node version requirement to 14.16.1

[0.55.0]: https://github.com/Automattic/jetpack-components/compare/0.54.4...0.55.0
[0.54.4]: https://github.com/Automattic/jetpack-components/compare/0.54.3...0.54.4
[0.54.3]: https://github.com/Automattic/jetpack-components/compare/0.54.2...0.54.3
[0.54.2]: https://github.com/Automattic/jetpack-components/compare/0.54.1...0.54.2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Added `className` prop to `Alert` component

This file was deleted.

13 changes: 11 additions & 2 deletions projects/js-packages/components/components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type AlertProps = {

/** Children to be rendered inside the alert. */
children: React.ReactNode;

/** Wrapper class name */
className?: string;
};

const getIconByLevel = ( level: AlertProps[ 'level' ] ) => {
Expand All @@ -35,11 +38,17 @@ const getIconByLevel = ( level: AlertProps[ 'level' ] ) => {
* @param {object} props - The component properties.
* @param {string} props.level - The alert level: error, warning, info, success.
* @param {boolean} props.showIcon - Whether to show the alert icon.
* @param {string} props.className - The wrapper class name.
* @param {React.Component} props.children - The alert content.
* @returns {React.ReactElement} The `Alert` component.
*/
const Alert: React.FC< AlertProps > = ( { level = 'warning', children, showIcon = true } ) => {
const classes = clsx( styles.container, styles[ `is-${ level }` ] );
const Alert: React.FC< AlertProps > = ( {
level = 'warning',
children,
showIcon = true,
className,
} ) => {
const classes = clsx( styles.container, styles[ `is-${ level }` ], className );

return (
<div className={ classes }>
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/jetpack-components",
"version": "0.55.0-alpha",
"version": "0.55.1-alpha",
"description": "Jetpack Components Package",
"author": "Automattic",
"license": "GPL-2.0-or-later",
Expand Down
5 changes: 5 additions & 0 deletions projects/js-packages/connection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### This is a list detailing changes for the Jetpack RNA Connection Component releases.

## [0.34.1] - 2024-07-22
### Added
- Display the proper error message for suspended sites on site registration. [#38359]

## [0.34.0] - 2024-07-18
### Changed
- Connection Screen: remove mention of Stats from the list of available free features. [#38328]
Expand Down Expand Up @@ -801,6 +805,7 @@
- `Main` and `ConnectUser` components added.
- `JetpackRestApiClient` API client added.

[0.34.1]: https://github.com/Automattic/jetpack-connection-js/compare/v0.34.0...v0.34.1
[0.34.0]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.19...v0.34.0
[0.33.19]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.18...v0.33.19
[0.33.18]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.17...v0.33.18
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/connection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/jetpack-connection",
"version": "0.34.1-alpha",
"version": "0.34.1",
"description": "Jetpack Connection Component",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/connection/#readme",
"bugs": {
Expand Down
8 changes: 8 additions & 0 deletions projects/js-packages/idc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

### This is a list detailing changes for the Jetpack RNA IDC package releases.

## 0.11.5 - 2024-07-23
### Fixed
- Updated package dependencies. [#38464]

## 0.11.4 - 2024-07-22
### Changed
- Update dependencies.

## 0.11.3 - 2024-07-03
### Changed
- Updated package dependencies. [#38132]
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/idc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/jetpack-idc",
"version": "0.11.3",
"version": "0.11.5",
"description": "Jetpack Connection Component",
"author": "Automattic",
"license": "GPL-2.0-or-later",
Expand Down
4 changes: 4 additions & 0 deletions projects/js-packages/licensing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.12.20 - 2024-07-22
### Changed
- Update dependencies. [#37982]

## 0.12.19 - 2024-07-15
### Changed
- Social Recommendations: Added for V1 plan [#38219]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: patch
Type: changed
Type: fixed

Updated package dependencies.
2 changes: 1 addition & 1 deletion projects/js-packages/licensing/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-licensing",
"version": "0.12.19",
"version": "0.12.21-alpha",
"description": "Jetpack licensing flow",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/licensing/#readme",
"bugs": {
Expand Down
4 changes: 4 additions & 0 deletions projects/js-packages/partner-coupon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.83 - 2024-07-22
### Changed
- Update dependencies. [#38402]

## 0.2.82 - 2024-07-08
### Changed
- Updated package dependencies. [#38132]
Expand Down
4 changes: 0 additions & 4 deletions projects/js-packages/partner-coupon/changelog/force-a-release

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/partner-coupon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-partner-coupon",
"version": "0.2.83-alpha",
"version": "0.2.83",
"description": "This package aims to add components to make it easier to redeem partner coupons",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/partner-coupon/#readme",
"bugs": {
Expand Down
6 changes: 6 additions & 0 deletions projects/js-packages/publicize-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.56.2] - 2024-07-22
### Fixed
- Fixed double request issue and simplifed refresh logic [#38350]
- Social: Fixed parallel social connection requests messing up the UI state. [#38408]

## [0.56.1] - 2024-07-15
### Changed
- Social: Removed unnecessary feature checks for social connections [#38216]
Expand Down Expand Up @@ -783,6 +788,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies. [#24470]

[0.56.2]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.56.1...v0.56.2
[0.56.1]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.56.0...v0.56.1
[0.56.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.55.1...v0.56.0
[0.55.1]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.55.0...v0.55.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Added mentioning of Manual Sharing

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fixed broken connection notices to make them more helpful
Loading

0 comments on commit ec6dbd1

Please sign in to comment.