@magidoc/rollup-plugin-parse-gql-schema
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -25,3 +25,4 @@ import glob from 'fast-glob'; | ||
async function readGlobPaths(globPath) { | ||
return await glob(globPath, { dot: true }); | ||
// Backslashes in windows paths are not supported by fast-glob | ||
return await glob(globPath.replaceAll('\\', '/'), { dot: true }); | ||
} | ||
@@ -28,0 +29,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"type": "module", | ||
@@ -29,9 +29,9 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^18.6.1", | ||
"@types/prettier": "^2.6.3", | ||
"@types/node": "^18.6.4", | ||
"@types/prettier": "^2.7.0", | ||
"c8": "^7.12.0", | ||
"rollup": "^2.77.0", | ||
"rollup": "^2.77.2", | ||
"typescript": "^4.7.4", | ||
"vite": "^3.0.3", | ||
"vitest": "^0.19.1" | ||
"vite": "^3.0.4", | ||
"vitest": "^0.21.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "scripts": { |
@@ -55,3 +55,4 @@ import glob from 'fast-glob' | ||
async function readGlobPaths(globPath: string): Promise<string[]> { | ||
return await glob(globPath, { dot: true }) | ||
// Backslashes in windows paths are not supported by fast-glob | ||
return await glob(globPath.replaceAll('\\', '/'), { dot: true }) | ||
} |
@@ -15,2 +15,13 @@ import { buildClientSchema, IntrospectionQuery } from 'graphql' | ||
describe('when parsing a file with backslashes', () => { | ||
const file = relativeToAbsolute('./samples/single-file.graphqls').replaceAll( | ||
'/', | ||
'\\', | ||
) | ||
it('should create the introspection result properly', async () => { | ||
verifyEqualExpected(await run([file])) | ||
}) | ||
}) | ||
describe('when parsing glob files', () => { | ||
@@ -17,0 +28,0 @@ describe('with a single glob path', () => { |
Sorry, the diff of this file is not supported yet
36180
292