Skip to content

Commit a203491

Browse files
committed
Merge remote-tracking branch 'npm/latest' into prefix-package-name-in-title
2 parents 42ab45f + e20424b commit a203491

477 files changed

Lines changed: 39538 additions & 12005 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/backport.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Backport
2+
3+
on:
4+
pull_request_target:
5+
types: [closed, labeled]
6+
# TODO: Remove before merging — manual trigger for testing from any branch
7+
workflow_dispatch:
8+
inputs:
9+
pr_number:
10+
description: 'Merged PR number to test backporting'
11+
required: true
12+
type: number
13+
14+
permissions:
15+
actions: write
16+
contents: write
17+
pull-requests: write
18+
19+
jobs:
20+
backport:
21+
name: Backport
22+
runs-on: ubuntu-latest
23+
# Run when a labeled PR is merged, or when a backport label is added to an already-merged PR.
24+
# Uses pull_request_target so the token has write access even for PRs from forks.
25+
if: >-
26+
github.repository_owner == 'npm' &&
27+
github.event.pull_request.merged == true &&
28+
(
29+
(github.event.action == 'closed' &&
30+
contains(join(github.event.pull_request.labels.*.name, ','), 'backport:'))
31+
||
32+
(github.event.action == 'labeled' &&
33+
startsWith(github.event.label.name, 'backport:'))
34+
)
35+
defaults:
36+
run:
37+
shell: bash
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v6
41+
with:
42+
fetch-depth: 0
43+
- name: Setup Git User
44+
run: |
45+
git config --global user.email "npm-cli+bot@github.com"
46+
git config --global user.name "npm CLI robot"
47+
- name: Create Backports
48+
uses: actions/github-script@v7
49+
env:
50+
MERGE_COMMIT_SHA: ${{ github.event.pull_request.merge_commit_sha }}
51+
with:
52+
script: |
53+
const backport = require('./scripts/backport.js')
54+
await backport({ github, context, core })
55+
56+
# TODO: Remove before merging — manual test job
57+
backport-test:
58+
name: Backport (Test)
59+
if: github.event_name == 'workflow_dispatch'
60+
runs-on: ubuntu-latest
61+
defaults:
62+
run:
63+
shell: bash
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v6
67+
with:
68+
fetch-depth: 0
69+
- name: Setup Git User
70+
run: |
71+
git config --global user.email "npm-cli+bot@github.com"
72+
git config --global user.name "npm CLI robot"
73+
- name: Create Backports
74+
uses: actions/github-script@v7
75+
with:
76+
script: |
77+
const { data: pr } = await github.rest.pulls.get({
78+
owner: context.repo.owner,
79+
repo: context.repo.repo,
80+
pull_number: ${{ inputs.pr_number }},
81+
})
82+
83+
if (!pr.merged) {
84+
return core.setFailed('PR #${{ inputs.pr_number }} is not merged')
85+
}
86+
87+
process.env.MERGE_COMMIT_SHA = pr.merge_commit_sha
88+
89+
const backport = require('./scripts/backport.js')
90+
await backport({
91+
github,
92+
core,
93+
context: {
94+
...context,
95+
payload: { action: 'closed', pull_request: pr },
96+
},
97+
})

.github/workflows/ci-libnpmaccess.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmdiff.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmexec.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmfund.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmorg.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmpack.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmpublish.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmsearch.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

.github/workflows/ci-libnpmteam.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
node-version: 22.x
4343
check-latest: contains('22.x', '.x')
4444
cache: npm
45-
- name: Install Latest npm
46-
uses: ./.github/actions/install-latest-npm
47-
with:
48-
node: ${{ steps.node.outputs.node-version }}
4945
- name: Check Git Status
5046
run: node scripts/git-dirty.js
5147
- name: Reset Deps
@@ -106,10 +102,6 @@ jobs:
106102
node-version: ${{ matrix.node-version }}
107103
check-latest: contains(matrix.node-version, '.x')
108104
cache: npm
109-
- name: Install Latest npm
110-
uses: ./.github/actions/install-latest-npm
111-
with:
112-
node: ${{ steps.node.outputs.node-version }}
113105
- name: Check Git Status
114106
run: node scripts/git-dirty.js
115107
- name: Reset Deps

0 commit comments

Comments
 (0)