Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DatePicker): rm component #7840

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`,
EldarMuhamethanov marked this conversation as resolved.
Show resolved Hide resolved
);
});

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
Loading