@graphcommerce/graphql-codegen-near-operation-file 9.0.4-canary.9 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -11
- package/dist/fragment-resolver.js +1 -4
- package/dist/index.js +1 -1
- package/dist/resolve-document-imports.js +1 -2
- package/dist/utils.js +1 -2
- package/package.json +5 -5
- package/src/fragment-resolver.ts +1 -4
- package/src/index.ts +1 -1
- package/src/resolve-document-imports.ts +1 -1
- package/src/utils.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## 9.0.4
|
3
|
+
## 9.0.4
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
## 9.0.4-canary.7
|
5
|
+
### Patch Changes
|
8
6
|
|
9
|
-
|
7
|
+
- [#2503](https://github.com/graphcommerce-org/graphcommerce/pull/2503) [`6c92d1b`](https://github.com/graphcommerce-org/graphcommerce/commit/6c92d1bf83c6fe691dac5d606407d28ca9099af5) - Solve issue: TypeError: InMemoryLRUCache is not a constructor ([@paales](https://github.com/paales))
|
10
8
|
|
11
|
-
## 9.0.
|
9
|
+
## 9.0.3
|
12
10
|
|
13
|
-
## 9.0.
|
11
|
+
## 9.0.3-canary.0
|
14
12
|
|
15
|
-
## 9.0.
|
13
|
+
## 9.0.2
|
16
14
|
|
17
|
-
## 9.0.
|
15
|
+
## 9.0.2-canary.0
|
18
16
|
|
19
|
-
## 9.0.
|
17
|
+
## 9.0.1
|
20
18
|
|
21
|
-
## 9.0.
|
19
|
+
## 9.0.1-canary.1
|
22
20
|
|
23
21
|
## 9.0.0
|
24
22
|
|
@@ -78,10 +78,7 @@ ${duplicateFragmentNames.join('\n')}\n\n`);
|
|
78
78
|
}
|
79
79
|
return registry;
|
80
80
|
}
|
81
|
-
/**
|
82
|
-
* Builds a fragment "resolver" that collects `externalFragments` definitions and
|
83
|
-
* `fragmentImportStatements`
|
84
|
-
*/
|
81
|
+
/** Builds a fragment "resolver" that collects `externalFragments` definitions and `fragmentImportStatements` */
|
85
82
|
function buildFragmentResolver(collectorOptions, presetOptions, schemaObject) {
|
86
83
|
const fragmentRegistry = buildFragmentRegistry(collectorOptions, presetOptions, schemaObject);
|
87
84
|
const { baseOutputDir } = presetOptions;
|
package/dist/index.js
CHANGED
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.preset = exports.resolveDocumentImports = void 0;
|
7
|
-
const path_1 = require("path");
|
8
7
|
const add_1 = __importDefault(require("@graphql-codegen/add"));
|
9
8
|
const graphql_1 = require("graphql");
|
9
|
+
const path_1 = require("path");
|
10
10
|
const env_1 = require("./directive/env");
|
11
11
|
const injectable_1 = require("./directive/injectable");
|
12
12
|
const resolve_document_imports_1 = require("./resolve-document-imports");
|
@@ -35,11 +35,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
35
35
|
})();
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
37
37
|
exports.resolveDocumentImports = resolveDocumentImports;
|
38
|
-
/* eslint-disable import/no-cycle */
|
39
|
-
const path_1 = require("path");
|
40
38
|
const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
|
41
39
|
const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
|
42
40
|
const graphql_1 = require("graphql");
|
41
|
+
const path_1 = require("path");
|
43
42
|
const fragment_resolver_1 = __importStar(require("./fragment-resolver"));
|
44
43
|
const utils_1 = require("./utils");
|
45
44
|
function getFragmentName(documentFile) {
|
package/dist/utils.js
CHANGED
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.defineFilepathSubfolder = defineFilepathSubfolder;
|
7
7
|
exports.appendExtensionToFilePath = appendExtensionToFilePath;
|
8
8
|
exports.extractExternalFragmentsInUse = extractExternalFragmentsInUse;
|
9
|
-
/* eslint-disable import/no-cycle */
|
10
|
-
const path_1 = require("path");
|
11
9
|
const graphql_1 = require("graphql");
|
12
10
|
const parse_filepath_1 = __importDefault(require("parse-filepath"));
|
11
|
+
const path_1 = require("path");
|
13
12
|
function defineFilepathSubfolder(baseFilePath, folder) {
|
14
13
|
const parsedPath = (0, parse_filepath_1.default)(baseFilePath);
|
15
14
|
return (0, path_1.join)(parsedPath.dir, folder, parsedPath.base).replace(/\\/g, '/');
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/graphql-codegen-near-operation-file",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "9.0.4
|
5
|
+
"version": "9.0.4",
|
6
6
|
"sideEffects": false,
|
7
7
|
"type": "commonjs",
|
8
8
|
"main": "dist/index.js",
|
@@ -23,14 +23,14 @@
|
|
23
23
|
"@graphql-codegen/add": "5.0.3",
|
24
24
|
"@graphql-codegen/plugin-helpers": "5.1.0",
|
25
25
|
"@graphql-codegen/visitor-plugin-common": "5.6.0",
|
26
|
-
"@graphql-tools/utils": "^10.
|
26
|
+
"@graphql-tools/utils": "^10.8.3",
|
27
27
|
"@types/parse-filepath": "^1.0.2",
|
28
28
|
"graphql": "^16.10.0",
|
29
29
|
"parse-filepath": "^1.0.2"
|
30
30
|
},
|
31
31
|
"peerDependencies": {
|
32
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4
|
33
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4
|
34
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4
|
32
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4",
|
33
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4",
|
34
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4"
|
35
35
|
}
|
36
36
|
}
|
package/src/fragment-resolver.ts
CHANGED
@@ -138,10 +138,7 @@ ${duplicateFragmentNames.join('\n')}\n\n`,
|
|
138
138
|
return registry
|
139
139
|
}
|
140
140
|
|
141
|
-
/**
|
142
|
-
* Builds a fragment "resolver" that collects `externalFragments` definitions and
|
143
|
-
* `fragmentImportStatements`
|
144
|
-
*/
|
141
|
+
/** Builds a fragment "resolver" that collects `externalFragments` definitions and `fragmentImportStatements` */
|
145
142
|
export default function buildFragmentResolver<T>(
|
146
143
|
collectorOptions: DocumentImportResolverOptions,
|
147
144
|
presetOptions: Types.PresetFnArgs<T>,
|
package/src/index.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { join } from 'path'
|
2
1
|
import addPlugin from '@graphql-codegen/add'
|
3
2
|
import type { CodegenPlugin, Types } from '@graphql-codegen/plugin-helpers'
|
4
3
|
import type {
|
@@ -8,6 +7,7 @@ import type {
|
|
8
7
|
} from '@graphql-codegen/visitor-plugin-common'
|
9
8
|
import type { FragmentDefinitionNode } from 'graphql'
|
10
9
|
import { buildASTSchema, visit } from 'graphql'
|
10
|
+
import { join } from 'path'
|
11
11
|
import { envDirective } from './directive/env'
|
12
12
|
import { injectableDirective } from './directive/injectable'
|
13
13
|
import type { DocumentImportResolverOptions } from './resolve-document-imports'
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
2
2
|
|
3
3
|
/* eslint-disable import/no-cycle */
|
4
|
-
import { resolve } from 'path'
|
5
4
|
import type { Types } from '@graphql-codegen/plugin-helpers'
|
6
5
|
import { isUsingTypes } from '@graphql-codegen/plugin-helpers'
|
7
6
|
import type {
|
@@ -17,6 +16,7 @@ import {
|
|
17
16
|
import type { Source } from '@graphql-tools/utils'
|
18
17
|
import type { DocumentNode, FragmentDefinitionNode, GraphQLSchema } from 'graphql'
|
19
18
|
import { visit } from 'graphql'
|
19
|
+
import { resolve } from 'path'
|
20
20
|
import buildFragmentResolver, { buildFragmentRegistry } from './fragment-resolver'
|
21
21
|
import { extractExternalFragmentsInUse } from './utils'
|
22
22
|
|
package/src/utils.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/* eslint-disable import/no-cycle */
|
2
|
-
import { join } from 'path'
|
3
2
|
import type { DocumentNode, FragmentDefinitionNode, FragmentSpreadNode } from 'graphql'
|
4
3
|
import { visit } from 'graphql'
|
5
4
|
import parsePath from 'parse-filepath'
|
5
|
+
import { join } from 'path'
|
6
6
|
import type { FragmentRegistry } from './fragment-resolver'
|
7
7
|
|
8
8
|
export function defineFilepathSubfolder(baseFilePath: string, folder: string) {
|