-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Upgrade deprecated order-none to order-0
#18126
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
Merged
Conversation
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
- Added tests to make sure that `order-0` is not migrated to
`order-none` because it is deprecated (aka, `order-none` is ignored).
- Added tests to ensure that `order-none` is migrated to `order-0`
because `order-none` is deprecated.
- Added tests to ensure that `order-none` is _not_ migrated if you have
a custom `@utility order-none {}` implementation.
order-none to order-0order-none to order-0
Contributor
|
Maybe move the definition of order-none from utilities.ts to the legacy utilities file too? |
By moving the `order-none` to the legacy utilities, the `order-none` is not suggested anymore from the core utility. Since the pre computed utilities lookup is driven by the class list for suggestions, this also solves our issue that `order-none` defined by the user will still be used.
packages/@tailwindcss-upgrade/src/codemods/template/migrate.test.ts
Outdated
Show resolved
Hide resolved
…st.ts Co-authored-by: Jordan Pittman <[email protected]>
thecrypticace
approved these changes
May 23, 2025
1 task
This was referenced Nov 6, 2025
This was referenced Nov 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds an initial version for deprecated utilities. Right now it's hardcoded to just the
order-noneutility.This means that
order-0andorder-[0]will not be migrated toorder-noneanymore. We did that automatically because we prefer named utilities over bare values and arbitrary values.With this PR,
order-noneis ignored.Similarly,
order-nonewill be migrated toorder-0instead (defined in a separate migration for deprecated values). Made it a new migration instead of using the legacy migration because there all utilities still exist, but are defined differently (e.g.:shadow,shadow-sm,shadow-xs).This PR is also an initial version, it doesn't add any form of
deprecatedflag or feature on a per-utility implementation basis. This therefor has the side effect that if you have a customorder-nonedefined, that it will also be ignored during migrations.Test plan
order-0is not migrated toorder-noneorder-noneis migrated toorder-0(if it's safe to do so, the signature is still computed to ensure the output is the same).order-0is not migrated toorder-noneand thatorder-noneis migrated toorder-0.