Skip to content

Commit c7c0767

Browse files
authored
fix(compat): update patch for [email protected] (#6248)
**What's the problem this PR addresses?** The PnP compatibility patch for TypeScript doesn't apply to `[email protected]`. Ref microsoft/TypeScript#35206 **How did you fix it?** Rebased it. **Checklist** - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [x] I have set the packages that need to be released for my changes to be effective. - [x] I will check that all automated PR checks pass before the PR gets reviewed.
1 parent c8c59ff commit c7c0767

20 files changed

+1150
-59
lines changed

.pnp.cjs

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-5.62 MB
Binary file not shown.
3.9 MB
Binary file not shown.
3.9 MB
Binary file not shown.
-5.62 MB
Binary file not shown.

.yarn/sdks/typescript/lib/tsserver.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ const relPnpApiPath = "../../../../.pnp.cjs";
99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1010
const absRequire = createRequire(absPnpApiPath);
1111

12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require typescript/lib/tsserver.js
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
1219
const moduleWrapper = tsserver => {
1320
if (!process.versions.pnp) {
1421
return tsserver;
@@ -214,12 +221,7 @@ const moduleWrapper = tsserver => {
214221
return tsserver;
215222
};
216223

217-
if (existsSync(absPnpApiPath)) {
218-
if (!process.versions.pnp) {
219-
// Setup the environment to be able to require typescript/lib/tsserver.js
220-
require(absPnpApiPath).setup();
221-
}
222-
}
224+
moduleWrapper(absRequire(`typescript`));
223225

224226
// Defer to the real typescript/lib/tsserver.js your application uses
225227
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));

.yarn/sdks/typescript/lib/tsserverlibrary.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ const relPnpApiPath = "../../../../.pnp.cjs";
99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1010
const absRequire = createRequire(absPnpApiPath);
1111

12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
1219
const moduleWrapper = tsserver => {
1320
if (!process.versions.pnp) {
1421
return tsserver;
@@ -214,12 +221,7 @@ const moduleWrapper = tsserver => {
214221
return tsserver;
215222
};
216223

217-
if (existsSync(absPnpApiPath)) {
218-
if (!process.versions.pnp) {
219-
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
220-
require(absPnpApiPath).setup();
221-
}
222-
}
224+
moduleWrapper(absRequire(`typescript`));
223225

224226
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
225227
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));

.yarn/sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript",
3-
"version": "5.4.1-rc-sdk",
3+
"version": "5.5.0-beta-sdk",
44
"main": "./lib/typescript.js",
55
"type": "commonjs",
66
"bin": {

.yarn/versions/80caa95b.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-compat": patch
4+
"@yarnpkg/sdks": patch
5+
6+
declined:
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-init"
11+
- "@yarnpkg/plugin-interactive-tools"
12+
- "@yarnpkg/plugin-nm"
13+
- "@yarnpkg/plugin-npm-cli"
14+
- "@yarnpkg/plugin-pack"
15+
- "@yarnpkg/plugin-patch"
16+
- "@yarnpkg/plugin-pnp"
17+
- "@yarnpkg/plugin-pnpm"
18+
- "@yarnpkg/plugin-stage"
19+
- "@yarnpkg/plugin-typescript"
20+
- "@yarnpkg/plugin-version"
21+
- "@yarnpkg/plugin-workspace-tools"
22+
- "@yarnpkg/builder"
23+
- "@yarnpkg/core"
24+
- "@yarnpkg/doctor"

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"jest": "^29.2.1",
2828
"pirates": "^4.0.5",
2929
"tslib": "^2.4.0",
30-
"typescript": "5.4.1-rc"
30+
"typescript": "5.5.0-beta"
3131
},
3232
"resolutions": {
3333
"ink": "patch:ink@npm%3A3.0.8#~/.yarn/patches/ink-npm-3.0.8-3a8005f59f.patch",
@@ -81,5 +81,6 @@
8181
"chalk": "^3.0.0",
8282
"micromatch": "^4.0.2",
8383
"semver": "^7.1.2"
84-
}
84+
},
85+
"packageManager": "[email protected]+sha256.f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781"
8586
}

0 commit comments

Comments
 (0)