-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature]: Restore Access to Utility Functions in "jest-snapshot/utils" for Continued Tooling Support #15036
Comments
@SimenB do you object we re-expose these functions/types? |
Perhaps the utils could simply be published as separate |
I'm ok with either approach. @SimenB, what's your take? |
Separate util package makes sense to me 👍 Happy to take a PR to that effect 🙂 |
@SimenB, a few follow-up questions regarding splitting the utils into its own package Circular ReferenceIs it correct to assume that you would prefer the In
Re-evaluationGiven these issues, do we still favor splitting |
In TypeScript repo they have public and internal utilities. Perhaps similar strategy could be adopted? I mean, the new package could exposing only By the way, I think UPDATE: Or |
Moving |
sorry for the delay, I am back to this issue now. One more question, given the |
The old ones don't as they predate our ownership of the |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
Please consider re-exposing the following functions and corresponding types in
jest-snapshot/utils.ts
to enable tools likevscode-jest
andjest-editor-support
to retrieve snapshot content by test names effectively:In jest-snapshot version 27.x, these utilities were fully accessible at jest-snapshot/utils, facilitating robust tool integration. However, versions 28.x and 29.x have restricted access to these functions/types, significantly impacting tool functionality and integration.
Motivation
The primary motivation for this request is to maintain backward compatibility with existing features in community tools, such as the "view snapshot" feature in vscode-jest. This functionality, along with others, enables users to view, update, run, and debug snapshots for individual tests, is crucial for enhancing the user experience in VSCode's Jest integration.
Example
For instance, the
jest-editor-support
library uses functions likegetSnapshotData
andtestNameToKey
from jest-snapshot/utils to retrieve snapshot content. Here's how it's implemented in getSnapshotContent and getMetadataPitch
I understand the concerns about exposing unnecessary functions. However, considering their existing use within the tooling community, unless there is a better alternative, could we consider re-exposing these utility functions/types? If you agree with this proposal, I could submit a PR shortly.
The text was updated successfully, but these errors were encountered: