@graphcommerce/graphql-mesh 9.1.0-canary.45 → 9.1.0-canary.46

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.46
4
+
3
5
  ## 9.1.0-canary.45
4
6
 
5
7
  ## 9.1.0-canary.44
@@ -109,7 +111,9 @@
109
111
  ### Patch Changes
110
112
 
111
113
  - [#2380](https://github.com/graphcommerce-org/graphcommerce/pull/2380) [`3710d8b`](https://github.com/graphcommerce-org/graphcommerce/commit/3710d8bf1cceb5a991e5cfdfc15d42e462704c6d) - Solves the issue `TypeError: url?.startsWith is not a function`. The generated `.mesh/index.ts` would be generated as a requirejs module while next.js expects an esm module. In the end we properly generated the mesh correctly and now there is an `import.meta.url` instead of using `require('node:url')`. To solve this we needed to solve a chain of issues:
114
+
112
115
  1. The generation of the mesh is based on the version of the mesh that is imported (esm or commonjs). See [source](https://github.com/ardatan/graphql-mesh/blob/bf588d372c0078378aaa24beea2da794af7949e6/scripts/replace-import-meta-url-in-cjs.ts#L9-L10) for the lines that need to be different. This meant that we needed to change the @graphcommerce/cli package to be of type:module instead of a commonjs module.
116
+
113
117
  2) To properly convert the module to an esm module we've migrated the build of the cli package to use 'pkgroll' instead of tsc, because tsc is limited in what it outputs and can't really convert classic imports to esm.
114
118
  3) To load possible mesh plugins we require additional .ts files to be loaded with [tsx](https://tsx.is/). To get the tsx loader to work properly in combination with esm modules, we need at least [node 18.19.0](https://nodejs.org/en/blog/release/v18.19.0#new-nodemodule-api-register-for-module-customization-hooks-new-initialize-hook). Minimal Node version upped to 18.19.0 and add support for node 22. ([@paales](https://github.com/paales))
115
119
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/graphql-mesh",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.45",
5
+ "version": "9.1.0-canary.46",
6
6
  "main": "index.ts",
7
7
  "dependencies": {
8
8
  "@whatwg-node/fetch": "^0.10.1",
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@apollo/client": "*",
17
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.45",
18
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.45",
19
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.45",
17
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.46",
18
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.46",
19
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.46",
20
20
  "@graphql-mesh/runtime": "*",
21
21
  "@graphql-mesh/types": "*"
22
22
  },