Skip to content

Conversation

@dkoo
Copy link
Contributor

@dkoo dkoo commented Oct 29, 2025

All Submissions:

Changes proposed in this Pull Request:

This updates as many shared dependencies as possible to the latest compatible versions. It also applies linting to this repo's own code using the same configs as it shares with other Newspack repos that consume it as an NPM package.

Also deprecates the separate typescript:check script used by dependent repos for TS type checking. In my testing, the newer version of @wordpress/eslint-plugin performs type checking via ESLint if you let it run on .ts|.tsx files, making the separate script redundant. However, I've left the typescript:check script code and its dependencies intact here just in case, so we can remove them at a future date once we're absolutely certain we don't need them.

Incidentally, updating all dependencies to the latest versions seems to have resolved most unresolvable peer dependency conflicts, so using --legacy-peer-deps should no longer be necessary in dependent Newspack repos.

How to test the changes in this Pull Request:

This can't be tested here, as the changes affect dependent Newspack repos that consume this repo as an NPM package. But before we publish these changes as a new package version, we can test the changes in those other repos by installing newspack-scripts from this branch using npm i Automattic/newspack-scripts#chore\/refresh-dependencies --save-dev.

I've done this for all of our major repos and opened PRs for testing. Once we've successfully tested each dependent repo, we can publish the changes to NPM and then update the version number in each PR before merging to complete the updates.

Testing for each PR should be as follows:

  1. Check out the PR
  2. Run npm start or npm ci (no --legacy-peer-deps!). You may need to delete the node_modules directory first, I'm not sure if this is strictly required but I'll mention it just in case.
  3. Confirm that the install completes successfully
  4. Run npm run build and npm run watch and confirm that the assets build successfully
  5. Run npm run lint and confirm that SCSS and JS linting works
  6. Note that the npm run typescript:check script is deprecated and removed from dependent repos. Instead, confirm that npm run lint:js performs TypeScript checks and report results along with other JS linting results. (This is easiest to confirm with newspack-plugin, which should return some non-blocking TS warnings.)
  7. Run npm run test and confirm that JS unit tests work (only applicable if the repo has any)
  8. Run npm run semantic-release --dry-run and confirm there's successful output
  9. Smoke test both WP admin and front-end functionality—there should be no significant changes

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo marked this pull request as ready for review October 30, 2025 17:48
@dkoo dkoo requested a review from a team as a code owner October 30, 2025 17:48
Copy link

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

Giving a shared 👍 based on @chickenn00dle and my testing!

@dkoo dkoo merged commit 93818f0 into trunk Nov 3, 2025
3 checks passed
@dkoo dkoo deleted the chore/refresh-dependencies branch November 3, 2025 17:45
@matticbot
Copy link

🎉 This PR is included in version 5.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants