From 245b8a6e3c80510987e5dca99c854fc6bf4efb76 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Wed, 10 Nov 2021 14:31:00 +0530 Subject: [PATCH] fix: compiling issues for codemirror-lang-graphql --- packages/codemirror-lang-graphql/.gitignore | 1 - packages/codemirror-lang-graphql/rollup.config.js | 2 +- .../codemirror-lang-graphql/src/{index.ts => index.js} | 0 packages/codemirror-lang-graphql/src/syntax.grammar | 2 +- packages/codemirror-lang-graphql/tsconfig.json | 7 ++++--- 5 files changed, 6 insertions(+), 6 deletions(-) rename packages/codemirror-lang-graphql/src/{index.ts => index.js} (100%) diff --git a/packages/codemirror-lang-graphql/.gitignore b/packages/codemirror-lang-graphql/.gitignore index a97c46617..0ef473202 100644 --- a/packages/codemirror-lang-graphql/.gitignore +++ b/packages/codemirror-lang-graphql/.gitignore @@ -1,5 +1,4 @@ /node_modules package-lock.json /dist -/src/*.js /src/*.d.ts diff --git a/packages/codemirror-lang-graphql/rollup.config.js b/packages/codemirror-lang-graphql/rollup.config.js index d8d87c181..f4367e403 100644 --- a/packages/codemirror-lang-graphql/rollup.config.js +++ b/packages/codemirror-lang-graphql/rollup.config.js @@ -2,7 +2,7 @@ import typescript from "rollup-plugin-ts" import {lezer} from "@lezer/generator/rollup" export default { - input: "src/index.ts", + input: "src/index.js", external: id => id != "tslib" && !/^(\.?\/|\w:)/.test(id), output: [ {file: "dist/index.cjs", format: "cjs"}, diff --git a/packages/codemirror-lang-graphql/src/index.ts b/packages/codemirror-lang-graphql/src/index.js similarity index 100% rename from packages/codemirror-lang-graphql/src/index.ts rename to packages/codemirror-lang-graphql/src/index.js diff --git a/packages/codemirror-lang-graphql/src/syntax.grammar b/packages/codemirror-lang-graphql/src/syntax.grammar index 42f25a51a..6417271f0 100644 --- a/packages/codemirror-lang-graphql/src/syntax.grammar +++ b/packages/codemirror-lang-graphql/src/syntax.grammar @@ -338,7 +338,7 @@ TypeSystemDirectiveLocation { @tokens { Whitespace { - std.whitespace + std.whitespace+ } StringValue { "\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\"" diff --git a/packages/codemirror-lang-graphql/tsconfig.json b/packages/codemirror-lang-graphql/tsconfig.json index d87615219..d91b09866 100644 --- a/packages/codemirror-lang-graphql/tsconfig.json +++ b/packages/codemirror-lang-graphql/tsconfig.json @@ -5,7 +5,8 @@ "module": "es2020", "newLine": "lf", "declaration": true, - "moduleResolution": "node" + "moduleResolution": "node", + "allowJs": true, }, - "include": ["src/*.ts"] -} + "include": ["src/*"] +} \ No newline at end of file