@mittwald/flow-react-components 1.2.0-next.33 → 1.2.0-next.34

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/MIGRATION.md CHANGED
@@ -571,7 +571,7 @@ case.
571
571
 
572
572
  ## TableColumn: `maxWidth` removed, `width` and `minWidth` retyped
573
573
 
574
- **Since `0.2.0-alpha.956`** · migration · manual change · also applies to
574
+ **Since `0.2.0-alpha.956`** · migration · codemod available · also applies to
575
575
  `@mittwald/flow-remote-react-components`
576
576
 
577
577
  `maxWidth` has been removed. `width` and `minWidth` are now typed as
@@ -588,9 +588,24 @@ Percentage, pixel and `fr` values keep working as strings or numbers
588
588
  (`width="50%"`, `width="200fr"`, `width={300}`). Where you passed `null` to mean
589
589
  "no explicit width", omit the prop instead.
590
590
 
591
+ A codemod removes `maxWidth` — the prop is gone from the type, so an explicit
592
+ attribute is wrong at any value, an expression included — and removes a `width`
593
+ or `minWidth` written as the literal `null`.
594
+
595
+ It declines what it cannot decide from the source: `width={maybeNull}` could be
596
+ anything at runtime, and a spread's contents are invisible. Both keep their
597
+ props and need a look by hand.
598
+
591
599
  **Apply:** Remove `maxWidth` from every `TableColumn`. Where `width` or
592
600
  `minWidth` was `null`, omit the prop instead — the type no longer accepts
593
- `null`, only `number | string`.
601
+ `null`, only `number | string`. A codemod does both for the cases it can decide
602
+ from the source. Two it declines: a `width`/`minWidth` whose value is an
603
+ expression (`width={maybeNull}`), and a spread that might carry `maxWidth`
604
+ (`<TableColumn {...props} />`). Check those by hand.
605
+
606
+ ```shell
607
+ npx @mittwald/flow-codemods@latest table-column-width-props src
608
+ ```
594
609
 
595
610
  ---
596
611
 
@@ -1153,7 +1168,7 @@ npx @mittwald/flow-codemods@latest imports-to-package-root src
1153
1168
 
1154
1169
  ## Renamed CSS export
1155
1170
 
1156
- **Since `0.1.0-alpha.292`** · migration · manual change
1171
+ **Since `0.1.0-alpha.292`** · migration · codemod available
1157
1172
 
1158
1173
  The CSS export `@mittwald/flow-react-components/styles` has renamed to the more
1159
1174
  precise name `@mittwald/flow-react-components/all.css`, because the file
@@ -1166,5 +1181,15 @@ as well. A documentation on how to use them is planned.
1166
1181
  + import "@mittwald/flow-react-components/all.css";
1167
1182
  ```
1168
1183
 
1184
+ A codemod rewrites the specifier in every JavaScript and TypeScript form that
1185
+ names a module. It cannot reach a `.css` or `.scss` file, so an `@import` of the
1186
+ old path there needs a manual search.
1187
+
1169
1188
  **Apply:** Replace the import `@mittwald/flow-react-components/styles` with
1170
- `@mittwald/flow-react-components/all.css`.
1189
+ `@mittwald/flow-react-components/all.css`. A codemod does this for JavaScript
1190
+ and TypeScript files. An `@import` of the old path inside a `.css` or `.scss`
1191
+ file is not covered — search for it by hand.
1192
+
1193
+ ```shell
1194
+ npx @mittwald/flow-codemods@latest renamed-css-export src
1195
+ ```