Skip to content

Commit

Permalink
chore(deps): lock file maintenance (#6846)
Browse files Browse the repository at this point in the history
* chore(deps): lock file maintenance

* Fix

* Fix prettier

* chore(dependencies): updated changesets for modified dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 16, 2025
1 parent dca1e49 commit 72dc6a5
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 305 deletions.
5 changes: 5 additions & 0 deletions .changeset/@graphql-tools_load-files-6846-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-tools/load-files": patch
---
dependencies updates:
- Updated dependency [`unixify@^1.0.0` ↗︎](https://www.npmjs.com/package/unixify/v/1.0.0) (from `1.0.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/twelve-points-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/graphql-file-loader': patch
---

Fix on Windows and new version of `fast-glob`
2 changes: 1 addition & 1 deletion packages/load-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"globby": "11.1.0",
"tslib": "^2.4.0",
"unixify": "1.0.0"
"unixify": "^1.0.0"
},
"publishConfig": {
"directory": "dist",
Expand Down
13 changes: 12 additions & 1 deletion packages/loaders/graphql-file/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ const { readFile, access } = fsPromises;

const FILE_EXTENSIONS = ['.gql', '.gqls', '.graphql', '.graphqls'];

function unixifyWithDriverLetter(path: string): string {
if (path.match(/^[A-Z]:\\/)) {
const driveLetter = path[0].toLowerCase();
return `${driveLetter}:${unixify(path)}`;
}
return unixify(path);
}

/**
* Additional options for loading from a GraphQL file
*/
Expand Down Expand Up @@ -95,7 +103,10 @@ export class GraphQLFileLoader implements Loader<GraphQLFileLoaderOptions> {

private _buildGlobs(glob: string, options: GraphQLFileLoaderOptions) {
const ignores = asArray(options.ignore || []);
const globs = [unixify(glob), ...ignores.map(v => buildIgnoreGlob(unixify(v)))];
const globs = [
unixifyWithDriverLetter(glob),
...ignores.map(v => buildIgnoreGlob(unixifyWithDriverLetter(v))),
];
return globs;
}

Expand Down
Loading

0 comments on commit 72dc6a5

Please # to comment.