Repository navigation
Conversation
findFilesByMatchers split relative() output on "/", but on Windows relative() returns backslash paths, so no ".." segment was removed and matched files were copied outside the build directory. Split on the platform separator instead. Fixes triggerdotdev#5074 Co-Authored-By: Claude Opus 5.5 <[email protected]>
🦋 Changeset detectedLatest commit: c6beede The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Hi @SimoMay, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
Contributor
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes #5074
What
findFilesByMatchers(packages/build/src/internal/copyFiles.ts) splits the output ofrelative()on/to drop leading..segments. On Windowsrelative()returns backslash paths, so nothing is dropped andadditionalFilesmatches like../shared/**are copied outside the build directory. This splits on the platform separator (sep) instead and still joins with/.Verification
path.win32:C:\repo\app+C:\repo\shared\a.mdnow resolves to<build>\shared\a.md. Before the change it resolved toC:\repo\app\.trigger\tmp\shared\a.md.findFilesByMatchersagainst real files with../shared/**. It returns<build>/shared/sub/a.md, the same as before.I didn't add a unit test: the function uses the native
pathmodule, so a Windows test needs a Windows CI runner or the path functions passed in. Happy to add either if you prefer.Changeset:
@trigger.dev/buildpatch.🤖 Generated with Claude Code