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

Port codemods to TypeScript, add codemods for replacing Nudge and SidebarTab components #1558

Merged
merged 14 commits into from
Dec 5, 2022
Merged

Port codemods to TypeScript, add codemods for replacing Nudge and SidebarTab components #1558

merged 14 commits into from
Dec 5, 2022

Conversation

brandongregoryscott
Copy link
Contributor

Overview

This PR overhauls our codemods directory and adds two new codemods, one for removing SidebarTab components (replacing with Tab direction="horizontal") and one for removing Nudge components (replacing with Pulsar where possible).

  • codemods directory is now written in TypeScript and added to the build process
  • jscodeshift has been updated
  • Lots of fluent-style utility functions have been added around jscodeshift to help reduce duplicated code & improve readability

There are a decent amount of tests, but not all of the new utility functions are tested. We can continue to back-fill these as new codemods are added, in addition to the regular input/output transformation tests.

Also... I noticed we were bundling up *.test.js files the main package. Looks like the glob for the build-commonjs and build-esm scripts is not picking up all of the test files, so excluding them explicitly from the files array in the package.json should tidy our distribution up a little!

Screenshots (if applicable)

Documentation

  • Updated Typescript types and/or component PropTypes
  • Added / modified component docs
  • Added / modified Storybook stories

@netlify
Copy link

netlify bot commented Nov 29, 2022

Deploy Preview for evergreen-storybook ready!

Name Link
🔨 Latest commit b0366bb
🔍 Latest deploy log https://app.netlify.com/sites/evergreen-storybook/deploys/638568744309110009581f6e
😎 Deploy Preview https://deploy-preview-1558--evergreen-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@brandongregoryscott brandongregoryscott mentioned this pull request Nov 29, 2022
3 tasks
@brandongregoryscott brandongregoryscott changed the base branch from master to v7 November 29, 2022 15:55
…ssing comment to replace-nudge, do not strip comments in distributed js
@brandongregoryscott brandongregoryscott merged commit 48c1a1c into segmentio:v7 Dec 5, 2022
@brandongregoryscott brandongregoryscott deleted the v7-codemods-ii branch December 5, 2022 17:03
@brandongregoryscott brandongregoryscott added this to the v7 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants