Skip to content

Commit

Permalink
Merge pull request #1003 from Quramy/ts5
Browse files Browse the repository at this point in the history
chore: Upgrade typescript
  • Loading branch information
Quramy committed Mar 30, 2023
2 parents d495285 + c318251 commit cefdce6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"ts-jest": "29.0.5",
"ts-loader": "9.4.2",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "5.0.2",
"typescript-eslint-language-service": "5.0.3",
"vscode-languageserver-types": "3.17.3",
"webpack": "5.77.0",
Expand All @@ -83,6 +83,6 @@
},
"peerDependencies": {
"graphql": "^15.0.0 || ^16.0.0",
"typescript": "^4.8.0"
"typescript": "^4.8.0 || ^5.0.0"
}
}
3 changes: 2 additions & 1 deletion src/graphql-language-service-adapter/simple-position.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { LineAndCharacter } from 'typescript';
import { IPosition } from 'graphql-language-service-types';

export class SimplePosition implements IPosition {
Expand All @@ -12,7 +13,7 @@ export class SimplePosition implements IPosition {
this.character = v;
}

constructor(lc: ts.LineAndCharacter) {
constructor(lc: LineAndCharacter) {
this.line = lc.line;
this.character = lc.character;
}
Expand Down
3 changes: 2 additions & 1 deletion src/register-hooks/register-typescript.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { CompilerOptions } from 'typescript';
import fs from 'fs';

export function registerTypeScript() {
let defaultCompileOptions: ts.CompilerOptions;
let defaultCompileOptions: CompilerOptions;
require.extensions['.ts'] = (module, fileName) => {
const ts = require('typescript') as typeof import('typescript');
if (!defaultCompileOptions) {
Expand Down
1 change: 1 addition & 0 deletions src/transformer/transformer-host.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ts from 'typescript';
import { DocumentNode } from 'graphql';
import { Analyzer, AnalyzerFactory, ExtractResult } from '../analyzer';
import { getTransformer, DocumentTransformer } from './transformer';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5701,10 +5701,10 @@ typescript-eslint-language-service@5.0.3:
resolved "https://registry.yarnpkg.com/typescript-eslint-language-service/-/typescript-eslint-language-service-5.0.3.tgz#607509b5b747bad11aba56f923490b615006214c"
integrity sha512-LWLURRRQF2L/N4LSIT2yI59x3UNttPdWOLtwe6JlklX1U1kp4WGk2OL1jViYYJmhruNFd7/Tp4QYeAC1eEhtsw==

typescript@4.9.5:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5"
integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==

unbox-primitive@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit cefdce6

Please sign in to comment.