@npmcli/template-oss 4.28.1 → 4.30.0

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.
@@ -12,7 +12,7 @@ strategy:
12
12
  os: macos-latest
13
13
  shell: bash
14
14
  - name: macOS
15
- os: macos-13
15
+ os: macos-15-intel
16
16
  shell: bash
17
17
  {{/if}}
18
18
  {{#if windowsCI}}
@@ -27,7 +27,8 @@ strategy:
27
27
  {{#if macCI}}
28
28
  exclude:
29
29
  {{#each ciVersions}}
30
- - platform: {name: macOS, os: macos-{{#if (lte (semverRangeMajor .) 14)}}latest{{else}}13{{/if}}, shell: bash}
30
+ {{!-- M1 macs do not have builds of node 14 and below --}}
31
+ - platform: {name: macOS, os: {{#if (lte (semverRangeMajor .) 14)}}macos-latest{{else}}macos-15-intel{{/if}}, shell: bash}
31
32
  node-version: {{ . }}
32
33
  {{/each}}
33
34
  {{/if}}
@@ -58,6 +58,15 @@ class ReleaseManager {
58
58
  pull_number: this.#pr,
59
59
  })
60
60
 
61
+ // Auto-detect backport from the PR base branch if not explicitly set
62
+ if (!this.#backport) {
63
+ const match = pullRequest.base.ref.match(/^release\/v(\d+)$/)
64
+ if (match) {
65
+ this.#backport = match[1]
66
+ this.#info(`Auto-detected backport=${this.#backport} from base branch ${pullRequest.base.ref}`)
67
+ }
68
+ }
69
+
61
70
  const [release, workspaces] = await this.#getPrReleases({ pullRequest })
62
71
  const releaseItems = await this.#getReleaseProcess({ release, workspaces })
63
72
 
@@ -163,8 +172,12 @@ class ReleaseManager {
163
172
 
164
173
  async #getReleaseProcess({ release, workspaces }) {
165
174
  const RELEASE_LIST_ITEM = /^\d+\.\s/gm
175
+ const isBackport = !!this.#backport
166
176
 
167
177
  this.#info(`Fetching release process from repo wiki: ${this.#owner}/${this.#repo}`)
178
+ if (isBackport) {
179
+ this.#info(`Release is a backport (backport=${this.#backport})`)
180
+ }
168
181
 
169
182
  const releaseProcess = await fetch(
170
183
  `https://raw.githubusercontent.com/wiki/${this.#owner}/${this.#repo}/Release-Process.md`,
@@ -203,6 +216,10 @@ class ReleaseManager {
203
216
  return false
204
217
  }
205
218
 
219
+ if (isBackport && item.includes('<!-- NOT FOR BACKPORT -->')) {
220
+ return false
221
+ }
222
+
206
223
  if (!workspaces.length && item.includes('Publish workspaces')) {
207
224
  return false
208
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.28.1",
3
+ "version": "4.30.0",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "author": "GitHub Inc.",
35
35
  "license": "ISC",
36
36
  "dependencies": {
37
- "@actions/core": "^1.9.1",
37
+ "@actions/core": "^2.0.0",
38
38
  "@commitlint/cli": "^20.1.0",
39
39
  "@commitlint/config-conventional": "^20.0.0",
40
40
  "@isaacs/string-locale-compare": "^1.1.0",