Skip to content

Commit c087d46

Browse files
committed
upgrade ts; replace ttypescript with ts-patch
1 parent 30b47fe commit c087d46

File tree

4 files changed

+171
-131
lines changed

4 files changed

+171
-131
lines changed

gw2-ui/api_typecheck.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import * as fs from 'node:fs';
22
import * as path from 'node:path';
33
import * as process from 'node:process';
4+
import * as module from 'node:module';
45
import { writeSource } from '../node_api_helpers.mjs';
56

7+
const require = module.createRequire(import.meta.url);
8+
69
// rollup and plugins
710
import { rollup } from 'rollup';
811
import resolve from '@rollup/plugin-node-resolve';
912
import commonjs from '@rollup/plugin-commonjs';
10-
import ttypescript from 'ttypescript';
13+
const tsPatchCompiler = require('ts-patch/compiler');
1114
import typescript from '@rollup/plugin-typescript';
1215

1316
const MAX_FAILURES = 20;
@@ -27,7 +30,7 @@ async function run() {
2730
resolve(),
2831
commonjs(),
2932
typescript({
30-
typescript: ttypescript,
33+
typescript: tsPatchCompiler,
3134
tsconfig: './src/gw2api/typeguards/tsconfig.json',
3235
}),
3336
],

gw2-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"clsx": "^2.1.1",
4848
"react": "^18.3.1",
4949
"react-dom": "^18.3.1",
50-
"ttypescript": "^1.5.15",
50+
"ts-patch": "^3.2.1",
5151
"typia": "^6.11.3"
5252
},
5353
"peerDependencies": {

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@
4949
"rollup-plugin-postcss": "^4.0.2",
5050
"storybook": "^8.3.6",
5151
"storybook-css-modules-preset": "^1.1.1",
52-
"typescript": "~4.7.4",
52+
"typescript": "^5.6.3",
5353
"typescript-plugin-css-modules": "^5.1.0"
5454
},
55-
"resolutions": {
56-
"typescript": "~4.7.4"
57-
},
5855
"engines": {
5956
"npm": "please-use-pnpm",
6057
"yarn": "please-use-pnpm"

0 commit comments

Comments
 (0)