@graphql-codegen/cli 5.0.1-rc-20231011204000-7eac82c07 → 5.0.1-rc-20231012192742-72511c277

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.
@@ -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}...`);
@@ -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-rc-20231011204000-7eac82c07",
3
+ "version": "5.0.1-rc-20231012192742-72511c277",
4
4
  "peerDependenciesMeta": {
5
5
  "@parcel/watcher": {
6
6
  "optional": true
@@ -14,8 +14,8 @@
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-rc-20231011204000-7eac82c07",
18
- "@graphql-codegen/plugin-helpers": "5.0.2-rc-20231011204000-7eac82c07",
17
+ "@graphql-codegen/core": "4.0.1-rc-20231012192742-72511c277",
18
+ "@graphql-codegen/plugin-helpers": "5.0.2-rc-20231012192742-72511c277",
19
19
  "@graphql-tools/apollo-engine-loader": "^8.0.0",
20
20
  "@graphql-tools/code-file-loader": "^8.0.0",
21
21
  "@graphql-tools/git-loader": "^8.0.0",