-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cm6-graphql): Fix query token used as field name (#2995)
* fix(cm6-graphql): Fix query token used as field name Use @extend instead of @Specialize Fixed tests * Create eighty-spiders-crash.md * build cm6-graphql * fix build * addressed pr feedback * yarn format
- Loading branch information
Showing
26 changed files
with
3,716 additions
and
1,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"cm6-graphql": patch | ||
"graphiql": patch | ||
--- | ||
|
||
fix(cm6-graphql): Fix query token used as field name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { graphqlLanguage } from '../dist/index.js'; | ||
import { fileTests } from '@lezer/generator/dist/test'; | ||
|
||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
|
||
// because of the babel transformations, __dirname is the package root (cm6-graphql) | ||
const caseDir = path.resolve(path.dirname(__dirname), '__tests__'); | ||
|
||
describe('codemirror 6 language', () => { | ||
for (const file of fs.readdirSync(caseDir)) { | ||
if (!/\.txt$/.test(file)) { | ||
continue; | ||
} | ||
|
||
const describeName = /^[^.]*/.exec(file)![0]; | ||
describe(`${describeName}`, () => { | ||
for (const { name, run } of fileTests( | ||
fs.readFileSync(path.join(caseDir, file), 'utf8'), | ||
file, | ||
)) { | ||
it(`${name}`, () => { | ||
try { | ||
run(graphqlLanguage.parser); | ||
} catch (err) { | ||
require('console').log(name, err); | ||
throw err; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.