Skip to content

feat(cli): auto-include pnpm patches directory in Playwright bundles#1273

Merged
sorccu merged 7 commits intomainfrom
feat/auto-include-pnpm-patches
Apr 6, 2026
Merged

feat(cli): auto-include pnpm patches directory in Playwright bundles#1273
sorccu merged 7 commits intomainfrom
feat/auto-include-pnpm-patches

Conversation

@hlenke
Copy link
Copy Markdown
Member

@hlenke hlenke commented Apr 3, 2026

Summary

  • Automatically includes patches/*.patch in Playwright check bundles when using pnpm, preventing pnpm install failures at runtime when patchedDependencies are referenced in the lockfile
  • Only activates when: package manager is pnpm and user hasn't already included a patches pattern
  • Resolves user include patterns to absolute paths so that ./patches/**, patches/**, and absolute paths are all detected correctly

Closes SIM-208

Test plan

  • Unit tests for getAutoIncludes() — 13 tests all passing
  • Existing util.spec.ts tests still pass
  • Existing check-parser.spec.ts tests still pass (44/44)
  • CI checks pass

🤖 Generated with Claude Code

sorccu
sorccu previously approved these changes Apr 6, 2026
hlenke and others added 7 commits April 7, 2026 02:02
When using pnpm, the CLI now automatically includes the `patches/` directory
in Playwright check bundles if it exists, preventing `pnpm install` failures
at runtime when patched dependencies are referenced in the lockfile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Includes

The glob pattern harmlessly matches nothing when the directory doesn't
exist, so the statSync check was redundant. This also removes the
basePath parameter and simplifies the tests to pure logic checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
More precise than patches/** — only includes actual patch files,
avoiding accidentally bundling unrelated files in the directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents adding duplicate patches include when the user specifies
the pattern with a relative prefix (./patches/**) or absolute path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
path.resolve ensures basePath is valid on Windows where /project
is not treated as an absolute path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sorccu sorccu force-pushed the feat/auto-include-pnpm-patches branch from 224eba4 to 24d64d1 Compare April 6, 2026 17:02
@sorccu sorccu merged commit 34d60e4 into main Apr 6, 2026
4 checks passed
@sorccu sorccu deleted the feat/auto-include-pnpm-patches branch April 6, 2026 17:28
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