express-version-route 1.2.15 → 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.
- package/.github/scripts/setup-npm.sh +16 -0
- package/.github/scripts/setup-yarn.sh +18 -0
- package/.github/workflows/main.yml +8 -0
- package/.npm-version +1 -0
- package/CONTRIBUTING.md +12 -0
- package/package.json +3 -2
|
@@ -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/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-version-route",
|
|
3
|
-
"version": "1.2.
|
|
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
|
}
|