syncpack 8.2.4 → 8.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -6,20 +6,21 @@ var write_if_changed_1 = require("../lib/write-if-changed");
|
|
|
6
6
|
function format(input, disk) {
|
|
7
7
|
var indent = input.indent, sortAz = input.sortAz, sortFirst = input.sortFirst, wrappers = input.wrappers;
|
|
8
8
|
wrappers.forEach(function (_a) {
|
|
9
|
-
var _b, _c;
|
|
9
|
+
var _b, _c, _d;
|
|
10
10
|
var contents = _a.contents, filePath = _a.filePath, json = _a.json;
|
|
11
11
|
var sortedKeys = Object.keys(contents).sort();
|
|
12
12
|
var keys = new Set(sortFirst.concat(sortedKeys));
|
|
13
13
|
var optionalChaining = contents;
|
|
14
14
|
var bugsUrl = (_b = optionalChaining === null || optionalChaining === void 0 ? void 0 : optionalChaining.bugs) === null || _b === void 0 ? void 0 : _b.url;
|
|
15
|
-
var
|
|
15
|
+
var repoUrl = (_c = optionalChaining === null || optionalChaining === void 0 ? void 0 : optionalChaining.repository) === null || _c === void 0 ? void 0 : _c.url;
|
|
16
|
+
var repoDir = (_d = optionalChaining === null || optionalChaining === void 0 ? void 0 : optionalChaining.repository) === null || _d === void 0 ? void 0 : _d.directory;
|
|
16
17
|
if (bugsUrl) {
|
|
17
18
|
contents.bugs = bugsUrl;
|
|
18
19
|
}
|
|
19
|
-
if (
|
|
20
|
-
contents.repository =
|
|
21
|
-
?
|
|
22
|
-
:
|
|
20
|
+
if ((0, expect_more_1.isNonEmptyString)(repoUrl) && !(0, expect_more_1.isNonEmptyString)(repoDir)) {
|
|
21
|
+
contents.repository = repoUrl.includes('github.com')
|
|
22
|
+
? repoUrl.replace(/^.+github\.com\//, '')
|
|
23
|
+
: repoUrl;
|
|
23
24
|
}
|
|
24
25
|
sortAz.forEach(function (key) { return sortAlphabetically(contents[key]); });
|
|
25
26
|
sortObject(keys, contents);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syncpack",
|
|
3
3
|
"description": "Manage multiple package.json files, such as in Lerna Monorepos and Yarn/Pnpm Workspaces",
|
|
4
|
-
"version": "8.2.
|
|
4
|
+
"version": "8.2.5",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"syncpack": "dist/bin.js",
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"Alex Hayton (https://github.com/AlexHayton)",
|
|
18
18
|
"Aparajita Fishman (https://github.com/aparajita)",
|
|
19
19
|
"Artur Wierzbicki (https://github.com/ArturWierzbicki)",
|
|
20
|
+
"Daniel Silva (https://github.com/dsilvasc)",
|
|
20
21
|
"Jamie Mason (https://github.com/JamieMason)",
|
|
22
|
+
"Jody Heavener (https://github.com/jodyheavener)",
|
|
21
23
|
"Luis Vieira (https://github.com/luisvieiragmr)",
|
|
22
24
|
"Marais Rossouw (https://github.com/maraisr)",
|
|
23
25
|
"Matt Sprague (https://github.com/uforic)",
|