Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: tap@21.0.1 #498

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,17 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 18.17.0
- 18.x
- 20.5.0
- 20.17.0
- 20.x
- 22.9.0
- 22.x
exclude:
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.5.0
node-version: 20.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.9.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.x
runs-on: ${{ matrix.platform.os }}
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 18.17.0
- 18.x
- 20.5.0
- 20.17.0
- 20.x
- 22.9.0
- 22.x
exclude:
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.5.0
node-version: 20.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.9.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.x
runs-on: ${{ matrix.platform.os }}
Expand Down
12 changes: 12 additions & 0 deletions lib/content/package-json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,24 @@
},
"templateVersion": {{{ del }}},
"standard": {{{ del }}},
"nyc": {{#if tap18}}{
"exclude": {{{ json workspaceGlobs }}}
}{{else}}{{{ del }}}{{/if}},
"tap": {
{{#if tap18}}
{{#if workspaceGlobs}}
"exclude": {{{ json workspaceGlobs }}},
{{/if}}
"test-ignore": {{{ del }}},
{{else}}
"exclude": {{{ del }}},
{{#if workspacePaths}}
"exclude": {{#if tap18}}[
"{{ join workspaceGlobs "," }}"
]{{else }}{{{ del }}}{{/if}},
"test-ignore": {{#if tap18}}{{{ del }}}{{else}}"^({{ join workspacePaths "|" }})/"{{/if}},
{{/if}}
{{/if}}
{{#if typescript}}
{{#if tap16}}
"coverage": false,
Expand All @@ -57,6 +68,7 @@
],
{{/if}}
{{/if}}
"show-full-coverage": {{#if tap18}}true{{else}}{{{ del }}}{{/if}},
"nyc-arg": {{#if tap18}}{{{ del }}}{{else}}[
{{#each workspaceGlobs}}
"--exclude",
Expand Down
4 changes: 3 additions & 1 deletion lib/release/node-workspace-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const { TagName } = require('release-please/build/src/util/tag-name.js')
const { ROOT_PROJECT_PATH } = require('release-please/build/src/manifest.js')
const { DEPS, link, wrapSpecs, list } = require('./util.js')

/* istanbul ignore next: TODO fix flaky tests and enable coverage */
/* TODO fix flaky tests and enable coverage */
/* c8 ignore start */
module.exports = class extends ManifestPlugin {
static WORKSPACE_MESSAGE = (name, version) => `${DEPS}(workspace): ${name}@${version}`

Expand Down Expand Up @@ -95,3 +96,4 @@ module.exports = class extends ManifestPlugin {
}
}
}
/* c8 ignore end */
3 changes: 2 additions & 1 deletion lib/release/release-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ class ReleaseManager {
// If the url fails with anything but a 404 we want the process to blow
// up because that means something is very wrong. This is a rare edge
// case that isn't worth testing.
/* istanbul ignore else */

if (r.statusCode === 200) {
this.#info('Found release process from wiki')
return r.body.text()
} else if (r.statusCode === 404) {
this.#info('No release process found in wiki, falling back to default process')
return this.#getReleaseSteps()
/* c8 ignore next 3 */
} else {
throw new Error(`Release process fetch failed with status: ${r.statusCode}`)
}
Expand Down
4 changes: 3 additions & 1 deletion lib/release/release-please.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const NodeWorkspaceFormat = require('./node-workspace-format.js')
const { getPublishTag, noop } = require('./util.js')
const { SemverVersioningStrategy } = require('./semver-versioning-strategy.js')

/* istanbul ignore next: TODO fix flaky tests and enable coverage */
/* TODO fix flaky tests and enable coverage */
/* c8 ignore start */
class ReleasePlease {
#token
#owner
Expand Down Expand Up @@ -163,5 +164,6 @@ class ReleasePlease {
return releases.length ? releases : null
}
}
/* c8 ignore end */

module.exports = ReleasePlease
3 changes: 2 additions & 1 deletion lib/release/semver-versioning-strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ class SemverVersioningStrategy {
const releaseType = parseCommits(commits)
const addPreIfNeeded = prerelease ? `pre${releaseType}` : releaseType
const version = inc(currentVersion.toString(), addPreIfNeeded, tag)
/* istanbul ignore next */
/* c8 ignore start */
if (!version) {
throw new Error('Could not bump version')
}
/* c8 ignore stop */
return Version.parse(version)
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/util/import-or-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ const importOrRequire = async path => {
} catch {
try {
content = await import(pathToFileURL(path)).then(r => r.default)
/* c8 ignore start */
} catch {
// its ok if this fails since the content dir might only be to provide
// other files. the index.js is optional
}
/* c8 ignore end */
}
importOrRequireCache.set(path, content)
return content
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,32 @@
"eslint-config-prettier": "^9.1.0",
"nock": "^13.3.8",
"prettier": "^3.2.5",
"tap": "^16.0.0"
"tap": "^21.0.1"
},
"tap": {
"timeout": 600,
"nyc-arg": [
"--exclude",
"workspace/test-workspace/**",
"--exclude",
"tap-snapshots/**"
],
"test-ignore": "^(workspace/test-workspace)/",
"node-arg": [
"--no-experimental-fetch"
]
],
"exclude": [
"workspace/test-workspace/**"
],
"show-full-coverage": true
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"publish": true,
"prettier": true
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
"node": "^20.17.0 || >=22.9.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some digging cause I was wondering if this was a semver major. It's not.

~/D/n/c/b/gar_npx-cache (gar/npx-cache|✚1) $ npm view semver devDependencies["@npmcli/template-oss"]
4.22.0
~/D/n/c/b/gar_npx-cache (gar/npx-cache|✚1) $ npm view semver engines
{ node: '>=10' }
~/D/n/c/b/gar_npx-cache (gar/npx-cache|✚1) $ npm view @npmcli/template-oss@4.22.0 engines
{ node: '^18.17.0 || >=20.5.0' }

This got updated previously w/o a semver major. 4.0.0 was node 16 engines.

The last engines update was a feat. I asked the same question about engines there, and Luke answered it. Yay.

^20.17.0 is higher than >=20.5.0 so we're good there w/ all the packages that still have the node 18 engines entry.

Having sad all that, what are your thoughts on isolating the engines bump into a feat: commit?

},
"workspaces": [
"workspace/test-workspace"
]
],
"nyc": {
"exclude": [
"workspace/test-workspace/**"
]
}
}
18 changes: 9 additions & 9 deletions tap-snapshots/test/apply/files-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/apply/files-snapshots.js TAP private workspace > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > private workspace > promise must resolve to match snapshot 1`] = `
.commitlintrc.js
.eslintrc.js
.github/actions/create-check/action.yml
Expand Down Expand Up @@ -42,7 +42,7 @@ workspaces/b/.gitignore
workspaces/b/package.json
`

exports[`test/apply/files-snapshots.js TAP turn off add/rm types > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > turn off add/rm types > promise must resolve to match snapshot 1`] = `
.commitlintrc.js
.github/actions/create-check/action.yml
.github/actions/install-latest-npm/action.yml
Expand All @@ -65,7 +65,7 @@ package.json
release-please-config.json
`

exports[`test/apply/files-snapshots.js TAP turn off module > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > turn off module > promise must resolve to match snapshot 1`] = `
.commitlintrc.js
.github/actions/create-check/action.yml
.github/actions/install-latest-npm/action.yml
Expand All @@ -88,7 +88,7 @@ package.json
release-please-config.json
`

exports[`test/apply/files-snapshots.js TAP turn off repo > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > turn off repo > promise must resolve to match snapshot 1`] = `
.eslintrc.js
.gitignore
.npmrc
Expand All @@ -98,11 +98,11 @@ package.json
SECURITY.md
`

exports[`test/apply/files-snapshots.js TAP turn off root > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > turn off root > promise must resolve to match snapshot 1`] = `
package.json
`

exports[`test/apply/files-snapshots.js TAP turn off specific files > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > turn off specific files > promise must resolve to match snapshot 1`] = `
.eslintrc.yml
.github/actions/create-check/action.yml
.github/actions/install-latest-npm/action.yml
Expand Down Expand Up @@ -131,7 +131,7 @@ release-please-config.json
SECURITY.md
`

exports[`test/apply/files-snapshots.js TAP workspaces > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > workspaces > promise must resolve to match snapshot 1`] = `
.github/actions/create-check/action.yml
.github/actions/install-latest-npm/action.yml
.github/dependabot.yml
Expand All @@ -158,7 +158,7 @@ workspaces/d/.gitignore
workspaces/d/package.json
`

exports[`test/apply/files-snapshots.js TAP workspaces only (like npm/cli) > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > workspaces only (like npm/cli) > promise must resolve to match snapshot 1`] = `
.github/actions/create-check/action.yml
.github/actions/install-latest-npm/action.yml
.github/dependabot.yml
Expand All @@ -182,7 +182,7 @@ workspaces/b/.gitignore
workspaces/b/package.json
`

exports[`test/apply/files-snapshots.js TAP workspaces with relative content path > expect resolving Promise 1`] = `
exports[`test/apply/files-snapshots.js > TAP > workspaces with relative content path > promise must resolve to match snapshot 1`] = `
content_dir/index.js
content_dir2/index.js
package.json
Expand Down
10 changes: 5 additions & 5 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/apply/source-snapshots.js TAP root only > expect resolving Promise 1`] = `
exports[`test/apply/source-snapshots.js > TAP > root only > promise must resolve to match snapshot 1`] = `
.commitlintrc.js
========================================
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
Expand Down Expand Up @@ -1426,7 +1426,7 @@ If the vulnerability you have found is [in scope for the GitHub Bug Bounty Progr
Thanks for helping make GitHub safe for everyone.
`

exports[`test/apply/source-snapshots.js TAP with content path > expect resolving Promise 1`] = `
exports[`test/apply/source-snapshots.js > TAP > with content path > promise must resolve to match snapshot 1`] = `
content_dir/index.js
========================================
module.exports={}
Expand All @@ -1444,7 +1444,7 @@ package.json
}
`

exports[`test/apply/source-snapshots.js TAP with workspaces > expect resolving Promise 1`] = `
exports[`test/apply/source-snapshots.js > TAP > with workspaces > promise must resolve to match snapshot 1`] = `
.commitlintrc.js
========================================
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
Expand Down Expand Up @@ -3272,7 +3272,7 @@ workspaces/b/package.json
}
`

exports[`test/apply/source-snapshots.js TAP workspaces only > expect resolving Promise 1`] = `
exports[`test/apply/source-snapshots.js > TAP > workspaces only > promise must resolve to match snapshot 1`] = `
.github/actions/create-check/action.yml
========================================
# This file is automatically added by @npmcli/template-oss. Do not edit.
Expand Down Expand Up @@ -4636,7 +4636,7 @@ workspaces/b/package.json
}
`

exports[`test/apply/source-snapshots.js TAP workspaces with nested content path > expect resolving Promise 1`] = `
exports[`test/apply/source-snapshots.js > TAP > workspaces with nested content path > promise must resolve to match snapshot 1`] = `
content_dir/index.js
========================================
module.exports={}
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/bin/check.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/bin/check.js TAP problems > must match snapshot 1`] = `
exports[`test/bin/check.js > TAP > problems > must match snapshot 1`] = `

Some problems were detected:

Expand Down
Loading
Loading