Skip to content

test: align cjs test with sass-loader#465

Merged
alexander-akait merged 1 commit into
mainfrom
claude/cjs-tests-changelog-nZZDY
May 25, 2026
Merged

test: align cjs test with sass-loader#465
alexander-akait merged 1 commit into
mainfrom
claude/cjs-tests-changelog-nZZDY

Conversation

@alexander-akait
Copy link
Copy Markdown
Member

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

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
Copilot AI review requested due to automatic review settings May 25, 2026 17:57
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.21%. Comparing base (6928e4e) to head (fd7aeed).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 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.json type marker is written (intended to reflect the build:cjs script 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 thread test/cjs.test.js
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.
@alexander-akait alexander-akait merged commit e3011b0 into main May 25, 2026
14 of 15 checks passed
@alexander-akait alexander-akait deleted the claude/cjs-tests-changelog-nZZDY branch May 25, 2026 18:03
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.

3 participants