syncpack 14.0.0-alpha.10 → 14.0.0-alpha.11
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 +72 -25
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# syncpack
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="https://jamiemason.github.io/syncpack/logo.svg" width="
|
|
4
|
+
<img src="https://jamiemason.github.io/syncpack/logo.svg" width="134" height="120" alt="">
|
|
5
5
|
<br>Consistent dependency versions in large JavaScript Monorepos.
|
|
6
6
|
<br><a href="https://jamiemason.github.io/syncpack">https://jamiemason.github.io/syncpack</a>
|
|
7
7
|
</p>
|
|
@@ -9,46 +9,93 @@
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install --save-dev syncpack
|
|
12
|
+
npm install --save-dev syncpack@alpha
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Commands
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
> All command line options can be combined to target packages and dependencies in multiple ways.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### [format](https://jamiemason.github.io/syncpack/command/format)
|
|
22
|
-
|
|
23
|
-
Organise package.json files according to a conventional format, where fields appear in a predictable order and nested fields are ordered alphabetically. Shorthand properties are used where available, such as the `"repository"` and `"bugs"` fields.
|
|
19
|
+
### [lint](https://jamiemason.github.io/syncpack/command/lint) and [fix](https://jamiemason.github.io/syncpack/command/fix)
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Lint all versions and ranges and exit with 0 or 1 based on whether all files match your Syncpack configuration file.
|
|
28
|
-
|
|
29
|
-
### [lint-semver-ranges](https://jamiemason.github.io/syncpack/command/lint-semver-ranges)
|
|
30
|
-
|
|
31
|
-
Check whether dependency versions used within "dependencies", "devDependencies", etc follow a consistent format.
|
|
21
|
+
Ensure that multiple packages requiring the same dependency define the same version, so that every package requires eg. `react@16.4.2`, instead of a combination of `react@16.4.2`, `react@0.15.9`, and `react@16.0.0`.
|
|
32
22
|
|
|
33
|
-
|
|
23
|
+
#### Examples
|
|
34
24
|
|
|
35
|
-
|
|
25
|
+
```bash
|
|
26
|
+
# Find every issue in "dependencies" or "devDependencies"
|
|
27
|
+
syncpack lint --dependency-types prod,dev
|
|
28
|
+
# Look for issues in dependencies containing "react" in the name
|
|
29
|
+
syncpack lint --dependencies '**react**'
|
|
30
|
+
# Autofix the above issues
|
|
31
|
+
syncpack fix --dependencies '**react**'
|
|
32
|
+
# Find issues everywhere except "peerDependencies"
|
|
33
|
+
syncpack lint --dependency-types '!peer'
|
|
34
|
+
# Only look for issues where an exact version is used
|
|
35
|
+
syncpack lint --specifier-types exact
|
|
36
|
+
# Only look for issues where an exact version is specified
|
|
37
|
+
syncpack lint --specifier-types exact
|
|
38
|
+
# Sort dependencies by how many times they are used
|
|
39
|
+
syncpack lint --sort count
|
|
40
|
+
# Show a lot more detail about the issues
|
|
41
|
+
syncpack lint --show hints,ignored,instances,statuses
|
|
42
|
+
# See more examples
|
|
43
|
+
syncpack lint --help
|
|
44
|
+
syncpack fix --help
|
|
45
|
+
# See a short summary of options
|
|
46
|
+
syncpack lint -h
|
|
47
|
+
syncpack fix -h
|
|
48
|
+
```
|
|
36
49
|
|
|
37
|
-
### [
|
|
50
|
+
### [update](https://jamiemason.github.io/syncpack/command/update)
|
|
38
51
|
|
|
39
|
-
|
|
52
|
+
Update packages to the latest versions from the npm registry, wherever they are in your monorepo.<br/>Semver range preferences are preserved when updating.
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
#### Examples
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
```bash
|
|
57
|
+
# Accept any update in latest (x.x.x)
|
|
58
|
+
syncpack update --target latest
|
|
59
|
+
# Only update minor versions (1.x.x)
|
|
60
|
+
syncpack update --target minor
|
|
61
|
+
# Only update patch versions (1.2.x)
|
|
62
|
+
syncpack update --target patch
|
|
63
|
+
# Check for outdated dependencies in one package
|
|
64
|
+
syncpack update --check --source 'packages/pingu/package.json'
|
|
65
|
+
# Update dependencies and devDependencies in the whole monorepo
|
|
66
|
+
syncpack update --dependency-types dev,prod
|
|
67
|
+
# Only update dependencies with a semver range specifier (^, ~, etc.)
|
|
68
|
+
syncpack update --specifier-types range
|
|
69
|
+
# Update dependencies where name exactly matches 'react'
|
|
70
|
+
syncpack update --dependencies 'react'
|
|
71
|
+
# Update dependencies where name contains 'react'
|
|
72
|
+
syncpack update --dependencies '**react**'
|
|
73
|
+
# Update dependencies with the '@aws-sdk' scope
|
|
74
|
+
syncpack update --dependencies '@aws-sdk/**'
|
|
75
|
+
# See more examples
|
|
76
|
+
syncpack update --help
|
|
77
|
+
# See a short summary of options
|
|
78
|
+
syncpack update -h
|
|
79
|
+
```
|
|
44
80
|
|
|
45
|
-
### [
|
|
81
|
+
### [format](https://jamiemason.github.io/syncpack/command/format)
|
|
46
82
|
|
|
47
|
-
|
|
83
|
+
Organise package.json files according to a conventional format, where fields appear in a predictable order and nested fields are ordered alphabetically. Shorthand properties are used where available, such as the `"repository"` and `"bugs"` fields.
|
|
48
84
|
|
|
49
|
-
|
|
85
|
+
#### Examples
|
|
50
86
|
|
|
51
|
-
|
|
87
|
+
```bash
|
|
88
|
+
# Fix every formatting issue in the monorepo
|
|
89
|
+
syncpack format
|
|
90
|
+
# List all formatting issues in the monorepo
|
|
91
|
+
syncpack format --check
|
|
92
|
+
# Check the formatting of one package
|
|
93
|
+
syncpack format --check --source 'packages/pingu/package.json'
|
|
94
|
+
# See more examples
|
|
95
|
+
syncpack format --help
|
|
96
|
+
# See a short summary of options
|
|
97
|
+
syncpack format -h
|
|
98
|
+
```
|
|
52
99
|
|
|
53
100
|
## Badges
|
|
54
101
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syncpack",
|
|
3
3
|
"description": "Consistent dependency versions in large JavaScript Monorepos",
|
|
4
|
-
"version": "14.0.0-alpha.
|
|
4
|
+
"version": "14.0.0-alpha.11",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bugs": "https://github.com/JamieMason/syncpack/issues",
|
|
7
7
|
"contributors": [
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"syncpack": "./index.cjs"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"syncpack-linux-x64": "14.0.0-alpha.
|
|
73
|
-
"syncpack-linux-arm64": "14.0.0-alpha.
|
|
74
|
-
"syncpack-darwin-x64": "14.0.0-alpha.
|
|
75
|
-
"syncpack-darwin-arm64": "14.0.0-alpha.
|
|
76
|
-
"syncpack-windows-x64": "14.0.0-alpha.
|
|
77
|
-
"syncpack-windows-arm64": "14.0.0-alpha.
|
|
72
|
+
"syncpack-linux-x64": "14.0.0-alpha.11",
|
|
73
|
+
"syncpack-linux-arm64": "14.0.0-alpha.11",
|
|
74
|
+
"syncpack-darwin-x64": "14.0.0-alpha.11",
|
|
75
|
+
"syncpack-darwin-arm64": "14.0.0-alpha.11",
|
|
76
|
+
"syncpack-windows-x64": "14.0.0-alpha.11",
|
|
77
|
+
"syncpack-windows-arm64": "14.0.0-alpha.11"
|
|
78
78
|
},
|
|
79
79
|
"types": "./syncpack.d.ts"
|
|
80
80
|
}
|