Skip to content

Make sure the content-analysis-api app still works with Parse5#22909

Merged
agnieszkaszuba merged 2 commits intotrunkfrom
fix-content-analysis-api-app-build
Jan 26, 2026
Merged

Make sure the content-analysis-api app still works with Parse5#22909
agnieszkaszuba merged 2 commits intotrunkfrom
fix-content-analysis-api-app-build

Conversation

@FAMarfuaty
Copy link
Copy Markdown
Contributor

@FAMarfuaty FAMarfuaty commented Jan 26, 2026

Context

Summary

This PR can be summarized in the following changelog entry:

  • Updates the start script in package.json of apps/content-analysis-api to include the --experimental-require-module flag, enabling experimental module loading features when starting the application.
  • Adds a .nvmrc file inside apps/content-analysis-api specifying Node.js version 22 for the project.

Relevant technical choices:

  • For the start script inside this app, I added --experimental-require-module flag. This will allow require() to load ES modules, enabling interoperability between CommonJS and ESM without bundling.
  • This flag however, is only available in Node 22. I've added a .nvmrc file inside app and set it to 22. So this means that one needs to switch to node 22 when using the app, e.g. run nvm use
  • I thought that this approach is simpler than adding a build  step (where we can use tool like esbuild).
  • Potential drawback:  --experimental-require-module  as in the name, the flag may change or be removed in future Node versions. We decide the impact is not too critical which we can address it later when the flag is actually removed or changed.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Only for devs

  • Go to apps/content-analysis-api
  • Set the node version to 22. You can run nvm use
  • Run yarn && yarn start and confirm that the app still works as expected
  • Smoke test in combination with prompt-engineering repo

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

  • N/A

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • N/A

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

… to enable interoperability between CommonJS and ESM without bundling
@coveralls
Copy link
Copy Markdown

coveralls commented Jan 26, 2026

Pull Request Test Coverage Report for Build 723511cab22b33e08430cd042c7aa48c800e7bb9

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 53.35%

Totals Coverage Status
Change from base Build 59792a9156dbbedb58e512ad0d76be3a50bdba6b: 0.0%
Covered Lines: 32897
Relevant Lines: 61867

💛 - Coveralls

@FAMarfuaty FAMarfuaty changed the title Update Node.js version in .nvmrc and modify package.json start script… Make sure the content-analysis-api app still works with Parse5 Jan 26, 2026
@FAMarfuaty FAMarfuaty added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jan 26, 2026
@FAMarfuaty FAMarfuaty marked this pull request as ready for review January 26, 2026 12:06
@agnieszkaszuba
Copy link
Copy Markdown
Contributor

CR & acceptance: 👍

@agnieszkaszuba agnieszkaszuba merged commit 92f7be1 into trunk Jan 26, 2026
22 checks passed
@agnieszkaszuba agnieszkaszuba deleted the fix-content-analysis-api-app-build branch January 26, 2026 14:33
@FAMarfuaty FAMarfuaty added this to the 27.0 milestone Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants