@graphcommerce/graphql-codegen-near-operation-file 9.1.0-canary.55 → 10.0.0-canary.58

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,5 +1,89 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.58
4
+
5
+ ## 10.0.0-canary.57
6
+
7
+ ## 10.0.0-canary.56
8
+
9
+ ### Major Changes
10
+
11
+ - [#2546](https://github.com/graphcommerce-org/graphcommerce/pull/2546) [`ed9332a`](https://github.com/graphcommerce-org/graphcommerce/commit/ed9332a7f78966d932041d9a7725641edc92b28d) - ## GraphCommerce 10 - Turbopack Support
12
+
13
+ This major release brings full Turbopack compatibility, dramatically improving development speed.
14
+
15
+ ### 🚀 Turbopack-Compatible Interceptor System
16
+
17
+ The entire plugin/interceptor system has been rewritten to work with Turbopack:
18
+
19
+ - **No more Webpack plugins** - Removed `InterceptorPlugin` webpack plugin entirely
20
+ - **File-based interception** - Original files are moved to `.original.tsx` and replaced with interceptor content
21
+ - **Direct imports** - Interceptors import from `.original` files instead of embedding source
22
+ - **New CLI commands**:
23
+ - `graphcommerce codegen-interceptors` - Generate interceptor files
24
+ - `graphcommerce cleanup-interceptors` - Reset interceptor system, restore original files
25
+ - **Stable file hashing** - Deterministic interceptor generation for better caching
26
+
27
+ ### ⚙️ Treeshakable Configuration System
28
+
29
+ Replaced Webpack `DefinePlugin`-based `import.meta.graphCommerce` with a new generated configuration system:
30
+
31
+ - **New `codegen-config-values` command** - Generates TypeScript files with precise typing
32
+ - **Schema-driven** - Dynamically introspects Zod schemas to determine all available properties
33
+ - **Fully treeshakable** - Unused config values are eliminated from the bundle
34
+ - **Type-safe** - Uses `Get<GraphCommerceConfig, 'path'>` for nested property access
35
+ - **Separate files for nested objects** - Optimal treeshaking for complex configurations
36
+
37
+ ### 🔧 withGraphCommerce Changes
38
+
39
+ - **Removed** `InterceptorPlugin` - No longer needed with file-based interception
40
+ - **Removed** `DefinePlugin` for `import.meta.graphCommerce` - Replaced with generated config
41
+ - **Removed** `@mui/*` alias rewrites - No longer required
42
+ - **Added** Turbopack loader rules for `.yaml`, `.yml`, and `.po` files
43
+ - **Added** `serverExternalPackages` for all `@whatwg-node/*` packages
44
+ - **Added** `optimizePackageImports` for better bundle optimization
45
+ - **Added** `images.qualities: [52, 75]` for Next.js image optimization
46
+
47
+ ### 📦 Lingui Configuration
48
+
49
+ - **Renamed** `lingui.config.js` → `lingui.config.ts` with TypeScript support
50
+ - **Updated** `@graphcommerce/lingui-next/config` to TypeScript with proper exports
51
+ - **Simplified** formatter options
52
+
53
+ ### ⚛️ React 19 & Next.js 16 Compatibility
54
+
55
+ - Updated `RefObject<T>` types for React 19 (now includes `null` by default)
56
+ - Replaced deprecated `React.VFC` with `React.FC`
57
+ - Fixed `useRef` calls to require explicit initial values
58
+ - Updated `MutableRefObject` usage in `framer-scroller`
59
+
60
+ ### 📋 ESLint 9 Flat Config
61
+
62
+ - Migrated from legacy `.eslintrc` to new flat config format (`eslint.config.mjs`)
63
+ - Updated `@typescript-eslint/*` packages to v8
64
+ - Fixed AST selector for `SxProps` rule (`typeParameters` → `typeArguments`)
65
+
66
+ ### 🔄 Apollo Client
67
+
68
+ - Fixed deprecated `name` option → `clientAwareness: { name: 'ssr' }`
69
+ - Updated error handling types to accept `ApolloError | null | undefined`
70
+
71
+ ### ⚠️ Breaking Changes
72
+
73
+ - **Node.js 24.x not supported** - Restricted to `>=20 <24.0.0` due to [nodejs/undici#4290](https://github.com/nodejs/undici/issues/4290)
74
+ - **Interceptor files changed** - Original components now at `.original.tsx`
75
+ - **Config access changed** - Use generated config values instead of `import.meta.graphCommerce`
76
+ - **ESLint config format** - Must use flat config (`eslint.config.mjs`)
77
+ - **Lingui config** - Rename `lingui.config.js` to `lingui.config.ts`
78
+
79
+ ### 🗑️ Removed
80
+
81
+ - `InterceptorPlugin` webpack plugin
82
+ - `configToImportMeta` utility
83
+ - Webpack `DefinePlugin` usage for config
84
+ - `@mui/*` modern alias rewrites
85
+ - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
86
+
3
87
  ## 9.1.0-canary.55
4
88
 
5
89
  ## 9.1.0-canary.54
@@ -126,6 +126,7 @@ function buildFragmentResolver(collectorOptions, presetOptions, schemaObject) {
126
126
  },
127
127
  emitLegacyCommonJSImports: presetOptions.config.emitLegacyCommonJSImports,
128
128
  typesImport,
129
+ importExtension: '',
129
130
  })),
130
131
  };
131
132
  }
@@ -85,6 +85,7 @@ function resolveDocumentImports(presetOptions, schemaObject, importResolverOptio
85
85
  baseOutputDir,
86
86
  outputPath: generatedFilePath,
87
87
  typesImport,
88
+ importExtension: '',
88
89
  });
89
90
  importStatements.unshift(schemaTypesImportStatement);
90
91
  }
@@ -109,6 +110,7 @@ function resolveDocumentImports(presetOptions, schemaObject, importResolverOptio
109
110
  baseOutputDir,
110
111
  outputPath: generatedFilePath,
111
112
  typesImport,
113
+ importExtension: '',
112
114
  });
113
115
  importStatements.unshift(schemaTypesImportStatement);
114
116
  }
package/package.json CHANGED
@@ -2,11 +2,9 @@
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.1.0-canary.55",
5
+ "version": "10.0.0-canary.58",
6
6
  "sideEffects": false,
7
7
  "type": "commonjs",
8
- "main": "dist/index.js",
9
- "types": "src/index.ts",
10
8
  "scripts": {
11
9
  "dev": "tsc -W --preserveWatchOutput",
12
10
  "build": "tsc",
@@ -20,17 +18,23 @@
20
18
  }
21
19
  },
22
20
  "dependencies": {
23
- "@graphql-codegen/add": "5.0.3",
24
- "@graphql-codegen/plugin-helpers": "5.1.0",
25
- "@graphql-codegen/visitor-plugin-common": "5.7.1",
26
- "@graphql-tools/utils": "^10.8.3",
21
+ "@graphql-codegen/add": "6.0.0",
22
+ "@graphql-codegen/plugin-helpers": "6.1.0",
23
+ "@graphql-codegen/visitor-plugin-common": "6.2.1",
24
+ "@graphql-tools/utils": "^10.11.0",
27
25
  "@types/parse-filepath": "^1.0.2",
28
- "graphql": "^16.10.0",
26
+ "graphql": "^16.12.0",
29
27
  "parse-filepath": "^1.0.2"
30
28
  },
31
29
  "peerDependencies": {
32
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
33
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
34
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55"
30
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.58",
31
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.58",
32
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.58"
33
+ },
34
+ "exports": {
35
+ ".": {
36
+ "default": "./dist/index.js",
37
+ "types": "./src/index.ts"
38
+ }
35
39
  }
36
40
  }
@@ -194,6 +194,7 @@ export default function buildFragmentResolver<T>(
194
194
  },
195
195
  emitLegacyCommonJSImports: presetOptions.config.emitLegacyCommonJSImports,
196
196
  typesImport,
197
+ importExtension: '',
197
198
  }),
198
199
  ),
199
200
  }
@@ -115,6 +115,7 @@ export function resolveDocumentImports<T>(
115
115
  baseOutputDir,
116
116
  outputPath: generatedFilePath,
117
117
  typesImport,
118
+ importExtension: '',
118
119
  })
119
120
  importStatements.unshift(schemaTypesImportStatement)
120
121
  }
@@ -152,6 +153,7 @@ export function resolveDocumentImports<T>(
152
153
  baseOutputDir,
153
154
  outputPath: generatedFilePath,
154
155
  typesImport,
156
+ importExtension: '',
155
157
  })
156
158
  importStatements.unshift(schemaTypesImportStatement)
157
159
  }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryWitInjectableDocument = void 0;
4
- exports.QueryWitInjectableDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "QueryWitInjectable" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "storeConfig" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "store_code" } }, { "kind": "Field", "name": { "kind": "Name", "value": "base_url" } }] } }] } }] };