Dev#155
Conversation
…and update package configurations.
…ion to `paths` array and update script to only use `paths`.
feat: enhance semantic-release path filter to support multiple paths …
There was a problem hiding this comment.
Pull request overview
This pull request refactors the semantic-release path filtering system to support multiple paths per package, enabling cross-package dependency tracking in the monorepo. The main enhancement allows packages to trigger releases when changes occur in their dependencies (e.g., ducsvg can now track changes in ducpdf, ducjs, and ducrs). Additionally, the PR fixes a duplicate line in the Python builder code and adds a future consideration note to the README.
- Refactored
semrel-path-filter.cjsto support multiple paths via apathsarray instead of a singlepathoption - Updated all package release configurations to use the new
pathsarray format, establishing dependency relationships - Fixed a duplicate
block_idsinitialization in the Python element builder
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/semrel-path-filter.cjs |
Refactored to support multiple path filtering with new normalizePaths function and renamed filterCommitsByPaths to handle arrays of prefixes |
packages/ducsvg/release.config.cjs |
Updated to track changes in ducsvg, ducpdf, ducjs, and ducrs packages |
packages/ducpdf/release.config.cjs |
Updated to track changes in ducpdf, ducjs, and ducrs packages; fixed incorrect package name in prepareCmd |
packages/ducpdf/src/duc2pdf/release.config.cjs |
Updated to track changes in duc2pdf and ducrs packages |
packages/ducrs/release.config.cjs |
Converted to use paths array format (single path) |
packages/ducpy/release.config.cjs |
Converted to use paths array format (single path) |
packages/ducpy/src/ducpy/builders/element_builders.py |
Removed duplicate block_ids initialization on line 91 |
packages/ducjs/release.config.cjs |
Converted to use paths array format (single path) |
packages/ducdxf/release.config.cjs |
Added path filter plugin to track changes in ducdxf and ducpy packages |
packages/ducsvg/README.md |
Added future consideration note about using hayro-svg library |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| > This library leverages the stable renderer from `ducpdf`, first converting the `duc` document to PDF format before transforming it into SVG using `pdf-into-svg`. This approach ensures high fidelity in the SVG output by utilizing the robust rendering capabilities of the PDF format. | ||
|
|
||
| > 💡 Maybe in the future we could refactor `ducpdf` to leverage the growing library [`hayro_svg`](https://docs.rs/hayro-svg/latest/hayro_svg/) to convert PDF to SVG more seamlessly instead of using `pdf-into-svg` (C# library). Reference: [hayro project](https://github.com/LaurenzV/hayro?tab=readme-ov-file) |
There was a problem hiding this comment.
Inconsistent naming in the library reference. The link uses "hayro-svg" (with hyphen) in the URL path, but the text uses "hayro_svg" (with underscore). Based on the actual URL "https://docs.rs/hayro-svg/latest/hayro_svg/", the library name should be "hayro-svg" in the descriptive text to match the package name convention.
| > 💡 Maybe in the future we could refactor `ducpdf` to leverage the growing library [`hayro_svg`](https://docs.rs/hayro-svg/latest/hayro_svg/) to convert PDF to SVG more seamlessly instead of using `pdf-into-svg` (C# library). Reference: [hayro project](https://github.com/LaurenzV/hayro?tab=readme-ov-file) | |
| > 💡 Maybe in the future we could refactor `ducpdf` to leverage the growing library [`hayro-svg`](https://docs.rs/hayro-svg/latest/hayro_svg/) to convert PDF to SVG more seamlessly instead of using `pdf-into-svg` (C# library). Reference: [hayro project](https://github.com/LaurenzV/hayro?tab=readme-ov-file) |
| "@semantic-release/commit-analyzer", | ||
| "@semantic-release/release-notes-generator", |
There was a problem hiding this comment.
Duplicate plugin configuration detected. The semrel-path-filter.cjs plugin internally uses @semantic-release/commit-analyzer and @semantic-release/release-notes-generator (as seen in lines 56 and 65 of the plugin). Having these plugins listed again on lines 15-16 will cause them to run twice, which could lead to unexpected behavior in the release process. Remove lines 15-16 to avoid duplication.
| "@semantic-release/commit-analyzer", | |
| "@semantic-release/release-notes-generator", |
| paths: [ | ||
| "packages/ducsvg", | ||
| "packages/ducpdf", | ||
| "packages/ducjs", | ||
| "packages/ducrs", | ||
| ], |
There was a problem hiding this comment.
Inconsistent quote style within the same configuration object. The file uses single quotes for require.resolve('../../scripts/semrel-path-filter.cjs') on line 5, but double quotes for the strings in the paths array and other properties. Consider using double quotes consistently throughout the configuration object to match the codebase convention.
| paths: [ | ||
| "packages/ducpdf", | ||
| "packages/ducjs", | ||
| "packages/ducrs" |
There was a problem hiding this comment.
Missing trailing comma after the last array element. The codebase convention is to include trailing commas in array and object literals in JavaScript configuration files for better diff readability and consistency.
| "packages/ducrs" | |
| "packages/ducrs", |
| { | ||
| paths: [ | ||
| "packages/ducdxf", | ||
| "packages/ducpy" |
There was a problem hiding this comment.
Missing trailing comma after the last array element. The codebase convention is to include trailing commas in array and object literals in JavaScript configuration files for better diff readability and consistency.
| "packages/ducpy" | |
| "packages/ducpy", |
| { | ||
| path: "packages/ducrs", | ||
| paths: [ | ||
| "packages/ducrs" |
There was a problem hiding this comment.
Missing trailing comma after the last array element. The codebase convention is to include trailing commas in array and object literals in JavaScript configuration files for better diff readability and consistency.
| "packages/ducrs" | |
| "packages/ducrs", |
| { | ||
| path: "packages/ducpy", | ||
| paths: [ | ||
| "packages/ducpy" |
There was a problem hiding this comment.
Missing trailing comma after the last array element. The codebase convention is to include trailing commas in array and object literals in JavaScript configuration files for better diff readability and consistency.
| "packages/ducpy" | |
| "packages/ducpy", |
| { | ||
| path: "packages/ducjs", | ||
| paths: [ | ||
| "packages/ducjs" |
There was a problem hiding this comment.
Missing trailing comma after the last array element. The codebase convention is to include trailing commas in array and object literals in JavaScript configuration files for better diff readability and consistency.
| "packages/ducjs" | |
| "packages/ducjs", |
|
🎉 This PR is included in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.