This codemod helps in tranformation, related to some import packages.
In v5, the project was maintained as a large set of sub-packages managed as a monorepo.
In v6 all imports are available in the root package, and for those who wish to have finer-grained control, the pkg.exports makes certain folders available directly.
Example
Before
import { InfuraProvider } from '@ethersproject/providers';
After
import { InfuraProvider } from 'ethers/providers';
,
Before
// in v5, some packages were grouped behind an additional propertyimport { providers } from "ethers"// And then we could retrieve the below packageconst { InfuraProvider } = providers;// PS: this codemod transforms the above line only,// import line in this before claus had to be removed manually
After
// Everything is available on the root packageimport { InfuraProvider } from 'ethers';
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community