Skip to content

Commit

Permalink
Merge branch 'master' into e.muhamethanov/cell-subhead-to-overtitle
Browse files Browse the repository at this point in the history
  • Loading branch information
EldarMuhamethanov committed Oct 28, 2024
2 parents 5ec37a3 + e44a13f commit 03ed81b
Show file tree
Hide file tree
Showing 33 changed files with 67 additions and 664 deletions.
31 changes: 31 additions & 0 deletions packages/codemods/src/transforms/v7/date-picker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { API, FileInfo } from 'jscodeshift';
import { getImportInfo } from '../../codemod-helpers';
import { report } from '../../report';
import { JSCodeShiftOptions } from '../../types';

export const parser = 'tsx';

export default function transformer(file: FileInfo, api: API, options: JSCodeShiftOptions) {
const { alias } = options;
const j = api.jscodeshift;
const source = j(file.source);
const { localName } = getImportInfo(j, file, 'DatePicker', alias);

if (!localName) {
return source.toSource();
}
source
.find(j.JSXElement, {
openingElement: {
name: { name: localName },
},
})
.forEach(() => {
report(
api,
`Manual changes required for ${localName}. component DatePicker was removed in v7.0.0, please use Input, Select or DateInput component`,
);
});

return source.toSource();
}

This file was deleted.

11 changes: 0 additions & 11 deletions packages/vkui/src/components/DatePicker/DatePicker.e2e.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions packages/vkui/src/components/DatePicker/DatePicker.module.css

This file was deleted.

25 changes: 0 additions & 25 deletions packages/vkui/src/components/DatePicker/DatePicker.stories.tsx

This file was deleted.

216 changes: 0 additions & 216 deletions packages/vkui/src/components/DatePicker/DatePicker.test.tsx

This file was deleted.

Loading

0 comments on commit 03ed81b

Please sign in to comment.