question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modification Cornucopia

See original GitHub issue

Hi. I recently used ts-migrate, in conjunction with my own codemod runner, to migrate large portions of my codebase to TS. It was fun!

Along the way, I made a series of modifications to make ts-migrate work for my repo. Some of them are likely specific to my idiosyncrasies, but some may be generally applicable. I’ll list them here, and you can tell me which, if any, you’re interested in. I’ll then carve individual PRs for the pieces you want.

Change List

Here’s the full set of changes, but it’s a bit noisy because some of it is things I’d never recommend merging / it’s not cleaned up for you. So I’ll also link to individual commits in the list below, but it’s not always a 1:1 mapping 🤪 .

Anyway, lmk if you’re interested in any of this. 😄

Task Tracking

Completed Changes

  • TS update to 4.7 – looks like someone got there before me. 😄

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
NickHeinercommented, May 22, 2022

Cool – I’ll probably have time to do some of these PRs in a month or so. Or anyone else is welcome to make an attempt in the meantime. 😄

Also, I recently ran into issues that I think are attributable to a stale tsbuildinfo after updating the compilerOptions in tsconfig. This may account for some instances where ts-migrate inserted ts-expect-errors unnecessarily, or failed to insert some that were needed. I don’t have a bulletproof repro yet, but it may be safer for ts-migrate to delete tsbuildinfo before building the TS project, to avoid any such risks.

1reaction
devinrhode2commented, Jun 21, 2022

@NickHeiner all those setup steps ran without warnings or errors, but when I finally ran yarn run ts-migrate locally, it was as if ts-migrate was not actually installed.

I did have success using verdaccio instead:

npm install --global verdaccio@6-next
verdaccio

Publish forked package locally:

git clone https://github.com/devinrhode2/ts-migrate.git ts-migrate-devin
cd ts-migrate-devin
git checkout nth/tvui-modifications-rebased-by-devin
yarn install
yarn run bootstrap
yarn run build
npm adduser --registry http://localhost:4873
YARN_REGISTRY=http://localhost:4873 yarn lerna publish

finally:

YARN_REGISTRY=http://localhost:4873 yarn add ts-migrate --dev
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vintage 60's Mod Cornucopia Rhinestone Ring Two Tone Horn
This Rings item by SultanaVintageJewels has 6 favorites from Etsy shoppers. Ships from Tucson, AZ. Listed on Oct 30, 2022.
Read more >
Organics' Relationship to Climate Change - Cornucopia Institute
Scientists and experts studying climate agree that climate change is a serious problem for current and future populations.
Read more >
"Designing Food, Owning the Cornucopia" by Thomas C ...
Imagine for purposes of discussion that the technology for designing and building an actual cornucopia—something that embodies code, genetically modified ...
Read more >
OWASP Cornucopia
Cornucopia Ecommerce Website Edition is based the concepts and game ideas in EoP, but those have been modified to be more relevant to...
Read more >
Cornucopia Educator Guide - California Academy of Sciences
Cornucopia is a game about food systems, ... Digital games like Cornucopia allow students to apply the content they've ... D Global Climate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found