Skip to content

Conversation

rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Oct 8, 2025

Description

Refactored the global changelog generation script (first-gen/scripts/update-global-changelog.js) to improve code maintainability by extracting repetitive logic into reusable helper functions. Also updated the changeset README documentation to provide clear guidance for creating changesets in the new monorepo structure with both first-gen and second-gen packages.

Motivation and context

The monorepo structure now includes both first-gen Spectrum Web Components and second-gen @swc/core packages, but the changeset documentation didn't provide clear guidance on how to create changesets for this new structure nor did the global changelog script support it.

Related issue(s)

  • SWC-1238

Screenshots (if appropriate)

N/A - Internal tooling improvement


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Test changelog generation for first-gen components

    1. Go to the project root directory
    2. Run yarn changeset and create a changeset with @spectrum-web-components/button: minor
    3. Run node first-gen/scripts/update-global-changelog.js
    4. Expect the first-gen CHANGELOG.md to be updated with the new version entry
  • Test changelog generation for @swc/core packages

    1. Go to the project root directory
    2. Run yarn changeset and create a changeset with @swc/core: patch
    3. Run node first-gen/scripts/update-global-changelog.js
    4. Expect the second-gen/packages/core/CHANGELOG.md to be updated with the new version entry
  • Test changeset documentation clarity

    1. Go to .changeset/README.md
    2. Review the updated documentation
    3. Expect clear guidance on creating changesets for both first-gen and second-gen packages
  • Test script error handling

    1. Run the script when no changesets exist
    2. Run the script when git tags are missing
    3. Expect appropriate error messages

Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: c522607

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 8, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5795

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link
Contributor

github-actions bot commented Oct 8, 2025

Tachometer results

Currently, no packages are changed by this PR...

@Rajdeepc
Copy link
Contributor

Rajdeepc commented Oct 9, 2025

Is it a good idea to create a approach document before we add these changes or are you planning to add it in the description root of this PR?

@rubencarvalho rubencarvalho changed the title Changelog changeset barebones chore: make changelog generation work for multiple packages and update changeset docs Oct 9, 2025
@rubencarvalho rubencarvalho marked this pull request as ready for review October 9, 2025 09:01
@rubencarvalho rubencarvalho requested a review from a team as a code owner October 9, 2025 09:01
@rubencarvalho rubencarvalho force-pushed the changelog-changeset-barebones branch from 56bf0c9 to c522607 Compare October 9, 2025 09:34
@rubencarvalho
Copy link
Contributor Author

Is it a good idea to create a approach document before we add these changes or are you planning to add it in the description root of this PR?

This is being tackled in SWC-1234. We can wait for those docs!

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.

2 participants