@npmcli/template-oss 4.26.1 → 4.27.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.
package/lib/config.js CHANGED
@@ -131,6 +131,7 @@ const getFullConfig = async ({
131
131
 
132
132
  // test runner configuration
133
133
  const isNodeTest = pkgConfig.testRunner === 'node:test'
134
+ const coverageThreshold = pkgConfig.coverageThreshold ?? 100
134
135
 
135
136
  // all derived keys
136
137
  const derived = {
@@ -173,6 +174,7 @@ const getFullConfig = async ({
173
174
  deleteJsExt: esm ? 'js' : 'cjs',
174
175
  // test runner
175
176
  isNodeTest,
177
+ coverageThreshold,
176
178
  // tap
177
179
  // 18 and up doesn't like nyc-arg
178
180
  tap18: !isNodeTest && semver.coerce(pkg.pkgJson?.devDependencies?.tap)?.major >= 18,
@@ -18,9 +18,9 @@
18
18
  "postlint": "template-oss-check",
19
19
  "template-oss-apply": "template-oss-apply --force",
20
20
  {{#if isNodeTest}}
21
- "snap": "node --test --test-update-snapshots",
22
- "test": "node --test",
23
- "test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100",
21
+ "snap": "node --test --test-update-snapshots ./test/**/*.js",
22
+ "test": "node --test ./test/**/*.js",
23
+ "test:cover": "node --test --experimental-test-coverage --test-timeout=3000{{#if coverageThreshold}} --test-coverage-lines={{coverageThreshold}} --test-coverage-functions={{coverageThreshold}} --test-coverage-branches={{coverageThreshold}}{{/if}} ./test/**/*.js",
24
24
  {{else}}
25
25
  "snap": "{{#if typescript}}{{#if tap16}}c8 {{/if}}{{/if}}tap",
26
26
  "test": "{{#if typescript}}{{#if tap16}}c8 {{/if}}{{/if}}tap",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.26.1",
3
+ "version": "4.27.0",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {