graphql.macro
Advanced tools
Comparing version 1.1.0 to 1.2.0
## Change Log | ||
### v1.1.0 (2019/01/24 01:10 +00:00) | ||
* [c2537ca](https://github.com/evenchange4/graphql.macro/commit/c2537ca40d24825a566a082060e085cda4489f6a) 1.1.0 (@evenchange4) | ||
* [1bd78e5](https://github.com/evenchange4/graphql.macro/commit/1bd78e5008d65faf807a6463ee0a93085b501588) chore(travis): update release key (@evenchange4) | ||
* [#42](https://github.com/evenchange4/graphql.macro/pull/42) feat(Imports): Recursive imports processing (#42) (@msimulcik) | ||
* [#11](https://github.com/evenchange4/graphql.macro/pull/11) chore(deps): update babel monorepo packages to v7.0.0-beta.39 (#11) (@renovate[bot]) | ||
* [#12](https://github.com/evenchange4/graphql.macro/pull/12) chore(deps): update dependency eslint-plugin-prettier to v2.6.0 (#12) (@renovate[bot]) | ||
* [#10](https://github.com/evenchange4/graphql.macro/pull/10) chore(deps): update dependency lint-staged to v6.1.0 (#10) (@renovate[bot]) | ||
* [9319dce](https://github.com/evenchange4/graphql.macro/commit/9319dcebeef3f5d68fe5a2bcd71d1d581591c4c2) docs(CHANGELOG): release 1.0.2 (@evenchange4) | ||
### v1.0.2 (2018/01/25 15:49 +00:00) | ||
@@ -4,0 +14,0 @@ |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _babelPluginMacros = require("babel-plugin-macros"); | ||
@@ -25,2 +27,15 @@ | ||
// console.log(printAST(referencePath.parentPath)) | ||
const cwd = _fs.default.realpathSync(process.cwd()); | ||
const resolvePathFromCwd = relativePath => { | ||
const resolvedPath = _path.default.resolve(cwd, process.env.NODE_PATH || '.', relativePath); | ||
if (_fs.default.existsSync(resolvedPath)) { | ||
return resolvedPath; | ||
} // Note: Try to resolve from node_modules if the file does not exist. PR#39 | ||
return _path.default.resolve(cwd, 'node_modules', relativePath); | ||
}; | ||
function graphqlMacro({ | ||
@@ -53,4 +68,3 @@ references, | ||
}) => { | ||
const queryPath = _path.default.join(filename, '..', value); | ||
const queryPath = value.startsWith('./') ? _path.default.join(filename, '..', value) : resolvePathFromCwd(value); | ||
const expanded = (0, _expandImports.default)(queryPath); // Note: #import feature | ||
@@ -57,0 +71,0 @@ |
{ | ||
"name": "graphql.macro", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Compile GraphQL AST at build-time with babel-plugin-macros.", | ||
@@ -5,0 +5,0 @@ "author": "Michael Hsu <evenchange4@gmail.com>", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
17085
115
3