Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add @wordpress/env devDep and wp-env script#365

Merged
ockham merged 3 commits into
trunkfrom
fix/wp-env-script
Feb 23, 2026
Merged

Add @wordpress/env devDep and wp-env script#365
ockham merged 3 commits into
trunkfrom
fix/wp-env-script

Conversation

@ockham

@ockham ockham commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

To fix e2e tests in CI, and to make instructions from AGENTS.md work out of the box.

Previously, @wordpress/env was installed globally (npm i -g) by the e2e CI workflow. With the recent update to @wordpress/env (which included a major change to the .wp-env.json format), this has started failing.

To fix this, we can simply add @wordpress/env as a devDependency to package.json and have it installed locally. This allows us to control the version of the package that's used.

As an additional benefit, this makes local setup consistent with CI, and more reproducible. Previously, Claude Code was struggling to get the environment to start, as the commands in AGENTS.md required running npm run wp-env start, which wouldn't work: https://github.com/WordPress/secure-custom-fields/blob/b25cb5858a3d3ee2676e0815b431c2b92b059dc0/AGENTS.md

Eventually, we can consider upgrading to @wordpress/env v11.x and its new format, but that's for another PR.

@ockham ockham self-assigned this Feb 23, 2026
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props bernhard-reiter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ockham ockham merged commit 8b53724 into trunk Feb 23, 2026
10 checks passed
@ockham ockham deleted the fix/wp-env-script branch February 23, 2026 17:12
@codecov

codecov Bot commented Feb 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.47%. Comparing base (b25cb58) to head (83ba2bd).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@              Coverage Diff              @@
##              trunk     #365       +/-   ##
=============================================
+ Coverage     32.16%   51.47%   +19.30%     
  Complexity     4410     4410               
=============================================
  Files           298      298               
  Lines         39206    39424      +218     
=============================================
+ Hits          12610    20292     +7682     
+ Misses        26596    19132     -7464     
Flag Coverage Δ
e2e-js 44.95% <ø> (-0.13%) ⬇️
e2e-php 39.00% <ø> (+39.00%) ⬆️
javascript 15.07% <ø> (ø)
phpunit 29.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ockham ockham added this to the 6.9.0 milestone Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant