Skip to content

Inaccurate warning for ignoring vendored packages with subpath and version#324

Open
ron-shinall wants to merge 1 commit intorails:mainfrom
ron-shinall:vendored-subpath
Open

Inaccurate warning for ignoring vendored packages with subpath and version#324
ron-shinall wants to merge 1 commit intorails:mainfrom
ron-shinall:vendored-subpath

Conversation

@ron-shinall
Copy link
Copy Markdown
Contributor

I noticed a warning that a couple of my vendored packages were being ignored as though there were unversioned:

pin "pdfjs-dist/build/pdf.min.mjs", to: "pdfjs-dist--build--pdf.min.mjs.js" # @5.4.530
pin "pdfjs-dist/build/pdf.worker.min.mjs", to: "pdfjs-dist--build--pdf.worker.min.mjs.js" # @5.4.530

For example, when executing bin/importmap audit:

$ bin/importmap audit
Ignoring pdfjs-dist/build/pdf.min.mjs (vendor/javascript/pdfjs-dist--build--pdf.min.mjs.js) since no version is specified in the importmap
Ignoring pdfjs-dist/build/pdf.worker.min.mjs (vendor/javascript/pdfjs-dist--build--pdf.worker.min.mjs.js) since no version is specified in the importmap

This PR makes a change to use the extract_base_package_name() method within find_unversioned_vendored_package() to make it consistent with packages_with_versions() and eliminate the erroneous warning.

I also created a new test to confirm that there is no longer a warning emitted.

@rafaelfranca please let me know if you prefer a different approach.

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.

1 participant