Skip to content

Commit 5d00c94

Browse files
fix(deps): update dependency minimatch to v10 (#1481)
* fix(deps): update dependency minimatch to v10 * Fix code * Go * Go * Prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Arda TANRIKULU <[email protected]>
1 parent 2476498 commit 5d00c94

File tree

7 files changed

+24
-18
lines changed

7 files changed

+24
-18
lines changed

.changeset/hip-badgers-thank.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'graphql-config': patch
3+
---
4+
5+
Update minimatch

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@graphql-tools/utils": "^10.0.0",
6666
"cosmiconfig": "^9.0.0",
6767
"jiti": "^1.18.2",
68-
"minimatch": "^4.2.3",
68+
"minimatch": "^10.0.0",
6969
"string-env-interpolation": "^1.0.1",
7070
"tslib": "^2.4.0"
7171
},

pnpm-lock.yaml

+4-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/project-config.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { dirname, isAbsolute, relative, normalize } from 'path';
22
import type { GraphQLSchema, DocumentNode } from 'graphql';
33
import type { Source } from '@graphql-tools/utils';
4-
import minimatch from 'minimatch';
4+
import { minimatch } from 'minimatch';
55
import {
66
LoadSchemaOptions as ToolsLoadSchemaOptions,
77
LoadTypedefsOptions as ToolsLoadTypedefsOptions,
@@ -210,8 +210,10 @@ function match(filepath: string, dirpath: string, pointer?: Pointer): boolean {
210210
return false;
211211
}
212212

213-
const normalizedFilepath = normalize(isAbsolute(filepath) ? relative(dirpath, filepath) : filepath);
214-
return minimatch(normalizedFilepath, normalize(pointer), { dot: true });
213+
const normalizedFilepath = normalize(isAbsolute(filepath) ? relative(dirpath, filepath) : filepath)
214+
.split('\\')
215+
.join('/');
216+
return minimatch(normalizedFilepath, normalize(pointer).split('\\').join('/'), { dot: true });
215217
}
216218

217219
if (typeof pointer === 'object') {

test/loaders.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ vi.mock('@graphql-tools/load', async () => {
1818
}
1919
`);
2020

21+
// @ts-expect-error - we're adding a property here
2122
schema.isTheOne = true;
2223

2324
const { OPERATION_KINDS } = await vi.importActual('@graphql-tools/load');
@@ -66,7 +67,9 @@ describe('middlewares', () => {
6667
const received = registry.loadSchemaSync('anything');
6768
const receivedAsync = await registry.loadSchema('anything');
6869

70+
// @ts-expect-error - we're adding a property here
6971
expect(received.isTheOne).toEqual(true);
72+
// @ts-expect-error - we're adding a property here
7073
expect(receivedAsync.isTheOne).toEqual(true);
7174
});
7275
});

tsconfig.build.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src"],
4+
"exclude": ["test"]
5+
}

tsconfig.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,5 @@
1717
"paths": {
1818
"graphql-config": ["./src/index.ts"]
1919
}
20-
},
21-
"exclude": [],
22-
"include": ["src"]
20+
}
2321
}

0 commit comments

Comments
 (0)