FreeBSD Bugzilla – Attachment 213157 Details for
Bug 245425
www/yarn: throws error when global packages are installed, 1.22.4 regression
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
yarn.diff (text/plain), 3.34 KB, created by
Guido Falsi
on 2020-04-07 15:30:17 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Guido Falsi
Created:
2020-04-07 15:30:17 UTC
Size:
3.34 KB
patch
obsolete
>Index: www/yarn/Makefile >=================================================================== >--- www/yarn/Makefile (revision 530965) >+++ www/yarn/Makefile (working copy) >@@ -3,6 +3,7 @@ > PORTNAME= yarn > DISTVERSIONPREFIX= v > DISTVERSION= 1.22.4 >+PORTREVISION= 1 > CATEGORIES= www > MASTER_SITES= https://yarnpkg.com/downloads/${PORTVERSION}/ > >Index: www/yarn/files/patch-lib_cli.js >=================================================================== >--- www/yarn/files/patch-lib_cli.js (nonexistent) >+++ www/yarn/files/patch-lib_cli.js (working copy) >@@ -0,0 +1,80 @@ >+--- lib/cli.js.orig 2020-03-09 15:51:47 UTC >++++ lib/cli.js >+@@ -56939,10 +56939,10 @@ function getRcConfigForFolder(cwd) { >+ } >+ >+ function loadRcFile(fileText, filePath) { >+- var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, filePath), >++ var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'), >+ values = _parse.object; >+ >+- if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string') { >++ if (filePath.match(/\.yml$/)) { >+ values = { 'yarn-path': values.yarnPath }; >+ } >+ >+@@ -64532,27 +64532,16 @@ function parse(str, fileLoc) { >+ var parser = new Parser(str, fileLoc); >+ parser.next(); >+ >+- if (!fileLoc.endsWith(`.yml`)) { >++ try { >++ return parser.parse(); >++ } catch (error1) { >+ try { >+- return parser.parse(); >+- } catch (error1) { >+- try { >+- return safeLoad(str, { >+- schema: FAILSAFE_SCHEMA >+- }); >+- } catch (error2) { >+- throw error1; >+- } >++ return safeLoad(str, { >++ schema: FAILSAFE_SCHEMA >++ }); >++ } catch (error2) { >++ throw error1; >+ } >+- } else { >+- var result = safeLoad(str, { >+- schema: FAILSAFE_SCHEMA >+- }); >+- if (typeof result === 'object') { >+- return result; >+- } else { >+- return {}; >+- } >+ } >+ } >+ >+@@ -90319,7 +90308,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _lo >+ var rcPath = `${config.lockfileFolder}/.yarnrc.yml`; >+ reporter.log(`Updating ${chalk.magenta(rcPath)}...`); >+ >+- yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(targetPath)}\n`); >++ yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(yarnPath)}\n`); >+ } else { >+ var _rcPath = `${config.lockfileFolder}/.yarnrc`; >+ reporter.log(`Updating ${chalk.magenta(_rcPath)}...`); >+@@ -101330,11 +101319,7 @@ function parseRcPaths(paths, parser) { >+ try { >+ return parser((0, (_fs || _load_fs()).readFileSync)(path).toString(), path); >+ } catch (error) { >+- if (error.code === 'ENOENT' || error.code === 'EISDIR') { >+- return {}; >+- } else { >+- throw error; >+- } >++ return {}; >+ } >+ }))); >+ } >+@@ -153406,4 +153391,4 @@ module.exports = require("dns"); >+ module.exports = require("domain"); >+ >+ /***/ }) >+-/******/ ]); >+\ No newline at end of file >++/******/ ]); > >Property changes on: www/yarn/files/patch-lib_cli.js >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245425
: 213157