syncpack 8.2.4 → 8.3.8
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 +4 -1
- package/dist/bin-format/format.js +7 -6
- package/dist/bin-set-semver-ranges/set-semver-ranges.js +2 -0
- package/dist/lib/disk.js +9 -0
- package/dist/lib/get-input/get-wrappers/index.d.ts +1 -0
- package/dist/option.d.ts +1 -1
- package/dist/option.js +4 -1
- package/package.json +16 -14
package/README.md
CHANGED
|
@@ -310,6 +310,7 @@ tree in the following places:
|
|
|
310
310
|
or `.syncpackrc.cjs` file
|
|
311
311
|
- a `syncpack.config.js` or `syncpack.config.cjs` CommonJS module exporting an
|
|
312
312
|
object
|
|
313
|
+
- a `config.syncpack` property in `package.json`
|
|
313
314
|
|
|
314
315
|
If you want to specify a path to a configuration file, overriding the discovered
|
|
315
316
|
configuration file (if present), you can use the `--config` option.
|
|
@@ -496,7 +497,7 @@ used in `dependencies` or `devDependencies`.
|
|
|
496
497
|
"versionGroups": [
|
|
497
498
|
{
|
|
498
499
|
"dependencies": ["**"],
|
|
499
|
-
"dependencyTypes": ["
|
|
500
|
+
"dependencyTypes": ["peerDependencies"],
|
|
500
501
|
"packages": ["**"]
|
|
501
502
|
}
|
|
502
503
|
]
|
|
@@ -655,6 +656,8 @@ package.json files are resolved in this order of precendence:
|
|
|
655
656
|
`./pnpm-workspace.yaml`.
|
|
656
657
|
5. Default to `'package.json'` and `'packages/*/package.json'`.
|
|
657
658
|
|
|
659
|
+
> 👋 Always add quotes around your `--source` patterns [[more info](https://github.com/JamieMason/syncpack/issues/66#issuecomment-1146011769)].
|
|
660
|
+
|
|
658
661
|
## 🙋🏿♀️ Getting Help
|
|
659
662
|
|
|
660
663
|
Get help with issues by creating a [Bug Report] or discuss ideas by opening a
|
|
@@ -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);
|
|
@@ -9,6 +9,8 @@ var setSemverRanges = function (input, disk) {
|
|
|
9
9
|
var mismatches = (0, list_semver_group_mismatches_1.listSemverGroupMismatches)(semverGroup);
|
|
10
10
|
mismatches.forEach(function (_a) {
|
|
11
11
|
var dependencyType = _a.dependencyType, name = _a.name, version = _a.version, wrapper = _a.wrapper;
|
|
12
|
+
if (dependencyType === 'workspace')
|
|
13
|
+
return;
|
|
12
14
|
var root = wrapper.contents;
|
|
13
15
|
var nextVersion = (0, set_semver_range_1.setSemverRange)(semverGroup.range, version);
|
|
14
16
|
if (dependencyType === 'pnpmOverrides') {
|
package/dist/lib/disk.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.disk = void 0;
|
|
4
4
|
var cosmiconfig_1 = require("cosmiconfig");
|
|
5
|
+
var expect_more_1 = require("expect-more");
|
|
5
6
|
var fs_extra_1 = require("fs-extra");
|
|
6
7
|
var glob_1 = require("glob");
|
|
8
|
+
var path_1 = require("path");
|
|
7
9
|
var read_yaml_file_1 = require("read-yaml-file");
|
|
8
10
|
var constants_1 = require("../constants");
|
|
9
11
|
var log_1 = require("./log");
|
|
@@ -24,10 +26,17 @@ exports.disk = {
|
|
|
24
26
|
});
|
|
25
27
|
},
|
|
26
28
|
readConfigFileSync: function (configPath) {
|
|
29
|
+
var _a;
|
|
27
30
|
(0, log_1.verbose)('readConfigFileSync(', configPath, ')');
|
|
28
31
|
try {
|
|
29
32
|
var result = configPath ? client.load(configPath) : client.search();
|
|
30
33
|
if (result === null) {
|
|
34
|
+
var rcPath_1 = (0, path_1.join)(constants_1.CWD, 'package.json');
|
|
35
|
+
var pjson = (0, fs_extra_1.readJsonSync)(rcPath_1, { throws: false });
|
|
36
|
+
var rcConfig_1 = (_a = pjson === null || pjson === void 0 ? void 0 : pjson.config) === null || _a === void 0 ? void 0 : _a.syncpack;
|
|
37
|
+
console.log(rcConfig_1);
|
|
38
|
+
if ((0, expect_more_1.isNonEmptyObject)(rcConfig_1))
|
|
39
|
+
return rcConfig_1;
|
|
31
40
|
(0, log_1.verbose)('no config file found');
|
|
32
41
|
return {};
|
|
33
42
|
}
|
package/dist/option.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const option: {
|
|
|
6
6
|
readonly indent: readonly ["-i, --indent [value]", `override indentation. defaults to "${string}"`];
|
|
7
7
|
readonly overrides: readonly ["-o, --overrides", string];
|
|
8
8
|
readonly peer: readonly ["-P, --peer", string];
|
|
9
|
-
readonly pnpmOverrides: readonly ["-O, --
|
|
9
|
+
readonly pnpmOverrides: readonly ["-O, --pnpmOverrides", string];
|
|
10
10
|
readonly prod: readonly ["-p, --prod", string];
|
|
11
11
|
readonly resolutions: readonly ["-R, --resolutions", string];
|
|
12
12
|
readonly semverRange: readonly ["-r, --semver-range <range>", "see supported ranges below. defaults to \"\"" | "see supported ranges below. defaults to \"*\"" | "see supported ranges below. defaults to \">\"" | "see supported ranges below. defaults to \">=\"" | "see supported ranges below. defaults to \".x\"" | "see supported ranges below. defaults to \"<\"" | "see supported ranges below. defaults to \"<=\"" | "see supported ranges below. defaults to \"^\"" | "see supported ranges below. defaults to \"~\""];
|
package/dist/option.js
CHANGED
|
@@ -24,7 +24,10 @@ exports.option = {
|
|
|
24
24
|
],
|
|
25
25
|
overrides: ['-o, --overrides', (0, chalk_1["default"])(templateObject_3 || (templateObject_3 = __makeTemplateObject(["include {yellow overrides} (npm)"], ["include {yellow overrides} (npm)"])))],
|
|
26
26
|
peer: ['-P, --peer', (0, chalk_1["default"])(templateObject_4 || (templateObject_4 = __makeTemplateObject(["include {yellow peerDependencies}"], ["include {yellow peerDependencies}"])))],
|
|
27
|
-
pnpmOverrides: [
|
|
27
|
+
pnpmOverrides: [
|
|
28
|
+
'-O, --pnpmOverrides',
|
|
29
|
+
(0, chalk_1["default"])(templateObject_5 || (templateObject_5 = __makeTemplateObject(["include {yellow overrides} (pnpm)"], ["include {yellow overrides} (pnpm)"]))),
|
|
30
|
+
],
|
|
28
31
|
prod: ['-p, --prod', (0, chalk_1["default"])(templateObject_6 || (templateObject_6 = __makeTemplateObject(["include {yellow dependencies}"], ["include {yellow dependencies}"])))],
|
|
29
32
|
resolutions: [
|
|
30
33
|
'-R, --resolutions',
|
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.
|
|
4
|
+
"version": "8.3.8",
|
|
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)",
|
|
@@ -25,32 +27,32 @@
|
|
|
25
27
|
],
|
|
26
28
|
"dependencies": {
|
|
27
29
|
"chalk": "4.1.2",
|
|
28
|
-
"commander": "9.
|
|
30
|
+
"commander": "9.4.1",
|
|
29
31
|
"cosmiconfig": "7.0.1",
|
|
30
32
|
"expect-more": "1.2.0",
|
|
31
|
-
"fp-ts": "2.
|
|
33
|
+
"fp-ts": "2.13.1",
|
|
32
34
|
"fs-extra": "10.1.0",
|
|
33
35
|
"glob": "8.0.3",
|
|
34
36
|
"minimatch": "5.1.0",
|
|
35
37
|
"read-yaml-file": "2.1.0",
|
|
36
|
-
"semver": "7.3.
|
|
38
|
+
"semver": "7.3.8"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"@types/fs-extra": "9.0.13",
|
|
40
|
-
"@types/glob": "
|
|
41
|
-
"@types/jest": "
|
|
42
|
-
"@types/node": "18.
|
|
43
|
-
"@types/semver": "7.3.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
45
|
-
"@typescript-eslint/parser": "5.
|
|
46
|
-
"eslint": "8.
|
|
42
|
+
"@types/glob": "8.0.0",
|
|
43
|
+
"@types/jest": "29.2.0",
|
|
44
|
+
"@types/node": "18.11.7",
|
|
45
|
+
"@types/semver": "7.3.13",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "5.41.0",
|
|
47
|
+
"@typescript-eslint/parser": "5.41.0",
|
|
48
|
+
"eslint": "8.26.0",
|
|
47
49
|
"eslint-plugin-import": "2.26.0",
|
|
48
50
|
"expect-more-jest": "5.4.1",
|
|
49
|
-
"jest": "
|
|
51
|
+
"jest": "29.2.2",
|
|
50
52
|
"prettier": "2.7.1",
|
|
51
53
|
"rimraf": "3.0.2",
|
|
52
|
-
"ts-jest": "
|
|
53
|
-
"typescript": "4.
|
|
54
|
+
"ts-jest": "29.0.3",
|
|
55
|
+
"typescript": "4.8.4"
|
|
54
56
|
},
|
|
55
57
|
"engines": {
|
|
56
58
|
"node": ">=10"
|