@graphcommerce/graphql-codegen-relay-optimizer-plugin 3.0.4 → 3.0.7

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 CHANGED
@@ -1,87 +1,84 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1426](https://github.com/graphcommerce-org/graphcommerce/pull/1426) [`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2) Thanks [@paales](https://github.com/paales)! - Upgrade packages
8
+
9
+ ## 3.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
14
+
15
+ ## 3.0.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
20
+
21
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
22
+
3
23
  ## 3.0.4
4
24
 
5
25
  ### Patch Changes
6
26
 
7
- - [#1285](https://github.com/ho-nl/m2-pwa/pull/1285)
8
- [`c85294ba6`](https://github.com/ho-nl/m2-pwa/commit/c85294ba6d742ce78c074559a1e95409b25a5017)
9
- Thanks [@paales](https://github.com/paales)! - upgraded dependencies
27
+ - [#1285](https://github.com/ho-nl/m2-pwa/pull/1285) [`c85294ba6`](https://github.com/ho-nl/m2-pwa/commit/c85294ba6d742ce78c074559a1e95409b25a5017) Thanks [@paales](https://github.com/paales)! - upgraded dependencies
10
28
 
11
29
  ## 3.0.3
12
30
 
13
31
  ### Patch Changes
14
32
 
15
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
16
- Thanks [@paales](https://github.com/paales)! - made packages public
33
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
17
34
 
18
35
  ## 3.0.2
19
36
 
20
37
  ### Patch Changes
21
38
 
22
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
23
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
24
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
25
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
26
- duplicate packages in the node_modules folders.
39
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
27
40
 
28
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
29
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
30
- Thanks [@paales](https://github.com/paales)! - Upgraded to
31
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
32
- implementing
33
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
34
- soon.
41
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
35
42
 
36
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
37
- frontend to be able to revalidate pages manually.
43
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
38
44
 
39
45
  ## 3.0.1
40
46
 
41
47
  ### Patch Changes
42
48
 
43
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
44
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
45
- so that the packages link to back to the website and repository
49
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
46
50
 
47
51
  ## 3.0.0
48
52
 
49
53
  ### Major Changes
50
54
 
51
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
52
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
53
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
55
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
54
56
 
55
- All notable changes to this project will be documented in this file. See
56
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
57
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
57
58
 
58
59
  ## [2.102.6](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.102.5...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.102.6) (2021-10-18)
59
60
 
60
61
  ### Bug Fixes
61
62
 
62
- - graphql-mesh missing inmemory lru
63
- ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
63
+ - graphql-mesh missing inmemory lru ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
64
64
 
65
65
  ## [2.102.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.102.0...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.102.1) (2021-09-28)
66
66
 
67
67
  ### Bug Fixes
68
68
 
69
- - do not build on install
70
- ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
69
+ - do not build on install ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
71
70
 
72
71
  # [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.101.3...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.102.0) (2021-09-28)
73
72
 
74
73
  ### Features
75
74
 
76
- - add postinstall commands to run properly on deploy
77
- ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
75
+ - add postinstall commands to run properly on deploy ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
78
76
 
79
77
  ## [2.101.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.101.2...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.101.3) (2021-09-27)
80
78
 
81
79
  ### Bug Fixes
82
80
 
83
- - build packages before releasing
84
- ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
81
+ - build packages before releasing ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
85
82
 
86
83
  ## [2.101.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.101.0...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.101.1) (2021-09-27)
87
84
 
@@ -91,35 +88,25 @@ All notable changes to this project will be documented in this file. See
91
88
 
92
89
  ### Bug Fixes
93
90
 
94
- - ignore md files from triggering version updates
95
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
96
- - make packages private so they dont get published accidently
97
- ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
91
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
92
+ - make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
98
93
 
99
94
  ### Features
100
95
 
101
- - created stacked-pages package
102
- ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
103
- - **next-config:** introduced package to streamline the setup of new examples
104
- ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
105
- - next.js 11
106
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
107
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
108
- [@reachdigital](https://github.com/reachdigital)
109
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
110
- - working on EmailForm
111
- ([f16141f](https://github.com/ho-nl/m2-pwa/commit/f16141f8cc0dfeaef8dee2a3e635bda898550a51))
96
+ - created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
97
+ - **next-config:** introduced package to streamline the setup of new examples ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
98
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
99
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
100
+ - working on EmailForm ([f16141f](https://github.com/ho-nl/m2-pwa/commit/f16141f8cc0dfeaef8dee2a3e635bda898550a51))
112
101
 
113
102
  ## 2.0.8 (2020-10-28)
114
103
 
115
104
  ### Features
116
105
 
117
- - added near-operation-file graphql codegen structure
118
- ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
106
+ - added near-operation-file graphql codegen structure ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
119
107
 
120
108
  ## [2.100.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.100.10...@graphcommerce/graphql-codegen-relay-optimizer-plugin@2.100.11) (2021-07-26)
121
109
 
122
110
  ### Bug Fixes
123
111
 
124
- - ignore md files from triggering version updates
125
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
112
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
@@ -33,7 +33,9 @@ function isFragment(documentFile) {
33
33
  });
34
34
  return name;
35
35
  }
36
- var plugin = function (schema, documents, _config) {
36
+ var plugin = function (schema, documents,
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
38
+ _config) {
37
39
  var isFrag = documents.every(function (d) { return isFragment(d); });
38
40
  if (isFrag)
39
41
  return { content: '' };
@@ -18,7 +18,9 @@ function isFragment(documentFile) {
18
18
  });
19
19
  return name;
20
20
  }
21
- export const plugin = (schema, documents, _config) => {
21
+ export const plugin = (schema, documents,
22
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
+ _config) => {
22
24
  const isFrag = documents.every((d) => isFragment(d));
23
25
  if (isFrag)
24
26
  return { content: '' };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/graphql-codegen-relay-optimizer-plugin",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.4",
5
+ "version": "3.0.7",
6
6
  "description": "GraphQL Code Generator plugin for optimizing your GraphQL queries relay style.",
7
7
  "license": "MIT",
8
8
  "main": "dist/main/index.js",
@@ -22,15 +22,15 @@
22
22
  "relay-compiler": "12.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@graphcommerce/eslint-config-pwa": "^4.0.4",
26
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
25
+ "@graphcommerce/eslint-config-pwa": "^4.1.6",
26
+ "@graphcommerce/prettier-config-pwa": "^4.0.6",
27
27
  "@graphql-codegen/testing": "1.17.7",
28
28
  "@types/jest": "27.4.1",
29
29
  "@types/relay-compiler": "8.0.2",
30
30
  "graphql": "^16.3.0",
31
- "jest": "27.5.1",
32
- "ts-jest": "27.1.3",
33
- "typescript": "^4.5.5"
31
+ "jest": "28.0.2",
32
+ "ts-jest": "27.1.4",
33
+ "typescript": "4.6.3"
34
34
  },
35
35
  "scripts": {
36
36
  "test": "jest",
@@ -1,6 +1,4 @@
1
- /* eslint-disable @typescript-eslint/ban-ts-ignore */
2
1
  import '@graphql-codegen/testing'
3
-
4
2
  import { Types } from '@graphql-codegen/plugin-helpers'
5
3
  import { buildSchema, parse, print, ASTNode } from 'graphql'
6
4
  import { plugin } from '..'
@@ -23,7 +21,6 @@ const testSchema = buildSchema(/* GraphQL */ `
23
21
  }
24
22
  `)
25
23
 
26
- // eslint-disable-next-line jest/expect-expect
27
24
  it('can be called', async () => {
28
25
  const testDocument = parse(/* GraphQL */ `
29
26
  query user {
@@ -35,7 +32,6 @@ it('can be called', async () => {
35
32
  await plugin(testSchema, [{ document: testDocument }], {})
36
33
  })
37
34
 
38
- // eslint-disable-next-line jest/expect-expect
39
35
  it('can be called with queries that include connection fragments', async () => {
40
36
  const testDocument = parse(/* GraphQL */ `
41
37
  query user {
package/src/index.ts CHANGED
@@ -30,6 +30,7 @@ function isFragment(documentFile: Types.DocumentFile) {
30
30
  export const plugin: PluginFunction<RelayOptimizerPluginConfig> = (
31
31
  schema: GraphQLSchema,
32
32
  documents: Types.DocumentFile[],
33
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
34
  _config: RelayOptimizerPluginConfig,
34
35
  ) => {
35
36
  const isFrag = documents.every((d) => isFragment(d))
package/src/tyes.d.ts CHANGED
@@ -3,7 +3,7 @@ declare module 'relay-compiler/lib/core/Schema' {
3
3
  }
4
4
 
5
5
  declare module 'relay-compiler/lib/core/IRPrinter' {
6
- export function print(schema: import('relay-compiler').Schema, document: any): string
6
+ export function print(schema: import('relay-compiler').Schema, document: unknown): string
7
7
  }
8
8
 
9
9
  declare module 'relay-compiler/lib/core/CompilerContext' {