Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(js): handle resolution from within node_module in the sync generator #29412

Merged

Conversation

beaussan
Copy link
Contributor

@beaussan beaussan commented Dec 19, 2024

closed #29411

Current Behavior

The resolve function from ts.System returning the full path, and so including the workspaceRoot that is also append by the FsTree

Expected Behavior

Resolution within node_modules are correctly followed

Related Issue(s)

Fixes #29411

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 0:40am

Copy link

nx-cloud bot commented Dec 19, 2024

View your CI Pipeline Execution ↗ for commit 154e3ac.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 38m 53s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check --base=2eb52... ✅ Succeeded 19s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx documentation --no-dte ✅ Succeeded 40s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-19 14:05:35 UTC

@beaussan beaussan marked this pull request as ready for review December 19, 2024 08:38
@beaussan beaussan requested a review from a team as a code owner December 19, 2024 08:38
@beaussan beaussan force-pushed the fix/typescript-sync-path-resolution branch from 932a757 to c5160da Compare December 19, 2024 09:05
Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! The changes look good to me. Let's just change it to use tree.root instead of importing workspaceRoot.

@leosvelperez leosvelperez self-assigned this Dec 19, 2024
@beaussan
Copy link
Contributor Author

Thanks @leosvelperez ! I didn't think about using the tree.root, changes are applied! ✔️

@beaussan beaussan force-pushed the fix/typescript-sync-path-resolution branch from 5a8b0df to 154e3ac Compare December 19, 2024 12:38
Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@leosvelperez leosvelperez merged commit 0ebe59c into nrwl:master Dec 19, 2024
6 checks passed
ndcunningham pushed a commit that referenced this pull request Dec 20, 2024
…tor (#29412)

closed #29411

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
The resolve function from ts.System returning the full path, and so
including the workspaceRoot that is also append by the FsTree

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Resolution within node_modules are correctly followed

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29411
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.

@nx/js:typescript-sync doesn't follow the resolution from within node_modules
2 participants