Skip to content

Commit 3efc9ba

Browse files
committed
Migrate jitit to v2
1 parent 9ee5c23 commit 3efc9ba

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/graphql-codegen-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"graphql-config": "^5.1.1",
6464
"inquirer": "^8.0.0",
6565
"is-glob": "^4.0.1",
66-
"jiti": "^1.17.1",
66+
"jiti": "^2.0.0",
6767
"json-to-pretty-yaml": "^1.2.2",
6868
"listr2": "^4.0.5",
6969
"log-symbols": "^4.0.0",

packages/graphql-codegen-cli/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Types,
1212
} from '@graphql-codegen/plugin-helpers';
1313
import { cosmiconfig, defaultLoaders } from 'cosmiconfig';
14-
import jiti from 'jiti';
14+
import { createJiti } from 'jiti';
1515
import { GraphQLSchema, GraphQLSchemaExtensions, print } from 'graphql';
1616
import { GraphQLConfig } from 'graphql-config';
1717
import { env } from 'string-env-interpolation';
@@ -75,8 +75,8 @@ function customLoader(ext: 'json' | 'yaml' | 'js' | 'ts' | 'mts' | 'cts'): Codeg
7575
}
7676

7777
if (ext === 'ts') {
78-
const jitiLoader = jiti('', { interopDefault: true });
79-
return jitiLoader(filepath);
78+
const jiti = createJiti('', { interopDefault: true });
79+
return jiti.import(filepath);
8080
}
8181
};
8282
}

yarn.lock

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10596,11 +10596,16 @@ [email protected]:
1059610596
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.17.1.tgz#264daa43ee89a03e8be28c3d712ccc4eb9f1e8ed"
1059710597
integrity sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw==
1059810598

10599-
jiti@^1.17.1, jiti@^1.18.2, jiti@^1.21.6:
10599+
jiti@^1.18.2, jiti@^1.21.6:
1060010600
version "1.21.7"
1060110601
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.7.tgz#9dd81043424a3d28458b193d965f0d18a2300ba9"
1060210602
integrity sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==
1060310603

10604+
jiti@^2.0.0:
10605+
version "2.5.1"
10606+
resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.5.1.tgz#bd099c1c2be1c59bbea4e5adcd127363446759d0"
10607+
integrity sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==
10608+
1060410609
joi@^17.11.0:
1060510610
version "17.11.0"
1060610611
resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a"

0 commit comments

Comments
 (0)