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

fix: doctor command match the darkMode array #91

Merged
merged 1 commit into from
Jul 21, 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
86 changes: 43 additions & 43 deletions src/constants/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "accordion",
"package": "@nextui-org/accordion",
"version": "2.0.34",
"version": "2.0.38",
"docs": "https://nextui.org/docs/components/accordion",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"status": "stable",
Expand All @@ -20,7 +20,7 @@
{
"name": "autocomplete",
"package": "@nextui-org/autocomplete",
"version": "2.1.1",
"version": "2.1.5",
"docs": "https://nextui.org/docs/components/autocomplete",
"description": "An autocomplete combines a text input with a listbox, allowing users to filter a list of options to items matching a query.",
"status": "stable",
Expand All @@ -37,7 +37,7 @@
{
"name": "avatar",
"package": "@nextui-org/avatar",
"version": "2.0.29",
"version": "2.0.32",
"docs": "https://nextui.org/docs/components/avatar",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"status": "stable",
Expand All @@ -53,7 +53,7 @@
{
"name": "badge",
"package": "@nextui-org/badge",
"version": "2.0.28",
"version": "2.0.31",
"docs": "https://nextui.org/docs/components/badge",
"description": "Badges are used as a small numerical value or status descriptor for UI elements.",
"status": "updated",
Expand All @@ -69,7 +69,7 @@
{
"name": "breadcrumbs",
"package": "@nextui-org/breadcrumbs",
"version": "2.0.9",
"version": "2.0.12",
"docs": "https://nextui.org/docs/components/breadcrumbs",
"description": "Breadcrumbs display a hierarchy of links to the current page or resource in an application.",
"status": "stable",
Expand All @@ -85,7 +85,7 @@
{
"name": "button",
"package": "@nextui-org/button",
"version": "2.0.33",
"version": "2.0.37",
"docs": "https://nextui.org/docs/components/button",
"description": "Buttons allow users to perform actions and choose with a single tap.",
"status": "stable",
Expand All @@ -102,7 +102,7 @@
{
"name": "calendar",
"package": "@nextui-org/calendar",
"version": "2.0.6",
"version": "2.0.11",
"docs": "https://nextui.org/docs/components/calendar",
"description": "A calendar displays one or more date grids and allows users to select a single date.",
"status": "new",
Expand All @@ -118,7 +118,7 @@
{
"name": "card",
"package": "@nextui-org/card",
"version": "2.0.30",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/card",
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
"status": "stable",
Expand All @@ -135,10 +135,10 @@
{
"name": "checkbox",
"package": "@nextui-org/checkbox",
"version": "2.1.1",
"version": "2.1.4",
"docs": "https://nextui.org/docs/components/checkbox",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"status": "stable",
"status": "updated",
"style": "",
"peerDependencies": {
"@nextui-org/system": ">=2.0.0",
Expand All @@ -151,7 +151,7 @@
{
"name": "chip",
"package": "@nextui-org/chip",
"version": "2.0.29",
"version": "2.0.32",
"docs": "https://nextui.org/docs/components/chip",
"description": "Chips help people enter information, make selections, filter content, or trigger actions.",
"status": "stable",
Expand All @@ -167,7 +167,7 @@
{
"name": "code",
"package": "@nextui-org/code",
"version": "2.0.28",
"version": "2.0.32",
"docs": "https://nextui.org/docs/components/code",
"description": "Code is a component used to display inline code.",
"status": "stable",
Expand All @@ -182,7 +182,7 @@
{
"name": "date-input",
"package": "@nextui-org/date-input",
"version": "2.1.0",
"version": "2.1.3",
"docs": "https://nextui.org/docs/components/date-input",
"description": "A date input allows users to enter and edit date and time values using a keyboard.",
"status": "new",
Expand All @@ -198,7 +198,7 @@
{
"name": "date-picker",
"package": "@nextui-org/date-picker",
"version": "2.1.1",
"version": "2.1.6",
"docs": "https://nextui.org/docs/components/date-picker",
"description": "A date picker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value.",
"status": "new",
Expand All @@ -214,7 +214,7 @@
{
"name": "divider",
"package": "@nextui-org/divider",
"version": "2.0.28",
"version": "2.0.31",
"docs": "https://nextui.org/docs/components/divider",
"description": ". A separator is a visual divider between two groups of content",
"status": "stable",
Expand All @@ -229,7 +229,7 @@
{
"name": "dropdown",
"package": "@nextui-org/dropdown",
"version": "2.1.25",
"version": "2.1.29",
"docs": "https://nextui.org/docs/components/dropdown",
"description": "A dropdown displays a list of actions or options that a user can choose.",
"status": "stable",
Expand All @@ -246,7 +246,7 @@
{
"name": "image",
"package": "@nextui-org/image",
"version": "2.0.28",
"version": "2.0.31",
"docs": "https://nextui.org/docs/components/image",
"description": "A simple image component",
"status": "stable",
Expand All @@ -262,7 +262,7 @@
{
"name": "input",
"package": "@nextui-org/input",
"version": "2.2.1",
"version": "2.2.4",
"docs": "https://nextui.org/docs/components/input",
"description": "The input component is designed for capturing user input within a text field.",
"status": "stable",
Expand All @@ -278,7 +278,7 @@
{
"name": "kbd",
"package": "@nextui-org/kbd",
"version": "2.0.29",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/kbd",
"description": "The keyboard key components indicates which key or set of keys used to execute a specificv action",
"status": "stable",
Expand All @@ -293,7 +293,7 @@
{
"name": "link",
"package": "@nextui-org/link",
"version": "2.0.31",
"version": "2.0.34",
"docs": "https://nextui.org/docs/components/link",
"description": "Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an <a>",
"status": "stable",
Expand All @@ -309,7 +309,7 @@
{
"name": "listbox",
"package": "@nextui-org/listbox",
"version": "2.1.21",
"version": "2.1.25",
"docs": "https://nextui.org/docs/components/listbox",
"description": "A listbox displays a list of options and allows a user to select one or more of them.",
"status": "stable",
Expand All @@ -325,7 +325,7 @@
{
"name": "menu",
"package": "@nextui-org/menu",
"version": "2.0.24",
"version": "2.0.28",
"docs": "https://nextui.org/docs/components/menu",
"description": "A menu displays a list of options and allows a user to select one or more of them.",
"status": "stable",
Expand All @@ -341,7 +341,7 @@
{
"name": "modal",
"package": "@nextui-org/modal",
"version": "2.0.35",
"version": "2.0.39",
"docs": "https://nextui.org/docs/components/modal",
"description": "Displays a dialog with a custom content that requires attention or provides additional information.",
"status": "stable",
Expand All @@ -358,7 +358,7 @@
{
"name": "navbar",
"package": "@nextui-org/navbar",
"version": "2.0.32",
"version": "2.0.36",
"docs": "https://nextui.org/docs/components/navbar",
"description": "A responsive navigation header positioned on top side of your page that includes support for branding, links, navigation, collapse and more.",
"status": "stable",
Expand All @@ -375,7 +375,7 @@
{
"name": "pagination",
"package": "@nextui-org/pagination",
"version": "2.0.32",
"version": "2.0.35",
"docs": "https://nextui.org/docs/components/pagination",
"description": "The Pagination component allows you to display active page and navigate between multiple pages.",
"status": "stable",
Expand All @@ -391,7 +391,7 @@
{
"name": "popover",
"package": "@nextui-org/popover",
"version": "2.1.23",
"version": "2.1.27",
"docs": "https://nextui.org/docs/components/popover",
"description": "A popover is an overlay element positioned relative to a trigger.",
"status": "stable",
Expand All @@ -408,7 +408,7 @@
{
"name": "progress",
"package": "@nextui-org/progress",
"version": "2.0.30",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/progress",
"description": "Progress bars show either determinate or indeterminate progress of an operation over time.",
"status": "stable",
Expand All @@ -424,7 +424,7 @@
{
"name": "radio",
"package": "@nextui-org/radio",
"version": "2.1.1",
"version": "2.1.4",
"docs": "https://nextui.org/docs/components/radio",
"description": "Radios allow users to select a single option from a list of mutually exclusive options.",
"status": "stable",
Expand All @@ -440,7 +440,7 @@
{
"name": "ripple",
"package": "@nextui-org/ripple",
"version": "2.0.29",
"version": "2.0.32",
"docs": "https://nextui.org/docs/components/ripple",
"description": "A simple implementation to display a ripple animation when the source component is clicked",
"status": "stable",
Expand All @@ -457,7 +457,7 @@
{
"name": "scroll-shadow",
"package": "@nextui-org/scroll-shadow",
"version": "2.1.16",
"version": "2.1.19",
"docs": "https://nextui.org/docs/components/scroll-shadow",
"description": "A component that applies top and bottom shadows when content overflows on scroll.",
"status": "stable",
Expand All @@ -473,7 +473,7 @@
{
"name": "select",
"package": "@nextui-org/select",
"version": "2.2.1",
"version": "2.2.5",
"docs": "https://nextui.org/docs/components/select",
"description": "A select displays a collapsible list of options and allows a user to select one of them.",
"status": "stable",
Expand All @@ -490,7 +490,7 @@
{
"name": "skeleton",
"package": "@nextui-org/skeleton",
"version": "2.0.28",
"version": "2.0.31",
"docs": "https://nextui.org/docs/components/skeleton",
"description": "Skeleton is used to display the loading state of some component.",
"status": "updated",
Expand All @@ -506,7 +506,7 @@
{
"name": "slider",
"package": "@nextui-org/slider",
"version": "2.2.11",
"version": "2.2.15",
"docs": "https://nextui.org/docs/components/slider",
"description": "A slider allows a user to select one or more values within a range.",
"status": "stable",
Expand All @@ -522,7 +522,7 @@
{
"name": "snippet",
"package": "@nextui-org/snippet",
"version": "2.0.37",
"version": "2.0.41",
"docs": "https://nextui.org/docs/components/snippet",
"description": "Display a snippet of copyable code for the command line.",
"status": "stable",
Expand All @@ -539,7 +539,7 @@
{
"name": "spacer",
"package": "@nextui-org/spacer",
"version": "2.0.28",
"version": "2.0.32",
"docs": "https://nextui.org/docs/components/spacer",
"description": "A flexible spacer component designed to create consistent spacing and maintain alignment in your layout.",
"status": "stable",
Expand All @@ -554,7 +554,7 @@
{
"name": "spinner",
"package": "@nextui-org/spinner",
"version": "2.0.29",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/spinner",
"description": "Loaders express an unspecified wait time or display the length of a process.",
"status": "stable",
Expand All @@ -569,7 +569,7 @@
{
"name": "switch",
"package": "@nextui-org/switch",
"version": "2.0.30",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/switch",
"description": "A switch is similar to a checkbox, but represents on/off values as opposed to selection.",
"status": "stable",
Expand All @@ -585,7 +585,7 @@
{
"name": "table",
"package": "@nextui-org/table",
"version": "2.0.35",
"version": "2.0.39",
"docs": "https://nextui.org/docs/components/table",
"description": "Tables are used to display tabular data using rows and columns. ",
"status": "stable",
Expand All @@ -601,7 +601,7 @@
{
"name": "tabs",
"package": "@nextui-org/tabs",
"version": "2.0.31",
"version": "2.0.35",
"docs": "https://nextui.org/docs/components/tabs",
"description": "Tabs organize content into multiple sections and allow users to navigate between them.",
"status": "updated",
Expand All @@ -618,10 +618,10 @@
{
"name": "tooltip",
"package": "@nextui-org/tooltip",
"version": "2.0.35",
"version": "2.0.39",
"docs": "https://nextui.org/docs/components/tooltip",
"description": "A React Component for rendering dynamically positioned Tooltips",
"status": "stable",
"status": "updated",
"style": "popover",
"peerDependencies": {
"react": ">=18",
Expand All @@ -635,7 +635,7 @@
{
"name": "user",
"package": "@nextui-org/user",
"version": "2.0.30",
"version": "2.0.33",
"docs": "https://nextui.org/docs/components/user",
"description": "Flexible User Profile Component.",
"status": "stable",
Expand All @@ -649,5 +649,5 @@
}
}
],
"version": "2.4.1"
"version": "2.4.6"
}
5 changes: 3 additions & 2 deletions src/helpers/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function combineProblemRecord<T extends CombineType = CombineType>(
Logger.log(`- need to add ${info}`);
});
Logger.newLine();
Logger.log(`See more info here: ${chalk.underline(DOCS_TAILWINDCSS_SETUP)}-1`);
Logger.log(`See more info here: ${chalk.underline(`${DOCS_TAILWINDCSS_SETUP}-1`)}`);
}
};
} else {
Expand Down Expand Up @@ -243,7 +243,8 @@ export function checkTailwind(

if (type === 'all') {
// Check if the required content is added Detail: https://nextui.org/docs/guide/installation#global-installation
const isDarkModeCorrect = tailwindContent.match(/darkMode: ["']\w/);
const darkMatch = getMatchArray('darkMode', tailwindContent)
const isDarkModeCorrect = darkMatch.some((darkMode) => darkMode.includes('class'));
const isContentCorrect = contentMatch.some((content) =>
content.includes(tailwindRequired.content)
);
Expand Down
Loading