diff --git a/.eslintrc.js b/.eslintrc.js index e5f42eea656b90..6626a55a762d1c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,21 +4,6 @@ const glob = require( 'glob' ).sync; const { join } = require( 'path' ); -/** - * Internal dependencies - */ -const { version } = require( './package' ); - -/** - * Regular expression string matching a SemVer string with equal major/minor to - * the current package version. Used in identifying deprecations. - * - * @type {string} - */ -const majorMinorRegExp = - version.replace( /\.\d+$/, '' ).replace( /[\\^$.*+?()[\]{}|]/g, '\\$&' ) + - '(\\.\\d+)?'; - /** * The list of patterns matching files used only for development purposes. * @@ -92,14 +77,6 @@ const restrictedSyntax = [ 'ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]', message: 'Path access on WordPress dependencies is not allowed.', }, - { - selector: - 'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' + - majorMinorRegExp + - '/]', - message: - 'Deprecated functions must be removed before releasing this version.', - }, { selector: 'CallExpression[callee.object.name="page"][callee.property.name="waitFor"]', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3e02267da7c512..f86afa25ae4bdc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,7 +14,7 @@ # Blocks /packages/block-library @ajitbohra @fabiankaegy -/packages/block-library/src/gallery @geriux +/packages/block-library/src/gallery /packages/block-library/src/comment-template @michalczaplinski /packages/block-library/src/comments @michalczaplinski /packages/block-library/src/table-of-contents @ZebulanStanphill @@ -138,10 +138,7 @@ /lib/compat/*/html-api @dmsnell /lib/experimental/rest-api.php @timothybjacobs /lib/experimental/class-wp-rest-* @timothybjacobs -/lib/experimental/class-wp-rest-block-editor-settings-controller.php @timothybjacobs @spacedmonkey @geriux - -# Native -/packages/components/src/mobile/global-styles-context @geriux +/lib/experimental/class-wp-rest-block-editor-settings-controller.php @timothybjacobs @spacedmonkey # Native (Unowned) *.native.js diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 2bb5676ae9ed66..c4c5eeba9c51a7 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -11,4 +11,4 @@ jobs: with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Validate checksums - uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 + uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index e0365c9b4d3d29..4989239286462f 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -29,7 +29,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Java - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 + uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 with: distribution: 'corretto' java-version: '17' @@ -48,7 +48,7 @@ jobs: run: npm run native test:e2e:setup - name: Gradle cache - uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 + uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 # AVD cache disabled as it caused emulator termination to hang indefinitely. # https://github.com/ReactiveCircus/android-emulator-runner/issues/385 diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 1665d769e25f05..855d8a3e5067a6 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -28,7 +28,7 @@ jobs: with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 + - uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # v1.207.0 with: # `.ruby-version` file location working-directory: packages/react-native-editor/ios diff --git a/.github/workflows/storybook-check.yml b/.github/workflows/storybook-check.yml new file mode 100644 index 00000000000000..dd710f96747128 --- /dev/null +++ b/.github/workflows/storybook-check.yml @@ -0,0 +1,27 @@ +name: Check Storybook build + +on: pull_request + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Setup Node.js and install dependencies + uses: ./.github/setup-node + + - name: Build Storybook + run: npm run storybook:build diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index efc7ef76f8c648..b5c5e2255da5e2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -188,7 +188,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: '${{ matrix.php }}' ini-file: development @@ -283,7 +283,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Set up PHP - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: '7.4' coverage: none diff --git a/.gitignore b/.gitignore index 1d75f9f429d869..9e7e4333af8689 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ results /test/e2e/artifacts /perf-envs /composer.lock +/ts-traces # The /.cache folder is needed for phpcs to cache results between runs, while other .cache folders must be ignored # It is not possible to re-include a file if a parent directory of that file is excluded diff --git a/backport-changelog/readme.md b/backport-changelog/readme.md index 8066cc6a6fca24..02b1983dd38e19 100644 --- a/backport-changelog/readme.md +++ b/backport-changelog/readme.md @@ -20,7 +20,7 @@ The filename is the Core PR number. For example, if your Core PR number is `1234` and is slated to be part of the WordPress 6.9 release, the filename will be `1234.md`, and will be placed in the `/backport-changelog/6.9` directory. -The content of the markdown file should be the Github URL of the Core PR, followed by a list of Gutenberg PR Github URLs whose changes are backported in the Core PR. +The content of the markdown file should be the GitHub URL of the Core PR, followed by a list of Gutenberg PR GitHub URLs whose changes are backported in the Core PR. A single Core PR may contain changes from one or multiple Gutenberg PRs. @@ -51,7 +51,7 @@ For the backport changelog, Gutenberg uses individual files as opposed to a sing Some Gutenberg PRs may be flagged as needing a core backport PR when they don't, for example when the PR contains minor comment changes, or the changes already exist in Core. -For individual PRs, there are two Github labels that can be used to exclude a PR from the backport changelog CI check: +For individual PRs, there are two GitHub labels that can be used to exclude a PR from the backport changelog CI check: - `Backport from WordPress Core` - Indicates that the PR is a backport from WordPress Core and doesn't need a Core PR. - `No Core Sync Required` - Indicates that any changes do not need to be synced to WordPress Core. diff --git a/bin/api-docs/gen-block-lib-list.js b/bin/api-docs/gen-block-lib-list.js index 0c79def1989992..309a3931b12189 100644 --- a/bin/api-docs/gen-block-lib-list.js +++ b/bin/api-docs/gen-block-lib-list.js @@ -108,12 +108,12 @@ function processObjWithInnerKeys( obj ) { * not disabled. So adding { color: 'link' } support also brings along * background and text. * - * @param {Object} supports - keys supported by blokc + * @param {Object} supports - keys supported by block * @return {Object} supports augmented with defaults */ function augmentSupports( supports ) { if ( 'color' in supports ) { - // If backgroud or text is not specified (true or false) + // If background or text is not specified (true or false) // then add it as true.a if ( ! ( 'background' in supports.color ) ) { supports.color.background = true; diff --git a/bin/generate-gutenberg-php.php b/bin/generate-gutenberg-php.php index 4ed6b661a21c23..1dc2cf6db4ef59 100755 --- a/bin/generate-gutenberg-php.php +++ b/bin/generate-gutenberg-php.php @@ -15,6 +15,8 @@ /** * Prints `define` statements for the production version of `gutenberg.php` * (the plugin entry point). + * + * @global string $plugin_version The version number of the plugin. */ function print_production_defines() { global $plugin_version; diff --git a/bin/plugin/commands/changelog.js b/bin/plugin/commands/changelog.js index eac0f7b268d5bf..edb81aa0ca6515 100644 --- a/bin/plugin/commands/changelog.js +++ b/bin/plugin/commands/changelog.js @@ -88,7 +88,7 @@ const LABEL_TYPE_MAPPING = { }; /** - * Mapping of label names to arbitary features in the release notes. + * Mapping of label names to arbitrary features in the release notes. * * Mapping a given label to a feature will guarantee it will be categorised * under that feature name in the changelog within each section. @@ -274,7 +274,7 @@ function mapLabelsToFeatures( labels ) { * * @param {string[]} labels Label names. * - * @return {boolean} whether or not the issue's is labbeled as block specific + * @return {boolean} whether or not the issue's is labeled as block specific */ function getIsBlockSpecificIssue( labels ) { return !! labels.find( ( label ) => label.startsWith( '[Block] ' ) ); @@ -343,7 +343,7 @@ function getIssueFeature( issue ) { // 1. Prefer explicit mapping of label to feature. if ( featureCandidates.length ) { - // Get occurances of the feature labels. + // Get occurrences of the feature labels. const featureCounts = featureCandidates.reduce( /** * @param {Record} acc Accumulator @@ -941,7 +941,7 @@ function skipCreatedByBots( pullRequests ) { } /** - * Produces the formatted markdown for the contributor props seciton. + * Produces the formatted markdown for the contributor props section. * * @param {IssuesListForRepoResponseItem[]} pullRequests List of pull requests. * diff --git a/bin/plugin/commands/test/changelog.js b/bin/plugin/commands/test/changelog.js index 9c9d423d18d1cb..eb7e3377fe55ba 100644 --- a/bin/plugin/commands/test/changelog.js +++ b/bin/plugin/commands/test/changelog.js @@ -260,7 +260,7 @@ describe( 'getIssueFeature', () => { name: '[Package] This package', }, { - name: '[Feature] Cool Feature', // Should have priority despite prescence of block specific label. + name: '[Feature] Cool Feature', // Should have priority despite presence of block specific label. }, { name: '[Package] Another One', diff --git a/changelog.txt b/changelog.txt index bb71ae8617d7f4..25e633d96949f8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,6 @@ == Changelog == -= 20.0.0-rc.1 = - += 20.0.0 = ## Changelog @@ -453,6 +452,8 @@ The following contributors merged PRs in this release: @aaronrobertshaw @afercia @akasunil @benazeer-ben @bph @Chrico @ciampo @d-alleyne @DAreRodz @dhruvikpatel18 @draganescu @ellatrix @fabiankaegy @fushar @getdave @gigitux @gziolo @hbhalodia @himanshupathak95 @im3dabasia @Infinite-Null @jameskoster @jasmussen @jeryj @jorgefilipecosta @jsnajdr @juanfra @justlevine @karthick-murugan @kmanijak @louwie17 @Lovor01 @Mamaduka @manzoorwanijk @matiasbenedetto @Mayank-Tripathi32 @mayurprajapatii @mcsf @michalczaplinski @mikachan @mirka @ntsekouras @oandregal @ockham @PARTHVATALIYA @prasadkarmalkar @ramonjd @rilwis @rinkalpagdar @Rishit30G @rohitmathur-7 @SainathPoojary @sarthaknagoshe2002 @SH4LIN @shail-mehta @shimotmk @sirreal @stokesman @Sukhendu2002 @swissspidy @t-hamano @talldan @tellthemachines @timse201 @tyxla @up1512001 @vampdroid @Vrishabhsk @yogeshbhutkar @youknowriad + + = 19.9.0 = ## Changelog diff --git a/docs/contributors/code/release.md b/docs/contributors/code/release.md index 6e99286895c7c3..1a3af716f5848a 100644 --- a/docs/contributors/code/release.md +++ b/docs/contributors/code/release.md @@ -234,7 +234,7 @@ It's important to check that: - the plugin from the directory works as expected - the ZIP contents (see [Downloads](https://plugins.trac.wordpress.org/browser/gutenberg/)) looks correct (doesn't have anything obvious missing) - the [Gutenberg SVN repo](https://plugins.trac.wordpress.org/browser/gutenberg/) has two new commits (see [the log](https://plugins.trac.wordpress.org/browser/gutenberg/)): - - the `trunk` folder should have "Commiting version X.Y.Z" + - the `trunk` folder should have "Committing version X.Y.Z" - there is a new `tags/X.Y.Z` folder with the same contents as `trunk` whose latest commit is "Tagging version X.Y.Z" Most likely, the tag folder couldn't be created. This is a [known issue](https://plugins.trac.wordpress.org/browser/gutenberg/) that [can be fixed manually](https://github.com/WordPress/gutenberg/issues/55295#issuecomment-1759292978). diff --git a/docs/how-to-guides/feature-flags.md b/docs/how-to-guides/feature-flags.md index 11c5ae881337dd..04fc6c08d98249 100644 --- a/docs/how-to-guides/feature-flags.md +++ b/docs/how-to-guides/feature-flags.md @@ -54,7 +54,7 @@ if ( globalThis.IS_GUTENBERG_PLUGIN ) { ```js if ( true ) { - // Wepack has replaced `globalThis.IS_GUTENBERG_PLUGIN` with `true` + // Webpack has replaced `globalThis.IS_GUTENBERG_PLUGIN` with `true` pluginOnlyFeature(); } ``` diff --git a/docs/manifest.json b/docs/manifest.json index 8f267e79ef4feb..94610061e430b5 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1967,6 +1967,12 @@ "markdown_source": "../packages/undo-manager/README.md", "parent": "packages" }, + { + "title": "@wordpress/upload-media", + "slug": "packages-upload-media", + "markdown_source": "../packages/upload-media/README.md", + "parent": "packages" + }, { "title": "@wordpress/url", "slug": "packages-url", diff --git a/docs/reference-guides/block-api/block-bindings.md b/docs/reference-guides/block-api/block-bindings.md index 479396abc13c9c..c26ade45e8b5e3 100644 --- a/docs/reference-guides/block-api/block-bindings.md +++ b/docs/reference-guides/block-api/block-bindings.md @@ -148,7 +148,7 @@ The function to register a custom source is `registerBlockBindingsSource( args ) - `args`: `object` with the following structure: - `name`: `string` with the unique and machine-readable name. - - `label`: `string` with the human readable name of the custom source. In case it was defined already on the server, the server label will be overriden by this one, in that case, it is not recommended to be defined here. (optional) + - `label`: `string` with the human readable name of the custom source. In case it was defined already on the server, the server label will be overridden by this one, in that case, it is not recommended to be defined here. (optional) - `usesContext`: `array` with the block context that the custom source may need. In case it was defined already on the server, it should not be defined here. (optional) - `getValues`: `function` that retrieves the values from the source. (optional) - `setValues`: `function` that allows updating the values connected to the source. (optional) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 0715b1e3547e2a..3b251813e41c0a 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -255,7 +255,7 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/details - **Category:** text - **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** showContent, summary +- **Attributes:** allowedBlocks, showContent, summary ## Embed @@ -512,7 +512,7 @@ Display a list of all pages. ([Source](https://github.com/WordPress/gutenberg/tr - **Name:** core/page-list - **Category:** widgets - **Allowed Blocks:** core/page-list-item -- **Supports:** interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** isNested, parentPageID ## Page List Item @@ -811,7 +811,7 @@ Display entries from any RSS or Atom feed. ([Source](https://github.com/WordPres - **Name:** core/rss - **Category:** widgets -- **Supports:** align, interactivity (clientNavigation), ~~html~~ +- **Supports:** align, color (background, gradients, link, text), interactivity (clientNavigation), ~~html~~ - **Attributes:** blockLayout, columns, displayAuthor, displayDate, displayExcerpt, excerptLength, feedURL, itemsToShow ## Search diff --git a/docs/reference-guides/data/data-core-block-editor.md b/docs/reference-guides/data/data-core-block-editor.md index bca05d57610934..c7ea40d3a6ff11 100644 --- a/docs/reference-guides/data/data-core-block-editor.md +++ b/docs/reference-guides/data/data-core-block-editor.md @@ -714,7 +714,7 @@ Returns the list of patterns based on their declared `blockTypes` and a block's _Parameters_ - _state_ `Object`: Editor state. -- _blockNames_ `string|string[]`: Block's name or array of block names to find matching pattens. +- _blockNames_ `string|string[]`: Block's name or array of block names to find matching patterns. - _rootClientId_ `?string`: Optional target root client ID. _Returns_ diff --git a/docs/reference-guides/data/data-core.md b/docs/reference-guides/data/data-core.md index 199c29cd67dd2e..4aee9d5051909b 100644 --- a/docs/reference-guides/data/data-core.md +++ b/docs/reference-guides/data/data-core.md @@ -878,7 +878,7 @@ _Returns_ ### redo -Action triggered to redo the last undoed edit to an entity record, if any. +Action triggered to redo the last undone edit to an entity record, if any. ### saveEditedEntityRecord diff --git a/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md b/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md index 3760fdf3867802..4f167d4e37de8a 100644 --- a/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md +++ b/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md @@ -28,6 +28,15 @@ Take, for example, this interactive block with two buttons and a paragraph: + +