diff --git a/node/utils.js b/node/utils.js index 3cdbb2ba..da9d2b25 100644 --- a/node/utils.js +++ b/node/utils.js @@ -11,6 +11,8 @@ const FastObject = require("../lib/fast-object.js"); const PkgInfo = require("./pkg-info.js"); const SemVer = require("semver"); +const REIFY_PACKAGE_NAME = '@meteorjs/reify'; + const DEFAULT_PKG_CONFIG = { "cache-directory": ".reify-cache", parser: void 0, @@ -23,8 +25,8 @@ const reifySemVer = require("./version.js"); function getReifyRange(json, name) { const entry = json[name]; - return utils.isObject(entry) && hasOwn.call(entry, "@meteorjs/reify") - ? SemVer.validRange(entry.reify) + return utils.isObject(entry) && hasOwn.call(entry, REIFY_PACKAGE_NAME) + ? SemVer.validRange(entry[REIFY_PACKAGE_NAME]) : null; } @@ -118,7 +120,7 @@ function readPkgInfo(dirPath) { return null; } - const reify = pkgJSON.reify; + const reify = pkgJSON[REIFY_PACKAGE_NAME]; if (reify === false) { // An explicit "reify": false property in package.json disables diff --git a/test/package.json b/test/package.json index 04565dd6..d33fdafe 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "reify-test-package", "private": true, - "reify": { + "@meteorjs/reify": { "cache-directory": ".cache/path/for/tests" }, "dependencies": {