From bd8a260942c56201bfba58fe37f91045b845d984 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Fri, 13 Dec 2019 18:04:27 -0600 Subject: [PATCH] chore(project): set yarn version to 1.21.1 (#4866) --- .../{yarn-1.19.1.js => yarn-1.21.1.js} | 309 ++++++++++++------ .yarnrc | 4 +- 2 files changed, 206 insertions(+), 107 deletions(-) rename .yarn/releases/{yarn-1.19.1.js => yarn-1.21.1.js} (99%) diff --git a/.yarn/releases/yarn-1.19.1.js b/.yarn/releases/yarn-1.21.1.js similarity index 99% rename from .yarn/releases/yarn-1.19.1.js rename to .yarn/releases/yarn-1.21.1.js index 3907b87325d0..1d8084f50860 100755 --- a/.yarn/releases/yarn-1.19.1.js +++ b/.yarn/releases/yarn-1.21.1.js @@ -1405,7 +1405,7 @@ function _load_glob() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(49)); + return _os = _interopRequireDefault(__webpack_require__(46)); } var _path; @@ -1832,7 +1832,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; -const os = __webpack_require__(49); +const os = __webpack_require__(46); const path = __webpack_require__(0); const userHome = __webpack_require__(67).default; @@ -4388,7 +4388,7 @@ module.exports = require("url"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); /** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ @@ -25141,6 +25141,12 @@ SafeBuffer.allocUnsafeSlow = function (size) { /***/ }), /* 46 */ +/***/ (function(module, exports) { + +module.exports = require("os"); + +/***/ }), +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25196,7 +25202,7 @@ var MapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25207,7 +25213,7 @@ var errorObject = { e: {} }; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25219,12 +25225,6 @@ function isScheduler(value) { //# sourceMappingURL=isScheduler.js.map -/***/ }), -/* 49 */ -/***/ (function(module, exports) { - -module.exports = require("os"); - /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { @@ -25425,7 +25425,7 @@ module.exports = new Schema({ "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = tryCatch; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__(48); /** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */ var tryCatchTarget; @@ -25959,7 +25959,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_37__internal_operators_isEmpty__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__ = __webpack_require__(868); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__ = __webpack_require__(47); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__ = __webpack_require__(869); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__["a"]; }); @@ -26636,7 +26636,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const path = __webpack_require__(0); -const home = exports.home = __webpack_require__(49).homedir(); +const home = exports.home = __webpack_require__(46).homedir(); const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; @@ -35333,7 +35333,7 @@ function _load_isCi() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(49)); + return _os = _interopRequireDefault(__webpack_require__(46)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -40721,7 +40721,7 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__(14); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InnerSubscriber__ = __webpack_require__(84); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */ @@ -45918,7 +45918,7 @@ var config = { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concat; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__(62); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__(429); @@ -46321,7 +46321,7 @@ var pump = __webpack_require__(781) var mkdirp = __webpack_require__(145) var fs = __webpack_require__(5) var path = __webpack_require__(0) -var os = __webpack_require__(49) +var os = __webpack_require__(46) var win32 = os.platform() === 'win32' @@ -46666,7 +46666,7 @@ function mkdirfix (name, opts, cb) { /* 194 */ /***/ (function(module, exports) { -module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.19.1","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} +module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.21.1","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), /* 195 */ @@ -49416,10 +49416,6 @@ class PackageLinker { } else if (workspaceLayout && remote.type === 'workspace' && !isShallow) { src = remote.reference; type = 'symlink'; - if (dest.indexOf(workspaceLayout.virtualManifestName) !== -1) { - // we don't need to install virtual manifest - continue; - } // to get real path for non hoisted dependencies symlinkPaths.set(dest, src); } else { @@ -49596,6 +49592,10 @@ class PackageLinker { possibleExtraneous.add(path.join(filepath, subfile)); } + } else if (file[0] === '.' && file !== '.bin') { + if (!(yield (_fs || _load_fs()).lstat(filepath)).isDirectory()) { + possibleExtraneous.add(filepath); + } } else { possibleExtraneous.add(filepath); } @@ -52045,6 +52045,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isValidLicense = isValidLicense; +exports.isValidBin = isValidBin; exports.stringifyPerson = stringifyPerson; exports.parsePerson = parsePerson; exports.normalizePerson = normalizePerson; @@ -52052,12 +52053,20 @@ exports.extractDescription = extractDescription; exports.extractRepositoryUrl = extractRepositoryUrl; +const path = __webpack_require__(0); + const validateLicense = __webpack_require__(959); +const PARENT_PATH = /^\.\.([\\\/]|$)/; + function isValidLicense(license) { return !!license && validateLicense(license).validForNewPackages; } +function isValidBin(bin) { + return !path.isAbsolute(bin) && !PARENT_PATH.test(path.normalize(bin)); +} + function stringifyPerson(person) { if (!person || typeof person !== 'object') { return person; @@ -67243,7 +67252,7 @@ var ReplayEvent = /*@__PURE__*/ (function () { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CombineLatestOperator; }); /* unused harmony export CombineLatestSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14); @@ -67387,7 +67396,7 @@ function defer(observableFactory) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = of; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fromArray__ = __webpack_require__(85); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(312); @@ -67879,7 +67888,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InnerSubscriber__ = __webpack_require__(84); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */ @@ -69793,6 +69802,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getRcConfigForCwd = getRcConfigForCwd; +exports.getRcConfigForFolder = getRcConfigForFolder; exports.getRcArgs = getRcArgs; var _fs; @@ -69848,13 +69858,23 @@ function getRcConfigForCwd(cwd, args) { const value = args[index + 1]; if (value && value.charAt(0) !== '-') { - Object.assign(config, loadRcFile((0, (_fs || _load_fs()).readFileSync)(value).toString(), value)); + Object.assign(config, loadRcFile((0, (_fs || _load_fs()).readFileSync)(value, 'utf8'), value)); } } return config; } +function getRcConfigForFolder(cwd) { + const filePath = (0, (_path || _load_path()).resolve)(cwd, '.yarnrc'); + if (!(0, (_fs || _load_fs()).existsSync)(filePath)) { + return {}; + } + + const fileText = (0, (_fs || _load_fs()).readFileSync)(filePath, 'utf8'); + return loadRcFile(fileText, filePath); +} + function loadRcFile(fileText, filePath) { var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'); @@ -69984,7 +70004,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isOffline = isOffline; -const os = __webpack_require__(49); +const os = __webpack_require__(46); const IGNORE_INTERFACES = ['lo0', 'awdl0', 'bridge0']; const LOCAL_IPS = ['127.0.0.1', '::1']; @@ -74680,6 +74700,7 @@ let getBinEntries = exports.getBinEntries = (() => { const registryFolder = _ref4; + binFolders.add(path.resolve(config.cwd, registryFolder, '.bin')); binFolders.add(path.resolve(config.lockfileFolder, registryFolder, '.bin')); } @@ -85410,7 +85431,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = merge; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(315); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fromArray__ = __webpack_require__(85); /** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */ @@ -85564,7 +85585,7 @@ var RaceSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(190); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */ @@ -85616,7 +85637,7 @@ function dispatch(state) { /* harmony export (immutable) */ __webpack_exports__["a"] = audit; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -85729,7 +85750,7 @@ function concatMap(project, resultSelector) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */ @@ -96945,6 +96966,22 @@ function _load_asyncToGenerator() { let run = exports.run = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (flags.install) { + const lockfilePath = path.resolve(config.cwd, 'yarn.lock'); + if (!(yield (_fs || _load_fs()).exists(lockfilePath))) { + yield (_fs || _load_fs()).writeFile(lockfilePath, ''); + } + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', flags.install], { + stdio: 'inherit', + cwd: config.cwd + }); + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'init', ...(flags.yes ? ['-y'] : []), ...(flags.private ? ['-p'] : [])], { + stdio: 'inherit', + cwd: config.cwd + }); + return; + } + const manifests = yield config.getRootManifests(); let repository = {}; @@ -97209,11 +97246,18 @@ function _load_validate() { return _validate = _interopRequireWildcard(__webpack_require__(125)); } +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(8); +} + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const objectPath = __webpack_require__(304); + const path = __webpack_require__(0); const yn = __webpack_require__(962); @@ -97221,6 +97265,7 @@ function setFlags(commander) { commander.description('Interactively creates or updates a package.json file.'); commander.option('-y, --yes', 'use default options'); commander.option('-p, --private', 'use default options and private true'); + commander.option('-i, --install ', 'install a specific Yarn release'); } function hasWrapper(commander, args) { @@ -98240,7 +98285,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def reporter.log(`Downloading ${chalk.green(bundleUrl)}...`); const bundle = yield fetchBundle(config, bundleUrl); - const rc = (0, (_rc || _load_rc()).getRcConfigForCwd)(config.lockfileFolder, []); + const rc = (0, (_rc || _load_rc()).getRcConfigForFolder)(config.lockfileFolder); const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.js`); reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`); @@ -99793,7 +99838,7 @@ let runScript = exports.runScript = (() => { const workspaceName = _ref7; const loc = workspaces[workspaceName].loc; - + reporter.log(`${os.EOL}> ${workspaceName}`); yield (_child || _load_child()).spawn((_constants2 || _load_constants2()).NODE_BIN_PATH, [(_constants2 || _load_constants2()).YARN_BIN_PATH, ...rest], { stdio: 'inherit', cwd: loc @@ -99847,6 +99892,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); const path = __webpack_require__(0); +const os = __webpack_require__(46); const semver = __webpack_require__(22); function hasWrapper(commander, args) { @@ -102347,6 +102393,15 @@ class PackageHoister { // decompress the location and push it to the flat tree. this path could be made const parts = []; const keyParts = key.split('#'); + const isWorkspaceEntry = this.workspaceLayout && keyParts[0] === this.workspaceLayout.virtualManifestName; + + // Don't add the virtual manifest (keyParts.length === 1) + // or ws childs which were not hoisted to the root (keyParts.length === 2). + // If a ws child was hoisted its key would not contain the virtual manifest name + if (isWorkspaceEntry && keyParts.length <= 2) { + continue; + } + for (let i = 0; i < keyParts.length; i++) { const key = keyParts.slice(0, i + 1).join('#'); const hoisted = this.tree.get(key); @@ -102355,16 +102410,26 @@ class PackageHoister { parts.push(keyParts[i]); } - const shallowLocs = []; - if (this.config.modulesFolder) { - // remove the first part which will be the folder name and replace it with a - // hardcoded modules folder - parts.splice(0, 1, this.config.modulesFolder); + // Check if the destination is pointing to a sub folder of the virtualManifestName + // e.g. _project_/node_modules/workspace-aggregator-123456/node_modules/workspaceChild/node_modules/dependency + // This probably happened because the hoister was not able to hoist the workspace child to the root + // So we have to change the folder to the workspace package location + if (this.workspaceLayout && isWorkspaceEntry) { + const wspPkg = this.workspaceLayout.workspaces[keyParts[1]]; + invariant(wspPkg, `expected workspace package to exist for "${keyParts[1]}"`); + parts.splice(0, 4, wspPkg.loc); } else { - // first part will be the registry-specific module folder - parts.splice(0, 0, this.config.lockfileFolder); + if (this.config.modulesFolder) { + // remove the first part which will be the folder name and replace it with a + // hardcoded modules folder + parts.splice(0, 1, this.config.modulesFolder); + } else { + // first part will be the registry-specific module folder + parts.splice(0, 0, this.config.lockfileFolder); + } } + const shallowLocs = []; info.shallowPaths.forEach(shallowPath => { const shallowCopyParts = parts.slice(); shallowCopyParts[0] = this.config.cwd; @@ -104558,7 +104623,8 @@ const messages = { couldntClearPackageFromCache: "Couldn't clear package $0 from cache", clearedPackageFromCache: 'Cleared package $0 from cache', packWroteTarball: 'Wrote tarball to $0.', - + invalidBinField: 'Invalid bin field for $0.', + invalidBinEntry: 'Invalid bin entry for $1 (in $0).', helpExamples: ' Examples:\n$0\n', helpCommands: ' Commands:\n$0\n', helpCommandsMore: ' Run `$0` for more information on specific commands.', @@ -106035,7 +106101,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/* babel-plugin-inline-import './generate-pnp-map-api.tpl.js' */const pnpApi = '#!$$SHEBANG\n\n/* eslint-disable max-len, flowtype/require-valid-file-annotation, flowtype/require-return-type */\n/* global packageInformationStores, $$BLACKLIST, $$SETUP_STATIC_TABLES */\n\n// Used for the resolveUnqualified part of the resolution (ie resolving folder/index.js & file extensions)\n// Deconstructed so that they aren\'t affected by any fs monkeypatching occuring later during the execution\nconst {statSync, lstatSync, readlinkSync, readFileSync, existsSync, realpathSync} = require(\'fs\');\n\nconst Module = require(\'module\');\nconst path = require(\'path\');\nconst StringDecoder = require(\'string_decoder\');\n\nconst ignorePattern = $$BLACKLIST ? new RegExp($$BLACKLIST) : null;\n\nconst pnpFile = path.resolve(__dirname, __filename);\nconst builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(\'natives\')));\n\nconst topLevelLocator = {name: null, reference: null};\nconst blacklistedLocator = {name: NaN, reference: NaN};\n\n// Used for compatibility purposes - cf setupCompatibilityLayer\nconst patchedModules = [];\nconst fallbackLocators = [topLevelLocator];\n\n// Matches backslashes of Windows paths\nconst backwardSlashRegExp = /\\\\/g;\n\n// Matches if the path must point to a directory (ie ends with /)\nconst isDirRegExp = /\\/$/;\n\n// Matches if the path starts with a valid path qualifier (./, ../, /)\n// eslint-disable-next-line no-unused-vars\nconst isStrictRegExp = /^\\.{0,2}\\//;\n\n// Splits a require request into its components, or return null if the request is a file path\nconst pathRegExp = /^(?![a-zA-Z]:[\\\\\\/]|\\\\\\\\|\\.{0,2}(?:\\/|$))((?:@[^\\/]+\\/)?[^\\/]+)\\/?(.*|)$/;\n\n// Keep a reference around ("module" is a common name in this context, so better rename it to something more significant)\nconst pnpModule = module;\n\n/**\n * Used to disable the resolution hooks (for when we want to fallback to the previous resolution - we then need\n * a way to "reset" the environment temporarily)\n */\n\nlet enableNativeHooks = true;\n\n/**\n * Simple helper function that assign an error code to an error, so that it can more easily be caught and used\n * by third-parties.\n */\n\nfunction makeError(code, message, data = {}) {\n const error = new Error(message);\n return Object.assign(error, {code, data});\n}\n\n/**\n * Ensures that the returned locator isn\'t a blacklisted one.\n *\n * Blacklisted packages are packages that cannot be used because their dependencies cannot be deduced. This only\n * happens with peer dependencies, which effectively have different sets of dependencies depending on their parents.\n *\n * In order to deambiguate those different sets of dependencies, the Yarn implementation of PnP will generate a\n * symlink for each combination of // it will find, and will\n * blacklist the target of those symlinks. By doing this, we ensure that files loaded through a specific path\n * will always have the same set of dependencies, provided the symlinks are correctly preserved.\n *\n * Unfortunately, some tools do not preserve them, and when it happens PnP isn\'t able anymore to deduce the set of\n * dependencies based on the path of the file that makes the require calls. But since we\'ve blacklisted those paths,\n * we\'re able to print a more helpful error message that points out that a third-party package is doing something\n * incompatible!\n */\n\n// eslint-disable-next-line no-unused-vars\nfunction blacklistCheck(locator) {\n if (locator === blacklistedLocator) {\n throw makeError(\n `BLACKLISTED`,\n [\n `A package has been resolved through a blacklisted path - this is usually caused by one of your tools calling`,\n `"realpath" on the return value of "require.resolve". Since the returned values use symlinks to disambiguate`,\n `peer dependencies, they must be passed untransformed to "require".`,\n ].join(` `)\n );\n }\n\n return locator;\n}\n\n$$SETUP_STATIC_TABLES();\n\n/**\n * Returns the module that should be used to resolve require calls. It\'s usually the direct parent, except if we\'re\n * inside an eval expression.\n */\n\nfunction getIssuerModule(parent) {\n let issuer = parent;\n\n while (issuer && (issuer.id === \'[eval]\' || issuer.id === \'\' || !issuer.filename)) {\n issuer = issuer.parent;\n }\n\n return issuer;\n}\n\n/**\n * Returns information about a package in a safe way (will throw if they cannot be retrieved)\n */\n\nfunction getPackageInformationSafe(packageLocator) {\n const packageInformation = exports.getPackageInformation(packageLocator);\n\n if (!packageInformation) {\n throw makeError(\n `INTERNAL`,\n `Couldn\'t find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`\n );\n }\n\n return packageInformation;\n}\n\n/**\n * Implements the node resolution for folder access and extension selection\n */\n\nfunction applyNodeExtensionResolution(unqualifiedPath, {extensions}) {\n // We use this "infinite while" so that we can restart the process as long as we hit package folders\n while (true) {\n let stat;\n\n try {\n stat = statSync(unqualifiedPath);\n } catch (error) {}\n\n // If the file exists and is a file, we can stop right there\n\n if (stat && !stat.isDirectory()) {\n // If the very last component of the resolved path is a symlink to a file, we then resolve it to a file. We only\n // do this first the last component, and not the rest of the path! This allows us to support the case of bin\n // symlinks, where a symlink in "/xyz/pkg-name/.bin/bin-name" will point somewhere else (like "/xyz/pkg-name/index.js").\n // In such a case, we want relative requires to be resolved relative to "/xyz/pkg-name/" rather than "/xyz/pkg-name/.bin/".\n //\n // Also note that the reason we must use readlink on the last component (instead of realpath on the whole path)\n // is that we must preserve the other symlinks, in particular those used by pnp to deambiguate packages using\n // peer dependencies. For example, "/xyz/.pnp/local/pnp-01234569/.bin/bin-name" should see its relative requires\n // be resolved relative to "/xyz/.pnp/local/pnp-0123456789/" rather than "/xyz/pkg-with-peers/", because otherwise\n // we would lose the information that would tell us what are the dependencies of pkg-with-peers relative to its\n // ancestors.\n\n if (lstatSync(unqualifiedPath).isSymbolicLink()) {\n unqualifiedPath = path.normalize(path.resolve(path.dirname(unqualifiedPath), readlinkSync(unqualifiedPath)));\n }\n\n return unqualifiedPath;\n }\n\n // If the file is a directory, we must check if it contains a package.json with a "main" entry\n\n if (stat && stat.isDirectory()) {\n let pkgJson;\n\n try {\n pkgJson = JSON.parse(readFileSync(`${unqualifiedPath}/package.json`, \'utf-8\'));\n } catch (error) {}\n\n let nextUnqualifiedPath;\n\n if (pkgJson && pkgJson.main) {\n nextUnqualifiedPath = path.resolve(unqualifiedPath, pkgJson.main);\n }\n\n // If the "main" field changed the path, we start again from this new location\n\n if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) {\n const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, {extensions});\n\n if (resolution !== null) {\n return resolution;\n }\n }\n }\n\n // Otherwise we check if we find a file that match one of the supported extensions\n\n const qualifiedPath = extensions\n .map(extension => {\n return `${unqualifiedPath}${extension}`;\n })\n .find(candidateFile => {\n return existsSync(candidateFile);\n });\n\n if (qualifiedPath) {\n return qualifiedPath;\n }\n\n // Otherwise, we check if the path is a folder - in such a case, we try to use its index\n\n if (stat && stat.isDirectory()) {\n const indexPath = extensions\n .map(extension => {\n return `${unqualifiedPath}/index${extension}`;\n })\n .find(candidateFile => {\n return existsSync(candidateFile);\n });\n\n if (indexPath) {\n return indexPath;\n }\n }\n\n // Otherwise there\'s nothing else we can do :(\n\n return null;\n }\n}\n\n/**\n * This function creates fake modules that can be used with the _resolveFilename function.\n * Ideally it would be nice to be able to avoid this, since it causes useless allocations\n * and cannot be cached efficiently (we recompute the nodeModulePaths every time).\n *\n * Fortunately, this should only affect the fallback, and there hopefully shouldn\'t be a\n * lot of them.\n */\n\nfunction makeFakeModule(path) {\n const fakeModule = new Module(path, false);\n fakeModule.filename = path;\n fakeModule.paths = Module._nodeModulePaths(path);\n return fakeModule;\n}\n\n/**\n * Normalize path to posix format.\n */\n\nfunction normalizePath(fsPath) {\n fsPath = path.normalize(fsPath);\n\n if (process.platform === \'win32\') {\n fsPath = fsPath.replace(backwardSlashRegExp, \'/\');\n }\n\n return fsPath;\n}\n\n/**\n * Forward the resolution to the next resolver (usually the native one)\n */\n\nfunction callNativeResolution(request, issuer) {\n if (issuer.endsWith(\'/\')) {\n issuer += \'internal.js\';\n }\n\n try {\n enableNativeHooks = false;\n\n // Since we would need to create a fake module anyway (to call _resolveLookupPath that\n // would give us the paths to give to _resolveFilename), we can as well not use\n // the {paths} option at all, since it internally makes _resolveFilename create another\n // fake module anyway.\n return Module._resolveFilename(request, makeFakeModule(issuer), false);\n } finally {\n enableNativeHooks = true;\n }\n}\n\n/**\n * This key indicates which version of the standard is implemented by this resolver. The `std` key is the\n * Plug\'n\'Play standard, and any other key are third-party extensions. Third-party extensions are not allowed\n * to override the standard, and can only offer new methods.\n *\n * If an new version of the Plug\'n\'Play standard is released and some extensions conflict with newly added\n * functions, they\'ll just have to fix the conflicts and bump their own version number.\n */\n\nexports.VERSIONS = {std: 1};\n\n/**\n * Useful when used together with getPackageInformation to fetch information about the top-level package.\n */\n\nexports.topLevel = {name: null, reference: null};\n\n/**\n * Gets the package information for a given locator. Returns null if they cannot be retrieved.\n */\n\nexports.getPackageInformation = function getPackageInformation({name, reference}) {\n const packageInformationStore = packageInformationStores.get(name);\n\n if (!packageInformationStore) {\n return null;\n }\n\n const packageInformation = packageInformationStore.get(reference);\n\n if (!packageInformation) {\n return null;\n }\n\n return packageInformation;\n};\n\n/**\n * Transforms a request (what\'s typically passed as argument to the require function) into an unqualified path.\n * This path is called "unqualified" because it only changes the package name to the package location on the disk,\n * which means that the end result still cannot be directly accessed (for example, it doesn\'t try to resolve the\n * file extension, or to resolve directories to their "index.js" content). Use the "resolveUnqualified" function\n * to convert them to fully-qualified paths, or just use "resolveRequest" that do both operations in one go.\n *\n * Note that it is extremely important that the `issuer` path ends with a forward slash if the issuer is to be\n * treated as a folder (ie. "/tmp/foo/" rather than "/tmp/foo" if "foo" is a directory). Otherwise relative\n * imports won\'t be computed correctly (they\'ll get resolved relative to "/tmp/" instead of "/tmp/foo/").\n */\n\nexports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {considerBuiltins = true} = {}) {\n // The \'pnpapi\' request is reserved and will always return the path to the PnP file, from everywhere\n\n if (request === `pnpapi`) {\n return pnpFile;\n }\n\n // Bailout if the request is a native module\n\n if (considerBuiltins && builtinModules.has(request)) {\n return null;\n }\n\n // We allow disabling the pnp resolution for some subpaths. This is because some projects, often legacy,\n // contain multiple levels of dependencies (ie. a yarn.lock inside a subfolder of a yarn.lock). This is\n // typically solved using workspaces, but not all of them have been converted already.\n\n if (ignorePattern && ignorePattern.test(normalizePath(issuer))) {\n const result = callNativeResolution(request, issuer);\n\n if (result === false) {\n throw makeError(\n `BUILTIN_NODE_RESOLUTION_FAIL`,\n `The builtin node resolution algorithm was unable to resolve the module referenced by "${request}" and requested from "${issuer}" (it didn\'t go through the pnp resolver because the issuer was explicitely ignored by the regexp "$$BLACKLIST")`,\n {\n request,\n issuer,\n }\n );\n }\n\n return result;\n }\n\n let unqualifiedPath;\n\n // If the request is a relative or absolute path, we just return it normalized\n\n const dependencyNameMatch = request.match(pathRegExp);\n\n if (!dependencyNameMatch) {\n if (path.isAbsolute(request)) {\n unqualifiedPath = path.normalize(request);\n } else if (issuer.match(isDirRegExp)) {\n unqualifiedPath = path.normalize(path.resolve(issuer, request));\n } else {\n unqualifiedPath = path.normalize(path.resolve(path.dirname(issuer), request));\n }\n }\n\n // Things are more hairy if it\'s a package require - we then need to figure out which package is needed, and in\n // particular the exact version for the given location on the dependency tree\n\n if (dependencyNameMatch) {\n const [, dependencyName, subPath] = dependencyNameMatch;\n\n const issuerLocator = exports.findPackageLocator(issuer);\n\n // If the issuer file doesn\'t seem to be owned by a package managed through pnp, then we resort to using the next\n // resolution algorithm in the chain, usually the native Node resolution one\n\n if (!issuerLocator) {\n const result = callNativeResolution(request, issuer);\n\n if (result === false) {\n throw makeError(\n `BUILTIN_NODE_RESOLUTION_FAIL`,\n `The builtin node resolution algorithm was unable to resolve the module referenced by "${request}" and requested from "${issuer}" (it didn\'t go through the pnp resolver because the issuer doesn\'t seem to be part of the Yarn-managed dependency tree)`,\n {\n request,\n issuer,\n }\n );\n }\n\n return result;\n }\n\n const issuerInformation = getPackageInformationSafe(issuerLocator);\n\n // We obtain the dependency reference in regard to the package that request it\n\n let dependencyReference = issuerInformation.packageDependencies.get(dependencyName);\n\n // If we can\'t find it, we check if we can potentially load it from the packages that have been defined as potential fallbacks.\n // It\'s a bit of a hack, but it improves compatibility with the existing Node ecosystem. Hopefully we should eventually be able\n // to kill this logic and become stricter once pnp gets enough traction and the affected packages fix themselves.\n\n if (issuerLocator !== topLevelLocator) {\n for (let t = 0, T = fallbackLocators.length; dependencyReference === undefined && t < T; ++t) {\n const fallbackInformation = getPackageInformationSafe(fallbackLocators[t]);\n dependencyReference = fallbackInformation.packageDependencies.get(dependencyName);\n }\n }\n\n // If we can\'t find the path, and if the package making the request is the top-level, we can offer nicer error messages\n\n if (!dependencyReference) {\n if (dependencyReference === null) {\n if (issuerLocator === topLevelLocator) {\n throw makeError(\n `MISSING_PEER_DEPENDENCY`,\n `You seem to be requiring a peer dependency ("${dependencyName}"), but it is not installed (which might be because you\'re the top-level package)`,\n {request, issuer, dependencyName}\n );\n } else {\n throw makeError(\n `MISSING_PEER_DEPENDENCY`,\n `Package "${issuerLocator.name}@${issuerLocator.reference}" is trying to access a peer dependency ("${dependencyName}") that should be provided by its direct ancestor but isn\'t`,\n {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName}\n );\n }\n } else {\n if (issuerLocator === topLevelLocator) {\n throw makeError(\n `UNDECLARED_DEPENDENCY`,\n `You cannot require a package ("${dependencyName}") that is not declared in your dependencies (via "${issuer}")`,\n {request, issuer, dependencyName}\n );\n } else {\n const candidates = Array.from(issuerInformation.packageDependencies.keys());\n throw makeError(\n `UNDECLARED_DEPENDENCY`,\n `Package "${issuerLocator.name}@${issuerLocator.reference}" (via "${issuer}") is trying to require the package "${dependencyName}" (via "${request}") without it being listed in its dependencies (${candidates.join(\n `, `\n )})`,\n {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName, candidates}\n );\n }\n }\n }\n\n // We need to check that the package exists on the filesystem, because it might not have been installed\n\n const dependencyLocator = {name: dependencyName, reference: dependencyReference};\n const dependencyInformation = exports.getPackageInformation(dependencyLocator);\n const dependencyLocation = path.resolve(__dirname, dependencyInformation.packageLocation);\n\n if (!dependencyLocation) {\n throw makeError(\n `MISSING_DEPENDENCY`,\n `Package "${dependencyLocator.name}@${dependencyLocator.reference}" is a valid dependency, but hasn\'t been installed and thus cannot be required (it might be caused if you install a partial tree, such as on production environments)`,\n {request, issuer, dependencyLocator: Object.assign({}, dependencyLocator)}\n );\n }\n\n // Now that we know which package we should resolve to, we only have to find out the file location\n\n if (subPath) {\n unqualifiedPath = path.resolve(dependencyLocation, subPath);\n } else {\n unqualifiedPath = dependencyLocation;\n }\n }\n\n return path.normalize(unqualifiedPath);\n};\n\n/**\n * Transforms an unqualified path into a qualified path by using the Node resolution algorithm (which automatically\n * appends ".js" / ".json", and transforms directory accesses into "index.js").\n */\n\nexports.resolveUnqualified = function resolveUnqualified(\n unqualifiedPath,\n {extensions = Object.keys(Module._extensions)} = {}\n) {\n const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, {extensions});\n\n if (qualifiedPath) {\n return path.normalize(qualifiedPath);\n } else {\n throw makeError(\n `QUALIFIED_PATH_RESOLUTION_FAILED`,\n `Couldn\'t find a suitable Node resolution for unqualified path "${unqualifiedPath}"`,\n {unqualifiedPath}\n );\n }\n};\n\n/**\n * Transforms a request into a fully qualified path.\n *\n * Note that it is extremely important that the `issuer` path ends with a forward slash if the issuer is to be\n * treated as a folder (ie. "/tmp/foo/" rather than "/tmp/foo" if "foo" is a directory). Otherwise relative\n * imports won\'t be computed correctly (they\'ll get resolved relative to "/tmp/" instead of "/tmp/foo/").\n */\n\nexports.resolveRequest = function resolveRequest(request, issuer, {considerBuiltins, extensions} = {}) {\n let unqualifiedPath;\n\n try {\n unqualifiedPath = exports.resolveToUnqualified(request, issuer, {considerBuiltins});\n } catch (originalError) {\n // If we get a BUILTIN_NODE_RESOLUTION_FAIL error there, it means that we\'ve had to use the builtin node\n // resolution, which usually shouldn\'t happen. It might be because the user is trying to require something\n // from a path loaded through a symlink (which is not possible, because we need something normalized to\n // figure out which package is making the require call), so we try to make the same request using a fully\n // resolved issuer and throws a better and more actionable error if it works.\n if (originalError.code === `BUILTIN_NODE_RESOLUTION_FAIL`) {\n let realIssuer;\n\n try {\n realIssuer = realpathSync(issuer);\n } catch (error) {}\n\n if (realIssuer) {\n if (issuer.endsWith(`/`)) {\n realIssuer = realIssuer.replace(/\\/?$/, `/`);\n }\n\n try {\n exports.resolveToUnqualified(request, realIssuer, {considerBuiltins});\n } catch (error) {\n // If an error was thrown, the problem doesn\'t seem to come from a path not being normalized, so we\n // can just throw the original error which was legit.\n throw originalError;\n }\n\n // If we reach this stage, it means that resolveToUnqualified didn\'t fail when using the fully resolved\n // file path, which is very likely caused by a module being invoked through Node with a path not being\n // correctly normalized (ie you should use "node $(realpath script.js)" instead of "node script.js").\n throw makeError(\n `SYMLINKED_PATH_DETECTED`,\n `A pnp module ("${request}") has been required from what seems to be a symlinked path ("${issuer}"). This is not possible, you must ensure that your modules are invoked through their fully resolved path on the filesystem (in this case "${realIssuer}").`,\n {\n request,\n issuer,\n realIssuer,\n }\n );\n }\n }\n throw originalError;\n }\n\n if (unqualifiedPath === null) {\n return null;\n }\n\n try {\n return exports.resolveUnqualified(unqualifiedPath, {extensions});\n } catch (resolutionError) {\n if (resolutionError.code === \'QUALIFIED_PATH_RESOLUTION_FAILED\') {\n Object.assign(resolutionError.data, {request, issuer});\n }\n throw resolutionError;\n }\n};\n\n/**\n * Setups the hook into the Node environment.\n *\n * From this point on, any call to `require()` will go through the "resolveRequest" function, and the result will\n * be used as path of the file to load.\n */\n\nexports.setup = function setup() {\n // A small note: we don\'t replace the cache here (and instead use the native one). This is an effort to not\n // break code similar to "delete require.cache[require.resolve(FOO)]", where FOO is a package located outside\n // of the Yarn dependency tree. In this case, we defer the load to the native loader. If we were to replace the\n // cache by our own, the native loader would populate its own cache, which wouldn\'t be exposed anymore, so the\n // delete call would be broken.\n\n const originalModuleLoad = Module._load;\n\n Module._load = function(request, parent, isMain) {\n if (!enableNativeHooks) {\n return originalModuleLoad.call(Module, request, parent, isMain);\n }\n\n // Builtins are managed by the regular Node loader\n\n if (builtinModules.has(request)) {\n try {\n enableNativeHooks = false;\n return originalModuleLoad.call(Module, request, parent, isMain);\n } finally {\n enableNativeHooks = true;\n }\n }\n\n // The \'pnpapi\' name is reserved to return the PnP api currently in use by the program\n\n if (request === `pnpapi`) {\n return pnpModule.exports;\n }\n\n // Request `Module._resolveFilename` (ie. `resolveRequest`) to tell us which file we should load\n\n const modulePath = Module._resolveFilename(request, parent, isMain);\n\n // Check if the module has already been created for the given file\n\n const cacheEntry = Module._cache[modulePath];\n\n if (cacheEntry) {\n return cacheEntry.exports;\n }\n\n // Create a new module and store it into the cache\n\n const module = new Module(modulePath, parent);\n Module._cache[modulePath] = module;\n\n // The main module is exposed as global variable\n\n if (isMain) {\n process.mainModule = module;\n module.id = \'.\';\n }\n\n // Try to load the module, and remove it from the cache if it fails\n\n let hasThrown = true;\n\n try {\n module.load(modulePath);\n hasThrown = false;\n } finally {\n if (hasThrown) {\n delete Module._cache[modulePath];\n }\n }\n\n // Some modules might have to be patched for compatibility purposes\n\n for (const [filter, patchFn] of patchedModules) {\n if (filter.test(request)) {\n module.exports = patchFn(exports.findPackageLocator(parent.filename), module.exports);\n }\n }\n\n return module.exports;\n };\n\n const originalModuleResolveFilename = Module._resolveFilename;\n\n Module._resolveFilename = function(request, parent, isMain, options) {\n if (!enableNativeHooks) {\n return originalModuleResolveFilename.call(Module, request, parent, isMain, options);\n }\n\n let issuers;\n\n if (options) {\n const optionNames = new Set(Object.keys(options));\n optionNames.delete(\'paths\');\n\n if (optionNames.size > 0) {\n throw makeError(\n `UNSUPPORTED`,\n `Some options passed to require() aren\'t supported by PnP yet (${Array.from(optionNames).join(\', \')})`\n );\n }\n\n if (options.paths) {\n issuers = options.paths.map(entry => `${path.normalize(entry)}/`);\n }\n }\n\n if (!issuers) {\n const issuerModule = getIssuerModule(parent);\n const issuer = issuerModule ? issuerModule.filename : `${process.cwd()}/`;\n\n issuers = [issuer];\n }\n\n let firstError;\n\n for (const issuer of issuers) {\n let resolution;\n\n try {\n resolution = exports.resolveRequest(request, issuer);\n } catch (error) {\n firstError = firstError || error;\n continue;\n }\n\n return resolution !== null ? resolution : request;\n }\n\n throw firstError;\n };\n\n const originalFindPath = Module._findPath;\n\n Module._findPath = function(request, paths, isMain) {\n if (!enableNativeHooks) {\n return originalFindPath.call(Module, request, paths, isMain);\n }\n\n for (const path of paths) {\n let resolution;\n\n try {\n resolution = exports.resolveRequest(request, path);\n } catch (error) {\n continue;\n }\n\n if (resolution) {\n return resolution;\n }\n }\n\n return false;\n };\n\n process.versions.pnp = String(exports.VERSIONS.std);\n};\n\nexports.setupCompatibilityLayer = () => {\n // ESLint currently doesn\'t have any portable way for shared configs to specify their own\n // plugins that should be used (https://github.com/eslint/eslint/issues/10125). This will\n // likely get fixed at some point, but it\'ll take time and in the meantime we\'ll just add\n // additional fallback entries for common shared configs.\n\n for (const name of [`react-scripts`]) {\n const packageInformationStore = packageInformationStores.get(name);\n if (packageInformationStore) {\n for (const reference of packageInformationStore.keys()) {\n fallbackLocators.push({name, reference});\n }\n }\n }\n\n // Modern versions of `resolve` support a specific entry point that custom resolvers can use\n // to inject a specific resolution logic without having to patch the whole package.\n //\n // Cf: https://github.com/browserify/resolve/pull/174\n\n patchedModules.push([\n /^\\.\\/normalize-options\\.js$/,\n (issuer, normalizeOptions) => {\n if (!issuer || issuer.name !== \'resolve\') {\n return normalizeOptions;\n }\n\n return (request, opts) => {\n opts = opts || {};\n\n if (opts.forceNodeResolution) {\n return opts;\n }\n\n opts.preserveSymlinks = true;\n opts.paths = function(request, basedir, getNodeModulesDir, opts) {\n // Extract the name of the package being requested (1=full name, 2=scope name, 3=local name)\n const parts = request.match(/^((?:(@[^\\/]+)\\/)?([^\\/]+))/);\n\n // make sure that basedir ends with a slash\n if (basedir.charAt(basedir.length - 1) !== \'/\') {\n basedir = path.join(basedir, \'/\');\n }\n // This is guaranteed to return the path to the "package.json" file from the given package\n const manifestPath = exports.resolveToUnqualified(`${parts[1]}/package.json`, basedir);\n\n // The first dirname strips the package.json, the second strips the local named folder\n let nodeModules = path.dirname(path.dirname(manifestPath));\n\n // Strips the scope named folder if needed\n if (parts[2]) {\n nodeModules = path.dirname(nodeModules);\n }\n\n return [nodeModules];\n };\n\n return opts;\n };\n },\n ]);\n};\n\nif (module.parent && module.parent.id === \'internal/preload\') {\n exports.setupCompatibilityLayer();\n\n exports.setup();\n}\n\nif (process.mainModule === module) {\n exports.setupCompatibilityLayer();\n\n const reportError = (code, message, data) => {\n process.stdout.write(`${JSON.stringify([{code, message, data}, null])}\\n`);\n };\n\n const reportSuccess = resolution => {\n process.stdout.write(`${JSON.stringify([null, resolution])}\\n`);\n };\n\n const processResolution = (request, issuer) => {\n try {\n reportSuccess(exports.resolveRequest(request, issuer));\n } catch (error) {\n reportError(error.code, error.message, error.data);\n }\n };\n\n const processRequest = data => {\n try {\n const [request, issuer] = JSON.parse(data);\n processResolution(request, issuer);\n } catch (error) {\n reportError(`INVALID_JSON`, error.message, error.data);\n }\n };\n\n if (process.argv.length > 2) {\n if (process.argv.length !== 4) {\n process.stderr.write(`Usage: ${process.argv[0]} ${process.argv[1]} \\n`);\n process.exitCode = 64; /* EX_USAGE */\n } else {\n processResolution(process.argv[2], process.argv[3]);\n }\n } else {\n let buffer = \'\';\n const decoder = new StringDecoder.StringDecoder();\n\n process.stdin.on(\'data\', chunk => {\n buffer += decoder.write(chunk);\n\n do {\n const index = buffer.indexOf(\'\\n\');\n if (index === -1) {\n break;\n }\n\n const line = buffer.slice(0, index);\n buffer = buffer.slice(index + 1);\n\n processRequest(line);\n } while (true);\n });\n }\n}\n'; +/* babel-plugin-inline-import './generate-pnp-map-api.tpl.js' */const pnpApi = '#!$$SHEBANG\n\n/* eslint-disable max-len, flowtype/require-valid-file-annotation, flowtype/require-return-type */\n/* global packageInformationStores, $$BLACKLIST, $$SETUP_STATIC_TABLES */\n\n// Used for the resolveUnqualified part of the resolution (ie resolving folder/index.js & file extensions)\n// Deconstructed so that they aren\'t affected by any fs monkeypatching occuring later during the execution\nconst {statSync, lstatSync, readlinkSync, readFileSync, existsSync, realpathSync} = require(\'fs\');\n\nconst Module = require(\'module\');\nconst path = require(\'path\');\nconst StringDecoder = require(\'string_decoder\');\n\nconst ignorePattern = $$BLACKLIST ? new RegExp($$BLACKLIST) : null;\n\nconst pnpFile = path.resolve(__dirname, __filename);\nconst builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(\'natives\')));\n\nconst topLevelLocator = {name: null, reference: null};\nconst blacklistedLocator = {name: NaN, reference: NaN};\n\n// Used for compatibility purposes - cf setupCompatibilityLayer\nconst patchedModules = [];\nconst fallbackLocators = [topLevelLocator];\n\n// Matches backslashes of Windows paths\nconst backwardSlashRegExp = /\\\\/g;\n\n// Matches if the path must point to a directory (ie ends with /)\nconst isDirRegExp = /\\/$/;\n\n// Matches if the path starts with a valid path qualifier (./, ../, /)\n// eslint-disable-next-line no-unused-vars\nconst isStrictRegExp = /^\\.{0,2}\\//;\n\n// Splits a require request into its components, or return null if the request is a file path\nconst pathRegExp = /^(?![a-zA-Z]:[\\\\\\/]|\\\\\\\\|\\.{0,2}(?:\\/|$))((?:@[^\\/]+\\/)?[^\\/]+)\\/?(.*|)$/;\n\n// Keep a reference around ("module" is a common name in this context, so better rename it to something more significant)\nconst pnpModule = module;\n\n/**\n * Used to disable the resolution hooks (for when we want to fallback to the previous resolution - we then need\n * a way to "reset" the environment temporarily)\n */\n\nlet enableNativeHooks = true;\n\n/**\n * Simple helper function that assign an error code to an error, so that it can more easily be caught and used\n * by third-parties.\n */\n\nfunction makeError(code, message, data = {}) {\n const error = new Error(message);\n return Object.assign(error, {code, data});\n}\n\n/**\n * Ensures that the returned locator isn\'t a blacklisted one.\n *\n * Blacklisted packages are packages that cannot be used because their dependencies cannot be deduced. This only\n * happens with peer dependencies, which effectively have different sets of dependencies depending on their parents.\n *\n * In order to deambiguate those different sets of dependencies, the Yarn implementation of PnP will generate a\n * symlink for each combination of // it will find, and will\n * blacklist the target of those symlinks. By doing this, we ensure that files loaded through a specific path\n * will always have the same set of dependencies, provided the symlinks are correctly preserved.\n *\n * Unfortunately, some tools do not preserve them, and when it happens PnP isn\'t able anymore to deduce the set of\n * dependencies based on the path of the file that makes the require calls. But since we\'ve blacklisted those paths,\n * we\'re able to print a more helpful error message that points out that a third-party package is doing something\n * incompatible!\n */\n\n// eslint-disable-next-line no-unused-vars\nfunction blacklistCheck(locator) {\n if (locator === blacklistedLocator) {\n throw makeError(\n `BLACKLISTED`,\n [\n `A package has been resolved through a blacklisted path - this is usually caused by one of your tools calling`,\n `"realpath" on the return value of "require.resolve". Since the returned values use symlinks to disambiguate`,\n `peer dependencies, they must be passed untransformed to "require".`,\n ].join(` `)\n );\n }\n\n return locator;\n}\n\n$$SETUP_STATIC_TABLES();\n\n/**\n * Returns the module that should be used to resolve require calls. It\'s usually the direct parent, except if we\'re\n * inside an eval expression.\n */\n\nfunction getIssuerModule(parent) {\n let issuer = parent;\n\n while (issuer && (issuer.id === \'[eval]\' || issuer.id === \'\' || !issuer.filename)) {\n issuer = issuer.parent;\n }\n\n return issuer;\n}\n\n/**\n * Returns information about a package in a safe way (will throw if they cannot be retrieved)\n */\n\nfunction getPackageInformationSafe(packageLocator) {\n const packageInformation = exports.getPackageInformation(packageLocator);\n\n if (!packageInformation) {\n throw makeError(\n `INTERNAL`,\n `Couldn\'t find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`\n );\n }\n\n return packageInformation;\n}\n\n/**\n * Implements the node resolution for folder access and extension selection\n */\n\nfunction applyNodeExtensionResolution(unqualifiedPath, {extensions}) {\n // We use this "infinite while" so that we can restart the process as long as we hit package folders\n while (true) {\n let stat;\n\n try {\n stat = statSync(unqualifiedPath);\n } catch (error) {}\n\n // If the file exists and is a file, we can stop right there\n\n if (stat && !stat.isDirectory()) {\n // If the very last component of the resolved path is a symlink to a file, we then resolve it to a file. We only\n // do this first the last component, and not the rest of the path! This allows us to support the case of bin\n // symlinks, where a symlink in "/xyz/pkg-name/.bin/bin-name" will point somewhere else (like "/xyz/pkg-name/index.js").\n // In such a case, we want relative requires to be resolved relative to "/xyz/pkg-name/" rather than "/xyz/pkg-name/.bin/".\n //\n // Also note that the reason we must use readlink on the last component (instead of realpath on the whole path)\n // is that we must preserve the other symlinks, in particular those used by pnp to deambiguate packages using\n // peer dependencies. For example, "/xyz/.pnp/local/pnp-01234569/.bin/bin-name" should see its relative requires\n // be resolved relative to "/xyz/.pnp/local/pnp-0123456789/" rather than "/xyz/pkg-with-peers/", because otherwise\n // we would lose the information that would tell us what are the dependencies of pkg-with-peers relative to its\n // ancestors.\n\n if (lstatSync(unqualifiedPath).isSymbolicLink()) {\n unqualifiedPath = path.normalize(path.resolve(path.dirname(unqualifiedPath), readlinkSync(unqualifiedPath)));\n }\n\n return unqualifiedPath;\n }\n\n // If the file is a directory, we must check if it contains a package.json with a "main" entry\n\n if (stat && stat.isDirectory()) {\n let pkgJson;\n\n try {\n pkgJson = JSON.parse(readFileSync(`${unqualifiedPath}/package.json`, \'utf-8\'));\n } catch (error) {}\n\n let nextUnqualifiedPath;\n\n if (pkgJson && pkgJson.main) {\n nextUnqualifiedPath = path.resolve(unqualifiedPath, pkgJson.main);\n }\n\n // If the "main" field changed the path, we start again from this new location\n\n if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) {\n const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, {extensions});\n\n if (resolution !== null) {\n return resolution;\n }\n }\n }\n\n // Otherwise we check if we find a file that match one of the supported extensions\n\n const qualifiedPath = extensions\n .map(extension => {\n return `${unqualifiedPath}${extension}`;\n })\n .find(candidateFile => {\n return existsSync(candidateFile);\n });\n\n if (qualifiedPath) {\n return qualifiedPath;\n }\n\n // Otherwise, we check if the path is a folder - in such a case, we try to use its index\n\n if (stat && stat.isDirectory()) {\n const indexPath = extensions\n .map(extension => {\n return `${unqualifiedPath}/index${extension}`;\n })\n .find(candidateFile => {\n return existsSync(candidateFile);\n });\n\n if (indexPath) {\n return indexPath;\n }\n }\n\n // Otherwise there\'s nothing else we can do :(\n\n return null;\n }\n}\n\n/**\n * This function creates fake modules that can be used with the _resolveFilename function.\n * Ideally it would be nice to be able to avoid this, since it causes useless allocations\n * and cannot be cached efficiently (we recompute the nodeModulePaths every time).\n *\n * Fortunately, this should only affect the fallback, and there hopefully shouldn\'t be a\n * lot of them.\n */\n\nfunction makeFakeModule(path) {\n const fakeModule = new Module(path, false);\n fakeModule.filename = path;\n fakeModule.paths = Module._nodeModulePaths(path);\n return fakeModule;\n}\n\n/**\n * Normalize path to posix format.\n */\n\nfunction normalizePath(fsPath) {\n fsPath = path.normalize(fsPath);\n\n if (process.platform === \'win32\') {\n fsPath = fsPath.replace(backwardSlashRegExp, \'/\');\n }\n\n return fsPath;\n}\n\n/**\n * Forward the resolution to the next resolver (usually the native one)\n */\n\nfunction callNativeResolution(request, issuer) {\n if (issuer.endsWith(\'/\')) {\n issuer += \'internal.js\';\n }\n\n try {\n enableNativeHooks = false;\n\n // Since we would need to create a fake module anyway (to call _resolveLookupPath that\n // would give us the paths to give to _resolveFilename), we can as well not use\n // the {paths} option at all, since it internally makes _resolveFilename create another\n // fake module anyway.\n return Module._resolveFilename(request, makeFakeModule(issuer), false);\n } finally {\n enableNativeHooks = true;\n }\n}\n\n/**\n * This key indicates which version of the standard is implemented by this resolver. The `std` key is the\n * Plug\'n\'Play standard, and any other key are third-party extensions. Third-party extensions are not allowed\n * to override the standard, and can only offer new methods.\n *\n * If an new version of the Plug\'n\'Play standard is released and some extensions conflict with newly added\n * functions, they\'ll just have to fix the conflicts and bump their own version number.\n */\n\nexports.VERSIONS = {std: 1};\n\n/**\n * Useful when used together with getPackageInformation to fetch information about the top-level package.\n */\n\nexports.topLevel = {name: null, reference: null};\n\n/**\n * Gets the package information for a given locator. Returns null if they cannot be retrieved.\n */\n\nexports.getPackageInformation = function getPackageInformation({name, reference}) {\n const packageInformationStore = packageInformationStores.get(name);\n\n if (!packageInformationStore) {\n return null;\n }\n\n const packageInformation = packageInformationStore.get(reference);\n\n if (!packageInformation) {\n return null;\n }\n\n return packageInformation;\n};\n\n/**\n * Transforms a request (what\'s typically passed as argument to the require function) into an unqualified path.\n * This path is called "unqualified" because it only changes the package name to the package location on the disk,\n * which means that the end result still cannot be directly accessed (for example, it doesn\'t try to resolve the\n * file extension, or to resolve directories to their "index.js" content). Use the "resolveUnqualified" function\n * to convert them to fully-qualified paths, or just use "resolveRequest" that do both operations in one go.\n *\n * Note that it is extremely important that the `issuer` path ends with a forward slash if the issuer is to be\n * treated as a folder (ie. "/tmp/foo/" rather than "/tmp/foo" if "foo" is a directory). Otherwise relative\n * imports won\'t be computed correctly (they\'ll get resolved relative to "/tmp/" instead of "/tmp/foo/").\n */\n\nexports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {considerBuiltins = true} = {}) {\n // The \'pnpapi\' request is reserved and will always return the path to the PnP file, from everywhere\n\n if (request === `pnpapi`) {\n return pnpFile;\n }\n\n // Bailout if the request is a native module\n\n if (considerBuiltins && builtinModules.has(request)) {\n return null;\n }\n\n // We allow disabling the pnp resolution for some subpaths. This is because some projects, often legacy,\n // contain multiple levels of dependencies (ie. a yarn.lock inside a subfolder of a yarn.lock). This is\n // typically solved using workspaces, but not all of them have been converted already.\n\n if (ignorePattern && ignorePattern.test(normalizePath(issuer))) {\n const result = callNativeResolution(request, issuer);\n\n if (result === false) {\n throw makeError(\n `BUILTIN_NODE_RESOLUTION_FAIL`,\n `The builtin node resolution algorithm was unable to resolve the module referenced by "${request}" and requested from "${issuer}" (it didn\'t go through the pnp resolver because the issuer was explicitely ignored by the regexp "$$BLACKLIST")`,\n {\n request,\n issuer,\n }\n );\n }\n\n return result;\n }\n\n let unqualifiedPath;\n\n // If the request is a relative or absolute path, we just return it normalized\n\n const dependencyNameMatch = request.match(pathRegExp);\n\n if (!dependencyNameMatch) {\n if (path.isAbsolute(request)) {\n unqualifiedPath = path.normalize(request);\n } else if (issuer.match(isDirRegExp)) {\n unqualifiedPath = path.normalize(path.resolve(issuer, request));\n } else {\n unqualifiedPath = path.normalize(path.resolve(path.dirname(issuer), request));\n }\n }\n\n // Things are more hairy if it\'s a package require - we then need to figure out which package is needed, and in\n // particular the exact version for the given location on the dependency tree\n\n if (dependencyNameMatch) {\n const [, dependencyName, subPath] = dependencyNameMatch;\n\n const issuerLocator = exports.findPackageLocator(issuer);\n\n // If the issuer file doesn\'t seem to be owned by a package managed through pnp, then we resort to using the next\n // resolution algorithm in the chain, usually the native Node resolution one\n\n if (!issuerLocator) {\n const result = callNativeResolution(request, issuer);\n\n if (result === false) {\n throw makeError(\n `BUILTIN_NODE_RESOLUTION_FAIL`,\n `The builtin node resolution algorithm was unable to resolve the module referenced by "${request}" and requested from "${issuer}" (it didn\'t go through the pnp resolver because the issuer doesn\'t seem to be part of the Yarn-managed dependency tree)`,\n {\n request,\n issuer,\n }\n );\n }\n\n return result;\n }\n\n const issuerInformation = getPackageInformationSafe(issuerLocator);\n\n // We obtain the dependency reference in regard to the package that request it\n\n let dependencyReference = issuerInformation.packageDependencies.get(dependencyName);\n\n // If we can\'t find it, we check if we can potentially load it from the packages that have been defined as potential fallbacks.\n // It\'s a bit of a hack, but it improves compatibility with the existing Node ecosystem. Hopefully we should eventually be able\n // to kill this logic and become stricter once pnp gets enough traction and the affected packages fix themselves.\n\n if (issuerLocator !== topLevelLocator) {\n for (let t = 0, T = fallbackLocators.length; dependencyReference === undefined && t < T; ++t) {\n const fallbackInformation = getPackageInformationSafe(fallbackLocators[t]);\n dependencyReference = fallbackInformation.packageDependencies.get(dependencyName);\n }\n }\n\n // If we can\'t find the path, and if the package making the request is the top-level, we can offer nicer error messages\n\n if (!dependencyReference) {\n if (dependencyReference === null) {\n if (issuerLocator === topLevelLocator) {\n throw makeError(\n `MISSING_PEER_DEPENDENCY`,\n `You seem to be requiring a peer dependency ("${dependencyName}"), but it is not installed (which might be because you\'re the top-level package)`,\n {request, issuer, dependencyName}\n );\n } else {\n throw makeError(\n `MISSING_PEER_DEPENDENCY`,\n `Package "${issuerLocator.name}@${issuerLocator.reference}" is trying to access a peer dependency ("${dependencyName}") that should be provided by its direct ancestor but isn\'t`,\n {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName}\n );\n }\n } else {\n if (issuerLocator === topLevelLocator) {\n throw makeError(\n `UNDECLARED_DEPENDENCY`,\n `You cannot require a package ("${dependencyName}") that is not declared in your dependencies (via "${issuer}")`,\n {request, issuer, dependencyName}\n );\n } else {\n const candidates = Array.from(issuerInformation.packageDependencies.keys());\n throw makeError(\n `UNDECLARED_DEPENDENCY`,\n `Package "${issuerLocator.name}@${issuerLocator.reference}" (via "${issuer}") is trying to require the package "${dependencyName}" (via "${request}") without it being listed in its dependencies (${candidates.join(\n `, `\n )})`,\n {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName, candidates}\n );\n }\n }\n }\n\n // We need to check that the package exists on the filesystem, because it might not have been installed\n\n const dependencyLocator = {name: dependencyName, reference: dependencyReference};\n const dependencyInformation = exports.getPackageInformation(dependencyLocator);\n const dependencyLocation = path.resolve(__dirname, dependencyInformation.packageLocation);\n\n if (!dependencyLocation) {\n throw makeError(\n `MISSING_DEPENDENCY`,\n `Package "${dependencyLocator.name}@${dependencyLocator.reference}" is a valid dependency, but hasn\'t been installed and thus cannot be required (it might be caused if you install a partial tree, such as on production environments)`,\n {request, issuer, dependencyLocator: Object.assign({}, dependencyLocator)}\n );\n }\n\n // Now that we know which package we should resolve to, we only have to find out the file location\n\n if (subPath) {\n unqualifiedPath = path.resolve(dependencyLocation, subPath);\n } else {\n unqualifiedPath = dependencyLocation;\n }\n }\n\n return path.normalize(unqualifiedPath);\n};\n\n/**\n * Transforms an unqualified path into a qualified path by using the Node resolution algorithm (which automatically\n * appends ".js" / ".json", and transforms directory accesses into "index.js").\n */\n\nexports.resolveUnqualified = function resolveUnqualified(\n unqualifiedPath,\n {extensions = Object.keys(Module._extensions)} = {}\n) {\n const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, {extensions});\n\n if (qualifiedPath) {\n return path.normalize(qualifiedPath);\n } else {\n throw makeError(\n `QUALIFIED_PATH_RESOLUTION_FAILED`,\n `Couldn\'t find a suitable Node resolution for unqualified path "${unqualifiedPath}"`,\n {unqualifiedPath}\n );\n }\n};\n\n/**\n * Transforms a request into a fully qualified path.\n *\n * Note that it is extremely important that the `issuer` path ends with a forward slash if the issuer is to be\n * treated as a folder (ie. "/tmp/foo/" rather than "/tmp/foo" if "foo" is a directory). Otherwise relative\n * imports won\'t be computed correctly (they\'ll get resolved relative to "/tmp/" instead of "/tmp/foo/").\n */\n\nexports.resolveRequest = function resolveRequest(request, issuer, {considerBuiltins, extensions} = {}) {\n let unqualifiedPath;\n\n try {\n unqualifiedPath = exports.resolveToUnqualified(request, issuer, {considerBuiltins});\n } catch (originalError) {\n // If we get a BUILTIN_NODE_RESOLUTION_FAIL error there, it means that we\'ve had to use the builtin node\n // resolution, which usually shouldn\'t happen. It might be because the user is trying to require something\n // from a path loaded through a symlink (which is not possible, because we need something normalized to\n // figure out which package is making the require call), so we try to make the same request using a fully\n // resolved issuer and throws a better and more actionable error if it works.\n if (originalError.code === `BUILTIN_NODE_RESOLUTION_FAIL`) {\n let realIssuer;\n\n try {\n realIssuer = realpathSync(issuer);\n } catch (error) {}\n\n if (realIssuer) {\n if (issuer.endsWith(`/`)) {\n realIssuer = realIssuer.replace(/\\/?$/, `/`);\n }\n\n try {\n exports.resolveToUnqualified(request, realIssuer, {considerBuiltins});\n } catch (error) {\n // If an error was thrown, the problem doesn\'t seem to come from a path not being normalized, so we\n // can just throw the original error which was legit.\n throw originalError;\n }\n\n // If we reach this stage, it means that resolveToUnqualified didn\'t fail when using the fully resolved\n // file path, which is very likely caused by a module being invoked through Node with a path not being\n // correctly normalized (ie you should use "node $(realpath script.js)" instead of "node script.js").\n throw makeError(\n `SYMLINKED_PATH_DETECTED`,\n `A pnp module ("${request}") has been required from what seems to be a symlinked path ("${issuer}"). This is not possible, you must ensure that your modules are invoked through their fully resolved path on the filesystem (in this case "${realIssuer}").`,\n {\n request,\n issuer,\n realIssuer,\n }\n );\n }\n }\n throw originalError;\n }\n\n if (unqualifiedPath === null) {\n return null;\n }\n\n try {\n return exports.resolveUnqualified(unqualifiedPath, {extensions});\n } catch (resolutionError) {\n if (resolutionError.code === \'QUALIFIED_PATH_RESOLUTION_FAILED\') {\n Object.assign(resolutionError.data, {request, issuer});\n }\n throw resolutionError;\n }\n};\n\n/**\n * Setups the hook into the Node environment.\n *\n * From this point on, any call to `require()` will go through the "resolveRequest" function, and the result will\n * be used as path of the file to load.\n */\n\nexports.setup = function setup() {\n // A small note: we don\'t replace the cache here (and instead use the native one). This is an effort to not\n // break code similar to "delete require.cache[require.resolve(FOO)]", where FOO is a package located outside\n // of the Yarn dependency tree. In this case, we defer the load to the native loader. If we were to replace the\n // cache by our own, the native loader would populate its own cache, which wouldn\'t be exposed anymore, so the\n // delete call would be broken.\n\n const originalModuleLoad = Module._load;\n\n Module._load = function(request, parent, isMain) {\n if (!enableNativeHooks) {\n return originalModuleLoad.call(Module, request, parent, isMain);\n }\n\n // Builtins are managed by the regular Node loader\n\n if (builtinModules.has(request)) {\n try {\n enableNativeHooks = false;\n return originalModuleLoad.call(Module, request, parent, isMain);\n } finally {\n enableNativeHooks = true;\n }\n }\n\n // The \'pnpapi\' name is reserved to return the PnP api currently in use by the program\n\n if (request === `pnpapi`) {\n return pnpModule.exports;\n }\n\n // Request `Module._resolveFilename` (ie. `resolveRequest`) to tell us which file we should load\n\n const modulePath = Module._resolveFilename(request, parent, isMain);\n\n // Check if the module has already been created for the given file\n\n const cacheEntry = Module._cache[modulePath];\n\n if (cacheEntry) {\n return cacheEntry.exports;\n }\n\n // Create a new module and store it into the cache\n\n const module = new Module(modulePath, parent);\n Module._cache[modulePath] = module;\n\n // The main module is exposed as global variable\n\n if (isMain) {\n process.mainModule = module;\n module.id = \'.\';\n }\n\n // Try to load the module, and remove it from the cache if it fails\n\n let hasThrown = true;\n\n try {\n module.load(modulePath);\n hasThrown = false;\n } finally {\n if (hasThrown) {\n delete Module._cache[modulePath];\n }\n }\n\n // Some modules might have to be patched for compatibility purposes\n\n for (const [filter, patchFn] of patchedModules) {\n if (filter.test(request)) {\n module.exports = patchFn(exports.findPackageLocator(parent.filename), module.exports);\n }\n }\n\n return module.exports;\n };\n\n const originalModuleResolveFilename = Module._resolveFilename;\n\n Module._resolveFilename = function(request, parent, isMain, options) {\n if (!enableNativeHooks) {\n return originalModuleResolveFilename.call(Module, request, parent, isMain, options);\n }\n\n let issuers;\n\n if (options) {\n const optionNames = new Set(Object.keys(options));\n optionNames.delete(\'paths\');\n\n if (optionNames.size > 0) {\n throw makeError(\n `UNSUPPORTED`,\n `Some options passed to require() aren\'t supported by PnP yet (${Array.from(optionNames).join(\', \')})`\n );\n }\n\n if (options.paths) {\n issuers = options.paths.map(entry => `${path.normalize(entry)}/`);\n }\n }\n\n if (!issuers) {\n const issuerModule = getIssuerModule(parent);\n const issuer = issuerModule ? issuerModule.filename : `${process.cwd()}/`;\n\n issuers = [issuer];\n }\n\n let firstError;\n\n for (const issuer of issuers) {\n let resolution;\n\n try {\n resolution = exports.resolveRequest(request, issuer);\n } catch (error) {\n firstError = firstError || error;\n continue;\n }\n\n return resolution !== null ? resolution : request;\n }\n\n throw firstError;\n };\n\n const originalFindPath = Module._findPath;\n\n Module._findPath = function(request, paths, isMain) {\n if (!enableNativeHooks) {\n return originalFindPath.call(Module, request, paths, isMain);\n }\n\n for (const path of paths || []) {\n let resolution;\n\n try {\n resolution = exports.resolveRequest(request, path);\n } catch (error) {\n continue;\n }\n\n if (resolution) {\n return resolution;\n }\n }\n\n return false;\n };\n\n process.versions.pnp = String(exports.VERSIONS.std);\n};\n\nexports.setupCompatibilityLayer = () => {\n // ESLint currently doesn\'t have any portable way for shared configs to specify their own\n // plugins that should be used (https://github.com/eslint/eslint/issues/10125). This will\n // likely get fixed at some point, but it\'ll take time and in the meantime we\'ll just add\n // additional fallback entries for common shared configs.\n\n for (const name of [`react-scripts`]) {\n const packageInformationStore = packageInformationStores.get(name);\n if (packageInformationStore) {\n for (const reference of packageInformationStore.keys()) {\n fallbackLocators.push({name, reference});\n }\n }\n }\n\n // Modern versions of `resolve` support a specific entry point that custom resolvers can use\n // to inject a specific resolution logic without having to patch the whole package.\n //\n // Cf: https://github.com/browserify/resolve/pull/174\n\n patchedModules.push([\n /^\\.\\/normalize-options\\.js$/,\n (issuer, normalizeOptions) => {\n if (!issuer || issuer.name !== \'resolve\') {\n return normalizeOptions;\n }\n\n return (request, opts) => {\n opts = opts || {};\n\n if (opts.forceNodeResolution) {\n return opts;\n }\n\n opts.preserveSymlinks = true;\n opts.paths = function(request, basedir, getNodeModulesDir, opts) {\n // Extract the name of the package being requested (1=full name, 2=scope name, 3=local name)\n const parts = request.match(/^((?:(@[^\\/]+)\\/)?([^\\/]+))/);\n\n // make sure that basedir ends with a slash\n if (basedir.charAt(basedir.length - 1) !== \'/\') {\n basedir = path.join(basedir, \'/\');\n }\n // This is guaranteed to return the path to the "package.json" file from the given package\n const manifestPath = exports.resolveToUnqualified(`${parts[1]}/package.json`, basedir);\n\n // The first dirname strips the package.json, the second strips the local named folder\n let nodeModules = path.dirname(path.dirname(manifestPath));\n\n // Strips the scope named folder if needed\n if (parts[2]) {\n nodeModules = path.dirname(nodeModules);\n }\n\n return [nodeModules];\n };\n\n return opts;\n };\n },\n ]);\n};\n\nif (module.parent && module.parent.id === \'internal/preload\') {\n exports.setupCompatibilityLayer();\n\n exports.setup();\n}\n\nif (process.mainModule === module) {\n exports.setupCompatibilityLayer();\n\n const reportError = (code, message, data) => {\n process.stdout.write(`${JSON.stringify([{code, message, data}, null])}\\n`);\n };\n\n const reportSuccess = resolution => {\n process.stdout.write(`${JSON.stringify([null, resolution])}\\n`);\n };\n\n const processResolution = (request, issuer) => {\n try {\n reportSuccess(exports.resolveRequest(request, issuer));\n } catch (error) {\n reportError(error.code, error.message, error.data);\n }\n };\n\n const processRequest = data => {\n try {\n const [request, issuer] = JSON.parse(data);\n processResolution(request, issuer);\n } catch (error) {\n reportError(`INVALID_JSON`, error.message, error.data);\n }\n };\n\n if (process.argv.length > 2) {\n if (process.argv.length !== 4) {\n process.stderr.write(`Usage: ${process.argv[0]} ${process.argv[1]} \\n`);\n process.exitCode = 64; /* EX_USAGE */\n } else {\n processResolution(process.argv[2], process.argv[3]);\n }\n } else {\n let buffer = \'\';\n const decoder = new StringDecoder.StringDecoder();\n\n process.stdin.on(\'data\', chunk => {\n buffer += decoder.write(chunk);\n\n do {\n const index = buffer.indexOf(\'\\n\');\n if (index === -1) {\n break;\n }\n\n const line = buffer.slice(0, index);\n buffer = buffer.slice(index + 1);\n\n processRequest(line);\n } while (true);\n });\n }\n}\n'; const crypto = __webpack_require__(11); @@ -106731,6 +106797,8 @@ const semver = __webpack_require__(22); const path = __webpack_require__(0); const url = __webpack_require__(24); +const VALID_BIN_KEYS = /^[a-z0-9_-]+$/i; + const LICENSE_RENAMES = { 'MIT/X11': 'MIT', X11: 'MIT' @@ -106898,6 +106966,37 @@ exports.default = (() => { info.bin = { [name]: info.bin }; } + // Validate that the bin entries reference only files within their package, and that + // their name is a valid file name + if (typeof info.bin === 'object' && info.bin !== null) { + const bin = info.bin; + for (var _iterator3 = Object.keys(bin), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + const key = _ref4; + + const target = bin[key]; + if (!VALID_BIN_KEYS.test(key) || !(0, (_util || _load_util()).isValidBin)(target)) { + delete bin[key]; + warn(reporter.lang('invalidBinEntry', info.name, key)); + } else { + bin[key] = path.normalize(target); + } + } + } else if (typeof info.bin !== 'undefined') { + delete info.bin; + warn(reporter.lang('invalidBinField', info.name)); + } + // bundleDependencies is an alias for bundledDependencies if (info.bundledDependencies) { info.bundleDependencies = info.bundledDependencies; @@ -106938,19 +107037,19 @@ exports.default = (() => { const fullBinDir = path.join(moduleLoc, binDir); if (yield (_fs || _load_fs()).exists(fullBinDir)) { - for (var _iterator3 = yield (_fs || _load_fs()).readdir(fullBinDir), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; + for (var _iterator4 = yield (_fs || _load_fs()).readdir(fullBinDir), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref5; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; } - const scriptName = _ref4; + const scriptName = _ref5; if (scriptName[0] === '.') { continue; @@ -106969,19 +107068,19 @@ exports.default = (() => { const fullManDir = path.join(moduleLoc, manDir); if (yield (_fs || _load_fs()).exists(fullManDir)) { - for (var _iterator4 = yield (_fs || _load_fs()).readdir(fullManDir), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { - var _ref5; + for (var _iterator5 = yield (_fs || _load_fs()).readdir(fullManDir), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref6; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref6 = _iterator5[_i5++]; } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref6 = _i5.value; } - const filename = _ref5; + const filename = _ref6; if (/^(.*?)\.[0-9]$/.test(filename)) { man.push(path.join('.', manDir, filename)); @@ -107000,19 +107099,19 @@ exports.default = (() => { if (Array.isArray(licenses) && !info.license) { let licenseTypes = []; - for (var _iterator5 = licenses, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { - var _ref6; + for (var _iterator6 = licenses, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref7; - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref6 = _iterator5[_i5++]; + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref7 = _iterator6[_i6++]; } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref6 = _i5.value; + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref7 = _i6.value; } - let license = _ref6; + let license = _ref7; if (license && typeof license === 'object') { license = license.type; @@ -107097,19 +107196,19 @@ exports.default = (() => { } } - for (var _iterator6 = (_constants || _load_constants()).MANIFEST_FIELDS, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { - var _ref7; + for (var _iterator7 = (_constants || _load_constants()).MANIFEST_FIELDS, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref8; - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref7 = _iterator6[_i6++]; + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref8 = _iterator7[_i7++]; } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref7 = _i6.value; + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref8 = _i7.value; } - const dependencyType = _ref7; + const dependencyType = _ref8; const dependencyList = info[dependencyType]; if (dependencyList && typeof dependencyList === 'object') { @@ -108267,7 +108366,7 @@ module.exports = (flag, argv) => { "use strict"; -const os = __webpack_require__(49); +const os = __webpack_require__(46); const hasFlag = __webpack_require__(597); const env = process.env; @@ -110384,7 +110483,7 @@ THE SOFTWARE. -var os = __webpack_require__(49); +var os = __webpack_require__(46); var hasFlag = __webpack_require__(619); var env = process.env; @@ -137062,10 +137161,10 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = bindCallback; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(183); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */ @@ -137181,9 +137280,9 @@ function dispatchError(state) { /* harmony export (immutable) */ __webpack_exports__["a"] = bindNodeCallback; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(183); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isArray__ = __webpack_require__(41); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */ @@ -137312,7 +137411,7 @@ function dispatchError(arg) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__OuterSubscriber__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */ @@ -137398,7 +137497,7 @@ var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137473,7 +137572,7 @@ function isEventTarget(sourceObj) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137654,7 +137753,7 @@ function fromPromise(input, scheduler) { /* harmony export (immutable) */ __webpack_exports__["a"] = generate; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(118); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */ @@ -138213,7 +138312,7 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */ @@ -138492,7 +138591,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -139366,7 +139465,7 @@ function elementAt(index, defaultValue) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */ @@ -139528,7 +139627,7 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InnerSubscriber__ = __webpack_require__(84); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */ @@ -139624,7 +139723,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) { /* unused harmony export ExpandSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -140074,7 +140173,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) { /* unused harmony export MergeScanSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__(14); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InnerSubscriber__ = __webpack_require__(84); @@ -140356,7 +140455,7 @@ function partition(predicate, thisArg) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = pluck; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__map__ = __webpack_require__(47); /** PURE_IMPORTS_START _map PURE_IMPORTS_END */ function pluck() { @@ -140563,7 +140662,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -140710,7 +140809,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -140915,7 +141014,7 @@ function dispatchNotification(state) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */ @@ -141411,7 +141510,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */ @@ -141717,7 +141816,7 @@ function dispatchNext(arg) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scan__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_defer__ = __webpack_require__(310); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__map__ = __webpack_require__(47); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -141782,7 +141881,7 @@ function timeout(due, scheduler) { /* harmony export (immutable) */ __webpack_exports__["a"] = timestamp; /* unused harmony export Timestamp */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__map__ = __webpack_require__(47); /** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */ @@ -142004,7 +142103,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isNumeric__ = __webpack_require__(190); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */ @@ -142172,7 +142271,7 @@ function dispatchWindowClose(state) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -142316,7 +142415,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ diff --git a/.yarnrc b/.yarnrc index a5ef0ebaafc9..9d428acd5409 100644 --- a/.yarnrc +++ b/.yarnrc @@ -2,7 +2,7 @@ # yarn lockfile v1 -lastUpdateCheck 1570572520160 +lastUpdateCheck 1576080308559 yarn-offline-mirror "./.yarn/offline-mirror" yarn-offline-mirror-pruning true -yarn-path ".yarn/releases/yarn-1.19.1.js" +yarn-path ".yarn/releases/yarn-1.21.1.js"