@npmcli/template-oss 4.21.1 → 4.21.3
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/lib/content/index.js
CHANGED
|
@@ -203,6 +203,6 @@ module.exports = {
|
|
|
203
203
|
{ type: 'fix', section: 'Bug Fixes', hidden: false, collapse: false },
|
|
204
204
|
{ type: 'docs', section: 'Documentation', hidden: false, collapse: false },
|
|
205
205
|
{ type: 'deps', section: 'Dependencies', hidden: false, collapse: false },
|
|
206
|
-
{ type: 'chore', section: 'Chores', hidden: false, collapse:
|
|
206
|
+
{ type: 'chore', section: 'Chores', hidden: false, collapse: false },
|
|
207
207
|
],
|
|
208
208
|
}
|
package/lib/release/changelog.js
CHANGED
|
@@ -31,6 +31,8 @@ class Changelog {
|
|
|
31
31
|
#getEntries (type) {
|
|
32
32
|
const section = this.#sections[type]
|
|
33
33
|
const entries = this.#entries[type].map(list)
|
|
34
|
+
// Ignoring coverage until we use this again
|
|
35
|
+
/* istanbul ignore next */
|
|
34
36
|
if (section?.collapse) {
|
|
35
37
|
entries.unshift('<details><summary>Commits</summary>\n')
|
|
36
38
|
entries.push('\n</details>')
|
|
@@ -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
|
-
|
|
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 =
|
|
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]
|
|
@@ -54,28 +53,6 @@ module.exports = class extends ManifestPlugin {
|
|
|
54
53
|
return `${link(scope, url)}: ${wrapSpecs(`${name}@${version}`)}`
|
|
55
54
|
})
|
|
56
55
|
|
|
57
|
-
// remove the other release please dependencies list which always starts with
|
|
58
|
-
// the following line and then each line is indented. so we search for the line
|
|
59
|
-
// and remove and indented lines until the next non indented line.
|
|
60
|
-
let foundRemoveStart = false
|
|
61
|
-
let foundRemoveEnd = false
|
|
62
|
-
release.notes = release.notes
|
|
63
|
-
.split('\n')
|
|
64
|
-
.filter((line) => {
|
|
65
|
-
if (line === '* The following workspace dependencies were updated') {
|
|
66
|
-
foundRemoveStart = true
|
|
67
|
-
} else if (foundRemoveStart && !foundRemoveEnd) {
|
|
68
|
-
// TODO: test when inserted dependencies is not the last thing in the changelog
|
|
69
|
-
/* istanbul ignore next */
|
|
70
|
-
if (!line || !line.startsWith(' ')) {
|
|
71
|
-
foundRemoveEnd = true
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// If we found the start, remove all lines until we've found the end
|
|
75
|
-
return foundRemoveStart ? foundRemoveEnd : true
|
|
76
|
-
})
|
|
77
|
-
.join('\n')
|
|
78
|
-
|
|
79
56
|
// Find the associated changelog and update that too
|
|
80
57
|
const path = this.#pathsByComponent.get(release.component)
|
|
81
58
|
for (const update of candidate.pullRequest.updates) {
|
|
@@ -10,7 +10,15 @@ 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 {
|
|
15
|
+
updateCandidate (pr) {
|
|
16
|
+
// no-op so release-please node-workspace plugin does not add
|
|
17
|
+
// its broken changelog to the workspace releases. our changelog
|
|
18
|
+
// formatting and the preconfigure method below fix this.
|
|
19
|
+
return pr
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
async preconfigure (strategiesByPath, commitsByPath, releasesByPath) {
|
|
15
23
|
// First build a list of all releases that will happen based on the
|
|
16
24
|
// conventional commits
|
|
@@ -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
|