@sproutsocial/racine 13.3.0 → 13.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/EnumIllustrationNames.js +1 -1
- package/__flow__/IconViewBoxes.js +1 -0
- package/__flow__/IllustrationViewBoxes.js +2 -0
- package/__flow__/SpotIllustration/illustrationNames.js +1 -1
- package/__flow__/themes/light/theme.js +2 -0
- package/bin/racine-codemod.js +37 -6
- package/codemods/__tests__/icon-library.test.js +224 -0
- package/codemods/__tests__/icon-name-substitution.test.js +39 -0
- package/codemods/codemod-docs.js +54 -0
- package/codemods/icon-library.js +315 -0
- package/codemods/icon-name-substitution.js +43 -0
- package/commonjs/IconViewBoxes.js +1 -0
- package/commonjs/IllustrationViewBoxes.js +2 -0
- package/commonjs/SpotIllustration/illustrationNames.js +1 -1
- package/commonjs/themes/light/theme.js +2 -0
- package/dist/icon.svg +1 -1
- package/dist/iconList.js +1 -1
- package/dist/illustration.svg +1 -1
- package/dist/illustrationList.js +1 -1
- package/dist/themes/dark/theme.scss +2 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +2 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +2 -0
- package/dist/themes/light/theme.scss +2 -0
- package/lib/IconViewBoxes.js +1 -0
- package/lib/IllustrationViewBoxes.js +2 -0
- package/lib/SpotIllustration/illustrationNames.js +1 -1
- package/lib/themes/light/theme.js +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 13.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e26d0ef6: Triggering a forced NPM deploy for the changes in 13.4.1 due to a deployment issue
|
|
8
|
+
|
|
9
|
+
## 13.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 6b1e15e9: Update tasks-check icon to remove fill that was preventing changing its color.
|
|
14
|
+
- ff903949: Added 'route' icon to the Icon Component.
|
|
15
|
+
- 5a9a805b: Allow consumers to reference Google and Apple App Store network colors using theme tokens
|
|
16
|
+
- 164e6cd9: This patch adds new spot illustrations for:
|
|
17
|
+
|
|
18
|
+
- variable-table
|
|
19
|
+
- user-team
|
|
20
|
+
|
|
21
|
+
## 13.4.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- b6f0228d: Adds Icon Library codemod to address upcoming breaking changes
|
|
26
|
+
|
|
27
|
+
**Deprecation Notice**: Upcoming breaking changes to the Icon component and tooling
|
|
28
|
+
|
|
29
|
+
In Q1 2023, we will be making several major changes to the Icon component. Key changes:
|
|
30
|
+
|
|
31
|
+
- Icon assets will be stored in a new package called @sproutsocial/seeds-icons. This will allow consumers of Racine to update to the latest icons without waiting for Racine to release an update. @sproutsocial/seeds-icons will be a peer and dev dependency of Racine.
|
|
32
|
+
- Most icons will have solid and outline variants, with outline being the default. Variants can be included in the icon name (e.g., `bell-solid`) or as a prop (e.g., `<Icon name=”bell” variant=”solid” />`).
|
|
33
|
+
- Icons will be renamed to use descriptive instead of prescriptive naming. For instance, the `ads` icon will be renamed to `dollar-outline` so that its name will visually describe the icon instead of prescribing its intended usage.
|
|
34
|
+
|
|
35
|
+
Due to the scale of the changes, we are unable to make the changes backwards-compatible. You can preview the migration process below, but you should not complete the migration until these changes are released.
|
|
36
|
+
|
|
37
|
+
Migration steps:
|
|
38
|
+
|
|
39
|
+
- Dependencies: Add @sproutsocial/seeds-icons to your application’s dependencies.
|
|
40
|
+
- Sprites: Instead of using icon.svg from Racine’s dist/ directory, the sprites should be imported from @sproutsocial/seeds-icons for each category of icons you want to include. Attach these spritesheets to the DOM in the same way you do icon.svg.
|
|
41
|
+
- Icon names: Most icon names are changing as a part of this refactor. Run the `icon-library` codemod to automatically update as many icon names as possible. For more information on how to use Racine codemods, view [our Migration docs on Seeds](https://seeds.sproutsocial.com/components/migration).
|
|
42
|
+
|
|
43
|
+
- f84feaf3: Adds icon-name-substitution codemod
|
|
44
|
+
- This codemod complements the existing icon-library codemod, helping to automate icon name updates that cannot be automatically handled by the icon-library codemod.
|
|
45
|
+
- The codemod replaces string literals that are deprecated icon names with their updated names. Please note that this codemod will change any strings that happen to match a deprecated icon name, even if they are unrelated to icons, so we recommend running it against specific files (not your entire codebase) and carefully checking the results.
|
|
46
|
+
- Use `racine-codemod icon-name-substitution` to run this codemod and view the docs
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- f84feaf3: Fixes icon-library codemod bugs
|
|
51
|
+
|
|
52
|
+
The following unwanted behaviors have been removed:
|
|
53
|
+
|
|
54
|
+
- Erroneously removing the first comment in a file
|
|
55
|
+
- Erroneously removing the Icon import when Icon is still being used for a styled component or for "typeof Icon"
|
|
56
|
+
- Incorrect parsing of the "components" argument, leading to it not being used
|
|
57
|
+
- Adding multiple shim imports if there are multiple @sproutsocial/racine imports in the same file
|
|
58
|
+
- Breaking aliased and type imports from @sproutsocial/racine
|
|
59
|
+
|
|
3
60
|
## 13.3.0
|
|
4
61
|
|
|
5
62
|
### Minor Changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "advocacy-outline" | "advocacy" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bookmark" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "github" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "h3" | "h4" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help-alt" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plug" | "plus" | "positive-sentiment" | "power-up-outline" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "reels-outline" | "reels" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "rss" | "sales" | "salesforce-cloud" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "send-again-outline" | "send-again" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "shopping-bag-outline" | "shopping-bag" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-check" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "tools" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "underline" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
|
|
2
|
+
export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "advocacy-outline" | "advocacy" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bookmark" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "github" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "h3" | "h4" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help-alt" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plug" | "plus" | "positive-sentiment" | "power-up-outline" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "reels-outline" | "reels" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "route" | "rss" | "sales" | "salesforce-cloud" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "send-again-outline" | "send-again" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "shopping-bag-outline" | "shopping-bag" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-check" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "tools" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "underline" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export type EnumIllustrationNames = "abacus" | "analytics-offering" | "asset-cards" | "astronaut" | "binoculars" | "brand-keyword" | "browser-doc" | "business" | "calendar-event" | "calendar-reporting" | "cat-error" | "cat-no-access" | "cat" | "checkbox-alert" | "coffee-cup" | "competitors" | "compose-window" | "compose" | "computer-error" | "connect" | "contact" | "conversation" | "custom-branding" | "customer-service" | "dashboard" | "exclamation-mark" | "face-happy" | "find-bookmark" | "flask" | "general-topic" | "global-features" | "global-trend" | "grow-large" | "grow" | "hands-raised" | "headset" | "heartbeat-connection" | "instagram-links" | "invoice" | "jewel" | "keyword-tracking" | "lightbulb-alt" | "lightbulb" | "like-conversation" | "link-broken" | "link-messages" | "link-sections" | "link-upload" | "listening-pendo" | "listening-sentiment" | "listening-topic-templates" | "listening-tour" | "listening" | "loading" | "mailbox-empty" | "mailbox-full" | "megaphone" | "message" | "molecule" | "network-data" | "no-messages-found" | "no-notifications" | "note" | "notification" | "notifications-onboarding" | "notifications" | "organize-message" | "outbox-queue" | "outbox-reviews" | "pdf" | "planning" | "podium" | "pointer" | "publish-assets" | "publish-links" | "publishing-notifications" | "publishing" | "puzzle-piece" | "question-mark" | "reporting-folder" | "reporting" | "review-location" | "review" | "robot-assembly" | "robot-error" | "robot-happy" | "rocket" | "schedule-date" | "schedule-messages" | "search-keywords" | "search-success" | "search-trends" | "search" | "security" | "sentiment" | "shopping-bag" | "spark-line" | "stamp" | "storefront" | "success" | "tag-message" | "tag" | "team-roles" | "team" | "telescope" | "tha-mel" | "thumbs-up" | "toggle-switch" | "toolset-strength" | "tracking-time" | "twitter-messages" | "twitter-profiles" | "under-construction" | "unsubscribe" | "upward-trend" | "user-task" | "view-connections" | "vip-list" | "warning" | "wifi" | "workflow-steps";
|
|
2
|
+
export type EnumIllustrationNames = "abacus" | "analytics-offering" | "asset-cards" | "astronaut" | "binoculars" | "brand-keyword" | "browser-doc" | "business" | "calendar-event" | "calendar-reporting" | "cat-error" | "cat-no-access" | "cat" | "checkbox-alert" | "coffee-cup" | "competitors" | "compose-window" | "compose" | "computer-error" | "connect" | "contact" | "conversation" | "custom-branding" | "customer-service" | "dashboard" | "exclamation-mark" | "face-happy" | "find-bookmark" | "flask" | "general-topic" | "global-features" | "global-trend" | "grow-large" | "grow" | "hands-raised" | "headset" | "heartbeat-connection" | "instagram-links" | "invoice" | "jewel" | "keyword-tracking" | "lightbulb-alt" | "lightbulb" | "like-conversation" | "link-broken" | "link-messages" | "link-sections" | "link-upload" | "listening-pendo" | "listening-sentiment" | "listening-topic-templates" | "listening-tour" | "listening" | "loading" | "mailbox-empty" | "mailbox-full" | "megaphone" | "message" | "molecule" | "network-data" | "no-messages-found" | "no-notifications" | "note" | "notification" | "notifications-onboarding" | "notifications" | "organize-message" | "outbox-queue" | "outbox-reviews" | "pdf" | "planning" | "podium" | "pointer" | "publish-assets" | "publish-links" | "publishing-notifications" | "publishing" | "puzzle-piece" | "question-mark" | "reporting-folder" | "reporting" | "review-location" | "review" | "robot-assembly" | "robot-error" | "robot-happy" | "rocket" | "schedule-date" | "schedule-messages" | "search-keywords" | "search-success" | "search-trends" | "search" | "security" | "sentiment" | "shopping-bag" | "spark-line" | "stamp" | "storefront" | "success" | "tag-message" | "tag" | "team-roles" | "team" | "telescope" | "tha-mel" | "thumbs-up" | "toggle-switch" | "toolset-strength" | "tracking-time" | "twitter-messages" | "twitter-profiles" | "under-construction" | "unsubscribe" | "upward-trend" | "user-task" | "user-team" | "variable-table" | "view-connections" | "vip-list" | "warning" | "wifi" | "workflow-steps";
|
|
@@ -115,6 +115,8 @@ module.exports = {
|
|
|
115
115
|
"unsubscribe": "0 0 212 163",
|
|
116
116
|
"upward-trend": "0 0 65 49",
|
|
117
117
|
"user-task": "0 0 313 176",
|
|
118
|
+
"user-team": "0 0 237 215",
|
|
119
|
+
"variable-table": "0 0 360 195",
|
|
118
120
|
"view-connections": "0 0 356 201",
|
|
119
121
|
"vip-list": "0 0 212 228",
|
|
120
122
|
"warning": "0 0 55 38",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export const illustrationNames = Object.freeze(['abacus', 'analytics-offering', 'asset-cards', 'astronaut', 'binoculars', 'brand-keyword', 'browser-doc', 'business', 'calendar-event', 'calendar-reporting', 'cat-error', 'cat-no-access', 'cat', 'checkbox-alert', 'coffee-cup', 'competitors', 'compose-window', 'compose', 'computer-error', 'connect', 'contact', 'conversation', 'custom-branding', 'customer-service', 'dashboard', 'exclamation-mark', 'face-happy', 'find-bookmark', 'flask', 'general-topic', 'global-features', 'global-trend', 'grow-large', 'grow', 'hands-raised', 'headset', 'heartbeat-connection', 'instagram-links', 'invoice', 'jewel', 'keyword-tracking', 'lightbulb-alt', 'lightbulb', 'like-conversation', 'link-broken', 'link-messages', 'link-sections', 'link-upload', 'listening-pendo', 'listening-sentiment', 'listening-topic-templates', 'listening-tour', 'listening', 'loading', 'mailbox-empty', 'mailbox-full', 'megaphone', 'message', 'molecule', 'network-data', 'no-messages-found', 'no-notifications', 'note', 'notification', 'notifications-onboarding', 'notifications', 'organize-message', 'outbox-queue', 'outbox-reviews', 'pdf', 'planning', 'podium', 'pointer', 'publish-assets', 'publish-links', 'publishing-notifications', 'publishing', 'puzzle-piece', 'question-mark', 'reporting-folder', 'reporting', 'review-location', 'review', 'robot-assembly', 'robot-error', 'robot-happy', 'rocket', 'schedule-date', 'schedule-messages', 'search-keywords', 'search-success', 'search-trends', 'search', 'security', 'sentiment', 'shopping-bag', 'spark-line', 'stamp', 'storefront', 'success', 'tag-message', 'tag', 'team-roles', 'team', 'telescope', 'tha-mel', 'thumbs-up', 'toggle-switch', 'toolset-strength', 'tracking-time', 'twitter-messages', 'twitter-profiles', 'under-construction', 'unsubscribe', 'upward-trend', 'user-task', 'view-connections', 'vip-list', 'warning', 'wifi', 'workflow-steps']);
|
|
2
|
+
export const illustrationNames = Object.freeze(['abacus', 'analytics-offering', 'asset-cards', 'astronaut', 'binoculars', 'brand-keyword', 'browser-doc', 'business', 'calendar-event', 'calendar-reporting', 'cat-error', 'cat-no-access', 'cat', 'checkbox-alert', 'coffee-cup', 'competitors', 'compose-window', 'compose', 'computer-error', 'connect', 'contact', 'conversation', 'custom-branding', 'customer-service', 'dashboard', 'exclamation-mark', 'face-happy', 'find-bookmark', 'flask', 'general-topic', 'global-features', 'global-trend', 'grow-large', 'grow', 'hands-raised', 'headset', 'heartbeat-connection', 'instagram-links', 'invoice', 'jewel', 'keyword-tracking', 'lightbulb-alt', 'lightbulb', 'like-conversation', 'link-broken', 'link-messages', 'link-sections', 'link-upload', 'listening-pendo', 'listening-sentiment', 'listening-topic-templates', 'listening-tour', 'listening', 'loading', 'mailbox-empty', 'mailbox-full', 'megaphone', 'message', 'molecule', 'network-data', 'no-messages-found', 'no-notifications', 'note', 'notification', 'notifications-onboarding', 'notifications', 'organize-message', 'outbox-queue', 'outbox-reviews', 'pdf', 'planning', 'podium', 'pointer', 'publish-assets', 'publish-links', 'publishing-notifications', 'publishing', 'puzzle-piece', 'question-mark', 'reporting-folder', 'reporting', 'review-location', 'review', 'robot-assembly', 'robot-error', 'robot-happy', 'rocket', 'schedule-date', 'schedule-messages', 'search-keywords', 'search-success', 'search-trends', 'search', 'security', 'sentiment', 'shopping-bag', 'spark-line', 'stamp', 'storefront', 'success', 'tag-message', 'tag', 'team-roles', 'team', 'telescope', 'tha-mel', 'thumbs-up', 'toggle-switch', 'toolset-strength', 'tracking-time', 'twitter-messages', 'twitter-profiles', 'under-construction', 'unsubscribe', 'upward-trend', 'user-task', 'user-team', 'variable-table', 'view-connections', 'vip-list', 'warning', 'wifi', 'workflow-steps']);
|
|
@@ -248,6 +248,8 @@ const colors = {
|
|
|
248
248
|
glassdoor: NETWORKCOLORS.NETWORK_COLOR_GLASSDOOR,
|
|
249
249
|
google_my_business: NETWORKCOLORS.NETWORK_COLOR_GOOGLE_MY_BUSINESS,
|
|
250
250
|
google_business_messages: NETWORKCOLORS.NETWORK_COLOR_GOOGLE_BUSINESS_MESSAGES,
|
|
251
|
+
google_play_store: NETWORKCOLORS.NETWORK_COLOR_GOOGLE_PLAY_STORE,
|
|
252
|
+
apple_app_store: NETWORKCOLORS.NETWORK_COLOR_APPLE_APP_STORE,
|
|
251
253
|
salesforce: NETWORKCOLORS.NETWORK_COLOR_SALESFORCE,
|
|
252
254
|
zendesk: NETWORKCOLORS.NETWORK_COLOR_ZENDESK,
|
|
253
255
|
hubspot: NETWORKCOLORS.NETWORK_COLOR_HUBSPOT,
|
package/bin/racine-codemod.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
const childProcess = require('child_process');
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
const path = require('path');
|
|
9
|
+
const docs = require('../codemods/codemod-docs');
|
|
9
10
|
|
|
10
11
|
const currentDir = process.cwd();
|
|
11
12
|
process.chdir(__dirname);
|
|
@@ -13,22 +14,46 @@ process.chdir(__dirname);
|
|
|
13
14
|
const codemods = fs
|
|
14
15
|
.readdirSync('../codemods')
|
|
15
16
|
.filter((x) => x.slice(-3) === '.js')
|
|
16
|
-
.map((x) => x.slice(0, -3))
|
|
17
|
+
.map((x) => x.slice(0, -3))
|
|
18
|
+
.filter((x) => x !== 'codemod-docs');
|
|
17
19
|
|
|
18
20
|
const transform = process.argv[2];
|
|
19
21
|
const dest = process.argv[3];
|
|
20
|
-
const usage = `
|
|
22
|
+
const usage = `racine-codemod <transformName> <path> <...otherArgs>\n`;
|
|
21
23
|
if (!transform || codemods.indexOf(transform) === -1) {
|
|
22
24
|
console.log(usage);
|
|
23
25
|
console.error(
|
|
24
|
-
'
|
|
26
|
+
'Missing/invalid transform name. Pick one of:\n' +
|
|
25
27
|
codemods.map((x) => '- ' + x).join('\n')
|
|
26
28
|
);
|
|
27
29
|
process.exit(1);
|
|
28
30
|
}
|
|
31
|
+
|
|
32
|
+
const formatCodemodDocs = (docs) => {
|
|
33
|
+
return ` Description: ${docs.description}
|
|
34
|
+
Usage: ${docs.example}
|
|
35
|
+
Arguments:
|
|
36
|
+
${Object.entries(docs.arguments)
|
|
37
|
+
.map(([argumentName, argumentDocs]) => {
|
|
38
|
+
return ` --${argumentName}
|
|
39
|
+
Description: ${argumentDocs.description}
|
|
40
|
+
Default: ${argumentDocs.default}
|
|
41
|
+
${
|
|
42
|
+
argumentDocs.options
|
|
43
|
+
? `Options: ${argumentDocs.options}`
|
|
44
|
+
: `Example: ${argumentDocs.example}`
|
|
45
|
+
}`;
|
|
46
|
+
})
|
|
47
|
+
.join('\n')}`;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// If a path argument is not passed, log the available arguments and example usage for the codemod.
|
|
29
51
|
if (!dest) {
|
|
30
|
-
console.log(
|
|
31
|
-
|
|
52
|
+
console.log(
|
|
53
|
+
docs[transform]
|
|
54
|
+
? formatCodemodDocs(docs[transform])
|
|
55
|
+
: 'Missing path argument'
|
|
56
|
+
);
|
|
32
57
|
process.exit(1);
|
|
33
58
|
}
|
|
34
59
|
|
|
@@ -39,6 +64,12 @@ const cmd = `npx jscodeshift -- --parser=flow -t ${path.join(
|
|
|
39
64
|
...process.argv,
|
|
40
65
|
]
|
|
41
66
|
.slice(4)
|
|
67
|
+
// Remove any spaces from args. Otherwise, anything after the space will be treated as a path argument.
|
|
68
|
+
.map((arg) => arg.replace(/\s/g, ''))
|
|
42
69
|
.join(' ')}`;
|
|
43
70
|
console.log('running', cmd);
|
|
44
|
-
childProcess.execSync(cmd);
|
|
71
|
+
childProcess.execSync(cmd, {stdio: 'inherit'});
|
|
72
|
+
|
|
73
|
+
console.log(
|
|
74
|
+
`Codemod complete! Please run prettier on "${dest}" to fix any formatting issues caused by the codemod.`
|
|
75
|
+
);
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
jest.autoMockOff();
|
|
2
|
+
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
3
|
+
const transform = require('../icon-library');
|
|
4
|
+
|
|
5
|
+
describe('icon-library codemod', () => {
|
|
6
|
+
function createTest(testName, input, output, options = {}) {
|
|
7
|
+
return defineInlineTest(
|
|
8
|
+
transform,
|
|
9
|
+
{parser: 'flow', ...options},
|
|
10
|
+
input,
|
|
11
|
+
output,
|
|
12
|
+
testName
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
createTest(
|
|
17
|
+
'No changes for already-migrated icons',
|
|
18
|
+
`<Icon name='dollar-outline' />`,
|
|
19
|
+
`<Icon name='dollar-outline' />`
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
createTest(
|
|
23
|
+
'Simple replacement',
|
|
24
|
+
`<Icon name='ads' />`,
|
|
25
|
+
`<Icon name='dollar-outline' />`
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
createTest(
|
|
29
|
+
'deprecatedIcons',
|
|
30
|
+
`<Icon name='backtotop' />`,
|
|
31
|
+
`<Icon name='arrow-up-outline' />`
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
createTest(
|
|
35
|
+
'Handle subcomponents',
|
|
36
|
+
`<Icon.Toggle activeName='like' inactiveName='like-outline'/>;`,
|
|
37
|
+
`<Icon.Toggle activeName='thumbs-up-solid' inactiveName='thumbs-up-outline'/>;`
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
createTest(
|
|
41
|
+
'ssiconsvg regex replacements',
|
|
42
|
+
`<use
|
|
43
|
+
xlink:href="#ssiconsvg-rejected"
|
|
44
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
45
|
+
/>`,
|
|
46
|
+
`<use
|
|
47
|
+
xlink:href="#seeds-svgs_ban-outline"
|
|
48
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
49
|
+
/>`
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
createTest(
|
|
53
|
+
'icon/iconName regex replacements',
|
|
54
|
+
`expect(queryByDataQaLabel({icon: 'dashboard'})).toBeFalsy();
|
|
55
|
+
const iconMap = {iconName: "like"};
|
|
56
|
+
const iconName = 'reply';`,
|
|
57
|
+
`expect(queryByDataQaLabel({icon: 'gauge-outline'})).toBeFalsy();
|
|
58
|
+
const iconMap = {iconName: "thumbs-up-solid"};
|
|
59
|
+
const iconName = 'reply-solid';`
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
createTest(
|
|
63
|
+
'Add comments',
|
|
64
|
+
`import { Badge, Icon } from '@sproutsocial/racine';
|
|
65
|
+
|
|
66
|
+
<>
|
|
67
|
+
<Icon name='dashboard' />
|
|
68
|
+
<Icon name='not-a-real-name' />
|
|
69
|
+
<Badge iconName={iconName} />
|
|
70
|
+
</>`,
|
|
71
|
+
`/*TODO (icon-library codemod): Please manually migrate icon names passed to 2 component(s) in this file.
|
|
72
|
+
Look for usages of these components: Icon, Badge*/
|
|
73
|
+
import { Badge, Icon } from '@sproutsocial/racine';
|
|
74
|
+
|
|
75
|
+
<>
|
|
76
|
+
<Icon name='gauge-outline' />
|
|
77
|
+
<Icon name='not-a-real-name' />
|
|
78
|
+
<Badge iconName={iconName} />
|
|
79
|
+
</>`
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Test shim component adding behavior with a mix of cases.
|
|
83
|
+
// The valid name Icon is migrated.
|
|
84
|
+
// The invalid string name Icon prompts a comment. The shim would not help map an invalid string name.
|
|
85
|
+
// The variable name Icon is converted to IconShim and does not contribute to the count of issues in the comment.
|
|
86
|
+
createTest(
|
|
87
|
+
'Add shim component and add comments',
|
|
88
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
89
|
+
|
|
90
|
+
<>
|
|
91
|
+
<Icon name='dashboard' />
|
|
92
|
+
<Icon name='not-a-real-name' />
|
|
93
|
+
<Icon name={iconName} />
|
|
94
|
+
</>`,
|
|
95
|
+
`/*TODO (icon-library codemod): Please manually migrate icon names passed to 1 component(s) in this file.
|
|
96
|
+
Look for usages of these components: Icon*/
|
|
97
|
+
import { Icon } from '@sproutsocial/racine';
|
|
98
|
+
|
|
99
|
+
import { IconShim } from 'script/core/react/IconShim';
|
|
100
|
+
|
|
101
|
+
<>
|
|
102
|
+
<Icon name='gauge-outline' />
|
|
103
|
+
<Icon name='not-a-real-name' />
|
|
104
|
+
<IconShim name={iconName} />
|
|
105
|
+
</>`,
|
|
106
|
+
{
|
|
107
|
+
shimName: 'IconShim',
|
|
108
|
+
shimImportPath: 'script/core/react/IconShim',
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
createTest(
|
|
113
|
+
'Add shim, remove Icon import',
|
|
114
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
115
|
+
|
|
116
|
+
<Icon name={iconName} />`,
|
|
117
|
+
`import { IconShim } from 'script/core/react/IconShim';
|
|
118
|
+
|
|
119
|
+
<IconShim name={iconName} />
|
|
120
|
+
`,
|
|
121
|
+
{
|
|
122
|
+
shimName: 'IconShim',
|
|
123
|
+
shimImportPath: 'script/core/react/IconShim',
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
createTest(
|
|
128
|
+
'Add shim, keep Icon import due to styled usage',
|
|
129
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
130
|
+
const StyledIcon = styled(Icon);
|
|
131
|
+
<Icon name={iconName} />`,
|
|
132
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
133
|
+
import { IconShim } from 'script/core/react/IconShim';
|
|
134
|
+
const StyledIcon = styled(Icon);
|
|
135
|
+
<IconShim name={iconName} />
|
|
136
|
+
`,
|
|
137
|
+
{
|
|
138
|
+
shimName: 'IconShim',
|
|
139
|
+
shimImportPath: 'script/core/react/IconShim',
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
createTest(
|
|
144
|
+
'Add shim, keep Icon import due to typeof Icon usage',
|
|
145
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
146
|
+
const iconType = typeof Icon;
|
|
147
|
+
<Icon name={iconName} />;`,
|
|
148
|
+
`import { Icon } from '@sproutsocial/racine';
|
|
149
|
+
import { IconShim } from 'script/core/react/IconShim';
|
|
150
|
+
const iconType = typeof Icon;
|
|
151
|
+
<IconShim name={iconName} />;
|
|
152
|
+
`,
|
|
153
|
+
{
|
|
154
|
+
shimName: 'IconShim',
|
|
155
|
+
shimImportPath: 'script/core/react/IconShim',
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
createTest(
|
|
160
|
+
'Retain first comments when Icon import is removed',
|
|
161
|
+
`// @flow
|
|
162
|
+
import { Icon } from '@sproutsocial/racine';
|
|
163
|
+
|
|
164
|
+
<Icon name={iconName} />`,
|
|
165
|
+
`// @flow
|
|
166
|
+
import { IconShim } from 'script/core/react/IconShim';
|
|
167
|
+
|
|
168
|
+
<IconShim name={iconName} />
|
|
169
|
+
`,
|
|
170
|
+
{
|
|
171
|
+
shimName: 'IconShim',
|
|
172
|
+
shimImportPath: 'script/core/react/IconShim',
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
createTest(
|
|
177
|
+
'Retain first comments and add new comments',
|
|
178
|
+
`// @flow
|
|
179
|
+
import { Badge, Icon } from '@sproutsocial/racine';
|
|
180
|
+
|
|
181
|
+
<>
|
|
182
|
+
<Icon name='dashboard' />
|
|
183
|
+
<Icon name='not-a-real-name' />
|
|
184
|
+
<Badge iconName={iconName} />
|
|
185
|
+
</>`,
|
|
186
|
+
`// @flow
|
|
187
|
+
/*TODO (icon-library codemod): Please manually migrate icon names passed to 2 component(s) in this file.
|
|
188
|
+
Look for usages of these components: Icon, Badge*/
|
|
189
|
+
import { Badge, Icon } from '@sproutsocial/racine';
|
|
190
|
+
|
|
191
|
+
<>
|
|
192
|
+
<Icon name='gauge-outline' />
|
|
193
|
+
<Icon name='not-a-real-name' />
|
|
194
|
+
<Badge iconName={iconName} />
|
|
195
|
+
</>`
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
createTest(
|
|
199
|
+
'Test "components" option',
|
|
200
|
+
`
|
|
201
|
+
<>
|
|
202
|
+
<Icon name='dashboard' />
|
|
203
|
+
<Message.Header iconName='reply' />
|
|
204
|
+
<SearchInput iconLeft='search' iconRight='x' />
|
|
205
|
+
</>`,
|
|
206
|
+
`
|
|
207
|
+
<>
|
|
208
|
+
<Icon name='gauge-outline' />
|
|
209
|
+
<Message.Header iconName='reply-solid' />
|
|
210
|
+
<SearchInput iconLeft='magnifying-glass-outline' iconRight='x-outline' />
|
|
211
|
+
</>`,
|
|
212
|
+
{
|
|
213
|
+
// This tests if the following argument was passed to `racine-codemod`:
|
|
214
|
+
// --components="{'Message.Header':['iconName'],SearchInput:['iconLeft','iconRight']}"
|
|
215
|
+
// Unfortunately, because it's getting passed directly to the transform in this case,
|
|
216
|
+
// We need to simulate the way that it gets mangled when passed through the console.
|
|
217
|
+
components: [
|
|
218
|
+
'Message.Header:[iconName]',
|
|
219
|
+
'SearchInput:[iconLeft',
|
|
220
|
+
'iconRight]',
|
|
221
|
+
],
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
jest.autoMockOff();
|
|
2
|
+
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
3
|
+
const transform = require('../icon-name-substitution');
|
|
4
|
+
|
|
5
|
+
describe('icon-name-substitution codemod', () => {
|
|
6
|
+
function createTest(testName, input, output, options = {}) {
|
|
7
|
+
return defineInlineTest(
|
|
8
|
+
transform,
|
|
9
|
+
{parser: 'flow', ...options},
|
|
10
|
+
input,
|
|
11
|
+
output,
|
|
12
|
+
testName
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
createTest(
|
|
17
|
+
'No changes for already-migrated icon names. Empty output due to returning null.',
|
|
18
|
+
`const IconMap = {ads: 'dollar-outline', draft: 'paper-solid'};`,
|
|
19
|
+
''
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
createTest(
|
|
23
|
+
'Simple replacements',
|
|
24
|
+
`const IconMap = {ads: 'ads', draft: 'drafts'}`,
|
|
25
|
+
`const IconMap = {ads: 'dollar-outline', draft: 'paper-solid'}`
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
createTest(
|
|
29
|
+
'Example of an expected but unwanted change: the "ads" key and value are both mapped.',
|
|
30
|
+
`const IconMap = {'ads': 'ads', 'draft': 'drafts'}`,
|
|
31
|
+
`const IconMap = {'dollar-outline': 'dollar-outline', 'draft': 'paper-solid'}`
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
createTest(
|
|
35
|
+
'deprecatedIcons',
|
|
36
|
+
`const name = 'backtotop';`,
|
|
37
|
+
`const name = 'arrow-up-outline';`
|
|
38
|
+
);
|
|
39
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Ideally, docs would be colocated with the codemod they are for, but I don't know how to make that work because
|
|
2
|
+
// the transform needs to be the only export from the codemod file in order for jscodeshift to know how to find it.
|
|
3
|
+
|
|
4
|
+
// Reused arguments
|
|
5
|
+
const quote = {
|
|
6
|
+
default: 'single',
|
|
7
|
+
options: 'single|double',
|
|
8
|
+
description:
|
|
9
|
+
'What kind of quotation marks should be preferred when converting updated files back to JS?',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
'icon-library': {
|
|
14
|
+
description:
|
|
15
|
+
'Assists in migrating Icon names and usages. Due to abstraction such as using variables and mappings to define icon names, the codemod cannot automatically migrate every icon name. To help you identify these cases, the codemod can add comments or shim component usages.',
|
|
16
|
+
example:
|
|
17
|
+
"racine-codemod icon-library src --components=\"{IconButton:['name'],MessageMeta:['iconNameLeft','iconNameRight']}\" --shimComponent=IconShim --shimImportPath=src/components/IconShim --quote=double --addComments=false",
|
|
18
|
+
arguments: {
|
|
19
|
+
quote,
|
|
20
|
+
addComments: {
|
|
21
|
+
default: 'true',
|
|
22
|
+
options: 'true|false',
|
|
23
|
+
description:
|
|
24
|
+
'Should code comments be added when the codemod identifies a case that cannot be automatically migrated? Comments will include "icon-library" to help you locate and remediate them.',
|
|
25
|
+
},
|
|
26
|
+
components: {
|
|
27
|
+
default: '"{}"',
|
|
28
|
+
example:
|
|
29
|
+
"\"{IconButton:['name'],MessageMeta:['iconNameLeft','iconNameRight']}\"",
|
|
30
|
+
description:
|
|
31
|
+
'What additional component names + prop name combinations would you like the codemod to target for the migration? Wrap this argument in quotes.',
|
|
32
|
+
},
|
|
33
|
+
shimName: {
|
|
34
|
+
default: '""',
|
|
35
|
+
example: 'IconShim',
|
|
36
|
+
description:
|
|
37
|
+
"If you provide a shim component name, any Icon that has a variable for its `name` prop will be renamed to the shim component's name. You must create this component in your own codebase, it is not provided.",
|
|
38
|
+
},
|
|
39
|
+
shimImportPath: {
|
|
40
|
+
default: '""',
|
|
41
|
+
example: 'src/components/IconShim',
|
|
42
|
+
description:
|
|
43
|
+
'shimImportPath is the import path for your shim component (see "shimName") so that imports can be automatically when usages are added.',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
'icon-name-substitution': {
|
|
48
|
+
description:
|
|
49
|
+
'Replaces string literals that are deprecated icon names with their updated names. Please note that this codemod will change any strings that happen to match a deprecated icon name, even if they are unrelated to icons, so we recommend running it against specific files (not your entire codebase) and carefully checking the results.',
|
|
50
|
+
example:
|
|
51
|
+
'racine-codemod icon-name-substitution src/constants.js --quote=double',
|
|
52
|
+
arguments: {quote},
|
|
53
|
+
},
|
|
54
|
+
};
|