Skip to content

Commit afd71c6

Browse files
committed
fix(compat): update patch for typescript 4.6
1 parent 442f509 commit afd71c6

File tree

5 files changed

+2884
-25
lines changed

5 files changed

+2884
-25
lines changed

packages/plugin-compat/extra/typescript/gen-typescript-patch.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,16 @@ const SLICES = [
8181
// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.5
8282
{
8383
from: `79fe5d206f89e5f1585807bdcd7feeb567a69646`,
84-
to: `fff89a12766fa485e35b1c65d8631d109c4e2c0e`,
84+
to: `b7875244ca066f2674e81ba84ce9fbf00466ab84`,
8585
onto: `7893f689fedcfe28a499d119d34844840bce9160`,
86-
range: `>=4.5.2`,
86+
range: `>=4.5.2 <4.6`,
87+
},
88+
// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.6
89+
{
90+
from: `5a46ef5979c2b0a8e31180d099b6c6acd3fe18ac`,
91+
to: `7874ae3accdaf5554dd9e1b9e6cf8d290a41d58c`,
92+
onto: `ce18254c776782a938bd55046d93871e176d6172`,
93+
range: `>=4.6.0-dev.20220113`,
8794
},
8895
];
8996

packages/plugin-compat/extra/typescript/patch-a0f4b2d552ff3b4930fdbb2b6ae46be5.diff renamed to packages/plugin-compat/extra/typescript/patch-b95c9209c76e581fea98e6a49935a315.diff

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
diff --git a/lib/tsc.js b/lib/tsc.js
2-
index b7520e834..a8b13999c 100644
3-
semver exclusivity >=4.5.2
2+
index b7520e834..796e8d126 100644
3+
semver exclusivity >=4.5.2 <4.6
44
--- a/lib/tsc.js
55
+++ b/lib/tsc.js
66
@@ -4776,6 +4776,9 @@ var ts;
@@ -193,7 +193,7 @@ semver exclusivity >=4.5.2
193193
+ var findPnpApi = require("module").findPnpApi;
194194
+ var pnpApi = findPnpApi(path);
195195
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
196-
+ if (locator != null) {
196+
+ if (locator !== null && locator !== undefined) {
197197
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
198198
+ if (locator === sourceLocator) {
199199
+ return undefined;
@@ -303,8 +303,8 @@ semver exclusivity >=4.5.2
303303
ts.perfLogger.logStartUpdateProgram("SynchronizeProgram");
304304
synchronizeProgram();
305305
diff --git a/lib/tsserver.js b/lib/tsserver.js
306-
index d0063b2e5..17d21c109 100644
307-
semver exclusivity >=4.5.2
306+
index d0063b2e5..a83296120 100644
307+
semver exclusivity >=4.5.2 <4.6
308308
--- a/lib/tsserver.js
309309
+++ b/lib/tsserver.js
310310
@@ -7515,6 +7515,11 @@ var ts;
@@ -520,7 +520,7 @@ semver exclusivity >=4.5.2
520520
+ var pnpApi = findPnpApi(path);
521521
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
522522
+ // eslint-disable-next-line no-null/no-null
523-
+ if (locator != null) {
523+
+ if (locator !== null && locator !== undefined) {
524524
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
525525
+ // Don't use the package name when the imported file is inside
526526
+ // the source directory (prefer a relative path instead)
@@ -924,8 +924,8 @@ semver exclusivity >=4.5.2
924924
this.installer.on("message", function (m) { return _this.handleMessage(m); });
925925
// We have to schedule this event to the next tick
926926
diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js
927-
index 362c8ed2f..836fb22b4 100644
928-
semver exclusivity >=4.5.2
927+
index 362c8ed2f..b99bd161a 100644
928+
semver exclusivity >=4.5.2 <4.6
929929
--- a/lib/tsserverlibrary.js
930930
+++ b/lib/tsserverlibrary.js
931931
@@ -7709,6 +7709,11 @@ var ts;
@@ -1141,7 +1141,7 @@ semver exclusivity >=4.5.2
11411141
+ var pnpApi = findPnpApi(path);
11421142
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
11431143
+ // eslint-disable-next-line no-null/no-null
1144-
+ if (locator != null) {
1144+
+ if (locator !== null && locator !== undefined) {
11451145
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
11461146
+ // Don't use the package name when the imported file is inside
11471147
+ // the source directory (prefer a relative path instead)
@@ -1521,8 +1521,8 @@ semver exclusivity >=4.5.2
15211521
var _this = this;
15221522
var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map());
15231523
diff --git a/lib/typescript.js b/lib/typescript.js
1524-
index b08660b52..0cefe5195 100644
1525-
semver exclusivity >=4.5.2
1524+
index b08660b52..e37fe50a1 100644
1525+
semver exclusivity >=4.5.2 <4.6
15261526
--- a/lib/typescript.js
15271527
+++ b/lib/typescript.js
15281528
@@ -7709,6 +7709,11 @@ var ts;
@@ -1738,7 +1738,7 @@ semver exclusivity >=4.5.2
17381738
+ var pnpApi = findPnpApi(path);
17391739
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
17401740
+ // eslint-disable-next-line no-null/no-null
1741-
+ if (locator != null) {
1741+
+ if (locator !== null && locator !== undefined) {
17421742
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
17431743
+ // Don't use the package name when the imported file is inside
17441744
+ // the source directory (prefer a relative path instead)
@@ -2014,8 +2014,8 @@ semver exclusivity >=4.5.2
20142014
return statement;
20152015
});
20162016
diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js
2017-
index bbe1b9b37..197e2c71c 100644
2018-
semver exclusivity >=4.5.2
2017+
index bbe1b9b37..e8f32af65 100644
2018+
semver exclusivity >=4.5.2 <4.6
20192019
--- a/lib/typescriptServices.js
20202020
+++ b/lib/typescriptServices.js
20212021
@@ -7709,6 +7709,11 @@ var ts;
@@ -2231,7 +2231,7 @@ semver exclusivity >=4.5.2
22312231
+ var pnpApi = findPnpApi(path);
22322232
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
22332233
+ // eslint-disable-next-line no-null/no-null
2234-
+ if (locator != null) {
2234+
+ if (locator !== null && locator !== undefined) {
22352235
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
22362236
+ // Don't use the package name when the imported file is inside
22372237
+ // the source directory (prefer a relative path instead)
@@ -2507,8 +2507,8 @@ semver exclusivity >=4.5.2
25072507
return statement;
25082508
});
25092509
diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js
2510-
index 514f48a46..4d1aa5d8f 100644
2511-
semver exclusivity >=4.5.2
2510+
index 514f48a46..f73da2952 100644
2511+
semver exclusivity >=4.5.2 <4.6
25122512
--- a/lib/typingsInstaller.js
25132513
+++ b/lib/typingsInstaller.js
25142514
@@ -7504,6 +7504,11 @@ var ts;
@@ -2724,7 +2724,7 @@ semver exclusivity >=4.5.2
27242724
+ var pnpApi = findPnpApi(path);
27252725
+ var locator = pnpApi === null || pnpApi === void 0 ? void 0 : pnpApi.findPackageLocator(path);
27262726
+ // eslint-disable-next-line no-null/no-null
2727-
+ if (locator != null) {
2727+
+ if (locator !== null && locator !== undefined) {
27282728
+ var sourceLocator = pnpApi.findPackageLocator("".concat(sourceDirectory, "/"));
27292729
+ // Don't use the package name when the imported file is inside
27302730
+ // the source directory (prefer a relative path instead)

0 commit comments

Comments
 (0)