syncpack 8.2.5 → 8.3.9
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 +6 -3
- package/dist/bin-set-semver-ranges/set-semver-ranges.js +2 -0
- package/dist/lib/disk.js +9 -0
- package/dist/lib/is-semver.js +2 -1
- package/dist/lib/set-semver-range.js +3 -2
- package/dist/option.d.ts +1 -1
- package/dist/option.js +4 -1
- package/package.json +14 -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.
|
|
@@ -599,7 +600,7 @@ and peer dependencies can be broader.
|
|
|
599
600
|
{
|
|
600
601
|
"range": "",
|
|
601
602
|
"dependencyTypes": [
|
|
602
|
-
"
|
|
603
|
+
"dependencies",
|
|
603
604
|
"resolutions",
|
|
604
605
|
"overrides",
|
|
605
606
|
"pnpmOverrides",
|
|
@@ -610,13 +611,13 @@ and peer dependencies can be broader.
|
|
|
610
611
|
},
|
|
611
612
|
{
|
|
612
613
|
"range": "~",
|
|
613
|
-
"dependencyTypes": ["
|
|
614
|
+
"dependencyTypes": ["devDependencies"],
|
|
614
615
|
"dependencies": ["**"],
|
|
615
616
|
"packages": ["**"]
|
|
616
617
|
},
|
|
617
618
|
{
|
|
618
619
|
"range": "^",
|
|
619
|
-
"dependencyTypes": ["
|
|
620
|
+
"dependencyTypes": ["peerDependencies"],
|
|
620
621
|
"dependencies": ["**"],
|
|
621
622
|
"packages": ["**"]
|
|
622
623
|
}
|
|
@@ -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
|
|
@@ -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/lib/is-semver.js
CHANGED
|
@@ -4,7 +4,8 @@ exports.isLooseSemver = exports.isSemver = exports.isValidSemverRange = void 0;
|
|
|
4
4
|
var expect_more_1 = require("expect-more");
|
|
5
5
|
var constants_1 = require("../constants");
|
|
6
6
|
function isValidSemverRange(value) {
|
|
7
|
-
return (value === constants_1.
|
|
7
|
+
return (value === constants_1.RANGE_ANY ||
|
|
8
|
+
value === constants_1.RANGE_EXACT ||
|
|
8
9
|
value === constants_1.RANGE_GT ||
|
|
9
10
|
value === constants_1.RANGE_GTE ||
|
|
10
11
|
value === constants_1.RANGE_LOOSE ||
|
|
@@ -4,9 +4,10 @@ exports.setSemverRange = void 0;
|
|
|
4
4
|
var constants_1 = require("../constants");
|
|
5
5
|
var is_semver_1 = require("./is-semver");
|
|
6
6
|
function setSemverRange(semverRange, version) {
|
|
7
|
-
if (!(0, is_semver_1.isSemver)(version) || !(0, is_semver_1.isValidSemverRange)(semverRange))
|
|
7
|
+
if (!(0, is_semver_1.isSemver)(version) || !(0, is_semver_1.isValidSemverRange)(semverRange))
|
|
8
8
|
return version;
|
|
9
|
-
|
|
9
|
+
if (semverRange === '*')
|
|
10
|
+
return semverRange;
|
|
10
11
|
var nextVersion = (0, is_semver_1.isLooseSemver)(version)
|
|
11
12
|
? version.replace(/\.x/g, '.0')
|
|
12
13
|
: version;
|
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.9",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"syncpack": "dist/bin.js",
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"chalk": "4.1.2",
|
|
30
|
-
"commander": "9.
|
|
30
|
+
"commander": "9.4.1",
|
|
31
31
|
"cosmiconfig": "7.0.1",
|
|
32
32
|
"expect-more": "1.2.0",
|
|
33
|
-
"fp-ts": "2.
|
|
33
|
+
"fp-ts": "2.13.1",
|
|
34
34
|
"fs-extra": "10.1.0",
|
|
35
35
|
"glob": "8.0.3",
|
|
36
36
|
"minimatch": "5.1.0",
|
|
37
37
|
"read-yaml-file": "2.1.0",
|
|
38
|
-
"semver": "7.3.
|
|
38
|
+
"semver": "7.3.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/fs-extra": "9.0.13",
|
|
42
|
-
"@types/glob": "
|
|
43
|
-
"@types/jest": "
|
|
44
|
-
"@types/node": "18.
|
|
45
|
-
"@types/semver": "7.3.
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
47
|
-
"@typescript-eslint/parser": "5.
|
|
48
|
-
"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",
|
|
49
49
|
"eslint-plugin-import": "2.26.0",
|
|
50
50
|
"expect-more-jest": "5.4.1",
|
|
51
|
-
"jest": "
|
|
51
|
+
"jest": "29.2.2",
|
|
52
52
|
"prettier": "2.7.1",
|
|
53
53
|
"rimraf": "3.0.2",
|
|
54
|
-
"ts-jest": "
|
|
55
|
-
"typescript": "4.
|
|
54
|
+
"ts-jest": "29.0.3",
|
|
55
|
+
"typescript": "4.8.4"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=10"
|