Skip to content

Commit 07865ef

Browse files
committed
1 parent d06b60f commit 07865ef

File tree

14 files changed

+107
-27
lines changed

14 files changed

+107
-27
lines changed

fe/.vscode/settings.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
"typescript",
99
"typescriptreact"
1010
],
11-
"typescript.enablePromptUseWorkspaceTsdk": true,
12-
"typescript.tsdk": ".yarn/sdks/typescript/lib",
11+
"eslint.useFlatConfig": true,
12+
"eslint.runtime": "node", // https://github.com/yarnpkg/berry/pull/6278#issuecomment-2149229422
1313
"eslint.nodePath": ".yarn/sdks",
14+
"typescript.tsdk": ".yarn/sdks/typescript/lib",
15+
"typescript.enablePromptUseWorkspaceTsdk": true,
16+
"typescript.tsserver.experimental.useVsCodeWatcher": false, // https://github.com/yarnpkg/berry/issues/6270
1417
"[vue]": {
15-
"editor.defaultFormatter": "Vue.volar"
18+
"editor.defaultFormatter": "Vue.volar"
1619
},
1720
// below are optional settings
1821
"vue.complete.casing.props": "autoCamel",

fe/.yarn/plugins/@yarnpkg/plugin-nolyfill.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module.exports = {
44
name: "@yarnpkg/plugin-nolyfill",
55
factory: function (require) {
6-
"use strict";var plugin=(()=>{var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,e)=>(typeof require<"u"?require:r)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var c=(t,r)=>{for(var e in r)p(t,e,{get:r[e],enumerable:!0})},g=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of y(r))!n.call(t,a)&&a!==e&&p(t,a,{get:()=>r[a],enumerable:!(s=i(r,a))||s.enumerable});return t};var f=t=>g(p({},"__esModule",{value:!0}),t);var u={};c(u,{default:()=>m});var o=l("@yarnpkg/core"),d=["abab","array-buffer-byte-length","array-includes","array.from","array.of","array.prototype.at","array.prototype.every","array.prototype.find","array.prototype.findlast","array.prototype.findlastindex","array.prototype.flat","array.prototype.flatmap","array.prototype.flatmap","array.prototype.foreach","array.prototype.reduce","array.prototype.toreversed","array.prototype.tosorted","arraybuffer.prototype.slice","assert","asynciterator.prototype","available-typed-arrays","deep-equal","define-properties","es-aggregate-error","es-iterator-helpers","es-set-tostringtag","es6-object-assign","function-bind","function.prototype.name","get-symbol-description","globalthis","gopd","harmony-reflect","has","has-property-descriptors","has-proto","has-symbols","has-tostringtag","hasown","internal-slot","is-arguments","is-array-buffer","is-date-object","is-generator-function","is-nan","is-regex","is-shared-array-buffer","is-string","is-symbol","is-typed-array","is-weakref","isarray","iterator.prototype","jsonify","object-is","object-keys","object.assign","object.entries","object.fromentries","object.getownpropertydescriptors","object.groupby","object.hasown","object.values","promise.allsettled","promise.any","reflect.getprototypeof","reflect.ownkeys","regexp.prototype.flags","safe-array-concat","safe-regex-test","set-function-length","side-channel","string.prototype.at","string.prototype.codepointat","string.prototype.includes","string.prototype.matchall","string.prototype.padend","string.prototype.padstart","string.prototype.repeat","string.prototype.replaceall","string.prototype.split","string.prototype.startswith","string.prototype.trim","string.prototype.trimend","string.prototype.trimleft","string.prototype.trimright","string.prototype.trimstart","typed-array-buffer","typed-array-byte-length","typed-array-byte-offset","typed-array-length","typedarray","unbox-primitive","util.promisify","which-boxed-primitive","which-typed-array"],h=new Map(d.map(t=>[o.structUtils.makeIdent(null,t).identHash,o.structUtils.makeIdent("nolyfill",t)])),b={hooks:{reduceDependency:async t=>{let r=h.get(t.identHash);if(r){let e=o.structUtils.makeDescriptor(r,"latest"),s=o.structUtils.makeRange({protocol:"npm:",source:null,selector:o.structUtils.stringifyDescriptor(e),params:null});return o.structUtils.makeDescriptor(t,s)}return t}}},m=b;return f(u);})();
6+
"use strict";var plugin=(()=>{var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,e)=>(typeof require<"u"?require:r)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var c=(t,r)=>{for(var e in r)p(t,e,{get:r[e],enumerable:!0})},g=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of y(r))!n.call(t,a)&&a!==e&&p(t,a,{get:()=>r[a],enumerable:!(s=i(r,a))||s.enumerable});return t};var f=t=>g(p({},"__esModule",{value:!0}),t);var u={};c(u,{default:()=>m});var o=l("@yarnpkg/core"),d=["abab","array-buffer-byte-length","array-includes","array.from","array.of","array.prototype.at","array.prototype.every","array.prototype.find","array.prototype.findlast","array.prototype.findlastindex","array.prototype.flat","array.prototype.flatmap","array.prototype.flatmap","array.prototype.foreach","array.prototype.reduce","array.prototype.toreversed","array.prototype.tosorted","arraybuffer.prototype.slice","assert","asynciterator.prototype","available-typed-arrays","deep-equal","define-properties","es-aggregate-error","es-iterator-helpers","es-set-tostringtag","es6-object-assign","function-bind","function.prototype.name","get-symbol-description","globalthis","gopd","harmony-reflect","has","has-property-descriptors","has-proto","has-symbols","has-tostringtag","hasown","internal-slot","is-arguments","is-array-buffer","is-date-object","is-generator-function","is-nan","is-regex","is-shared-array-buffer","is-string","is-symbol","is-typed-array","is-weakref","isarray","iterator.prototype","json-stable-stringify","jsonify","object-is","object-keys","object.assign","object.entries","object.fromentries","object.getownpropertydescriptors","object.groupby","object.hasown","object.values","promise.allsettled","promise.any","reflect.getprototypeof","reflect.ownkeys","regexp.prototype.flags","safe-array-concat","safe-regex-test","set-function-length","side-channel","string.prototype.at","string.prototype.codepointat","string.prototype.includes","string.prototype.matchall","string.prototype.padend","string.prototype.padstart","string.prototype.repeat","string.prototype.replaceall","string.prototype.split","string.prototype.startswith","string.prototype.trim","string.prototype.trimend","string.prototype.trimleft","string.prototype.trimright","string.prototype.trimstart","typed-array-buffer","typed-array-byte-length","typed-array-byte-offset","typed-array-length","typedarray","unbox-primitive","util.promisify","which-boxed-primitive","which-typed-array"],b=new Map(d.map(t=>[o.structUtils.makeIdent(null,t).identHash,o.structUtils.makeIdent("nolyfill",t)])),h={hooks:{reduceDependency:async t=>{let r=b.get(t.identHash);if(r){let e=o.structUtils.makeDescriptor(r,"latest"),s=o.structUtils.makeRange({protocol:"npm:",source:null,selector:o.structUtils.stringifyDescriptor(e),params:null});return o.structUtils.makeDescriptor(t,s)}return t}}},m=h;return f(u);})();
77
return plugin;
88
}
99
};

fe/.yarn/sdks/eslint/bin/eslint.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require eslint/bin/eslint.js
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

fe/.yarn/sdks/eslint/lib/api.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require eslint
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

fe/.yarn/sdks/eslint/lib/unsupported-api.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require eslint/use-at-your-own-risk
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

fe/.yarn/sdks/eslint/package.json

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

fe/.yarn/sdks/typescript/bin/tsc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/bin/tsc
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

fe/.yarn/sdks/typescript/bin/tsserver

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/bin/tsserver
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

fe/.yarn/sdks/typescript/lib/tsc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/lib/tsc.js
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
16+
if (existsSync(absPnpApiPath)) {
17+
if (!process.versions.pnp) {
18+
// Setup the environment to be able to require typescript/lib/tsserver.js
19+
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
23+
}
24+
}
25+
1226
const moduleWrapper = tsserver => {
1327
if (!process.versions.pnp) {
1428
return tsserver;
@@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
214228
return tsserver;
215229
};
216230

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-
}
231+
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
232+
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
233+
// Ref https://github.com/microsoft/TypeScript/pull/55326
234+
if (major > 5 || (major === 5 && minor >= 5)) {
235+
moduleWrapper(absRequire(`typescript`));
222236
}
223237

224238
// Defer to the real typescript/lib/tsserver.js your application uses

0 commit comments

Comments
 (0)