fix(js): resolve build output dir from globbed outputs in node executor#35288
Open
leosvelperez wants to merge 1 commit intomasterfrom
Open
fix(js): resolve build output dir from globbed outputs in node executor#35288leosvelperez wants to merge 1 commit intomasterfrom
leosvelperez wants to merge 1 commit intomasterfrom
Conversation
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit e97708f
☁️ Nx Cloud last updated this comment at |
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.
Current Behavior
The
@nx/js:nodeexecutor fails withCould not find <project>/dist/**/*.{js,cjs,mjs,jsx,d.ts,d.cts,d.mts}{,.map}/main.js. Make sure your build succeeded.when combined with the inferred@nx/js/typescriptbuild target.Since #35041 narrowed the inferred build target's
outputs[0]from{projectRoot}/distto{projectRoot}/dist/**/*.{js,...}{,.map}(to prevent cross-OS cache pollution), the node executor'sgetFileToRunkept joiningmain.jsonto that value and produced an invalid path.Expected Behavior
outputsentries are cache patterns and may legitimately contain globs.getFileToRunnow strips the glob portion back to the last path separator before appendingmain.js, so<projectRoot>/dist/**/*.{js,...}{,.map}correctly resolves to<projectRoot>/dist/main.js. Handles**,*,?, character classes, brace expansion, extglob, and Windows/POSIX separators.Related Issue(s)
Fixes #35198