test: align cjs test with sass-loader#465
Merged
Merged
Conversation
Fix an inaccurate JSDoc reference (the marker is written by `build:cjs`, not a `build:cjs-marker` script, to `dist/cjs/package.json`) and add the same explanatory comments sass-loader carries. Document why the temp dir stays inside the project tree: the transpiled CJS bundle resolves runtime dependencies (`normalize-path`, `tinyglobby`) from the project's own `node_modules`. https://claude.ai/code/session_01Nf5AKZbH171RomFY1NKmQ2
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #465 +/- ##
=======================================
Coverage 96.21% 96.21%
=======================================
Files 2 2
Lines 1269 1269
=======================================
Hits 1221 1221
Misses 48 48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CommonJS (CJS) test documentation/comments to match the conventions used in sass-loader, correcting an inaccurate JSDoc reference and adding clarifying rationale for the test setup (notably why the temp CJS build output must live inside the repo tree).
Changes:
- Fixes the JSDoc description of how/where the CJS
package.jsontype marker is written (intended to reflect thebuild:cjsscript behavior). - Adds explanatory comments about why the temp directory is created within the project tree (so runtime deps resolve from the project’s
node_modules). - Adds higher-level test intent comments describing what shape the CJS bundle is expected to have.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+27
| * non-JS assets, then drop the `dist/cjs/package.json` type marker and | ||
| * the same `module.exports = exports.default` post-build append the | ||
| * `build:cjs` npm script writes. The test then `require()`s the result. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix an inaccurate JSDoc reference (the marker is written by
build:cjs,not a
build:cjs-markerscript, todist/cjs/package.json) and add thesame explanatory comments sass-loader carries. Document why the temp dir
stays inside the project tree: the transpiled CJS bundle resolves runtime
dependencies (
normalize-path,tinyglobby) from the project's ownnode_modules.https://claude.ai/code/session_01Nf5AKZbH171RomFY1NKmQ2