@npmcli/template-oss 4.21.0 → 4.21.2

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.
@@ -27,6 +27,7 @@ runs:
27
27
  shell: bash
28
28
  env:
29
29
  NODE_VERSION: $\{{ inputs.node }}
30
+ working-directory: $\{{ runner.temp }}
30
31
  run: |
31
32
  MATCH=""
32
33
  SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6")
@@ -21,4 +21,5 @@ updates:
21
21
  {{#each labels }}
22
22
  - "{{ . }}"
23
23
  {{/each}}
24
+ open-pull-requests-limit: 10
24
25
  {{/each}}
@@ -199,10 +199,10 @@ module.exports = {
199
199
  },
200
200
  allowedPackages: [],
201
201
  changelogTypes: [
202
- { type: 'feat', section: 'Features', hidden: false },
203
- { type: 'fix', section: 'Bug Fixes', hidden: false },
204
- { type: 'docs', section: 'Documentation', hidden: false },
205
- { type: 'deps', section: 'Dependencies', hidden: false },
206
- { type: 'chore', section: 'Chores', hidden: false },
202
+ { type: 'feat', section: 'Features', hidden: false, collapse: false },
203
+ { type: 'fix', section: 'Bug Fixes', hidden: false, collapse: false },
204
+ { type: 'docs', section: 'Documentation', hidden: false, collapse: false },
205
+ { type: 'deps', section: 'Dependencies', hidden: false, collapse: false },
206
+ { type: 'chore', section: 'Chores', hidden: false, collapse: false },
207
207
  ],
208
208
  }
@@ -6,6 +6,7 @@ class Changelog {
6
6
  #title
7
7
  #entries = {}
8
8
  #types = new Set([Changelog.BREAKING])
9
+ #sections = {}
9
10
  #titles = {
10
11
  [Changelog.BREAKING]: '⚠️ BREAKING CHANGES',
11
12
  }
@@ -14,6 +15,7 @@ class Changelog {
14
15
  this.#title = `## ${url ? link(version, url) : version} (${formatDate()})`
15
16
  for (const section of sections) {
16
17
  this.#types.add(section.type)
18
+ this.#sections[section.type] = section
17
19
  this.#titles[section.type] = section.section
18
20
  }
19
21
  }
@@ -26,6 +28,18 @@ class Changelog {
26
28
  this.#entries[type].push(...entries)
27
29
  }
28
30
 
31
+ #getEntries (type) {
32
+ const section = this.#sections[type]
33
+ const entries = this.#entries[type].map(list)
34
+ // Ignoring coverage until we use this again
35
+ /* istanbul ignore next */
36
+ if (section?.collapse) {
37
+ entries.unshift('<details><summary>Commits</summary>\n')
38
+ entries.push('\n</details>')
39
+ }
40
+ return entries.join('\n')
41
+ }
42
+
29
43
  toString () {
30
44
  const body = [this.#title]
31
45
  for (const type of this.#types) {
@@ -33,7 +47,7 @@ class Changelog {
33
47
  if (this.#entries[type]?.length) {
34
48
  body.push(
35
49
  `### ${title}`,
36
- this.#entries[type].map(list).join('\n')
50
+ this.#getEntries(type)
37
51
  )
38
52
  }
39
53
  }
@@ -5,14 +5,13 @@ const { TagName } = require('release-please/build/src/util/tag-name.js')
5
5
  const { ROOT_PROJECT_PATH } = require('release-please/build/src/manifest.js')
6
6
  const { DEPS, link, wrapSpecs } = require('./util.js')
7
7
 
8
- const WORKSPACE_MESSAGE = (name, version) => `${DEPS}(workspace): ${name}@${version}`
9
- const WORKSPACE_SCOPE = /(?<scope>workspace): `?(?<name>\S+?)[@\s](?<version>\S+?)`?$/gm
10
-
8
+ /* istanbul ignore next: TODO fix flaky tests and enable coverage */
11
9
  module.exports = class extends ManifestPlugin {
12
- static WORKSPACE_MESSAGE = WORKSPACE_MESSAGE
10
+ static WORKSPACE_MESSAGE = (name, version) => `${DEPS}(workspace): ${name}@${version}`
13
11
 
14
12
  #releasesByPackage = new Map()
15
13
  #pathsByComponent = new Map()
14
+ #WORKSPACE_SCOPE = /(?<scope>workspace): `?(?<name>\S+?)[@\s](?<version>\S+?)`?$/gm
16
15
 
17
16
  async preconfigure (strategiesByPath) {
18
17
  // First build a list of all releases that will happen based on
@@ -44,7 +43,7 @@ module.exports = class extends ManifestPlugin {
44
43
  // Update notes with a link to each workspaces release notes
45
44
  // now that we have all of the releases in a single pull request
46
45
  release.notes =
47
- release.notes.replace(WORKSPACE_SCOPE, (...args) => {
46
+ release.notes.replace(this.#WORKSPACE_SCOPE, (...args) => {
48
47
  const { scope, name, version } = args.pop()
49
48
  const { path, component } = this.#releasesByPackage.get(name)
50
49
  const { tagSeparator, includeVInTag } = this.repositoryConfig[path]
@@ -10,6 +10,7 @@ const { WORKSPACE_MESSAGE } = require('./node-workspace-format')
10
10
  // not be easy to land. For now we extend the base plugin and add one method
11
11
  // which is much better than previously when we needed to fork and maintain
12
12
  // release-please ourselves.
13
+ /* istanbul ignore next: TODO fix flaky tests and enable coverage */
13
14
  class NpmNodeWorkspace extends NodeWorkspace {
14
15
  async preconfigure (strategiesByPath, commitsByPath, releasesByPath) {
15
16
  // First build a list of all releases that will happen based on the
@@ -15,6 +15,7 @@ const NodeWorkspace = require('./node-workspace.js')
15
15
  const NodeWorkspaceFormat = require('./node-workspace-format.js')
16
16
  const { getPublishTag, noop } = require('./util.js')
17
17
 
18
+ /* istanbul ignore next: TODO fix flaky tests and enable coverage */
18
19
  class ReleasePlease {
19
20
  #token
20
21
  #owner
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.21.0",
3
+ "version": "4.21.2",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {