babel-plugin-modular-graphql
Advanced tools
Comparing version 0.1.3 to 1.0.0
@@ -5,3 +5,7 @@ { | ||
"from": "graphql" | ||
}, | ||
"executeSync": { | ||
"local": "executeSync", | ||
"from": "graphql" | ||
} | ||
} |
@@ -102,2 +102,6 @@ { | ||
}, | ||
"GraphQLSpecifiedByDirective": { | ||
"local": "GraphQLSpecifiedByDirective", | ||
"from": "graphql/type/directives" | ||
}, | ||
"GraphQLString": { | ||
@@ -135,2 +139,6 @@ "local": "GraphQLString", | ||
}, | ||
"Location": { | ||
"local": "Location", | ||
"from": "graphql/language/ast" | ||
}, | ||
"LoneAnonymousOperationRule": { | ||
@@ -144,2 +152,6 @@ "local": "LoneAnonymousOperationRule", | ||
}, | ||
"NoDeprecatedCustomRule": { | ||
"local": "NoDeprecatedCustomRule", | ||
"from": "graphql/validation/rules/custom/NoDeprecatedCustomRule" | ||
}, | ||
"NoFragmentCyclesRule": { | ||
@@ -149,2 +161,6 @@ "local": "NoFragmentCyclesRule", | ||
}, | ||
"NoSchemaIntrospectionCustomRule": { | ||
"local": "NoSchemaIntrospectionCustomRule", | ||
"from": "graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule" | ||
}, | ||
"NoUndefinedVariablesRule": { | ||
@@ -194,2 +210,6 @@ "local": "NoUndefinedVariablesRule", | ||
}, | ||
"Token": { | ||
"local": "Token", | ||
"from": "graphql/language/ast" | ||
}, | ||
"TokenKind": { | ||
@@ -435,2 +455,6 @@ "local": "TokenKind", | ||
}, | ||
"executeSync": { | ||
"local": "executeSync", | ||
"from": "graphql/execution/execute" | ||
}, | ||
"extendSchema": { | ||
@@ -437,0 +461,0 @@ "local": "extendSchema", |
@@ -1,2 +0,7 @@ | ||
module.exports = function babelPluginModularGraphql({ types: t }) { | ||
module.exports = function babelPluginModularGraphql({ types: t }, options = {}) { | ||
let extension = (options.extension || '').trim(); | ||
if (extension && extension[0] !== '.') { | ||
extension = '.' + extension; | ||
} | ||
const importMap = require('./import-map.json'); | ||
@@ -24,3 +29,3 @@ const importMapOverrides = require('./import-map-overrides.json'); | ||
if (!acc[from]) { | ||
acc[from] = t.importDeclaration([], t.stringLiteral(from)); | ||
acc[from] = t.importDeclaration([], t.stringLiteral(from + extension)); | ||
} | ||
@@ -27,0 +32,0 @@ |
{ | ||
"name": "babel-plugin-modular-graphql", | ||
"description": "Modular GraphQL.js import paths without the hassle", | ||
"version": "0.1.3", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
@@ -28,9 +28,8 @@ "author": "Phil Pluckthun <phil@kitten.sh>", | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"acorn-walk": "^7.1.1", | ||
"graphql": "^15.0.0", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.1.3", | ||
"prettier": "^2.0.4", | ||
"rollup": "^2.6.1" | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"graphql": "^15.4.0", | ||
"husky": "^4.3.0", | ||
"lint-staged": "^10.5.0", | ||
"prettier": "^2.1.2", | ||
"rollup": "^2.32.1" | ||
}, | ||
@@ -37,0 +36,0 @@ "lint-staged": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
26119
6
841
1