babel-plugin-inline-import-graphql-ast
Advanced tools
Comparing version 2.3.7 to 2.3.8
@@ -6,8 +6,2 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "requireGql", { | ||
enumerable: true, | ||
get: function get() { | ||
return _requireGql.requireGql; | ||
} | ||
}); | ||
exports.default = void 0; | ||
@@ -19,4 +13,2 @@ | ||
var _core = require("@babel/core"); | ||
var _requireGql = require("./requireGql"); | ||
@@ -27,3 +19,4 @@ | ||
var _default = function _default(_ref) { | ||
var t = _ref.types; | ||
var t = _ref.types, | ||
template = _ref.template; | ||
return { | ||
@@ -41,5 +34,4 @@ manipulateOptions(_ref2) { | ||
exit(curPath, _ref3) { | ||
var babelPath = _ref3.file.opts.filename, | ||
nodePath = _ref3.opts.nodePath; | ||
var importNames = curPath.node.specifiers; | ||
var opts = _ref3.opts, | ||
file = _ref3.file; | ||
var importPath = curPath.node.source.value; | ||
@@ -49,4 +41,4 @@ | ||
// Find the file, using node resolution/NODE_PATH if necessary. | ||
var fallbackPaths = nodePath ? nodePath.split(_path.delimiter) : process.env.NODE_PATH; | ||
var absPath = resolve(importPath, babelPath); | ||
var fallbackPaths = opts.nodePath ? opts.nodePath.split(_path.delimiter) : process.env.NODE_PATH; | ||
var absPath = resolve(importPath, file.opts.filename); | ||
if (!(0, _fs.existsSync)(absPath)) absPath = require.resolve(importPath, { | ||
@@ -60,2 +52,3 @@ paths: fallbackPaths | ||
}); | ||
var importNames = curPath.node.specifiers; | ||
@@ -93,8 +86,7 @@ if (typeof result === 'string') { | ||
function buildVariableAST(graphqlAST, importName) { | ||
var _transformSync = (0, _core.transformSync)(`var ${importName} = ${JSON.stringify(graphqlAST)}`, { | ||
ast: true | ||
}), | ||
ast = _transformSync.ast; | ||
return ast.program.body[0]; | ||
var buildAst = template(`var IMPORT_NAME = AST;`); | ||
return buildAst({ | ||
IMPORT_NAME: t.identifier(importName), | ||
AST: t.valueToNode(JSON.parse(JSON.stringify(graphqlAST))) | ||
}); | ||
} | ||
@@ -101,0 +93,0 @@ } |
# ChangeLog | ||
## v2.3.8 (May 15, 2018) | ||
### Fixes | ||
* Refactor plugin to not have direct dependency on @babel/core (hopefully fixing #30) | ||
* Update package-lock.json that was not updated for version 2.3.7 | ||
### Maintenance | ||
* Automate updating of package-lock.json and yarn.lock | ||
* Remove undocumented `requireGql` export | ||
* Update all dependencies | ||
## v2.3.7 (April 26, 2018) | ||
@@ -4,0 +17,0 @@ |
{ | ||
"name": "babel-plugin-inline-import-graphql-ast", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"description": "Babel plugin to make .gql/.graphql files importable", | ||
@@ -14,3 +14,3 @@ "author": "Alexander Roberts <detrohutt@gmail.com>", | ||
"test": "jest", | ||
"prepublish": "babel plugin --out-dir build" | ||
"prepare": "babel plugin --out-dir build" | ||
}, | ||
@@ -23,4 +23,3 @@ "husky": { | ||
"dependencies": { | ||
"@babel/core": "7.0.0-beta.46", | ||
"graphql-tag": "^2.9.1" | ||
"graphql-tag": "^2.9.2" | ||
}, | ||
@@ -31,4 +30,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.46", | ||
"@babel/preset-env": "^7.0.0-beta.46", | ||
"@babel/cli": "^7.0.0-beta.47", | ||
"@babel/core": "7.0.0-beta.47", | ||
"@babel/preset-env": "^7.0.0-beta.47", | ||
"babel-core": "7.0.0-bridge.0", | ||
@@ -48,3 +48,3 @@ "babel-eslint": "^8.2.3", | ||
"jest": "^22.4.3", | ||
"lint-staged": "^7.0.5", | ||
"lint-staged": "^7.1.0", | ||
"prettier": "^1.12.1" | ||
@@ -51,0 +51,0 @@ }, |
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
24628
2
19
278
- Removed@babel/core@7.0.0-beta.46
- Removed@babel/code-frame@7.0.0-beta.46(transitive)
- Removed@babel/core@7.0.0-beta.46(transitive)
- Removed@babel/generator@7.0.0-beta.46(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.46(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.46(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.46(transitive)
- Removed@babel/helpers@7.0.0-beta.46(transitive)
- Removed@babel/highlight@7.0.0-beta.46(transitive)
- Removed@babel/template@7.0.0-beta.46(transitive)
- Removed@babel/traverse@7.0.0-beta.46(transitive)
- Removed@babel/types@7.0.0-beta.46(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedarr-diff@2.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarray-unique@0.2.1(transitive)
- Removedbabylon@7.0.0-beta.46(transitive)
- Removedbraces@1.8.5(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removeddebug@3.2.7(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesutils@2.0.3(transitive)
- Removedexpand-brackets@0.1.5(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedextglob@0.3.2(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.4(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedglob-parent@2.0.0(transitive)
- Removedglobals@11.12.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-extendable@0.1.1(transitive)
- Removedis-extglob@1.0.0(transitive)
- Removedis-glob@2.0.1(transitive)
- Removedis-number@2.1.04.0.0(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.0(transitive)
- Removedjs-tokens@3.0.2(transitive)
- Removedjsesc@2.5.2(transitive)
- Removedjson5@0.5.1(transitive)
- Removedkind-of@3.2.26.0.3(transitive)
- Removedlodash@4.17.21(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmicromatch@2.3.11(transitive)
- Removedms@2.1.3(transitive)
- Removednormalize-path@2.1.1(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedto-fast-properties@2.0.0(transitive)
- Removedtrim-right@1.0.1(transitive)
Updatedgraphql-tag@^2.9.2