diff --git a/.github/workflows/php-changes-detection.yml b/.github/workflows/php-changes-detection.yml
deleted file mode 100644
index 2eeaea561eb7ed..00000000000000
--- a/.github/workflows/php-changes-detection.yml
+++ /dev/null
@@ -1,101 +0,0 @@
-name: OPTIONAL - Confirm if PHP changes require backporting to WordPress Core
-
-on:
- pull_request:
- types: [opened, synchronize]
-jobs:
- detect_php_changes:
- name: Detect PHP changes
- runs-on: ubuntu-latest
- if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
- steps:
- - name: Check out code
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- with:
- fetch-depth: 0
- show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
- - name: Get changed PHP files
- id: changed-files-php
- uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44.5.2
- with:
- files: |
- lib/**
- packages/**/*.php
- phpunit/**
-
- - name: List all changed files
- if: steps.changed-files-php.outputs.any_changed == 'true'
- id: list-changed-php-files
- run: |
- echo "Changed files:"
- formatted_change_list=""
- for file in ${{ steps.changed-files-php.outputs.all_changed_files }}; do
- echo "$file was changed"
- formatted_change_list+="
:grey_question: $file"
- done
- formatted_change_list+="
"
- echo "formatted_change_list=$formatted_change_list" >> $GITHUB_OUTPUT
-
- - name: Find Comment
- uses: peter-evans/find-comment@v3
- id: find-comment
- with:
- issue-number: ${{ github.event.pull_request.number }}
- comment-author: 'github-actions[bot]'
- body-includes: ''
-
- - name: Create comment
- if: steps.find-comment.outputs.comment-id == '' && steps.changed-files-php.outputs.any_changed == 'true'
- uses: peter-evans/create-or-update-comment@v4
- with:
- issue-number: ${{ github.event.pull_request.number }}
- body: |
-
- This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.
-
- If so, it is recommended to create a [new Trac ticket](https://core.trac.wordpress.org/newticket) and submit a pull request to the [WordPress Core Github repository](https://github.com/WordPress/wordpress-develop) soon after this pull request is merged.
-
- If you're unsure, you can always ask for help in the #core-editor channel in [WordPress Slack](https://make.wordpress.org/chat/).
-
- Thank you! :heart:
-
- View changed files
- ${{ steps.list-changed-php-files.outputs.formatted_change_list }}
- View changed files
- ${{ steps.list-changed-php-files.outputs.formatted_change_list }}
-
webpack.config.js
when using wp-scripts
to modify the build process to suit your needs.
my text
" * ``` * - * @return {string} Text which has been converted into paragraph tags. + * @return Text which has been converted into paragraph tags. */ -export function autop( text, br = true ) { - const preTags = []; +export function autop( text: string, br: boolean = true ): string { + const preTags: Array< [ string, string ] > = []; if ( text.trim() === '' ) { return ''; @@ -330,7 +331,7 @@ export function autop( text, br = true ) { * Replaces `` tags with two line breaks except where the `
` has attributes. * Unifies whitespace. Indents `
my text
' ); // "my text" * ``` * - * @return {string} The content with stripped paragraph tags. + * @return The content with stripped paragraph tags. */ -export function removep( html ) { +export function removep( html: string ): string { const blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure'; const blocklist1 = blocklist + '|div|p'; const blocklist2 = blocklist + '|pre'; - /** @type {string[]} */ - const preserve = []; + const preserve: string[] = []; let preserveLinebreaks = false; let preserveBr = false; @@ -480,7 +480,7 @@ export function removep( html ) { // Restore preserved tags. if ( preserve.length ) { html = html.replace( /<${ inline }>foo${ inline }>
` ); } ); - content = content.join( '\n\n' ); - expected = expected.join( '\n' ); + const contentString = content.join( '\n\n' ); + const expectedString = expected.join( '\n' ); - expect( autop( content ).trim() ).toBe( expected ); + expect( autop( contentString ).trim() ).toBe( expectedString ); } ); test( 'element sanity', () => { diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index 53ced4dd01d2bb..e2d28f989be2c8 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.1.0 (2024-06-15) + ## 5.0.0 (2024-05-31) ### Breaking Changes diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index fc7c1294339083..4069427e2266f0 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "5.0.0", + "version": "5.1.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index 62a625ec2beeb7..fb97b5a036f414 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.1.0 (2024-06-15) + ## 6.0.0 (2024-05-31) ### Breaking Changes diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index c6f74686e56af2..6e0f58ed11f21f 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "6.0.0", + "version": "6.1.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index a59bd0bd795e16..94ca9ee37c6a39 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.1.0 (2024-06-15) + ## 8.0.0 (2024-05-31) ### Breaking Changes diff --git a/packages/babel-preset-default/README.md b/packages/babel-preset-default/README.md index 945e1137a328f4..fb853a73ea3c8b 100644 --- a/packages/babel-preset-default/README.md +++ b/packages/babel-preset-default/README.md @@ -2,7 +2,7 @@ Default [Babel](https://babeljs.io/) preset for WordPress development. -The preset includes configuration which enable language features and syntax extensions targeted for support by WordPress. This includes [ECMAScript proposals](https://github.com/tc39/proposals) which have reached [Stage 4 ("Finished")](https://tc39.es/process-document/), as well as the [JSX syntax extension](https://reactjs.org/docs/introducing-jsx.html). For more information, refer to the [JavaScript Coding Guidelines](https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/coding-guidelines.md#javascript). +The preset includes configuration which enable language features and syntax extensions targeted for support by WordPress. This includes [ECMAScript proposals](https://github.com/tc39/proposals) which have reached [Stage 4 ("Finished")](https://tc39.es/process-document/), as well as the [JSX syntax extension](https://react.dev/learn/writing-markup-with-jsx). For more information, refer to the [JavaScript Coding Guidelines](https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/code/coding-guidelines.md#javascript). ## Installation diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index e6d8f163b253fe..6e7f46a6480eb1 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "8.0.0", + "version": "8.1.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index 51e71a7555b8b9..81eaa88f226805 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.1.0 (2024-06-15) + ## 5.0.0 (2024-05-31) ### Breaking Changes diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index 690cd2ea76551e..7d0f3abb46f421 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "5.0.0", + "version": "5.1.0", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/CHANGELOG.md b/packages/blob/CHANGELOG.md index 50b6143dfb3e6c..940db196eede93 100644 --- a/packages/blob/CHANGELOG.md +++ b/packages/blob/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +## 4.1.0 (2024-06-15) + +### Internal + +- Refactor to TypeScript ([#62569](https://github.com/WordPress/gutenberg/pull/62569)). + ## 4.0.0 (2024-05-31) ### Breaking Changes diff --git a/packages/blob/README.md b/packages/blob/README.md index 64520a98bd6a79..d315cdab5e4a48 100644 --- a/packages/blob/README.md +++ b/packages/blob/README.md @@ -61,7 +61,7 @@ _Parameters_ _Returns_ -- `File|undefined`: The file for the blob URL. +- `File | undefined`: The file for the blob URL. ### getBlobTypeByURL @@ -73,7 +73,7 @@ _Parameters_ _Returns_ -- `string|undefined`: The blob type. +- `string | undefined`: The blob type. ### isBlobURL @@ -81,7 +81,7 @@ Check whether a url is a blob url. _Parameters_ -- _url_ `string|undefined`: The URL. +- _url_ `string | undefined`: The URL. _Returns_ diff --git a/packages/blob/package.json b/packages/blob/package.json index a6ea4525b3d376..335bf6cba82989 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "4.0.0", + "version": "4.1.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/src/index.js b/packages/blob/src/index.ts similarity index 66% rename from packages/blob/src/index.js rename to packages/blob/src/index.ts index 2493f81fc4c65b..62a6671db61544 100644 --- a/packages/blob/src/index.js +++ b/packages/blob/src/index.ts @@ -1,16 +1,13 @@ -/** - * @type {Record