-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
moduleResolution: node12
support
#45884
Conversation
cea73a2
to
093002c
Compare
@typescript-bot pack this |
Heya @weswigham, I've started to run the tarball bundle task on this PR at 859abb6. You can monitor the build here. |
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
@weswigham i did test this beta get
so support for moduleResolution |
I just tried the
See https://unpkg.com/browse/@angular/[email protected]/package.json
See https://unpkg.com/browse/[email protected]/package.json I have no idea how can it be fixed on my side. Test source codes: // worker.ts
import type { ParsedTemplate } from '@angular/compiler'
import { runAsWorker } from 'synckit'
runAsWorker<ParsedTemplate>(async (code: string, filePath: string) => {
const { parseTemplate } = await import('@angular/compiler')
return parseTemplate(code, filePath, {
preserveWhitespaces: true,
preserveLineEndings: true,
collectCommentNodes: true,
})
}) |
for (const name of names) { | ||
let resolution = resolutionsInFile.get(name); | ||
const mode = containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot assume that module name is referenced at index i
in containing source file because we could be calling you with only few module names from the source file. https://github.com/microsoft/TypeScript/blob/main/src/compiler/program.ts#L1571 shows that case
This PR is mostly just to pack up everything together for reviews over at weswigham#68 (if you're pinged as a reviewer here, go there to just review this most recent stage of development). It's also a viable PR to squash and merge to get everything merged all at once, once reviews and CI are in~