Skip to content

Commit 4b1daa8

Browse files
authored
Merge branch 'master' into ulises/clean-up
2 parents c3d5804 + a480150 commit 4b1daa8

20 files changed

+391
-122
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Lint Markdown'
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
- run: npm i
15+
- run: npm test

.gitignore

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# vitepress build output
108+
**/.vitepress/dist
109+
110+
# vitepress cache directory
111+
**/.vitepress/cache
112+
113+
# Docusaurus cache and generated files
114+
.docusaurus
115+
116+
# Serverless directories
117+
.serverless/
118+
119+
# FuseBox cache
120+
.fusebox/
121+
122+
# DynamoDB Local files
123+
.dynamodb/
124+
125+
# TernJS port file
126+
.tern-port
127+
128+
# Stores VSCode versions used for testing VSCode extensions
129+
.vscode-test
130+
131+
# yarn v2
132+
.yarn/cache
133+
.yarn/unplugged
134+
.yarn/build-state.yml
135+
.yarn/install-state.gz
136+
.pnp.*

.markdownlint-cli2.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"globs": [
3+
"**/*.md"
4+
],
5+
"ignores": [
6+
".github/**",
7+
"node_modules/**"
8+
]
9+
}

.markdownlint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# for reference, see https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
2+
3+
# Default state for all rules
4+
default: true
5+
6+
# MD013/line-length - Line length
7+
MD013: false
8+
9+
# MD033/no-inline-html - Inline HTML
10+
MD033:
11+
allowed_elements: ['kbd', 'sup']

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

docs/CHARTER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Express is made of many modules spread between three GitHub Orgs:
3030

3131
Section Intentionally Left Blank
3232

33-
## Section 2: Relationship with OpenJS Foundation CPC.
33+
## Section 2: Relationship with OpenJS Foundation CPC
3434

3535
Technical leadership for the projects within the OpenJS Foundation is
3636
delegated to the projects through their project charters by the OpenJS
@@ -89,4 +89,4 @@ Section Intentionally Left Blank
8989

9090
## Section 5: Definitions
9191

92-
Section Intentionally Left Blank
92+
Section Intentionally Left Blank

docs/GOVERNANCE.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,17 @@ project for at least 6 months as a committer prior to the request. They should h
135135
helped with code contributions as well as triaging issues. They are also required to
136136
have 2FA enabled on both their GitHub and npm accounts.
137137

138-
Any TC member or an existing captain on the **same** repo can nominate another committer
139-
to the captain role. To do so, they should submit a PR to this document, updating the
140-
**Active Project Captains** section (while maintaining the sort order) with the project
138+
Any TC member or an existing captain on the **same** repo can nominate another committer
139+
to the captain role. To do so, they should submit a PR to this document, updating the
140+
**Active Project Captains** section (while maintaining the sort order) with the project
141141
name, the nominee's GitHub handle, and their npm username (if different).
142-
- Repos can have as many captains as make sense for the scope of work.
143-
- A TC member or an existing repo captain **on the same project** can nominate a new captain.
142+
143+
* Repos can have as many captains as make sense for the scope of work.
144+
* A TC member or an existing repo captain **on the same project** can nominate a new captain.
144145
Repo captains from other projects should not nominate captains for a different project.
145146

146-
The PR will require at least 2 approvals from TC members and 2 weeks hold time to allow
147-
for comment and/or dissent. When the PR is merged, a TC member will add them to the
147+
The PR will require at least 2 approvals from TC members and 2 weeks hold time to allow
148+
for comment and/or dissent. When the PR is merged, a TC member will add them to the
148149
proper GitHub/npm groups.
149150

150151
### Active Projects and Captains
@@ -181,4 +182,4 @@ By making a contribution to this project, I certify that:
181182
personal information I submit with it, including my sign-off) is
182183
maintained indefinitely and may be redistributed consistent with
183184
this project or the open source license(s) involved.
184-
```
185+
```

docs/LTS-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939

4040
### Release calendar
4141

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.

docs/adr/adr-template.md renamed to docs/adr/000-adr-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the base template that we use
44

55
```md
66

7-
# ADR [Number]: [Title of Decision]
7+
# ADR [PR Number]: [Title of Decision]
88

99
## Status
1010

docs/adr/002-policy-on-using-caret-with-dependencies.md renamed to docs/adr/290-using-caret-with-dependencies.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff 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`
22

33
## Status
4-
Proposed
4+
5+
Accepted
56

67
## Submitters
8+
79
- Ulises Gascón (@UlisesGascon)
810

911
## Decision Owners
12+
1013
- Express TC (@expressjs/express-tc)
1114

1215
## Context
16+
1317
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.
1418

1519
**Why do we need this decision?**
@@ -19,36 +23,44 @@ Clarifying the policy on using caret (`^`) helps to ensure consistency across th
1923
This decision aims to reduce the maintenance burden of frequently updating pinned dependencies.
2024

2125
**Are there any existing issues/discussions/pull requests related to this?**
26+
2227
- [Discussion: Using caret (^) with our own dependencies #279](https://github.com/expressjs/discussions/issues/279)
2328
- [expressjs/express#6017 (comment)](https://github.com/expressjs/express/issues/6017)
2429

2530
## Decision
31+
2632
We will adopt a policy where the caret (`^`) symbol is used for dependencies all dependencies.
2733

2834
**What will be done?**
35+
2936
- Update the `package.json` files to use `^` for all dependencies (both prod and dev).
3037

3138
**Note on `^` vs. `~`:**
39+
3240
- `^` 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`.
3341
- `~` 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].
3442

3543
**What will not be done?**
44+
3645
- 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.
3746

3847
## Rationale
3948

4049
**Alternatives Considered:**
50+
4151
- **Alternative:** Continue pinning all dependencies, including internal ones, to specific versions.
4252
- **Reason for rejection:** This approach requires frequent updates and increases the maintenance burden, as each minor or patch update requires a new release.
4353

4454
**Pros and Cons**:
4555

4656
**Pros**:
57+
4758
- Reduces the number of PRs for updating our own dependencies.
4859
- Allows for quicker adoption of minor and patch updates within the Express ecosystem.
4960
- Users are still protected by lockfiles, mitigating the risk of regressions.
5061

5162
**Cons**:
63+
5264
- There is still a risk of minor regressions from updates, even within internally managed dependencies.
5365
- Requires discipline in maintaining lockfiles to ensure stability for end users.
5466

@@ -58,14 +70,17 @@ This decision strikes a balance between reducing maintenance effort and managing
5870
## Consequences
5971

6072
**Positive Impact**:
73+
6174
- Fewer manual updates required for internally managed dependencies.
6275
- Users benefit from improvements and fixes in internal packages more quickly.
6376

6477
**Negative Impact**:
78+
6579
- Potential risk of regressions if an internal dependency introduces a breaking change in a minor update.
6680
- Users relying on strict version control may need to adjust their expectations when using our own dependencies.
6781

6882
**Mitigations**:
83+
6984
- Strong test coverage and CI checks will help catch potential issues early.
7085
- Clear communication in documentation and release notes to inform users of the updated dependency policy.
7186
- 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
7691
- **Phase 2**: Review and adjust documentation to include the new policy on dependency versioning.
7792

7893
## References
94+
7995
- [NPM semver documentation](https://docs.npmjs.com/cli/v6/using-npm/semver)
8096

8197
## Changelog
98+
8299
- **[2024-10-22]**: @UlisesGascon - Initial draft of ADR for using caret (`^`) or tilde (`~`) with our own dependencies.

0 commit comments

Comments
 (0)