@@ -34805,15 +34805,27 @@ function hasMergeConflicts(str) {
34805
34805
function parse(str, fileLoc) {
34806
34806
const parser = new Parser(str, fileLoc);
34807
34807
parser.next();
34808
- try {
34809
- return parser.parse();
34810
- } catch (error1) {
34808
+
34809
+ if (!fileLoc.endsWith(`.yml`)) {
34811
34810
try {
34812
- return safeLoad(str, {
34813
- schema: FAILSAFE_SCHEMA
34814
- });
34815
- } catch (error2) {
34816
- throw error1;
34811
+ return parser.parse();
34812
+ } catch (error1) {
34813
+ try {
34814
+ return safeLoad(str, {
34815
+ schema: FAILSAFE_SCHEMA
34816
+ });
34817
+ } catch (error2) {
34818
+ throw error1;
34819
+ }
34820
+ }
34821
+ } else {
34822
+ const result = safeLoad(str, {
34823
+ schema: FAILSAFE_SCHEMA
34824
+ });
34825
+ if (typeof result === 'object') {
34826
+ return result;
34827
+ } else {
34828
+ return {};
34817
34829
}
34818
34830
}
34819
34831
}
@@ -44642,7 +44654,7 @@ const FOLDERS_IGNORE = [
44642
44654
const DEFAULT_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([...FOLDERS_IGNORE,
44643
44655
44644
44656
// ignore cruft
44645
- 'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.npmignore', '.gitignore', '.DS_Store']);
44657
+ 'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.yarnrc.yml', '. npmignore', '.gitignore', '.DS_Store']);
44646
44658
44647
44659
const NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([
44648
44660
// never ignore these files
@@ -44651,6 +44663,7 @@ const NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([
44651
44663
function packWithIgnoreAndHeaders(cwd, ignoreFunction, { mapHeader } = {}) {
44652
44664
return tar.pack(cwd, {
44653
44665
ignore: ignoreFunction,
44666
+ sort: true,
44654
44667
map: header => {
44655
44668
const suffix = header.name === '.' ? '' : `/${header.name}`;
44656
44669
header.name = `package${suffix}`;
@@ -46666,7 +46679,7 @@ function mkdirfix (name, opts, cb) {
46666
46679
/* 194 */
46667
46680
/***/ (function(module, exports) {
46668
46681
46669
- module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.0","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"}}}
46682
+ module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.10","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"}}}
46670
46683
46671
46684
/***/ }),
46672
46685
/* 195 */
@@ -69876,12 +69889,12 @@ function getRcConfigForFolder(cwd) {
69876
69889
}
69877
69890
69878
69891
function loadRcFile(fileText, filePath) {
69879
- var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc' );
69892
+ var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, filePath );
69880
69893
69881
69894
let values = _parse.object;
69882
69895
69883
69896
69884
- if (filePath.match(/\.yml$/)) {
69897
+ if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string' ) {
69885
69898
values = { 'yarn-path': values.yarnPath };
69886
69899
}
69887
69900
@@ -97001,7 +97014,7 @@ let run = exports.run = (() => {
97001
97014
if (!(yield (_fs || _load_fs()).exists(lockfilePath))) {
97002
97015
yield (_fs || _load_fs()).writeFile(lockfilePath, '');
97003
97016
}
97004
- yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', installVersion], {
97017
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', installVersion, '--silent' ], {
97005
97018
stdio: 'inherit',
97006
97019
cwd: config.cwd
97007
97020
});
@@ -98326,7 +98339,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def
98326
98339
98327
98340
const bundle = yield fetchBundle(config, bundleUrl);
98328
98341
98329
- const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.js `);
98342
+ const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.cjs `);
98330
98343
reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`);
98331
98344
yield (_fs || _load_fs()).mkdirp(path.dirname(yarnPath));
98332
98345
yield (_fs || _load_fs()).writeFile(yarnPath, bundle);
@@ -98338,7 +98351,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def
98338
98351
const rcPath = `${config.lockfileFolder}/.yarnrc.yml`;
98339
98352
reporter.log(`Updating ${chalk.magenta(rcPath)}...`);
98340
98353
98341
- yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${JSON.stringify(yarnPath )}\n`);
98354
+ yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${JSON.stringify(targetPath )}\n`);
98342
98355
} else {
98343
98356
const rcPath = `${config.lockfileFolder}/.yarnrc`;
98344
98357
reporter.log(`Updating ${chalk.magenta(rcPath)}...`);
@@ -100178,7 +100191,7 @@ let main = exports.main = (() => {
100178
100191
100179
100192
const config = new (_config || _load_config()).default(reporter);
100180
100193
const outputWrapperEnabled = (0, (_conversion || _load_conversion()).boolifyWithDefault)(process.env.YARN_WRAP_OUTPUT, true);
100181
- const shouldWrapOutput = outputWrapperEnabled && !(_commander || _load_commander()).default.json && command.hasWrapper((_commander || _load_commander()).default, (_commander || _load_commander()).default.args);
100194
+ const shouldWrapOutput = outputWrapperEnabled && !(_commander || _load_commander()).default.json && command.hasWrapper((_commander || _load_commander()).default, (_commander || _load_commander()).default.args) && !(commandName === 'init' && (_commander || _load_commander()).default[`2`]) ;
100182
100195
100183
100196
if (shouldWrapOutput) {
100184
100197
reporter.header(commandName, { name: 'yarn', version: (_yarnVersion || _load_yarnVersion()).version });
@@ -100586,8 +100599,13 @@ let start = (() => {
100586
100599
const opts = { stdio: 'inherit', env: Object.assign({}, process.env, { YARN_IGNORE_PATH: 1 }) };
100587
100600
let exitCode = 0;
100588
100601
100602
+ process.on(`SIGINT`, function () {
100603
+ // We don't want SIGINT to kill our process; we want it to kill the
100604
+ // innermost process, whose end will cause our own to exit.
100605
+ });
100606
+
100589
100607
try {
100590
- if (yarnPath.endsWith(`.js` )) {
100608
+ if (/\.[cm]?js$/.test(yarnPath )) {
100591
100609
exitCode = yield (0, (_child || _load_child()).spawnp)(process.execPath, [yarnPath, ...argv], opts);
100592
100610
} else {
100593
100611
exitCode = yield (0, (_child || _load_child()).spawnp)(yarnPath, argv, opts);
@@ -107715,7 +107733,11 @@ function parseRcPaths(paths, parser) {
107715
107733
try {
107716
107734
return parser((0, (_fs || _load_fs()).readFileSync)(path).toString(), path);
107717
107735
} catch (error) {
107718
- return {};
107736
+ if (error.code === 'ENOENT' || error.code === 'EISDIR') {
107737
+ return {};
107738
+ } else {
107739
+ throw error;
107740
+ }
107719
107741
}
107720
107742
}));
107721
107743
}
0 commit comments