Skip to content

Remove npm dependencies#1033

Merged
peterwilsoncc merged 8 commits intodevelopfrom
update-npm-dependencies
Jan 22, 2026
Merged

Remove npm dependencies#1033
peterwilsoncc merged 8 commits intodevelopfrom
update-npm-dependencies

Conversation

@peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc commented Jan 20, 2026

Description of the Change

Removes a good number of NPM dependencies in an attempt to clear up the audit report:

  • All the packages bundled in WP Core and removed in favour of an eslint config
  • Custom SVG loader removed in favour of the one in WP-Scripts
  • Updated dependencies via npm audit

Tests are failing with WP Trunk but that looks to be the case on the develop branch.

How to test the Change

Build:

  1. Run npm ci; npm run build
  2. Enable: Classification, Title Generation, Excerpt Generation, Content Generation, Content Resizing, Key Takeaways
  3. Ensure the Classifai logo SVG displays in the editor as expected:
    • Document settings section
    • Paragraph toolbar for expand/contract
    • Sparkle in bottom right of editor
    • Key takeaways block

The E2E tests are quite thorougher so look to take care of most things.

Changelog Entry

Changed - Update dependencies via npm audit fix.
Changed - Remove SVG loader in favour of WP Scripts version.
Developer - E2E test: set fast fail to false in GitHub action.
Developer - Update @wordpress/scripts to 31.3.0
Developer - Update @wordpress/env to 10.38.0
Developer - Move WP bundled dependencies to eslint config.

Credits

Props @username, ...

Checklist:

@github-actions github-actions bot added this to the 3.8.0 milestone Jan 20, 2026
@peterwilsoncc peterwilsoncc force-pushed the update-npm-dependencies branch from 49aa80c to 669dd3b Compare January 21, 2026 00:26
@peterwilsoncc peterwilsoncc marked this pull request as ready for review January 21, 2026 01:02
@peterwilsoncc peterwilsoncc requested review from a team, dkotter and jeffpaul as code owners January 21, 2026 01:02
@github-actions github-actions bot added the needs:code-review This requires code review. label Jan 21, 2026
"devDependencies": {
"@10up/cypress-wp-utils": "^0.6.0",
"@types/wordpress__blocks": "^12.5.18",
"@wordpress/api-fetch": "^7.37.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm fine with removing these but noting the reason I import those here is Cursor complains at me otherwise:

Error message around not finding module

This may just be a configuration issue for me that I need to fix, curious if there's something I should change locally to make the imports work? Code all builds and works fine, it's just in my IDE I get these errors

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been resolved for me by updating our types here: d50a3f7 (noting AI suggested these changes). I didn't set these types up to begin with so not overly familiar with why we're doing it this way but this does resolve these inline errors for me

@dkotter
Copy link
Collaborator

dkotter commented Jan 21, 2026

Tests are failing with WP Trunk but that looks to be the case on the develop branch

Yes, tests on trunk started failing a few weeks ago and not sure why. I originally thought it had to do with changes in trunk around how Gutenberg gets merged but if I'm following that Trac ticket properly, seems like that should be resolved now.

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@peterwilsoncc peterwilsoncc merged commit 07f3262 into develop Jan 22, 2026
11 of 12 checks passed
@peterwilsoncc peterwilsoncc deleted the update-npm-dependencies branch January 22, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants