-
-
Notifications
You must be signed in to change notification settings - Fork 462
1559: Can't resolve 'tailwindcss/version.js' #1566
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
Merged
+832
−490
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
d308a98
refactor: remove `patch` command from CLI and related setup processes
SutuSebastian 0bda702
chore: update Flowbite React config to include Tailwind CSS version
SutuSebastian 212fd22
chore: improve JSDoc
SutuSebastian 93ceddb
chore: fix tests
SutuSebastian 607c6ae
feat(cli): add syncTailwindVersion utility and integrate into build a…
SutuSebastian 8154242
feat(docs): add dark mode option to configuration examples in customi…
SutuSebastian 41333eb
fix(Datepicker): switch hardcoded color `cyan` -> `primary`
SutuSebastian f733a0a
fix(modal): update button color from `failure` to `red`
SutuSebastian bc30900
Merge branch 'main' into 1559-cant-resolve-tailwindcssversionjs
SutuSebastian 176237b
regen lock file
SutuSebastian 8eaba2e
up bun version
SutuSebastian 338e8bf
Merge remote-tracking branch 'origin/main' into 1559-cant-resolve-tai…
SutuSebastian 2bac1da
regen lock file
SutuSebastian 5d78792
feat(install): enhance package installation logic to upgrade to lates…
SutuSebastian 61aec45
refactor(cli): replace getPackageJson with getModulePackageJson
SutuSebastian 3179ba4
chore(install): remove redundant comment
SutuSebastian 43d07aa
chore: improve DX and cleanup:
SutuSebastian 8d4c672
refactor(cli): auto generate the `ThemeInit` component in `.flwobite-…
SutuSebastian 2905e20
fix: typecheck
SutuSebastian 68d3a2a
fix: typecheck $2
SutuSebastian fc4996a
format code
SutuSebastian 7d6e75f
refactor(cli): update `setup-init` parsing:
SutuSebastian abc4e70
fix lint
SutuSebastian 25bc2c9
feat(cli): add warning for custom config values in setupConfig function
SutuSebastian 565c8a2
add changeset
SutuSebastian c443c90
update dark mode and prefix documentation:
SutuSebastian 6dd6d1d
update changelog
SutuSebastian 942a6da
feat(theme): add Tailwind CSS version support in theme mode handling …
SutuSebastian b74b29b
fix(config): update schema path and export config in `.flowbite-react…
SutuSebastian cf98442
update changelog
SutuSebastian bbafda4
fix(getThemeModeScript): wrap classsName in proper string tags
SutuSebastian e7f5931
test(theme): add tests for `getThemeModeScript` function
SutuSebastian d4985f0
expose all `/store` import paths
SutuSebastian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
"flowbite-react": minor | ||
--- | ||
|
||
# Breaking changes | ||
|
||
- removed `flowbite-react patch` CLI command | ||
|
||
## Changes | ||
|
||
- `flowbite-react/.gitignore`, `flowbite-react/config.json` self manages, regenerates and repairs | ||
- new generated file `init.(jsx|tsx)` in `.flowbite-react/` directory that syncs up values from `config.json` that also are needed in React app runtime (similar to how a React context works) | ||
- synced on CLI commands: `init`, `build`, `dev`, `register` | ||
- If you have custom configuration in `.flowbite-react/config.json` (different `dark`/`prefix`/`version` values), you must render `<ThemeInit />` at the root level of your app to sync runtime with node config values | ||
- notify users to include `<ThemeInit />` at the root level if custom `dark`, `prefix`, or `version` values are detected in the configuration file | ||
- expose `flowbite-react/store` import path | ||
- check if `flowbite-react` is installed when `npx flowbite-react@latest init` | ||
- bump the version to latest if below `0.11.x` | ||
- remove redundant `{ flag: "w" }` in `fs.writeFile` | ||
- update `dark-mode.md` and `prefix.md` documentation to reflect the `<ThemeInit />` changes | ||
- add Tailwind CSS version support in theme mode handling and fix dark theme toggle class in Tailwind CSS v4 | ||
|
||
## Migration Guide | ||
|
||
1. Remove `flowbite-react patch` from your `package.json` | ||
|
||
```diff | ||
{ | ||
"scripts": { | ||
- "postinstall": "flowbite-react patch" | ||
} | ||
} | ||
``` | ||
|
||
2. Add `<ThemeInit />` (import from `.flowbite-react/init.(jsx|tsx)`) at the root level of your app if you have custom configuration in `.flowbite-react/config.json` (different `dark`/`prefix`/`version` values). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"$schema": "../../../node_modules/flowbite-react/schema.json", | ||
"$schema": "https://unpkg.com/flowbite-react/schema.json", | ||
"components": [], | ||
"dark": true, | ||
"path": "src/components", | ||
"prefix": "", | ||
"rsc": true, | ||
"tsx": true | ||
"tsx": true, | ||
"version": 3 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
// biome-ignore-all lint: auto-generated file | ||
|
||
// This file is auto-generated by the flowbite-react CLI. | ||
// Do not edit this file directly. | ||
// Instead, edit the .flowbite-react/config.json file. | ||
|
||
import { StoreInit } from "flowbite-react/store/init"; | ||
import React from "react"; | ||
|
||
export const config = { | ||
dark: true, | ||
prefix: "", | ||
version: 3, | ||
}; | ||
|
||
export function ThemeInit() { | ||
return <StoreInit {...config} />; | ||
} | ||
|
||
ThemeInit.displayName = "ThemeInit"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"$schema": "../../../node_modules/flowbite-react/schema.json", | ||
"$schema": "https://unpkg.com/flowbite-react/schema.json", | ||
"components": [], | ||
"dark": true, | ||
"path": "components", | ||
"prefix": "", | ||
"rsc": true, | ||
"tsx": true | ||
"tsx": true, | ||
"version": 3 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
// biome-ignore-all lint: auto-generated file | ||
SutuSebastian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// This file is auto-generated by the flowbite-react CLI. | ||
// Do not edit this file directly. | ||
// Instead, edit the .flowbite-react/config.json file. | ||
|
||
import { StoreInit } from "flowbite-react/store/init"; | ||
import React from "react"; | ||
|
||
export const config = { | ||
dark: true, | ||
prefix: "", | ||
version: 3, | ||
}; | ||
|
||
export function ThemeInit() { | ||
return <StoreInit {...config} />; | ||
} | ||
|
||
ThemeInit.displayName = "ThemeInit"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,5 @@ | |
"prettier-plugin-tailwindcss": "0.6.11", | ||
"turbo": "2.4.4" | ||
}, | ||
"packageManager": "[email protected].4" | ||
"packageManager": "[email protected].18" | ||
SutuSebastian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.