ts-migrate
jscodeshift

ts-migrate | jscodeshift | |
---|---|---|
16 | 28 | |
5,571 | 9,729 | |
0.2% | 0.5% | |
0.7 | 7.6 | |
about 1 month ago | 2 months ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ts-migrate
-
From React to TypeScript, Simplifying Migration with ts-migrate
Update tsconfig. Replace the content of tsconfig.json with the values from tsconfig.base.json.
-
How to Do a TypeScript Conversion: an opinionated take on gradual conversions
Airbnb converted many millions of lines gradually using automation and wrote about it:
https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-...
And also open sourced the tooling:
https://github.com/airbnb/ts-migrate
-
Declaring static json imported "as const"
Are you migrating with ts-migrate?
-
A Comparison of Node.js Environment Managers
When you migrate your entire project over to TypeScript, errors like "undefined is not a function", syntax errors, or reference errors should no longer exist in your codebase. Thankfully, this is not as daunting as it sounds. Migrating your entire Node.js application to TypeScript can be done incrementally so that you can start reaping the rewards immediately in crucial parts of the codebase. You can also adopt a tool like ts-migrate if you intend to perform the migration in one go.
-
How We Migrated from Javascript and Flow to TypeScript at Osome
Flow to ts — helps to produce raw migration from Flow to TS files and reduces monkey job. TS migrate — helps convert JS files to Typescript files. A great introduction can be found here.
- Should a team of one (me) with some TS experience attempt to refactor a mid-size fullstack app (React & Node) to TypeScript?
-
The Best Integration Testing Library for Serverless Projects Now Supports Typescript!
💡 I typed it using ts-migrate ts-migrate is a tool I strongly recommend. It's been developed by Airbnb to help to migrate easily JavaScript projects to TypeScript.
-
Should I migrate to TS?
When you decide to migrate, I recommend checking https://github.com/airbnb/ts-migrate may speed few migration steps (but it wont solve missing types/interfaces)
-
How to Overcome Your TypeScriptoPhobia
You can use AirBnb's ts-migrate tool or try a more direct tactic following the Migrating from JavaScript guide.
-
[AskJS] Would a Javascript to Typescript Converter Be Useful?
Take a look at https://github.com/airbnb/ts-migrate
jscodeshift
-
Building a JSON Parser from scratch with JS 🤯
A parser can have various applications in everyday life, and you probably use some parser daily. Babel, webpack, eslint, prettier, and jscodeshift. All of them, behind the scenes, run a parser that manipulates an Abstract Syntax Tree (AST) to do what you need - we'll talk about that later, don't worry.
-
[AskJS] Can anyone recommend a test runner with ESM and Custom Loader Support?
OP: If this is an avenue you feel like entertaining, here are some nice codemod tools that could ease the transition for you: CodeQue, Subsecond, and the old standard jscodeshift.
-
[AskJS] Are there any tools to help automatically update imports when splitting typescript libraries in a Monorepo?
If that isn't enough or you find issues with it, the current de-facto standard for codemods is jscodeshift. You'll write more code, but at least you only have to write it once.
-
env: node\r: No such file or directory
Here is the pull request https://github.com/facebook/jscodeshift/pull/549
- Criando um Parser de JSON do zero
-
Show HN: Starter.place – Gumroad for Starter Repos
Those are important but tough problems!
1. I feel like codemods and a setup shell prompt are the best solution to this, but this looks different for each language (eg, in JS there is https://github.com/facebook/jscodeshift). I could make UI around that for listers to provide parts of the app that should replaced and buyers to provide values for it, but it could be quite a rabbit hole. This is actually why I show the README for the repos, so users can see if the setup steps are comprehensive before buying (for paid ones).
2. I agree atomic commits can help someone navigate a new codebase. In the same spirit as my response to #1, I don't feel confident I could enforce this, but I could surface the commits on the starter repo page so potential buyers could see if the author laid things out well.
Thanks for the ideas!
-
Automatic Dependency Upgrade Tool (with auto-resolve breaking changes)
That's why I've been working on a tool that automatically upgrades major versions of libraries with breaking changes, the idea is to simplify the process and save developers time and effort by having a bank of transformers (using codemod & jscodeshift) and open source them:
-
Effective Refactoring with Codemods
JSCodeshift: A toolkit for running and writing codemods.
- Launch HN: FlyCode (YC S22) – Let product teams edit web apps without coding
-
JARVIS – Write me a Codemod
jscodeshift
What are some alternatives?
TypeStat - Converts JavaScript to TypeScript and TypeScript to better TypeScript. 🧫
react-codemod - React codemod scripts
flow-to-ts - Convert flow code to typescript
putout - 🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
flow-to-typescript-codemod - Codemod Stripe used to migrate 6.5m+ lines of code from Flow to TypeScript
Acorn - A small, fast, JavaScript-based JavaScript parser
