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

feat(compat): update patch for typescript 4.3 #2889

Merged
merged 3 commits into from
May 27, 2021

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented May 13, 2021

What's the problem this PR addresses?

The PnP patch for TypeScript doesn't apply to typescript@>=4.3.1-rc

Closes #2799
Closes #2938

How did you fix it?

Rebased microsoft/TypeScript#35206 onto 4.3.2

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz changed the title feat(compat): update patch for typescript 4.3.1-rc feat(compat): update patch for typescript 4.3 May 26, 2021
@merceyz merceyz force-pushed the merceyz/fix/typescript-4.3 branch from 31573fe to b442b9b Compare May 26, 2021 22:11
@merceyz merceyz force-pushed the merceyz/fix/typescript-4.3 branch from b442b9b to a78efcc Compare May 26, 2021 22:18
@merceyz merceyz marked this pull request as ready for review May 27, 2021 10:16
@sirreal
Copy link

sirreal commented May 27, 2021

👍 I was able to upgrade to TypeScript 4.3.2 when using the build from this branch. tsc appeared to work as expected.

yarn set version from sources --branch merceyz/fix/typescript-4.3
yarn up typescript

I'm using the node-modules linker.

@arcanis arcanis merged commit a01852b into master May 27, 2021
@arcanis arcanis deleted the merceyz/fix/typescript-4.3 branch May 27, 2021 12:54
@jtbandes
Copy link

jtbandes commented May 27, 2021

These changes seem to break bundling typescript for the browser, because of the dynamic require("module") call which won't work in the browser.

More details on similar issues at microsoft/TypeScript#39436 – although, until now, these have just been warnings because those code paths weren't actually executed when running TS in a browser context.

I guess one can probably work around it by further patching TypeScript during bundling to remove the getPnpTypeRoots logic, so I'll be trying that next...
I worked around this by adding module: false to webpack resolve.fallback.

@SimenB
Copy link

SimenB commented Jun 3, 2021

Will there be a release of this similar to how there was one for [email protected] (in yarn 2.4.1)?

@arcanis
Copy link
Member

arcanis commented Jun 3, 2021

Yes, I just released 2.4.2 which includes this fix.

@SimenB
Copy link

SimenB commented Jun 3, 2021

Wonderful, thank you!

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.

[Bug] Unable to install TypeScript 4.3.2 [Bug] TypeScript resolution in latest dev build
5 participants