express-version-route 1.2.14 → 1.2.16

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.
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
4
+ cd "$repo_root"
5
+ if [[ -f .npm-version ]]; then
6
+ npm_version="$(cat .npm-version)"
7
+ else
8
+ npm_version="$(node -p "require('./package.json').packageManager.slice(4)")"
9
+ fi
10
+ [[ "$npm_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Expected an exact npm version" >&2; exit 1; }
11
+ config=(--min-release-age=30)
12
+ if [[ -f .npmrc ]]; then
13
+ config+=(--userconfig "$repo_root/.npmrc")
14
+ fi
15
+ npm install --global --ignore-scripts "${config[@]}" "npm@$npm_version"
16
+ [[ "$(npm --version)" == "$npm_version" ]]
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
4
+ cd "$repo_root"
5
+ package_manager="$(node -p "require('./package.json').packageManager")"
6
+ [[ "$package_manager" =~ ^yarn@[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Expected an exact Yarn version" >&2; exit 1; }
7
+ config=(--min-release-age=30)
8
+ if [[ -f .npmrc ]]; then
9
+ config+=(--userconfig "$repo_root/.npmrc")
10
+ fi
11
+ # Use an isolated prefix rather than replacing runner-provided binaries.
12
+ yarn_prefix="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/pinned-yarn"
13
+ npm install --global --prefix "$yarn_prefix" --ignore-scripts "${config[@]}" "$package_manager"
14
+ export PATH="$yarn_prefix/bin:$PATH"
15
+ if [[ -n "${GITHUB_PATH:-}" ]]; then
16
+ echo "$yarn_prefix/bin" >> "$GITHUB_PATH"
17
+ fi
18
+ [[ "$(yarn --version)" == "${package_manager#yarn@}" ]]
@@ -19,6 +19,10 @@ jobs:
19
19
  - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
20
20
  with:
21
21
  node-version: ${{ matrix.node }}
22
+ - name: Set up pinned npm
23
+ run: bash "${{ github.workspace }}/.github/scripts/setup-npm.sh"
24
+ - name: Set up pinned Yarn
25
+ run: bash "${{ github.workspace }}/.github/scripts/setup-yarn.sh"
22
26
  - name: install dependencies
23
27
  run: yarn install --ignore-engines
24
28
  - name: run tests
@@ -48,6 +52,10 @@ jobs:
48
52
  - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
49
53
  with:
50
54
  node-version: '24.x'
55
+ - name: Set up pinned npm
56
+ run: bash "${{ github.workspace }}/.github/scripts/setup-npm.sh"
57
+ - name: Set up pinned Yarn
58
+ run: bash "${{ github.workspace }}/.github/scripts/setup-yarn.sh"
51
59
  - name: install dependencies
52
60
  run: yarn install --ignore-engines
53
61
  - name: release
package/.npm-version ADDED
@@ -0,0 +1 @@
1
+ 11.21.0
package/AGENTS.md ADDED
@@ -0,0 +1,35 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI coding agents working in this repository.
4
+
5
+ ## Start Here
6
+
7
+ Before making changes, read:
8
+
9
+ - `CONTRIBUTING.md` for contribution, PR, testing, commit, and agent-specific expectations.
10
+ - `RELEASE.md` for release workflow details.
11
+ - `README.md` for user-facing behavior, install/use examples, and package or app overview.
12
+ - `docs/README.md` for the project documentation index.
13
+ - `docs/development.md` for local setup and development workflows.
14
+ - `docs/testing.md` for test strategy, commands, and verification expectations.
15
+ - `docs/architecture.md` for project structure, boundaries, and important invariants.
16
+ - `docs/conventions.md` for project-specific coding, documentation, and maintenance conventions.
17
+
18
+ Treat those files as the source of truth. Do not duplicate or reinterpret their rules here.
19
+
20
+ ## Documentation
21
+
22
+ - Keep documentation in sync when changing behavior, public interfaces, workflows, architecture, configuration, or operational assumptions.
23
+ - Put project-specific development details in `docs/`; keep root files focused on their standard audiences.
24
+ - Prefer linking to the source of truth over duplicating long instructions across files.
25
+ - When adding new docs, link them from `docs/README.md` and update this file only when they become important entry points for future agents.
26
+
27
+ ## PRs and Issues
28
+
29
+ - Follow PR, issue, and agent-labeling rules in `CONTRIBUTING.md`.
30
+ - Use the issue-linking format specified in `CONTRIBUTING.md`.
31
+
32
+ ## Releases
33
+
34
+ - Follow `RELEASE.md` for release workflow and changeset creation steps.
35
+ - If this project uses changesets, treat `RELEASE.md` and any changeset guidance in `CONTRIBUTING.md` as authoritative.
package/CONTRIBUTING.md CHANGED
@@ -72,3 +72,15 @@ If any of the above doesn't work on a fresh checkout, that's a bug, please open
72
72
  If you are an AI coding agent or automated bot opening a PR, please add 🤖🤖🤖 to the end of the PR title. This helps maintainers triage agent-authored contributions and is a baseline expectation for this repo — PRs without the marker that turn out to be automated may be closed without review.
73
73
 
74
74
  The same applies to issues: prefix the title with 🤖🤖🤖 if it was opened by an agent on your behalf.
75
+ ## Package-manager pin
76
+
77
+ CI uses Yarn Classic, pinned by `package.json#packageManager`.
78
+ The auxiliary npm version used for tooling is pinned in `.npm-version`.
79
+ Run `bash .github/scripts/setup-npm.sh` and then
80
+ `bash .github/scripts/setup-yarn.sh` to install those exact versions.
81
+ The Yarn setup writes its bin directory to `GITHUB_PATH` in CI; locally add
82
+ `${TMPDIR:-/tmp}/pinned-yarn/bin` to your `PATH` before running Yarn.
83
+
84
+ Upgrade the pins in a maintenance PR, choose releases at least 30 days old,
85
+ and run the project checks. The bootstrap keeps `.npmrc` policies enabled.
86
+ Periodic upgrade automation is not configured.
package/README.md CHANGED
@@ -163,6 +163,10 @@ Several npm projects exist which provide similar API versioning capabilities to
163
163
  * https://github.com/elliotttf/express-versioned-routes
164
164
  * https://github.com/biowink/express-route-versioning
165
165
 
166
+ ## Documentation
167
+
168
+ - [Project documentation](./docs/README.md) - development, testing, architecture, and conventions.
169
+
166
170
  ## Contributing
167
171
 
168
172
  Please consult [CONTRIBUTING](./CONTRIBUTING.md) for guidelines on contributing to this project.
package/RELEASE.md ADDED
@@ -0,0 +1,22 @@
1
+ # Release
2
+
3
+ This project uses [Changesets](https://github.com/changesets/changesets) for versioning and release notes.
4
+
5
+ ## Release Flow
6
+
7
+ 1. Ensure all intended changes are merged and CI is green.
8
+ 2. Run `yarn version` to apply Changesets version and changelog updates.
9
+ 3. Review the generated package and changelog changes.
10
+ 4. Run the release command, if configured for the repository.
11
+
12
+ No root `release` script is currently defined. Use the repository's publishing workflow or add one before publishing.
13
+
14
+ ## Changesets
15
+
16
+ Add a changeset for user-facing package behavior changes:
17
+
18
+ ```sh
19
+ yarn changeset
20
+ ```
21
+
22
+ Documentation-only, test-only, and internal refactor PRs usually do not need a changeset unless they describe or accompany a release-worthy behavior change.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-version-route",
3
- "version": "1.2.14",
3
+ "version": "1.2.16",
4
4
  "description": "provides middleware to load controllers based on api versions",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -140,5 +140,6 @@
140
140
  "engines": {
141
141
  "node": ">=24.0.0",
142
142
  "npm": ">=11.10.0"
143
- }
143
+ },
144
+ "packageManager": "yarn@1.22.22"
144
145
  }