Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release yoastseo and preview packages to NPM #21410

Merged

Conversation

d-claassen
Copy link
Contributor

@d-claassen d-claassen commented May 27, 2024

Important

Do not rebase this PR. The "Version increase" commit fa68e4c is the exact version that has been published to NPM. Orphaning this commit will make it impossible to properly determine changes since the published version.

Context

  • Release our YoastSEO.js and preview packages to NPM again for easier reuse:
  • @yoast/components:3.0.0-alpha.0
  • @yoast/feature-flag:0.6.0-alpha.0
  • @yoast/helpers:0.17.0-alpha.0
  • @yoast/replacement-variable-editor:2.0.0-alpha.0
  • @yoast/search-metadata-previews:3.0.0-alpha.0
  • @yoast/social-metadata-forms:2.0.0-alpha.0
  • @yoast/social-metadata-previews:2.0.0-alpha.0
  • @yoast/style-guide:0.14.0-alpha.0
  • yoastseo:2.0.0-alpha.0

Summary

This PR can be summarized in the following changelog entry:

  • Release new package versions.

Relevant technical choices:

  • went with premajor version increases because of (at least) the change to a transpiled published package. Major version zero packages went to 0.x.0-alpha.0 and the rest to x.0.0-alpha.0
  • focused on @yoast/search-metadata-previews and @yoast/social-metadata-previews for now with all sub-dependencies
  • remove side-effect of publish, as per the recommendation in https://yarnpkg.com/advanced/lifecycle-scripts
  • use files to determine what we would publish, see https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files
  • ignore .map files, in case the build contains them
  • move @yoast/browserslist-config's index.js out of src folder, for convenience of no src in the published version (there's no build step that introduces a build folder)
  • cascade the peer dependency for the packages using @yoast/replacement-variable-editor

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

All changes in this PR are related to what we publish to NPM (which isn't used by any plugin). So this shouldn't effect the plugin itself at all. Any regression testing should be focused on JavaScript-powered features, and specifically those features provided by our NPM packages.

  • Regression test the social & search previews in the metabox and sidebars. Test both with Free and Free+Premium.
  • Regression test the "insights" section of the metabox and sidebars. Verify all @yoast/components look as before.
  • Regression test the SEO/readability/inclusive language analyses.
  • Regression test the replacement variable editors in the Yoast SEO settings.

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.

Impact check

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

  • All changes in this PR are related to what we publish to NPM (= a version of the packages not used by any plugin). So this shouldn't effect the plugin itself at all. Any regression testing should be focused on JavaScript-powered features, and specifically those features provided by our NPM packages.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

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.

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.

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 #

d-claassen and others added 4 commits May 27, 2024 16:20
* remove side-effect of publish, as per the recommendation in https://yarnpkg.com/advanced/lifecycle-scripts
* using files determine what we would publish, see https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files
* ignore .map files, just in case the build contains them
* move browserslist-config index out of `src` folder, just for convenience of no `src` in the published version

Conflicts:
	packages/browserslist-config/package.json
	packages/components/package.json
	packages/social-metadata-forms/package.json
	packages/yoastseo/package.json

Co-Authored-By: Igor <35524806+igorschoester@users.noreply.github.com>
* as peer deps of the packages using replacement-variable-editor

Conflicts:
	yarn.lock

Co-Authored-By: Igor <35524806+igorschoester@users.noreply.github.com>
- @yoast/components:3.0.0-alpha.0
- @yoast/feature-flag:0.6.0-alpha.0
- @yoast/helpers:0.17.0-alpha.0
- @yoast/replacement-variable-editor:2.0.0-alpha.0
- @yoast/search-metadata-previews:3.0.0-alpha.0
- @yoast/social-metadata-forms:2.0.0-alpha.0
- @yoast/social-metadata-previews:2.0.0-alpha.0
- @yoast/style-guie:0.14.0-alpha.0
- yoastseo:2.0.0-alpha.0
@d-claassen d-claassen added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label May 27, 2024
Copy link

@d-claassen Please be aware that following packages have been abandoned and are not actively maintained anymore:

Package name Path
@yoast/babel-preset packages/babel-preset
@yoast/components packages/components
@yoast/e2e-tests packages/e2e-tests
@yoast/helpers packages/helpers
@yoast/jest-preset packages/jest-preset
@yoast/style-guide packages/style-guide

Please consider using the other packages instead.

@coveralls
Copy link

Pull Request Test Coverage Report for Build e469e1ddd87d6be912fd170bb7f08e60f3e46c43

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3706 unchanged lines in 106 files lost coverage.
  • Overall coverage decreased (-4.3%) to 48.3%

Files with Coverage Reduction New Missed Lines %
admin/class-option-tabs-formatter.php 1 0.0%
src/actions/configuration/first-time-configuration-action.php 1 91.84%
src/builders/indexable-home-page-builder.php 1 98.0%
src/builders/indexable-term-builder.php 1 99.15%
src/context/meta-tags-context.php 1 28.29%
src/generators/breadcrumbs-generator.php 1 64.23%
src/generators/schema/webpage.php 1 90.32%
src/integrations/blocks/structured-data-blocks.php 1 16.0%
src/integrations/settings-integration.php 1 28.49%
src/integrations/watchers/indexable-ancestor-watcher.php 1 98.41%
Totals Coverage Status
Change from base Build e258f001be7d517dbc2ed545b8b89d4027953559: -4.3%
Covered Lines: 24971
Relevant Lines: 53563

💛 - Coveralls

@d-claassen d-claassen marked this pull request as ready for review May 30, 2024 13:45
@d-claassen d-claassen requested a review from a team as a code owner May 30, 2024 13:45
@igorschoester igorschoester changed the base branch from trunk to release/23.1 July 3, 2024 13:49
@igorschoester igorschoester self-assigned this Jul 3, 2024
@enricobattocchi enricobattocchi added this to the 23.1 milestone Jul 4, 2024
@enricobattocchi enricobattocchi merged commit aeed167 into release/23.1 Jul 4, 2024
16 of 17 checks passed
@enricobattocchi enricobattocchi deleted the d-claassen/release-yoastseo-and-previews branch July 4, 2024 09:09
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 fix-before-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants