-
Notifications
You must be signed in to change notification settings - Fork 49
[Website] Changelog component docs script format enhancements #2953
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5d542da
to
7360f81
Compare
7360f81
to
3ecc9ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dchyun Love this change! 👏🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an issue with allComponentPaths
being used as an object, where now is an array (and potentially is not needed anymore). Also, a few general observations:
Non-existing path (eg. for a typo)
This (wrong) case is not handled (I would expect an error to be thrown, so there is visibility that something was not correct in the format used:
<!-- START foo/bar -->
`Card` - Added something to the component
<!-- END foo/bar -->
Opening/Closing tags not matching (eg. for a typo)
Same as above, I think this should be handled too
<!-- START components/card -->
`Card` - Added something to the component
<!-- END cmnponents/car -->
(this leads me to a question: could the regex be this ^(<!-- START \[${componentName}\])((.|\n)*?)(<!-- END -->)$
and be run against this (simplified) format?
<!-- START [components/tag] -->
`Tag` - Test change
<!-- END -->
(I've added the []
for better readability; it's an idea, for your consideration)
3ecc9ea
to
385e241
Compare
@didoo I took your suggestion and updated the format slightly to no longer have the path in the "END" statement.
I also added in support for notifying the user of an incorrect component path. It will output a message in the console when the script is run with the name of the incorrect path.
I tried adding this in with the regex you suggested, and ran into some issues with the regex parser no longer automatically escaping the |
📌 Summary
If merged, this PR would update the script that generate component changelog entries to a new format, which would support the following enhancements in writing changelog entries.
🛠️ Detailed description
New format
In the new format, changelog component entries must contain comments above and below each component entry that tell the script which portions to use in the appropriate component changelog files.
The path used inside the comments directs the script to what website docs file to attach the entry. That path must match exactly. For example a change to the
LinkStandalone
would use the pathcomponents/links/standalone
.When the script is ran, these comments will be removed following parsing.
Testing
There is a temporary commit included in this PR that allows testing of the script locally. To test this change do the following:
./website
pnpm generate-component-changelog-entries
CHANGELOG.md
and website release notes page.📸 Screenshots
Changeset file format
Before
After
🔗 External links
Jira ticket: HDS-4951
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.