You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,6 +69,15 @@ const patcher = new TailwindcssPatcher({
67
69
68
70
Both shapes are accepted. When the constructor detects `patch`/`cache` keys it automatically converts them via `fromLegacyOptions()`. This allows step-by-step migrations.
69
71
72
+
Deprecated fields (planned removal in the next major): `cwd`, `overwrite`, `tailwind`, `features`, `output`.
73
+
74
+
Migration mapping:
75
+
-`cwd` -> `projectRoot`
76
+
-`overwrite` -> `apply.overwrite`
77
+
-`tailwind` -> `tailwindcss`
78
+
-`features` -> `apply`
79
+
-`output` -> `extract`
80
+
70
81
## 3. CLI changes
71
82
72
83
-`tw-patch install` still applies the runtime patch, but logging and error handling were refreshed.
@@ -104,15 +115,15 @@ Update imports accordingly when consuming these helpers directly.
104
115
105
116
## 6. Configuration advice
106
117
107
-
`defineConfig` from `tailwindcss-patch` (provided by `@tailwindcss-mangle/config`) still emits the legacy `patch` object. All new fields—`output.format`, extended `tailwindcss.v4` options, `applyPatches.extendLengthUnits` objects—are handled transparently. You may migrate gradually by adding the new keys into the existing `patch` block.
118
+
`defineConfig` from `tailwindcss-patch` (provided by `@tailwindcss-mangle/config`) still emits the legacy `patch` object. The patcher normalizer maps it to the modern runtime shape (`tailwindcss`, `apply`, `extract`) automatically, so migration can be gradual.
108
119
109
120
If you want the new structure inside application code, prefer creating the patcher manually and pass the modern object as demonstrated above.
110
121
111
122
## 7. Feature highlights
112
123
113
-
- Tailwind v4 is supported without monkey patching. Provide CSS entries and content sources to `tailwind.v4` and call `extract()`.
124
+
- Tailwind v4 is supported without monkey patching. Provide CSS entries and content sources to `tailwindcss.v4` and call `extract()`.
114
125
- Custom length units patching (`extendLengthUnits`) now supports Tailwind v3 and v4 with a single option object.
115
-
- Filters are composed with the `output.removeUniversalSelector` flag so `'*'` can be kept when desired.
126
+
- Filters are composed with the `extract.removeUniversalSelector` flag so `'*'` can be kept when desired.
116
127
117
128
## 8. Removal summary
118
129
@@ -126,7 +137,7 @@ If you want the new structure inside application code, prefer creating the patch
126
137
2. Review custom imports from `tailwindcss-patch/core/*` and switch to the new module paths.
127
138
3. If you instantiate the patcher manually, adopt the new options object (or keep legacy options temporarily).
128
139
4. Refresh CLI usage in scripts (e.g. add `--output` or `--no-write` where appropriate).
129
-
5. For Tailwind v4 projects, configure `tailwind.v4.cssEntries` and `sources` so that `extract()` can discover candidates.
140
+
5. For Tailwind v4 projects, configure `tailwindcss.v4.cssEntries` and `sources` so that `extract()` can discover candidates.
130
141
6. Run your extraction workflow and ensure the generated class list matches expectations.
131
142
132
143
For any regressions or gaps discovered during migration, please open an issue with reproduction details so we can iterate quickly.
The constructor accepts either the new object shown above or the historical `patch`/`cache` shape. Conversions happen internally so existing configs remain backwards compatible.
167
+
The constructor accepts either the new object shown above or historical shapes. Conversions happen internally so existing configs remain backwards compatible.
168
+
169
+
Deprecated fields kept temporarily (to be removed in the next major): `cwd`, `overwrite`, `tailwind`, `features`, `output`.
170
+
171
+
Migration mapping:
172
+
-`cwd` -> `projectRoot`
173
+
-`overwrite` -> `apply.overwrite`
174
+
-`tailwind` -> `tailwindcss`
175
+
-`features` -> `apply`
176
+
-`output` -> `extract`
166
177
167
178
Use cache.driver to switch between the default file-backed cache, an in-memory cache (memory), or a no-op cache (noop) when filesystem permissions are restricted.
0 commit comments