Skip to content

Commit a3ea1dd

Browse files
authored
chore(build): upgrade TypeScript (#409)
1 parent 47be27c commit a3ea1dd

6 files changed

Lines changed: 43 additions & 11 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire} = require(`module`);
5+
const {resolve} = require(`path`);
6+
7+
const relPnpApiPath = "../../../../.pnp.cjs";
8+
9+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
11+
12+
if (existsSync(absPnpApiPath)) {
13+
if (!process.versions.pnp) {
14+
// Setup the environment to be able to require eslint/use-at-your-own-risk
15+
require(absPnpApiPath).setup();
16+
}
17+
}
18+
19+
// Defer to the real eslint/use-at-your-own-risk your application uses
20+
module.exports = absRequire(`eslint/use-at-your-own-risk`);

.yarn/sdks/eslint/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
22
"name": "eslint",
3-
"version": "8.40.0-sdk",
3+
"version": "8.56.0-sdk",
44
"main": "./lib/api.js",
5-
"type": "commonjs"
5+
"type": "commonjs",
6+
"bin": {
7+
"eslint": "./bin/eslint.js"
8+
},
9+
"exports": {
10+
"./package.json": "./package.json",
11+
".": "./lib/api.js",
12+
"./use-at-your-own-risk": "./lib/unsupported-api.js"
13+
}
614
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {
14-
// Setup the environment to be able to require typescript/lib/typescript.js
14+
// Setup the environment to be able to require typescript
1515
require(absPnpApiPath).setup();
1616
}
1717
}
1818

19-
// Defer to the real typescript/lib/typescript.js your application uses
20-
module.exports = absRequire(`typescript/lib/typescript.js`);
19+
// Defer to the real typescript your application uses
20+
module.exports = absRequire(`typescript`);

.yarn/sdks/typescript/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "typescript",
3-
"version": "5.0.4-sdk",
3+
"version": "5.3.3-sdk",
44
"main": "./lib/typescript.js",
5-
"type": "commonjs"
5+
"type": "commonjs",
6+
"bin": {
7+
"tsc": "./bin/tsc",
8+
"tsserver": "./bin/tsserver"
9+
}
610
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"supports-color": "^9.0.0",
4848
"tar": "^6.0.1",
4949
"ts-node": "^10.0.0",
50-
"typescript": "^5.0.4",
50+
"typescript": "^5.3.3",
5151
"undici": "^6.6.1",
5252
"v8-compile-cache": "^2.3.0",
5353
"which": "^4.0.0"

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ __metadata:
22272227
supports-color: "npm:^9.0.0"
22282228
tar: "npm:^6.0.1"
22292229
ts-node: "npm:^10.0.0"
2230-
typescript: "npm:^5.0.4"
2230+
typescript: "npm:^5.3.3"
22312231
undici: "npm:^6.6.1"
22322232
v8-compile-cache: "npm:^2.3.0"
22332233
which: "npm:^4.0.0"
@@ -5959,7 +5959,7 @@ __metadata:
59595959
languageName: node
59605960
linkType: hard
59615961

5962-
"typescript@npm:^5.0.4":
5962+
"typescript@npm:^5.3.3":
59635963
version: 5.3.3
59645964
resolution: "typescript@npm:5.3.3"
59655965
bin:
@@ -5969,7 +5969,7 @@ __metadata:
59695969
languageName: node
59705970
linkType: hard
59715971

5972-
"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin<compat/typescript>":
5972+
"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>":
59735973
version: 5.3.3
59745974
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
59755975
bin:

0 commit comments

Comments
 (0)