Skip to content

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

Merged
leosvelperez merged 1 commit intonrwl:masterfrom
beaussan:fix/typescript-sync-path-resolution
Dec 19, 2024
Merged

fix(js): handle resolution from within node_module in the sync generator#29412
leosvelperez merged 1 commit intonrwl:masterfrom
beaussan:fix/typescript-sync-path-resolution

Conversation

@beaussan
Copy link
Copy Markdown
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

@vercel
Copy link
Copy Markdown

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

@nx-cloud
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

Comment thread packages/js/src/generators/typescript-sync/typescript-sync.ts Outdated
Comment thread packages/js/src/generators/typescript-sync/typescript-sync.ts Outdated
Comment thread packages/js/src/generators/typescript-sync/typescript-sync.ts Outdated
@leosvelperez leosvelperez self-assigned this Dec 19, 2024
@beaussan
Copy link
Copy Markdown
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
Copy Markdown
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
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
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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