@graphql-codegen/cli 5.0.1-alpha-20231026110906-739a9e416 → 5.0.1-alpha-20231026192534-8b4c5345f

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.
@@ -40,7 +40,7 @@ const createWatcher = (initialContext, onNext) => {
40
40
  parcelWatcher = await Promise.resolve().then(() => tslib_1.__importStar(require('@parcel/watcher')));
41
41
  }
42
42
  catch (err) {
43
- log(`Parcel watcher not found. To use this feature, please make sure to provide @parcel/watcher as a peer dependency.`);
43
+ log(`Failed to import @parcel/watcher due to the following error (to use watch mode, install https://www.npmjs.com/package/@parcel/watcher):\n${err}`);
44
44
  return;
45
45
  }
46
46
  (0, debugging_js_1.debugLog)(`[Watcher] Parcel watcher loaded...`);
@@ -176,7 +176,11 @@ const findHighestCommonDirectory = async (files) => {
176
176
  // e.g. mm.scan("/**/foo/bar").base -> "/" ; mm.scan("/foo/bar/**/fizz/*.graphql") -> /foo/bar
177
177
  const dirPaths = files
178
178
  .map(filePath => ((0, path_1.isAbsolute)(filePath) ? filePath : (0, path_1.resolve)(filePath)))
179
- .map(patterned => micromatch_1.default.scan(patterned).base);
179
+ // mm.scan doesn't know how to handle Windows \ path separator
180
+ .map(patterned => patterned.replace(/\\/g, '/'))
181
+ .map(patterned => micromatch_1.default.scan(patterned).base)
182
+ // revert the separators to the platform-supported ones
183
+ .map(base => base.replace(/\//g, path_1.sep));
180
184
  // Return longest common prefix if it's accessible, otherwise process.cwd()
181
185
  return (async (maybeValidPath) => {
182
186
  (0, debugging_js_1.debugLog)(`[Watcher] Longest common prefix of all files: ${maybeValidPath}...`);
@@ -36,7 +36,7 @@ export const createWatcher = (initialContext, onNext) => {
36
36
  parcelWatcher = await import('@parcel/watcher');
37
37
  }
38
38
  catch (err) {
39
- log(`Parcel watcher not found. To use this feature, please make sure to provide @parcel/watcher as a peer dependency.`);
39
+ log(`Failed to import @parcel/watcher due to the following error (to use watch mode, install https://www.npmjs.com/package/@parcel/watcher):\n${err}`);
40
40
  return;
41
41
  }
42
42
  debugLog(`[Watcher] Parcel watcher loaded...`);
@@ -171,7 +171,11 @@ const findHighestCommonDirectory = async (files) => {
171
171
  // e.g. mm.scan("/**/foo/bar").base -> "/" ; mm.scan("/foo/bar/**/fizz/*.graphql") -> /foo/bar
172
172
  const dirPaths = files
173
173
  .map(filePath => (isAbsolute(filePath) ? filePath : resolve(filePath)))
174
- .map(patterned => mm.scan(patterned).base);
174
+ // mm.scan doesn't know how to handle Windows \ path separator
175
+ .map(patterned => patterned.replace(/\\/g, '/'))
176
+ .map(patterned => mm.scan(patterned).base)
177
+ // revert the separators to the platform-supported ones
178
+ .map(base => base.replace(/\//g, sep));
175
179
  // Return longest common prefix if it's accessible, otherwise process.cwd()
176
180
  return (async (maybeValidPath) => {
177
181
  debugLog(`[Watcher] Longest common prefix of all files: ${maybeValidPath}...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "5.0.1-alpha-20231026110906-739a9e416",
3
+ "version": "5.0.1-alpha-20231026192534-8b4c5345f",
4
4
  "peerDependenciesMeta": {
5
5
  "@parcel/watcher": {
6
6
  "optional": true
@@ -14,8 +14,9 @@
14
14
  "@babel/generator": "^7.18.13",
15
15
  "@babel/template": "^7.18.10",
16
16
  "@babel/types": "^7.18.13",
17
- "@graphql-codegen/core": "4.0.1-alpha-20231026110906-739a9e416",
18
- "@graphql-codegen/plugin-helpers": "5.0.2-alpha-20231026110906-739a9e416",
17
+ "@graphql-codegen/client-preset": "4.2.0-alpha-20231026192534-8b4c5345f",
18
+ "@graphql-codegen/core": "4.0.1-alpha-20231026192534-8b4c5345f",
19
+ "@graphql-codegen/plugin-helpers": "5.0.2-alpha-20231026192534-8b4c5345f",
19
20
  "@graphql-tools/apollo-engine-loader": "^8.0.0",
20
21
  "@graphql-tools/code-file-loader": "^8.0.0",
21
22
  "@graphql-tools/git-loader": "^8.0.0",