-
Notifications
You must be signed in to change notification settings - Fork 82
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
Emit .d.ts to dist/ on build via "declaration" in tsconfig.json #323
Conversation
Codecov Report
@@ Coverage Diff @@
## main #323 +/- ##
=======================================
Coverage 92.09% 92.09%
=======================================
Files 26 26
Lines 1872 1872
Branches 392 392
=======================================
Hits 1724 1724
Misses 102 102
Partials 46 46 Continue to review full report at Codecov.
|
I'm curious to understand the use case here. So I assume you have a project where you want to load the transformers from a TypeScript node-based setup and execute jscodeshift from your side? |
We've built some codemods (in Typescript) that transform some internal testing infrastructure using some of the utils in jest-codemods. We initially added them directly to a fork of this project but it'd be much cleaner to use parts of jest-codemods as a library instead. We upstreamed the Sinon codemod cuz that'd be helpful to others. But the rest wouldn't be (cuz the code they transform isn't publicly available). |
Correct me if I'm wrong @danbeam but I believe we are mostly (only?) using stuff from the utils directory in this way. I see things like this: import finale from 'jest-codemods/dist/utils/finale';
import { findParentOfType } from 'jest-codemods/dist/utils/recast-helpers';
import { modifyVariableDeclaration } from 'jest-codemods/dist/utils/sinon-helpers'; and this: import { api } from 'jest-codemods/dist/utils/test-helpers'; |
Thanks for the additional context. I always wondered if some of the utilities here should be shipped as a separate package. Especially the code mod CLI part that is now powering a lot of codemods (by copy pasting this and improving it). :) |
This is a small followup to skovhus#323 Using ^ will allow projects that consume this package as a dependency to be more flexible with the versions of these dependencies.
* Use ^ semver ranges for dependencies This is a small followup to #323 Using ^ will allow projects that consume this package as a dependency to be more flexible with the versions of these dependencies. * Bump version to 0.29 Co-authored-by: Kenneth Skovhus <[email protected]>
This is so folks can consume this code in a more type safe way.
cc @catc @lencioni