Skip to content

Instantly share code, notes, and snippets.

View dlebedynskyi's full-sized avatar

Dima Lebedynskyi dlebedynskyi

View GitHub Profile
@dlebedynskyi
dlebedynskyi / import-transform.js
Last active September 12, 2022 21:12
jscodeshift transform to update imports from one package to another
module.exports.parser = 'tsx';
module.exports = function transformer(file, api, options) {
const j = api.jscodeshift;
const root = j(file.source);
const { from: fromPath, to: toPath } = options;
const jestLookFor = ["mock", "doMock"];
replaceImports();
@dlebedynskyi
dlebedynskyi / Readme.md
Created April 29, 2021 16:06
day.js patch for @formatjs/Intl polyfill