Skip to content

Conversation

@tobybessant
Copy link
Member

@tobybessant tobybessant commented Nov 23, 2025

Ignore directories whose name starts with a dot (.). Package names in npm cannot start with a . so these are safe to ignore, and allows us to "support" Deno runtimes (via package.json).

@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.83%. Comparing base (5755970) to head (fc621ae).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #660   +/-   ##
=======================================
  Coverage   99.83%   99.83%           
=======================================
  Files          32       32           
  Lines         621      621           
  Branches      106      106           
=======================================
  Hits          620      620           
  Misses          1        1           

☔ 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

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 adds support for ignoring dot-prefixed directories in node_modules, enabling compatibility with Deno runtimes while maintaining npm package resolution. The change filters out any dependency whose name starts with a dot (.) before attempting to read its package.json, since npm package names cannot start with a dot.

Key Changes

  • Modified the dependency filtering logic to skip dot-prefixed directories alongside dev and peer dependencies
  • Added the name field to existing test mock objects to align with the Node interface requirements
  • Added comprehensive test coverage for the dot-prefixed directory filtering behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/packages/generate-license-file/src/lib/internal/resolveDependencies/resolveNpmDependencies.ts Added node.name.startsWith(".") check to skip dot-prefixed directories in the parseNode function
src/packages/generate-license-file/test/internal/resolveDependencies/resolveNpmDependencies.spec.ts Added name field to existing test mocks and implemented new test case verifying dot-prefixed directories are skipped without file I/O operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobysmith568 tobysmith568 merged commit bd2e698 into main Nov 23, 2025
26 checks passed
@tobysmith568 tobysmith568 deleted the tb/ignore-dotprefixed-dirs branch November 23, 2025 12:54
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