You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/LTS-strategy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,4 +39,4 @@
39
39
40
40
### Release calendar
41
41
42
-
* There is a regular cadence of semver major releases (details TBD). However, if no breaking changes were introduced between the last semver major and the scheduled date of the release of the new one, the new semver major release is skipped.
42
+
* There is a regular cadence of semver major releases (details TBD). However, if no breaking changes were introduced between the last semver major and the scheduled date of the release of the new one, the new semver major release is skipped.
Copy file name to clipboardExpand all lines: docs/adr/290-using-caret-with-dependencies.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
-
# ADR 002: Policy on Using Caret (`^`) or tilde (`~`) with Dependencies in `package.json`
1
+
# ADR #290: Policy on Using Caret (`^`) or tilde (`~`) with Dependencies in `package.json`
2
2
3
3
## Status
4
-
Proposed
4
+
5
+
Accepted
5
6
6
7
## Submitters
8
+
7
9
- Ulises Gascón (@UlisesGascon)
8
10
9
11
## Decision Owners
12
+
10
13
- Express TC (@expressjs/express-tc)
11
14
12
15
## Context
16
+
13
17
Historically, the Express project has avoided using the caret (`^`) in the `package.json` files for its own dependencies. This proposal aims to review whether this practice should continue or if adjustments are needed.
14
18
15
19
**Why do we need this decision?**
@@ -19,36 +23,44 @@ Clarifying the policy on using caret (`^`) helps to ensure consistency across th
19
23
This decision aims to reduce the maintenance burden of frequently updating pinned dependencies.
20
24
21
25
**Are there any existing issues/discussions/pull requests related to this?**
26
+
22
27
-[Discussion: Using caret (^) with our own dependencies #279](https://github.com/expressjs/discussions/issues/279)
We will adopt a policy where the caret (`^`) symbol is used for dependencies all dependencies.
27
33
28
34
**What will be done?**
35
+
29
36
- Update the `package.json` files to use `^` for all dependencies (both prod and dev).
30
37
31
38
**Note on `^` vs. `~`:**
39
+
32
40
-`^` allows updates to the most recent minor or patch version, offering greater flexibility and reducing the need for frequent manual updates. For example, `^1.2.3` will accept updates to `1.3.0`, `1.4.0`, but not `2.0.0`.
33
41
-`~` is more conservative, only allowing updates to patch versions. For example, `~1.2.3` will accept updates to `1.2.4`, `1.2.5`, but not `1.3.0`. Some Node.js legacy versions only support this, like [email protected].
34
42
35
43
**What will not be done?**
44
+
36
45
- We won't force to use `^` or `~` for any dependency if there is a reason to use a pinned version and it is properly documented.
37
46
38
47
## Rationale
39
48
40
49
**Alternatives Considered:**
50
+
41
51
-**Alternative:** Continue pinning all dependencies, including internal ones, to specific versions.
42
52
-**Reason for rejection:** This approach requires frequent updates and increases the maintenance burden, as each minor or patch update requires a new release.
43
53
44
54
**Pros and Cons**:
45
55
46
56
**Pros**:
57
+
47
58
- Reduces the number of PRs for updating our own dependencies.
48
59
- Allows for quicker adoption of minor and patch updates within the Express ecosystem.
49
60
- Users are still protected by lockfiles, mitigating the risk of regressions.
50
61
51
62
**Cons**:
63
+
52
64
- There is still a risk of minor regressions from updates, even within internally managed dependencies.
53
65
- Requires discipline in maintaining lockfiles to ensure stability for end users.
54
66
@@ -58,14 +70,17 @@ This decision strikes a balance between reducing maintenance effort and managing
58
70
## Consequences
59
71
60
72
**Positive Impact**:
73
+
61
74
- Fewer manual updates required for internally managed dependencies.
62
75
- Users benefit from improvements and fixes in internal packages more quickly.
63
76
64
77
**Negative Impact**:
78
+
65
79
- Potential risk of regressions if an internal dependency introduces a breaking change in a minor update.
66
80
- Users relying on strict version control may need to adjust their expectations when using our own dependencies.
67
81
68
82
**Mitigations**:
83
+
69
84
- Strong test coverage and CI checks will help catch potential issues early.
70
85
- Clear communication in documentation and release notes to inform users of the updated dependency policy.
71
86
- Ensure that we are following strict semver when releasing our own libraries.
@@ -76,7 +91,9 @@ This decision strikes a balance between reducing maintenance effort and managing
76
91
-**Phase 2**: Review and adjust documentation to include the new policy on dependency versioning.
0 commit comments