Skip to content

Dev#155

Merged
jorgedanisc merged 3 commits into
mainfrom
dev
Dec 13, 2025
Merged

Dev#155
jorgedanisc merged 3 commits into
mainfrom
dev

Conversation

@jorgedanisc
Copy link
Copy Markdown
Contributor

No description provided.

jorgedanisc and others added 3 commits December 13, 2025 02:08
…ion to `paths` array and update script to only use `paths`.
feat: enhance semantic-release path filter to support multiple paths …
@jorgedanisc jorgedanisc self-assigned this Dec 13, 2025
Copilot AI review requested due to automatic review settings December 13, 2025 18:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cjs to support multiple paths via a paths array instead of a single path option
  • Updated all package release configurations to use the new paths array format, establishing dependency relationships
  • Fixed a duplicate block_ids initialization 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.

Comment thread packages/ducsvg/README.md

> 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)
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
> 💡 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)

Copilot uses AI. Check for mistakes.
Comment on lines 15 to 16
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +12
paths: [
"packages/ducsvg",
"packages/ducpdf",
"packages/ducjs",
"packages/ducrs",
],
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
paths: [
"packages/ducpdf",
"packages/ducjs",
"packages/ducrs"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ducrs"
"packages/ducrs",

Copilot uses AI. Check for mistakes.
{
paths: [
"packages/ducdxf",
"packages/ducpy"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ducpy"
"packages/ducpy",

Copilot uses AI. Check for mistakes.
{
path: "packages/ducrs",
paths: [
"packages/ducrs"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ducrs"
"packages/ducrs",

Copilot uses AI. Check for mistakes.
{
path: "packages/ducpy",
paths: [
"packages/ducpy"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ducpy"
"packages/ducpy",

Copilot uses AI. Check for mistakes.
{
path: "packages/ducjs",
paths: [
"packages/ducjs"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ducjs"
"packages/ducjs",

Copilot uses AI. Check for mistakes.
@jorgedanisc jorgedanisc merged commit b6ee4e6 into main Dec 13, 2025
13 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants