The current buildScripts/injectPackageVersion.mjs script is responsible for updating the package version across various files during a release. This ticket proposes to refactor and enhance this script to create a more comprehensive release preparation tool.
Proposed Changes:
- Rename Script: Rename
buildScripts/injectPackageVersion.mjs to buildScripts/prepareRelease.mjs (or a similar, more descriptive name). This new name will better reflect its expanded responsibilities.
- Update
package.json: Modify the package.json scripts to use the new script name.
- Integrate SEO File Generation: Extend the functionality of the
prepareRelease.mjs script to automatically regenerate sitemap.xml and llm.txt. This ensures that these SEO-critical files are always up-to-date with the latest content and version information as part of the release process. The script should call the relevant functions from generate-seo-files.mjs to perform this.
Benefits:
- Streamlines the release workflow.
- Ensures consistency and accuracy of version numbers and SEO files.
- Reduces the risk of manual errors during release preparation.
Acceptance Criteria:
- The script
buildScripts/injectPackageVersion.mjs is renamed to buildScripts/prepareRelease.mjs.
- All references to the old script name in
package.json are updated.
- The
prepareRelease.mjs script successfully updates package versions and regenerates sitemap.xml and llm.txt when executed.
- The generated
sitemap.xml and llm.txt files contain the correct, canonical, hash-based URLs.
The current
buildScripts/injectPackageVersion.mjsscript is responsible for updating the package version across various files during a release. This ticket proposes to refactor and enhance this script to create a more comprehensive release preparation tool.Proposed Changes:
buildScripts/injectPackageVersion.mjstobuildScripts/prepareRelease.mjs(or a similar, more descriptive name). This new name will better reflect its expanded responsibilities.package.json: Modify thepackage.jsonscripts to use the new script name.prepareRelease.mjsscript to automatically regeneratesitemap.xmlandllm.txt. This ensures that these SEO-critical files are always up-to-date with the latest content and version information as part of the release process. The script should call the relevant functions fromgenerate-seo-files.mjsto perform this.Benefits:
Acceptance Criteria:
buildScripts/injectPackageVersion.mjsis renamed tobuildScripts/prepareRelease.mjs.package.jsonare updated.prepareRelease.mjsscript successfully updates package versions and regeneratessitemap.xmlandllm.txtwhen executed.sitemap.xmlandllm.txtfiles contain the correct, canonical, hash-based URLs.