graphql-import
Advanced tools
Comparing version 0.4.5 to 0.5.0
@@ -23,3 +23,3 @@ "use strict"; | ||
// Apply regex to import line | ||
var matches = importLine.match(/^import (\*|(.*)) from ('|")(.*)('|")$/); | ||
var matches = importLine.match(/^import (\*|(.*)) from ('|")(.*)('|");?$/); | ||
if (!matches || matches.length !== 6 || !matches[4]) { | ||
@@ -26,0 +26,0 @@ throw new Error("Too few regex matches: " + matches); |
@@ -11,2 +11,8 @@ "use strict"; | ||
}); | ||
ava_1.default('parseImportLine: optional semicolon', function (t) { | ||
t.deepEqual(_1.parseImportLine("import A from \"schema.graphql\";"), { | ||
imports: ['A'], | ||
from: 'schema.graphql', | ||
}); | ||
}); | ||
ava_1.default('parseImportLine: invalid', function (t) { | ||
@@ -13,0 +19,0 @@ t.throws(function () { return _1.parseImportLine("import from \"schema.graphql\""); }, Error); |
{ | ||
"name": "graphql-import", | ||
"version": "0.4.5", | ||
"version": "0.5.0", | ||
"engines": { | ||
@@ -48,14 +48,14 @@ "node": ">=4.0.0" | ||
"devDependencies": { | ||
"@types/graphql": "0.12.4", | ||
"@types/lodash": "4.14.104", | ||
"@types/node": "9.4.6", | ||
"@types/graphql": "0.12.6", | ||
"@types/lodash": "4.14.106", | ||
"@types/node": "9.6.0", | ||
"ava": "0.25.0", | ||
"ava-ts": "0.24.2", | ||
"graphql": "0.13.1", | ||
"nyc": "11.4.1", | ||
"tap-xunit": "2.2.0", | ||
"graphql": "0.13.2", | ||
"nyc": "11.6.0", | ||
"tap-xunit": "2.3.0", | ||
"ts-node": "4.1.0", | ||
"tslint": "5.9.1", | ||
"tslint-config-standard": "7.0.0", | ||
"typedoc": "0.10.0", | ||
"typedoc": "0.11.1", | ||
"typescript": "2.7.2" | ||
@@ -62,0 +62,0 @@ }, |
@@ -5,5 +5,6 @@ # graphql-import | ||
Import & export definitions in GraphQL SDL (also refered to as GraphQL modules) | ||
> There is also a [`graphql-import-loader`](https://github.com/graphcool/graphql-import-loader) for Webpack available. | ||
## Install | ||
@@ -10,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50748
576
101