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

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,72 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
9
+ * [#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
10
+
3
11
  ## 3.0.4
4
12
 
5
13
  ### Patch Changes
6
14
 
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
15
+ - [#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
16
 
11
17
  ## 3.0.3
12
18
 
13
19
  ### Patch Changes
14
20
 
15
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
16
- Thanks [@paales](https://github.com/paales)! - made packages public
21
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
17
22
 
18
23
  ## 3.0.2
19
24
 
20
25
  ### Patch Changes
21
26
 
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.
27
+ - [#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
28
 
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.
29
+ * [#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
30
 
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.
31
+ 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
32
 
39
33
  ## 3.0.1
40
34
 
41
35
  ### Patch Changes
42
36
 
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
37
+ - [`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
38
 
47
39
  ## 3.0.0
48
40
 
49
41
  ### Major Changes
50
42
 
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
43
+ - [#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
44
 
55
- All notable changes to this project will be documented in this file. See
56
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
45
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
57
46
 
58
47
  ## [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
48
 
60
49
  ### Bug Fixes
61
50
 
62
- - graphql-mesh missing inmemory lru
63
- ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
51
+ - graphql-mesh missing inmemory lru ([6c71c25](https://github.com/ho-nl/m2-pwa/commit/6c71c256911072ace19037616e0ce2ab478bf070))
64
52
 
65
53
  ## [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
54
 
67
55
  ### Bug Fixes
68
56
 
69
- - do not build on install
70
- ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
57
+ - do not build on install ([254e2a6](https://github.com/ho-nl/m2-pwa/commit/254e2a6f4b2a7e81f46466a0abe06ae2f3a79575))
71
58
 
72
59
  # [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
60
 
74
61
  ### Features
75
62
 
76
- - add postinstall commands to run properly on deploy
77
- ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
63
+ - add postinstall commands to run properly on deploy ([d512ee3](https://github.com/ho-nl/m2-pwa/commit/d512ee3ba5c3a9573651ec5333595fe2f1aa141c))
78
64
 
79
65
  ## [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
66
 
81
67
  ### Bug Fixes
82
68
 
83
- - build packages before releasing
84
- ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
69
+ - build packages before releasing ([c4761cf](https://github.com/ho-nl/m2-pwa/commit/c4761cf6d1810c140fd56f6eac8fca922f8c0edc))
85
70
 
86
71
  ## [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
72
 
@@ -91,35 +76,25 @@ All notable changes to this project will be documented in this file. See
91
76
 
92
77
  ### Bug Fixes
93
78
 
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))
79
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
80
+ - make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
98
81
 
99
82
  ### Features
100
83
 
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))
84
+ - created stacked-pages package ([d86008e](https://github.com/ho-nl/m2-pwa/commit/d86008ee659ccb25b194a41d624b394a1ddbd088))
85
+ - **next-config:** introduced package to streamline the setup of new examples ([b8a3958](https://github.com/ho-nl/m2-pwa/commit/b8a39584e5b529fcaa22db67d3f986b91ae683ad))
86
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
87
+ - 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))
88
+ - working on EmailForm ([f16141f](https://github.com/ho-nl/m2-pwa/commit/f16141f8cc0dfeaef8dee2a3e635bda898550a51))
112
89
 
113
90
  ## 2.0.8 (2020-10-28)
114
91
 
115
92
  ### Features
116
93
 
117
- - added near-operation-file graphql codegen structure
118
- ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
94
+ - added near-operation-file graphql codegen structure ([e25bdd1](https://github.com/ho-nl/m2-pwa/commit/e25bdd130ac41325619a7d0648e3cb68f2380d32))
119
95
 
120
96
  ## [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
97
 
122
98
  ### Bug Fixes
123
99
 
124
- - ignore md files from triggering version updates
125
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
100
+ - 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.5",
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.0.5",
26
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
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
31
  "jest": "27.5.1",
32
32
  "ts-jest": "27.1.3",
33
- "typescript": "^4.5.5"
33
+ "typescript": "^4.6.2"
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' {