-
-
Notifications
You must be signed in to change notification settings - Fork 199
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(common): update TS module resolution flow #1659
Open
arturovt
wants to merge
1
commit into
master
Choose a base branch
from
fix/ts-resolution
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
arturovt
force-pushed
the
fix/ts-resolution
branch
2 times, most recently
from
February 4, 2024 20:55
0de7266
to
b2a36d8
Compare
arturovt
force-pushed
the
fix/ts-resolution
branch
from
February 4, 2024 21:06
b2a36d8
to
b6737b9
Compare
@arturovt The CI is failing 😬. |
arturovt
force-pushed
the
fix/ts-resolution
branch
from
February 17, 2024 16:04
ea040ac
to
f2d57f2
Compare
arturovt
force-pushed
the
fix/ts-resolution
branch
3 times, most recently
from
March 10, 2024 21:51
6b5ca2f
to
15c4e1b
Compare
Ugh that CI is so weird with random failures... doesn't even show any error... |
arturovt
force-pushed
the
fix/ts-resolution
branch
5 times, most recently
from
April 4, 2024 08:27
f9ab45e
to
e02da5d
Compare
@just-jeb could you run ci locally? Maybe you can see the actual error… |
@arturovt I'll give it a look. Were you unable to run it locally? |
This commit updates the implementation for resolving `.ts` files. Instead of registering the `ts-node` project only once, we now refrain from doing so since there might be multiple projects with different configurations. The current approach involves dynamically switching the implementation for registering and unregistering the project after the `.ts` file has been transpiled and resolved. This change addresses an issue where warnings were encountered when `ts-node` attempted to register with different configurations. The number of configurations is no longer a concern, as each time we need to read a `.ts` file, a new TS project is registered. This adjustment does not impact performance or other attributes because `ts-node` allows native project disabling. Part of the implementation has been adapted from what Nrwl Nx already has; we can find their implementation here: https://github.com/nrwl/nx/blob/master/packages/nx/src/plugins/js/utils/register.ts It's worth noting that their implementation is somewhat versatile, as it also supports SWC. Closes: #1197 Closes: #1213 Closes: #1730
arturovt
force-pushed
the
fix/ts-resolution
branch
from
September 19, 2024 15:52
e02da5d
to
9aaf502
Compare
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.
This commit updates the implementation for resolving
.ts
files.Instead of registering the
ts-node
project only once, we now refrain fromdoing so since there might be multiple projects with different configurations.
The current approach involves dynamically switching the implementation for
registering and unregistering the project after the
.ts
file has been transpiledand resolved. This change addresses an issue where warnings were encountered when
ts-node
attempted to register with different configurations. The number of configurationsis no longer a concern, as each time we need to read a
.ts
file, a new TS project isregistered. This adjustment does not impact performance or other attributes because
ts-node
allows native project disabling. Part of the implementation has been adapted from what Nrwl Nx
already has; we can find their implementation here:
https://github.com/nrwl/nx/blob/master/packages/nx/src/plugins/js/utils/register.ts
It's worth noting that their implementation is somewhat versatile, as it also supports SWC.
Closes: #1197
Closes: #1213
Closes: #1730