@npmcli/template-oss 4.23.6 → 4.24.1
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/package-json.hbs +13 -1
- package/lib/release/node-workspace-format.js +3 -1
- package/lib/release/release-manager.js +2 -1
- package/lib/release/release-please.js +3 -1
- package/lib/release/semver-versioning-strategy.js +2 -1
- package/lib/util/import-or-require.js +10 -1
- package/package.json +14 -12
|
@@ -40,13 +40,24 @@
|
|
|
40
40
|
},
|
|
41
41
|
"templateVersion": {{{ del }}},
|
|
42
42
|
"standard": {{{ del }}},
|
|
43
|
+
"nyc": {{#if tap18}}{
|
|
44
|
+
"exclude": {{{ json workspaceGlobs }}}
|
|
45
|
+
}{{else}}{{{ del }}}{{/if}},
|
|
43
46
|
"tap": {
|
|
47
|
+
{{#if tap18}}
|
|
48
|
+
{{#if workspaceGlobs}}
|
|
49
|
+
"exclude": {{{ json workspaceGlobs }}},
|
|
50
|
+
{{/if}}
|
|
51
|
+
"test-ignore": {{{ del }}},
|
|
52
|
+
{{else}}
|
|
53
|
+
"exclude": {{{ del }}},
|
|
44
54
|
{{#if workspacePaths}}
|
|
45
55
|
"exclude": {{#if tap18}}[
|
|
46
|
-
"{{
|
|
56
|
+
"{{ json workspaceGlobs }}"
|
|
47
57
|
]{{else }}{{{ del }}}{{/if}},
|
|
48
58
|
"test-ignore": {{#if tap18}}{{{ del }}}{{else}}"^({{ join workspacePaths "|" }})/"{{/if}},
|
|
49
59
|
{{/if}}
|
|
60
|
+
{{/if}}
|
|
50
61
|
{{#if typescript}}
|
|
51
62
|
{{#if tap16}}
|
|
52
63
|
"coverage": false,
|
|
@@ -57,6 +68,7 @@
|
|
|
57
68
|
],
|
|
58
69
|
{{/if}}
|
|
59
70
|
{{/if}}
|
|
71
|
+
"show-full-coverage": {{#if tap18}}true{{else}}{{{ del }}}{{/if}},
|
|
60
72
|
"nyc-arg": {{#if tap18}}{{{ del }}}{{else}}[
|
|
61
73
|
{{#each workspaceGlobs}}
|
|
62
74
|
"--exclude",
|
|
@@ -5,7 +5,8 @@ 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, list } = require('./util.js')
|
|
7
7
|
|
|
8
|
-
/*
|
|
8
|
+
/* TODO fix flaky tests and enable coverage */
|
|
9
|
+
/* c8 ignore start */
|
|
9
10
|
module.exports = class extends ManifestPlugin {
|
|
10
11
|
static WORKSPACE_MESSAGE = (name, version) => `${DEPS}(workspace): ${name}@${version}`
|
|
11
12
|
|
|
@@ -95,3 +96,4 @@ module.exports = class extends ManifestPlugin {
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
}
|
|
99
|
+
/* c8 ignore end */
|
|
@@ -165,13 +165,14 @@ class ReleaseManager {
|
|
|
165
165
|
// If the url fails with anything but a 404 we want the process to blow
|
|
166
166
|
// up because that means something is very wrong. This is a rare edge
|
|
167
167
|
// case that isn't worth testing.
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
if (r.statusCode === 200) {
|
|
170
170
|
this.#info('Found release process from wiki')
|
|
171
171
|
return r.body.text()
|
|
172
172
|
} else if (r.statusCode === 404) {
|
|
173
173
|
this.#info('No release process found in wiki, falling back to default process')
|
|
174
174
|
return this.#getReleaseSteps()
|
|
175
|
+
/* c8 ignore next 3 */
|
|
175
176
|
} else {
|
|
176
177
|
throw new Error(`Release process fetch failed with status: ${r.statusCode}`)
|
|
177
178
|
}
|
|
@@ -9,7 +9,8 @@ const NodeWorkspaceFormat = require('./node-workspace-format.js')
|
|
|
9
9
|
const { getPublishTag, noop } = require('./util.js')
|
|
10
10
|
const { SemverVersioningStrategy } = require('./semver-versioning-strategy.js')
|
|
11
11
|
|
|
12
|
-
/*
|
|
12
|
+
/* TODO fix flaky tests and enable coverage */
|
|
13
|
+
/* c8 ignore start */
|
|
13
14
|
class ReleasePlease {
|
|
14
15
|
#token
|
|
15
16
|
#owner
|
|
@@ -163,5 +164,6 @@ class ReleasePlease {
|
|
|
163
164
|
return releases.length ? releases : null
|
|
164
165
|
}
|
|
165
166
|
}
|
|
167
|
+
/* c8 ignore end */
|
|
166
168
|
|
|
167
169
|
module.exports = ReleasePlease
|
|
@@ -59,10 +59,11 @@ class SemverVersioningStrategy {
|
|
|
59
59
|
const releaseType = parseCommits(commits)
|
|
60
60
|
const addPreIfNeeded = prerelease ? `pre${releaseType}` : releaseType
|
|
61
61
|
const version = inc(currentVersion.toString(), addPreIfNeeded, tag)
|
|
62
|
-
/*
|
|
62
|
+
/* c8 ignore start */
|
|
63
63
|
if (!version) {
|
|
64
64
|
throw new Error('Could not bump version')
|
|
65
65
|
}
|
|
66
|
+
/* c8 ignore stop */
|
|
66
67
|
return Version.parse(version)
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -14,9 +14,18 @@ const importOrRequire = async path => {
|
|
|
14
14
|
let content = {}
|
|
15
15
|
try {
|
|
16
16
|
content = require(path)
|
|
17
|
+
// this is for node 22+
|
|
18
|
+
/* c8 ignore start */
|
|
19
|
+
if (content.__esModule) {
|
|
20
|
+
return content.default
|
|
21
|
+
}
|
|
22
|
+
/* c8 ignore end */
|
|
17
23
|
} catch {
|
|
18
24
|
try {
|
|
19
|
-
|
|
25
|
+
// this is for node under 20
|
|
26
|
+
const results = await import(pathToFileURL(path))
|
|
27
|
+
// istanbul ignore next
|
|
28
|
+
return results.default
|
|
20
29
|
} catch {
|
|
21
30
|
// its ok if this fails since the content dir might only be to provide
|
|
22
31
|
// other files. the index.js is optional
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/template-oss",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.1",
|
|
4
4
|
"description": "templated files used in npm CLI team oss projects",
|
|
5
5
|
"main": "lib/content/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -73,20 +73,17 @@
|
|
|
73
73
|
"eslint-config-prettier": "^9.1.0",
|
|
74
74
|
"nock": "^13.3.8",
|
|
75
75
|
"prettier": "^3.2.5",
|
|
76
|
-
"tap": "^
|
|
76
|
+
"tap": "^21.0.1"
|
|
77
77
|
},
|
|
78
78
|
"tap": {
|
|
79
79
|
"timeout": 600,
|
|
80
|
-
"nyc-arg": [
|
|
81
|
-
"--exclude",
|
|
82
|
-
"workspace/test-workspace/**",
|
|
83
|
-
"--exclude",
|
|
84
|
-
"tap-snapshots/**"
|
|
85
|
-
],
|
|
86
|
-
"test-ignore": "^(workspace/test-workspace)/",
|
|
87
80
|
"node-arg": [
|
|
88
81
|
"--no-experimental-fetch"
|
|
89
|
-
]
|
|
82
|
+
],
|
|
83
|
+
"exclude": [
|
|
84
|
+
"workspace/test-workspace/**"
|
|
85
|
+
],
|
|
86
|
+
"show-full-coverage": true
|
|
90
87
|
},
|
|
91
88
|
"templateOSS": {
|
|
92
89
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
@@ -94,9 +91,14 @@
|
|
|
94
91
|
"prettier": true
|
|
95
92
|
},
|
|
96
93
|
"engines": {
|
|
97
|
-
"node": "^
|
|
94
|
+
"node": "^20.17.0 || >=22.9.0"
|
|
98
95
|
},
|
|
99
96
|
"workspaces": [
|
|
100
97
|
"workspace/test-workspace"
|
|
101
|
-
]
|
|
98
|
+
],
|
|
99
|
+
"nyc": {
|
|
100
|
+
"exclude": [
|
|
101
|
+
"workspace/test-workspace/**"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
102
104
|
}
|