@graphcommerce/graphql-codegen-relay-optimizer-plugin 3.0.3 → 3.0.6

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,79 +1,78 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
9
+ ## 3.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#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.
14
+
15
+ * [#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
16
+
17
+ ## 3.0.4
18
+
19
+ ### Patch Changes
20
+
21
+ - [#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
22
+
3
23
  ## 3.0.3
4
24
 
5
25
  ### Patch Changes
6
26
 
7
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
8
- Thanks [@paales](https://github.com/paales)! - made packages public
27
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
9
28
 
10
29
  ## 3.0.2
11
30
 
12
31
  ### Patch Changes
13
32
 
14
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
15
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
16
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
17
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
18
- duplicate packages in the node_modules folders.
33
+ - [#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.
19
34
 
20
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
21
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
22
- Thanks [@paales](https://github.com/paales)! - Upgraded to
23
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
24
- implementing
25
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
26
- soon.
35
+ * [#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.
27
36
 
28
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
29
- frontend to be able to revalidate pages manually.
37
+ 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.
30
38
 
31
39
  ## 3.0.1
32
40
 
33
41
  ### Patch Changes
34
42
 
35
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
36
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
37
- so that the packages link to back to the website and repository
43
+ - [`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
38
44
 
39
45
  ## 3.0.0
40
46
 
41
47
  ### Major Changes
42
48
 
43
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
44
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
45
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
49
+ - [#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
46
50
 
47
- All notable changes to this project will be documented in this file. See
48
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
51
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
49
52
 
50
53
  ## [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)
51
54
 
52
55
  ### Bug Fixes
53
56
 
54
- - graphql-mesh missing inmemory lru
55
- ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
57
+ - graphql-mesh missing inmemory lru ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
56
58
 
57
59
  ## [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)
58
60
 
59
61
  ### Bug Fixes
60
62
 
61
- - do not build on install
62
- ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
63
+ - do not build on install ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
63
64
 
64
65
  # [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)
65
66
 
66
67
  ### Features
67
68
 
68
- - add postinstall commands to run properly on deploy
69
- ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
69
+ - add postinstall commands to run properly on deploy ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
70
70
 
71
71
  ## [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)
72
72
 
73
73
  ### Bug Fixes
74
74
 
75
- - build packages before releasing
76
- ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
75
+ - build packages before releasing ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
77
76
 
78
77
  ## [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)
79
78
 
@@ -83,35 +82,25 @@ All notable changes to this project will be documented in this file. See
83
82
 
84
83
  ### Bug Fixes
85
84
 
86
- - ignore md files from triggering version updates
87
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
88
- - make packages private so they dont get published accidently
89
- ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
85
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
86
+ - make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
90
87
 
91
88
  ### Features
92
89
 
93
- - created stacked-pages package
94
- ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
95
- - **next-config:** introduced package to streamline the setup of new examples
96
- ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
97
- - next.js 11
98
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
99
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
100
- [@reachdigital](https://github.com/reachdigital)
101
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
102
- - working on EmailForm
103
- ([f16141f](https://github.com/ho-nl/m2-pwa/commit/f16141f8cc0dfeaef8dee2a3e635bda898550a51))
90
+ - created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
91
+ - **next-config:** introduced package to streamline the setup of new examples ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
92
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
93
+ - 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))
94
+ - working on EmailForm ([f16141f](https://github.com/ho-nl/m2-pwa/commit/f16141f8cc0dfeaef8dee2a3e635bda898550a51))
104
95
 
105
96
  ## 2.0.8 (2020-10-28)
106
97
 
107
98
  ### Features
108
99
 
109
- - added near-operation-file graphql codegen structure
110
- ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
100
+ - added near-operation-file graphql codegen structure ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
111
101
 
112
102
  ## [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)
113
103
 
114
104
  ### Bug Fixes
115
105
 
116
- - ignore md files from triggering version updates
117
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
106
+ - 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.3",
5
+ "version": "3.0.6",
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",
@@ -18,19 +18,19 @@
18
18
  "graphql": "14.x.x || 15.x.x || 16.x.x"
19
19
  },
20
20
  "dependencies": {
21
- "@graphql-codegen/plugin-helpers": "2.4.1",
21
+ "@graphql-codegen/plugin-helpers": "2.4.2",
22
22
  "relay-compiler": "12.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@graphcommerce/eslint-config-pwa": "^4.0.3",
26
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
25
+ "@graphcommerce/eslint-config-pwa": "^4.1.3",
26
+ "@graphcommerce/prettier-config-pwa": "^4.0.5",
27
27
  "@graphql-codegen/testing": "1.17.7",
28
- "@types/jest": "27.4.0",
28
+ "@types/jest": "27.4.1",
29
29
  "@types/relay-compiler": "8.0.2",
30
30
  "graphql": "^16.3.0",
31
31
  "jest": "27.5.1",
32
- "ts-jest": "27.1.3",
33
- "typescript": "^4.5.5"
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' {