Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f552d74
Init
manzoorwanijk Oct 31, 2025
dd61046
Update package paths
manzoorwanijk Oct 31, 2025
49b5b5f
Fix peer dependencies
manzoorwanijk Oct 31, 2025
cb03ba7
Fix build for packages/theme
manzoorwanijk Oct 31, 2025
998f20a
Update build.mjs
manzoorwanijk Oct 31, 2025
492cb30
Migrate patches
manzoorwanijk Dec 20, 2025
d276d97
Fix tsc errors
manzoorwanijk Dec 20, 2025
d7a9437
Fix build
manzoorwanijk Dec 20, 2025
2df4fe7
Fix Jest config
manzoorwanijk Dec 20, 2025
500b10a
pnpm import package-lock.json
manzoorwanijk Dec 20, 2025
8cb5b86
Migrate GitHub Actions workflows from npm to pnpm
manzoorwanijk Dec 20, 2025
9452948
Update bin/* to use pnpm
manzoorwanijk Dec 20, 2025
25550cc
Update AGENTS.md
manzoorwanijk Dec 20, 2025
b954fd7
Update pnpm-lock.yaml
manzoorwanijk Dec 20, 2025
51e192b
Update pnpm-lock.yaml
manzoorwanijk Dec 20, 2025
105eda7
Try explicit flag auto-install-peers=false
manzoorwanijk Dec 20, 2025
a4bed2e
Ensure that sass imports work fine
manzoorwanijk Dec 20, 2025
6982c06
Clean up root package.json
manzoorwanijk Dec 20, 2025
eb176b2
Let us live with this for now. We can remove it later if needed
manzoorwanijk Dec 20, 2025
05be888
Update dependencies for browserslist and jest-preset
manzoorwanijk Dec 20, 2025
994e953
Update prelint script to use pnpm recursively
manzoorwanijk Dec 20, 2025
af91646
Clean up test runs on CI
manzoorwanijk Dec 20, 2025
b5174e6
Add @wordpress/babel-preset-default to devDependencies
manzoorwanijk Dec 20, 2025
9873820
Add @emotion/babel-plugin to devDependencies
manzoorwanijk Dec 20, 2025
f75ee74
Add @wordpress/block-library to dependencies
manzoorwanijk Dec 20, 2025
758c9e5
Remove lint:lockfile from lint script for now
manzoorwanijk Dec 20, 2025
ea7b973
Add @wordpress/base-styles to interface dependencies
manzoorwanijk Dec 20, 2025
7e2c8db
Fix ESLint deps
manzoorwanijk Dec 20, 2025
b34cb91
Update pnpm-lock.yaml
manzoorwanijk Dec 20, 2025
e96ff9d
Fix lints in changed files
manzoorwanijk Dec 20, 2025
c3aff81
Add @wordpress/base-styles to format-library dependencies
manzoorwanijk Dec 20, 2025
056bf3d
Fix npx run
manzoorwanijk Dec 20, 2025
2a7a79e
Fix more packages with missing base-styles dependency
manzoorwanijk Dec 20, 2025
f076ec8
Fix test-create-block
manzoorwanijk Dec 20, 2025
23316f6
Fix moment-timezone error on build
manzoorwanijk Dec 20, 2025
eeba529
More base-styles dependency fixes
manzoorwanijk Dec 20, 2025
27dbb17
Add @wordpress/env as a workspace dependency
manzoorwanijk Dec 20, 2025
a6f3ba8
Fix webpack dependency for test-create-block and postcss-plugins-pres…
manzoorwanijk Dec 20, 2025
d563e97
Update package.json
manzoorwanijk Dec 31, 2025
3a58bf3
Convert storybook to workspace
manzoorwanijk Dec 31, 2025
fc06ba0
Fix build
manzoorwanijk Dec 31, 2025
b1232bc
Fix unit tests
manzoorwanijk Dec 31, 2025
266a885
Fix lints
manzoorwanijk Dec 31, 2025
6cd4bbb
Fix create block
manzoorwanijk Jan 1, 2026
5345cc9
Apply a better fix for jest-console types
manzoorwanijk Jan 1, 2026
8d24922
Use a better and more performant approach for global types
manzoorwanijk Jan 1, 2026
5be0d17
Fix storybook check
manzoorwanijk Jan 1, 2026
efea3cf
Fix docgen error
manzoorwanijk Jan 1, 2026
717d5f5
Fix more builds
manzoorwanijk Jan 1, 2026
75517fe
Simplify sass build fix
manzoorwanijk Jan 1, 2026
619d70e
Update storybook-check.yml
manzoorwanijk Jan 1, 2026
e7eecf1
Fix lints
manzoorwanijk Jan 1, 2026
9d4c099
Fix storybook check
manzoorwanijk Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 25 additions & 26 deletions .github/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Setup Node.js and install npm dependencies'
description: 'Configure Node.js and install npm dependencies while managing all aspects of caching.'
name: 'Setup Node.js and install pnpm dependencies'
description: 'Configure Node.js and install pnpm dependencies while managing all aspects of caching.'
inputs:
node-version:
description: 'Optional. The Node.js version to use. When not specified, the version specified in .nvmrc will be used.'
Expand All @@ -9,46 +9,45 @@ inputs:
runs:
using: 'composite'
steps:
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Use desired version of Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: ${{ inputs.node-version == '' && '.nvmrc' || '' }}
node-version: ${{ inputs.node-version }}
check-latest: true
cache: npm
cache: pnpm

- name: Get Node.js and npm version
- name: Get Node.js and pnpm version
id: node-version
run: |
echo "NODE_VERSION=$(node -v)" >> "$GITHUB_OUTPUT"
echo "PNPM_VERSION=$(pnpm -v)" >> "$GITHUB_OUTPUT"
shell: bash

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cache node_modules
id: cache-node_modules
- name: Cache pnpm store
id: cache-pnpm-store
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '**/node_modules'
key: node_modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-${{ hashFiles('package-lock.json', 'patches/**') }}
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: pnpm-store-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-

- name: Install npm dependencies
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }}
run: |
npm ci
- name: Install pnpm dependencies
run: pnpm install --frozen-lockfile --config.auto-install-peers=false
shell: bash
- name: Upload npm logs as an artifact on failure

- name: Upload pnpm logs as an artifact on failure
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: failure()
with:
name: npm-logs
path: C:\npm\cache\_logs

# On cache hit, we run the post-install script to match the native `npm ci` behavior.
# An example of this is to patch `node_modules` using patch-package.
- name: Post-install
if: ${{ steps.cache-node_modules.outputs.cache-hit == 'true' }}
run: |
# Run the post-install script for the root project.
npm run postinstall
# Run the post-install scripts for workspaces.
npx lerna run postinstall
shell: bash
name: pnpm-logs
path: ~/.local/share/pnpm/store
15 changes: 13 additions & 2 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,15 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Use desired version of Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
check-latest: true
cache: pnpm

- name: Build Gutenberg plugin ZIP file
run: ./bin/build-plugin-zip.sh
Expand All @@ -225,7 +229,7 @@ jobs:
run: |
IFS='.' read -r -a VERSION_ARRAY <<< "${VERSION}"
MILESTONE="Gutenberg ${VERSION_ARRAY[0]}.${VERSION_ARRAY[1]}"
npm run other:changelog -- --milestone="$MILESTONE" --unreleased > release-notes.txt
pnpm run other:changelog --milestone="$MILESTONE" --unreleased > release-notes.txt
sed -ie '1,6d' release-notes.txt
if [[ "${VERSION}" != *"rc"* ]]; then
# Include previous RCs' release notes, if any
Expand Down Expand Up @@ -378,17 +382,24 @@ jobs:
git config user.name "Gutenberg Repository Automation"
git config user.email gutenberg@wordpress.org

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
package_json_file: 'main/package.json'

- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: 'main/.nvmrc'
registry-url: 'https://registry.npmjs.org'
check-latest: true
cache: pnpm
cache-dependency-path: 'main/pnpm-lock.yaml'

- name: Publish packages to npm ("latest" dist-tag)
run: |
cd main
npm ci
pnpm install --frozen-lockfile --config.auto-install-peers=false
./bin/plugin/cli.js npm-latest --semver minor --ci --repository-path ../publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,20 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Use desired version of Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
check-latest: true
cache: npm
cache: pnpm

- uses: preactjs/compressed-size-action@946a292cd35bd1088e0d7eb92b69d1a8d5b5d76a # v2.8.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: '{build/scripts/**/*.min.js,build/styles/**/*.css,build/modules/**/*.min.js}'
clean-script: 'distclean'
install-script: 'pnpm install --frozen-lockfile --config.auto-install-peers=false'
build-script: 'build'
12 changes: 6 additions & 6 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Npm build
run: npm run build
- name: Build
run: pnpm run build

- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps

- name: Install WordPress and start the server
run: |
npm run wp-env start
pnpm run wp-env start

- name: Run the tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
SHARD_PART: ${{ matrix.part }}
SHARD_TOTAL: ${{ matrix.totalParts }}
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e -- --shard="${SHARD_PART}/${SHARD_TOTAL}"
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm run test:e2e --shard="${SHARD_PART}/${SHARD_TOTAL}"

- name: Archive debug artifacts (screenshots, traces)
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
Expand Down Expand Up @@ -132,8 +132,8 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Npm build
run: npm run build
- name: Build
run: pnpm run build

- name: Report flaky tests
uses: ./packages/report-flaky-tests
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,27 @@ jobs:
git config user.name "Gutenberg Repository Automation"
git config user.email gutenberg@wordpress.org

- name: Install pnpm
if: ${{ github.event.inputs.release_type != 'wp' }}
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
package_json_file: 'cli/package.json'

- name: Setup Node.js
if: ${{ github.event.inputs.release_type != 'wp' }}
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: 'cli/.nvmrc'
registry-url: 'https://registry.npmjs.org'
check-latest: true
cache: pnpm
cache-dependency-path: 'cli/pnpm-lock.yaml'

- name: Install pnpm (for WP major version)
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
package_json_file: 'publish/package.json'

- name: Setup Node.js (for WP major version)
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
Expand All @@ -90,12 +104,14 @@ jobs:
node-version-file: 'publish/.nvmrc'
registry-url: 'https://registry.npmjs.org'
check-latest: true
cache: pnpm
cache-dependency-path: 'publish/pnpm-lock.yaml'

- name: Publish development packages to npm ("next" dist-tag)
if: ${{ github.event.inputs.release_type == 'development' }}
run: |
cd cli
npm ci
pnpm install --frozen-lockfile --config.auto-install-peers=false
./bin/plugin/cli.js npm-next --ci --repository-path ../publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -104,7 +120,7 @@ jobs:
if: ${{ github.event.inputs.release_type == 'latest' }}
run: |
cd cli
npm ci
pnpm install --frozen-lockfile --config.auto-install-peers=false
./bin/plugin/cli.js npm-latest --semver minor --ci --repository-path ../publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -113,7 +129,7 @@ jobs:
if: ${{ github.event.inputs.release_type == 'bugfix' }}
run: |
cd cli
npm ci
pnpm install --frozen-lockfile --config.auto-install-peers=false
./bin/plugin/cli.js npm-bugfix --ci --repository-path ../publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -122,8 +138,8 @@ jobs:
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
run: |
cd publish
npm ci
npx lerna publish patch --dist-tag "wp-$WP_VERSION" --no-private --yes --no-verify-access
pnpm install --frozen-lockfile --config.auto-install-peers=false
pnpm exec lerna publish patch --dist-tag "wp-$WP_VERSION" --no-private --yes --no-verify-access
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
WP_VERSION: ${{ github.event.inputs.wp_version }}
6 changes: 3 additions & 3 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
with:
path: |
~/.appium
key: ${{ runner.os }}-tests-setup-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-tests-setup-${{ hashFiles('pnpm-lock.yaml') }}

- name: Prepare tests setup
run: npm run native test:e2e:setup
run: pnpm run native test:e2e:setup

- name: Gradle cache
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
disable-animations: true
arch: x86_64
profile: Nexus 6
script: npm run native test:e2e:android:local "$NATIVE_TEST_NAME"
script: pnpm run native test:e2e:android:local "$NATIVE_TEST_NAME"

- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: always()
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
with:
path: |
~/.appium
key: ${{ runner.os }}-tests-setup-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-tests-setup-${{ hashFiles('pnpm-lock.yaml') }}

- name: Prepare tests setup
run: npm run native test:e2e:setup
run: pnpm run native test:e2e:setup

- name: Prepare build cache key
run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt
run: find pnpm-lock.yaml packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt

- name: Restore build cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
Expand All @@ -82,21 +82,21 @@ jobs:
~/Library/Caches/CocoaPods
~/.cocoapods/repos/trunk
packages/react-native-editor/ios/vendor
key: ${{ runner.os }}-pods-${{ hashFiles('packages/react-native-editor/ios/Gemfile.lock') }}-${{ hashFiles('packages/react-native-editor/ios/Podfile.lock') }}-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-pods-${{ hashFiles('packages/react-native-editor/ios/Gemfile.lock') }}-${{ hashFiles('packages/react-native-editor/ios/Podfile.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Bundle iOS
run: npm run native test:e2e:bundle:ios
run: pnpm run native test:e2e:bundle:ios

- name: Build (if needed)
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || npm run native test:e2e:build-app:ios
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || pnpm run native test:e2e:build-app:ios

- name: Build Web Driver Agent (if needed)
run: test -d packages/react-native-editor/ios/build/WDA || npm run native test:e2e:build-wda
run: test -d packages/react-native-editor/ios/build/WDA || pnpm run native test:e2e:build-wda

- name: Run iOS Device Tests
env:
NATIVE_TEST_NAME: ${{ matrix.native-test-name }}
run: TEST_RN_PLATFORM=ios npm run native device-tests:local "$NATIVE_TEST_NAME"
run: TEST_RN_PLATFORM=ios pnpm run native device-tests:local "$NATIVE_TEST_NAME"

- name: Prepare build cache
run: |
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,30 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Use desired version of Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node }}
cache: pnpm

- name: Pin npm version for consistency
run: npm install -g npm@10

- name: Npm install
# A "full" install is executed, since `npm ci` does not always exit
# with an error status code if the lock file is inaccurate. This also
# helps to catch dependencies not being installed with exact version.
- name: Install pnpm dependencies
# A "full" install is executed to catch any lockfile inconsistencies.
#
# See: https://github.com/WordPress/gutenberg/issues/16157
# See: https://github.com/WordPress/gutenberg/pull/39865
run: npm install
run: pnpm install --config.auto-install-peers=false

- name: Lint JavaScript and Styles
run: npm run lint
run: pnpm run lint

- name: Type checking
run: npm run build
run: pnpm run build

- name: Check local changes
run: npm run other:check-local-changes
run: pnpm run other:check-local-changes

- name: License compatibility
run: npm run other:check-licenses
run: pnpm run other:check-licenses
8 changes: 5 additions & 3 deletions .github/workflows/storybook-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ jobs:
uses: ./.github/setup-node

- name: Build Storybook
run: npm run storybook:build
run: pnpm run storybook:build

- name: Install test-runner and Playwright dependencies
run: |
npm install --no-save @storybook/test-runner@0.22.1
npx playwright install --with-deps
# storybook and playwright are needed as peer dependencies of @storybook/test-runner for pnpm
STORYBOOK_VERSION=$(node -p "require('./storybook/package.json').devDependencies.storybook")
pnpm add -wD "storybook@$STORYBOOK_VERSION" @storybook/test-runner@0.22.1 playwright
pnpm exec playwright install --with-deps

- name: Serve Storybook and run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./.github/setup-node

- name: Build Storybook
run: npm run storybook:build
run: pnpm run storybook:build

- name: Deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
Expand Down
Loading
Loading