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
@@ -496,7 +496,7 @@ used in `dependencies` or `devDependencies`.
496
496
  "versionGroups": [
497
497
  {
498
498
  "dependencies": ["**"],
499
- "dependencyTypes": ["peer"],
499
+ "dependencyTypes": ["peerDependencies"],
500
500
  "packages": ["**"]
501
501
  }
502
502
  ]
@@ -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 repositoryUrl = (_c = optionalChaining === null || optionalChaining === void 0 ? void 0 : optionalChaining.repository) === null || _c === void 0 ? void 0 : _c.url;
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 (repositoryUrl) {
20
- contents.repository = repositoryUrl.includes('github.com')
21
- ? repositoryUrl.replace(/^.+github\.com\//, '')
22
- : repositoryUrl;
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);
@@ -14,6 +14,7 @@ export interface Source {
14
14
  overrides?: Record<string, string>;
15
15
  };
16
16
  repository?: {
17
+ directory?: string;
17
18
  type: string;
18
19
  url: string;
19
20
  } | string;
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",
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)",