View | Details | Raw Unified | Return to bug 245425
Collapse All | Expand All

(-)www/yarn/Makefile (+1 lines)
Lines 3-8 Link Here
3
PORTNAME=	yarn
3
PORTNAME=	yarn
4
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	1.22.4
5
DISTVERSION=	1.22.4
6
PORTREVISION=	1
6
CATEGORIES=	www
7
CATEGORIES=	www
7
MASTER_SITES=	https://yarnpkg.com/downloads/${PORTVERSION}/
8
MASTER_SITES=	https://yarnpkg.com/downloads/${PORTVERSION}/
8
9
(-)www/yarn/files/patch-lib_cli.js (+80 lines)
Line 0 Link Here
1
--- lib/cli.js.orig	2020-03-09 15:51:47 UTC
2
+++ lib/cli.js
3
@@ -56939,10 +56939,10 @@ function getRcConfigForFolder(cwd) {
4
 }
5
 
6
 function loadRcFile(fileText, filePath) {
7
-  var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, filePath),
8
+  var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'),
9
       values = _parse.object;
10
 
11
-  if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string') {
12
+  if (filePath.match(/\.yml$/)) {
13
     values = { 'yarn-path': values.yarnPath };
14
   }
15
 
16
@@ -64532,27 +64532,16 @@ function parse(str, fileLoc) {
17
   var parser = new Parser(str, fileLoc);
18
   parser.next();
19
 
20
-  if (!fileLoc.endsWith(`.yml`)) {
21
+  try {
22
+    return parser.parse();
23
+  } catch (error1) {
24
     try {
25
-      return parser.parse();
26
-    } catch (error1) {
27
-      try {
28
-        return safeLoad(str, {
29
-          schema: FAILSAFE_SCHEMA
30
-        });
31
-      } catch (error2) {
32
-        throw error1;
33
-      }
34
+      return safeLoad(str, {
35
+        schema: FAILSAFE_SCHEMA
36
+      });
37
+    } catch (error2) {
38
+      throw error1;
39
     }
40
-  } else {
41
-    var result = safeLoad(str, {
42
-      schema: FAILSAFE_SCHEMA
43
-    });
44
-    if (typeof result === 'object') {
45
-      return result;
46
-    } else {
47
-      return {};
48
-    }
49
   }
50
 }
51
 
52
@@ -90319,7 +90308,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _lo
53
         var rcPath = `${config.lockfileFolder}/.yarnrc.yml`;
54
         reporter.log(`Updating ${chalk.magenta(rcPath)}...`);
55
 
56
-        yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(targetPath)}\n`);
57
+        yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(yarnPath)}\n`);
58
       } else {
59
         var _rcPath = `${config.lockfileFolder}/.yarnrc`;
60
         reporter.log(`Updating ${chalk.magenta(_rcPath)}...`);
61
@@ -101330,11 +101319,7 @@ function parseRcPaths(paths, parser) {
62
     try {
63
       return parser((0, (_fs || _load_fs()).readFileSync)(path).toString(), path);
64
     } catch (error) {
65
-      if (error.code === 'ENOENT' || error.code === 'EISDIR') {
66
-        return {};
67
-      } else {
68
-        throw error;
69
-      }
70
+      return {};
71
     }
72
   })));
73
 }
74
@@ -153406,4 +153391,4 @@ module.exports = require("dns");
75
 module.exports = require("domain");
76
 
77
 /***/ })
78
-/******/ ]);
79
\ No newline at end of file
80
+/******/ ]);

Return to bug 245425