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