Skip to content

Remove tap, replace with vitest#312

Merged
pvdz merged 27 commits intomainfrom
vitest_poc
Feb 26, 2025
Merged

Remove tap, replace with vitest#312
pvdz merged 27 commits intomainfrom
vitest_poc

Conversation

@pvdz
Copy link
Contributor

@pvdz pvdz commented Feb 7, 2025

Remove tap, replace it with vitest.

Updated tests accordingly.

Inline snapshots here we come!

@jdalton
Copy link
Contributor

jdalton commented Feb 7, 2025

Reduces the bug workarounds for tap 🎉 ! Let's see how discussions shake out over the next week!

Copy link
Contributor

@jdalton jdalton left a comment

Choose a reason for hiding this comment

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

Okay. Let's do this.

@socket-security
Copy link

socket-security bot commented Feb 25, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@vitest/coverage-v8@3.0.7 Transitive: environment, filesystem, shell +53 7.84 MB antfu, oreanno, patak, ...1 more
npm/vitest@3.0.7 Transitive: environment, filesystem, network, shell, unsafe +66 260 MB

🚮 Removed packages: npm/@tapjs/run@4.0.2, npm/custompatch@1.1.4

View full report↗︎

Have feedback? Participate in our User Experience Survey 📊

@socket-security-staging
Copy link

socket-security-staging bot commented Feb 25, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@vitest/coverage-v8@3.0.7 Transitive: environment, filesystem, shell +53 7.83 MB vitestbot
npm/vitest@3.0.7 environment, eval Transitive: filesystem, network, shell, unsafe +66 265 MB vitestbot

🚮 Removed packages: npm/@tapjs/run@4.0.2, npm/custompatch@1.1.4

View full report↗︎

@jdalton
Copy link
Contributor

jdalton commented Feb 26, 2025

AbortController is built-in to Node. It's also a browser standard. Node and its APIs accept the signal

const controller = new AbortController();
const signal = controller.signal;

as a way to abort requests or operations.

The registry and CLI share an abortSignal that is wired through things that will abort when 'signal-exit' fires its onExit callback. This works for things like Ctrl^C and other stuff making for clean CLI exits.

We should run Vitest without JSDOM if possible.

// Lazily access constants.ENV[TAP].
!!constants.ENV[TAP]
// Lazily access constants.ENV[VITEST].
!!constants.ENV[VITEST]
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer need to add this as it's added before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the TAP one is redundant too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gonna merge. if redundant we can drop it in a separate PR. it doesnt seem to block right now

@pvdz pvdz marked this pull request as ready for review February 26, 2025 10:53
@pvdz pvdz changed the title POC for migrating tap to vitest Remove tap, replace with vitest Feb 26, 2025
@pvdz pvdz merged commit 89fc476 into main Feb 26, 2025
15 checks passed
@pvdz pvdz deleted the vitest_poc branch February 26, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants