Skip to content

Commit ea5d0ee

Browse files
near-operation-file: upgrade packages (#1307)
* near-operation-file: upgrade packages * Revert snapshot update * Wire up missing field --------- Co-authored-by: Eddy Nguyen <[email protected]>
1 parent 94b88d3 commit ea5d0ee

6 files changed

Lines changed: 59 additions & 11 deletions

File tree

.changeset/green-wasps-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/near-operation-file-preset': major
3+
---
4+
5+
updated dependency @graphql-codegen/visitor-plugin-common to 6.2.1

packages/presets/near-operation-file/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
4141
},
4242
"dependencies": {
43-
"@graphql-codegen/add": "^3.2.1",
44-
"@graphql-codegen/plugin-helpers": "^3.0.0",
45-
"@graphql-codegen/visitor-plugin-common": "2.13.8",
43+
"@graphql-codegen/add": "^6.0.0",
44+
"@graphql-codegen/plugin-helpers": "^6.1.0",
45+
"@graphql-codegen/visitor-plugin-common": "^6.2.1",
4646
"@graphql-tools/utils": "^10.0.0",
4747
"parse-filepath": "^1.0.2",
4848
"tslib": "^2.8.1"

packages/presets/near-operation-file/src/fragment-resolver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export default function buildFragmentResolver<T>(
229229
identifiers,
230230
},
231231
emitLegacyCommonJSImports: presetOptions.config.emitLegacyCommonJSImports,
232+
importExtension: presetOptions.config.importExtension,
232233
typesImport,
233234
}),
234235
),

packages/presets/near-operation-file/src/resolve-document-imports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export function resolveDocumentImports<T>(
8888
const schemaTypesImportStatement = generateImportStatement({
8989
baseDir,
9090
emitLegacyCommonJSImports: presetOptions.config.emitLegacyCommonJSImports,
91+
importExtension: presetOptions.config.importExtension,
9192
importSource: resolveImportSource(schemaTypesSource),
9293
baseOutputDir,
9394
outputPath: generatedFilePath,

packages/presets/near-operation-file/tests/near-operation-file.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,23 +406,23 @@ describe('near-operation-file preset', () => {
406406
});
407407

408408
expect(result[0].content).toMatchInlineSnapshot(`
409-
"import * as Types from '../../../../../out1.ts/types';
409+
"import * as Types from '../../../../../out1.ts/types';
410410
411-
export type AQueryVariables = Types.Exact<{ [key: string]: never; }>;
411+
export type AQueryVariables = Types.Exact<{ [key: string]: never; }>;
412412
413413
414-
export type AQuery = { __typename?: 'Query', a?: string | null };
414+
export type AQuery = { __typename?: 'Query', a?: string | null };
415415
416-
export type BQueryVariables = Types.Exact<{ [key: string]: never; }>;
416+
export type BQueryVariables = Types.Exact<{ [key: string]: never; }>;
417417
418418
419-
export type BQuery = { __typename?: 'Query', a?: string | null };
419+
export type BQuery = { __typename?: 'Query', a?: string | null };
420420
421-
export type CQueryVariables = Types.Exact<{ [key: string]: never; }>;
421+
export type CQueryVariables = Types.Exact<{ [key: string]: never; }>;
422422
423423
424-
export type CQuery = { __typename?: 'Query', a?: string | null };
425-
"
424+
export type CQuery = { __typename?: 'Query', a?: string | null };
425+
"
426426
`);
427427
});
428428

yarn.lock

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,14 @@
13801380
"@graphql-codegen/plugin-helpers" "^3.1.1"
13811381
tslib "~2.4.0"
13821382

1383+
"@graphql-codegen/add@^6.0.0":
1384+
version "6.0.0"
1385+
resolved "https://registry.yarnpkg.com/@graphql-codegen/add/-/add-6.0.0.tgz#d195051d7c4bd6d3955a92361cc9eec7784bb541"
1386+
integrity sha512-biFdaURX0KTwEJPQ1wkT6BRgNasqgQ5KbCI1a3zwtLtO7XTo7/vKITPylmiU27K5DSOWYnY/1jfSqUAEBuhZrQ==
1387+
dependencies:
1388+
"@graphql-codegen/plugin-helpers" "^6.0.0"
1389+
tslib "~2.6.0"
1390+
13831391
"@graphql-codegen/[email protected]":
13841392
version "2.16.5"
13851393
resolved "https://registry.yarnpkg.com/@graphql-codegen/cli/-/cli-2.16.5.tgz#b3b5eeec357af01c1cb72f6a4ea96e52bd49e662"
@@ -1467,6 +1475,18 @@
14671475
lodash "~4.17.0"
14681476
tslib "~2.5.0"
14691477

1478+
"@graphql-codegen/plugin-helpers@^6.0.0", "@graphql-codegen/plugin-helpers@^6.1.0":
1479+
version "6.1.0"
1480+
resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-6.1.0.tgz#251d76dac2801a4baaef5613b9a22698c1218c47"
1481+
integrity sha512-JJypehWTcty9kxKiqH7TQOetkGdOYjY78RHlI+23qB59cV2wxjFFVf8l7kmuXS4cpGVUNfIjFhVr7A1W7JMtdA==
1482+
dependencies:
1483+
"@graphql-tools/utils" "^10.0.0"
1484+
change-case-all "1.0.15"
1485+
common-tags "1.8.2"
1486+
import-from "4.0.0"
1487+
lodash "~4.17.0"
1488+
tslib "~2.6.0"
1489+
14701490
"@graphql-codegen/schema-ast@^2.5.0", "@graphql-codegen/schema-ast@^2.6.1":
14711491
version "2.6.1"
14721492
resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-2.6.1.tgz#8ba1b38827c034b51ecd3ce88622c2ae6cd3fe1a"
@@ -1598,6 +1618,22 @@
15981618
parse-filepath "^1.0.2"
15991619
tslib "~2.6.0"
16001620

1621+
"@graphql-codegen/visitor-plugin-common@^6.2.1":
1622+
version "6.2.1"
1623+
resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-6.2.1.tgz#76b02057bdbde00eeb852d72bc814d941ba46550"
1624+
integrity sha512-5QT1hCV3286mrmoIC7vlFXsTlwELMexhuFIkjh+oVGGL1E8hxkIPAU0kfH/lsPbQHKi8zKmic2pl3tAdyYxNyg==
1625+
dependencies:
1626+
"@graphql-codegen/plugin-helpers" "^6.1.0"
1627+
"@graphql-tools/optimize" "^2.0.0"
1628+
"@graphql-tools/relay-operation-optimizer" "^7.0.0"
1629+
"@graphql-tools/utils" "^10.0.0"
1630+
auto-bind "~4.0.0"
1631+
change-case-all "1.0.15"
1632+
dependency-graph "^1.0.0"
1633+
graphql-tag "^2.11.0"
1634+
parse-filepath "^1.0.2"
1635+
tslib "~2.6.0"
1636+
16011637
"@graphql-tools/apollo-engine-loader@^7.3.6":
16021638
version "7.3.26"
16031639
resolved "https://registry.yarnpkg.com/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.3.26.tgz#91e54460d5579933e42a2010b8688c3459c245d8"
@@ -3919,6 +3955,11 @@ dependency-graph@^0.11.0:
39193955
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27"
39203956
integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==
39213957

3958+
dependency-graph@^1.0.0:
3959+
version "1.0.0"
3960+
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-1.0.0.tgz#bb5e85aec1310bc13b22dbd76e3196c4ee4c10d2"
3961+
integrity sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg==
3962+
39223963
detect-indent@^6.0.0:
39233964
version "6.1.0"
39243965
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6"

0 commit comments

Comments
 (0)