@mittwald/flow-codemods 1.2.0-next.9 → 1.2.0
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/dist/catalog/entries.d.ts +0 -1
- package/dist/catalog/select.d.ts +0 -1
- package/dist/catalog/types.d.ts +0 -1
- package/dist/cli/args.d.ts +0 -1
- package/dist/cli/choose.d.ts +0 -1
- package/dist/cli/codemod.d.ts +0 -1
- package/dist/cli/list.d.ts +0 -1
- package/dist/cli/upgrade.d.ts +7 -1
- package/dist/cli/upgrade.js +18 -14
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +4 -0
- package/dist/flowPackages.generated.d.ts +0 -1
- package/dist/git.d.ts +0 -1
- package/dist/install.d.ts +0 -1
- package/dist/manifest.d.ts +0 -1
- package/dist/migrations/action-prop-to-on-action/transform.js +91 -5
- package/dist/migrations/imports-to-package-root/transform.js +25 -2
- package/dist/migrations/password-tools-rule/transform.js +12 -1
- package/dist/migrations/popover-open-state-props/transform.js +101 -0
- package/dist/migrations/renamed-css-export/transform.js +73 -0
- package/dist/migrations/table-column-width-props/transform.js +131 -0
- package/dist/migrations.generated.d.ts +0 -1
- package/dist/migrations.generated.js +33 -6
- package/dist/resolve/range.d.ts +0 -1
- package/dist/resolve/registry.d.ts +0 -1
- package/dist/resolve/target.d.ts +0 -1
- package/dist/run/jscodeshift.d.ts +0 -1
- package/package.json +3 -2
- package/dist/catalog/entries.d.ts.map +0 -1
- package/dist/catalog/select.d.ts.map +0 -1
- package/dist/catalog/types.d.ts.map +0 -1
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/choose.d.ts.map +0 -1
- package/dist/cli/codemod.d.ts.map +0 -1
- package/dist/cli/list.d.ts.map +0 -1
- package/dist/cli/upgrade.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/flowPackages.generated.d.ts.map +0 -1
- package/dist/git.d.ts.map +0 -1
- package/dist/install.d.ts.map +0 -1
- package/dist/manifest.d.ts.map +0 -1
- package/dist/migrations.generated.d.ts.map +0 -1
- package/dist/resolve/range.d.ts.map +0 -1
- package/dist/resolve/registry.d.ts.map +0 -1
- package/dist/resolve/target.d.ts.map +0 -1
- package/dist/run/jscodeshift.d.ts.map +0 -1
package/dist/catalog/select.d.ts
CHANGED
package/dist/catalog/types.d.ts
CHANGED
package/dist/cli/args.d.ts
CHANGED
package/dist/cli/choose.d.ts
CHANGED
|
@@ -28,4 +28,3 @@ export interface CreateChooseInput {
|
|
|
28
28
|
* distinguishes a human from an unattended runner there.
|
|
29
29
|
*/
|
|
30
30
|
export declare const createChoose: ({ yes, isTTY, isCI, prompt, onCancel, }: CreateChooseInput) => ((entries: CatalogEntry[]) => Promise<CatalogEntry[]>);
|
|
31
|
-
//# sourceMappingURL=choose.d.ts.map
|
package/dist/cli/codemod.d.ts
CHANGED
package/dist/cli/list.d.ts
CHANGED
package/dist/cli/upgrade.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ export interface UpgradeDeps {
|
|
|
13
13
|
isDirty: (cwd: string) => boolean;
|
|
14
14
|
readInstalledVersion: (cwd: string, name: string) => string | undefined;
|
|
15
15
|
log: (message: string) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Emit ANSI colour in the by-hand list. Off by default so a test sees plain
|
|
18
|
+
* text.
|
|
19
|
+
*/
|
|
20
|
+
color?: boolean;
|
|
21
|
+
/** Terminal width to wrap the by-hand list's prose to. */
|
|
22
|
+
width?: number;
|
|
16
23
|
}
|
|
17
24
|
export declare const defaultUpgradeDeps: (cwd: string) => UpgradeDeps;
|
|
18
25
|
/**
|
|
@@ -31,4 +38,3 @@ export declare const defaultUpgradeDeps: (cwd: string) => UpgradeDeps;
|
|
|
31
38
|
* genuinely have nothing to do.
|
|
32
39
|
*/
|
|
33
40
|
export declare const runUpgrade: (parsed: ParsedCommand, deps: UpgradeDeps) => Promise<number>;
|
|
34
|
-
//# sourceMappingURL=upgrade.d.ts.map
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -187,26 +187,20 @@ export const runUpgrade = async (parsed, deps) => {
|
|
|
187
187
|
log(` ${entry.id}: ${result.changed} file(s) changed`);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
// Selection has no lower bound (see `selectEntries`), so this loop can run
|
|
191
|
-
// every codemod in the catalogue on a project that never crossed a version
|
|
192
|
-
// at all — "N run, 0 changed" is the confirmation that there was nothing to
|
|
193
|
-
// catch up on, not a list of new work.
|
|
194
|
-
if (ranCount > 0) {
|
|
195
|
-
log(`\n${ranCount} codemod${ranCount === 1 ? "" : "s"} run, ${changedCount} changed something.`);
|
|
196
|
-
}
|
|
197
190
|
if (byHand.length > 0) {
|
|
198
191
|
log(`\n${byHand.length} migration(s) in this range have no codemod — apply them by hand:\n`);
|
|
199
|
-
// `frame: false` — this already printed the heading above and
|
|
200
|
-
//
|
|
201
|
-
// renderList's own frame
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
// the only thing left that says so now that hiding it is gone.
|
|
192
|
+
// `frame: false` — this already printed the heading above, and the
|
|
193
|
+
// closing summaries below cover the same aggregate ("N codemods run, N
|
|
194
|
+
// changed something") renderList's own frame would otherwise repeat.
|
|
195
|
+
// `range` is still passed so each entry gets its catch-up mark — a manual
|
|
196
|
+
// entry that shipped at or before `current` may already be done, and the
|
|
197
|
+
// mark is the only thing left that says so now that hiding it is gone.
|
|
206
198
|
log(renderList({
|
|
207
199
|
entries: byHand,
|
|
208
200
|
range: { from: current, to: target },
|
|
209
201
|
json: false,
|
|
202
|
+
color: deps.color,
|
|
203
|
+
width: deps.width,
|
|
210
204
|
// The same path this run used, so a command copied out of the by-hand
|
|
211
205
|
// block works instead of falling back to a hardcoded `src`.
|
|
212
206
|
path: displaySourcePath(parsed.path, cwd),
|
|
@@ -217,6 +211,16 @@ export const runUpgrade = async (parsed, deps) => {
|
|
|
217
211
|
else {
|
|
218
212
|
log("\nNo migration in this range required a change by hand.");
|
|
219
213
|
}
|
|
214
|
+
// Both closing summaries trail everything else, not just each other: a
|
|
215
|
+
// multi-screen by-hand list would otherwise scroll them out of sight before
|
|
216
|
+
// the reader reaches the end — exactly when they want the counts. Selection
|
|
217
|
+
// has no lower bound (see `selectEntries`), so this loop can run every
|
|
218
|
+
// codemod in the catalogue on a project that never crossed a version at
|
|
219
|
+
// all — "N run, 0 changed" is the confirmation that there was nothing to
|
|
220
|
+
// catch up on, not a list of new work.
|
|
221
|
+
if (ranCount > 0) {
|
|
222
|
+
log(`\n${ranCount} codemod${ranCount === 1 ? "" : "s"} run, ${changedCount} changed something.`);
|
|
223
|
+
}
|
|
220
224
|
if (incomplete.length > 0) {
|
|
221
225
|
log(`\n${incomplete.length} codemod(s) did not complete: ${incomplete.join(", ")}`);
|
|
222
226
|
}
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -107,6 +107,10 @@ const main = async () => {
|
|
|
107
107
|
return runUpgrade(parsed, {
|
|
108
108
|
...defaultUpgradeDeps(process.cwd()),
|
|
109
109
|
choose,
|
|
110
|
+
// Same rule as `list`: colour only for a person at a real terminal,
|
|
111
|
+
// off under `NO_COLOR` or a pipe so the output stays greppable.
|
|
112
|
+
color: process.stdout.isTTY === true && process.env.NO_COLOR === undefined,
|
|
113
|
+
width: Math.min(Math.max(process.stdout.columns ?? 80, 60), 100),
|
|
110
114
|
});
|
|
111
115
|
}
|
|
112
116
|
default:
|
package/dist/git.d.ts
CHANGED
package/dist/install.d.ts
CHANGED
package/dist/manifest.d.ts
CHANGED
|
@@ -42,4 +42,3 @@ export declare const applyTarget: <T extends Manifest>(manifest: T, target: stri
|
|
|
42
42
|
* `imports-to-package-root` needed an explicit leave-alone set to earn this.
|
|
43
43
|
*/
|
|
44
44
|
export declare const detectCurrentVersion: (dependencies: FlowDependency[], readInstalledVersion: (name: string) => string | undefined) => string | undefined;
|
|
45
|
-
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* Renames the `action` prop to `onAction` on `Action
|
|
4
|
+
* Renames the `action` prop to `onAction` on `Action`, and wraps a bare
|
|
5
|
+
* function reference passed to it in an inline call.
|
|
5
6
|
*
|
|
6
7
|
* The scope is deliberately narrow. Only JSX elements that resolve to `Action`
|
|
7
8
|
* — imported (named or as a namespace) from `@mittwald/flow-react-components`
|
|
@@ -14,6 +15,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
15
|
* An element that already carries `onAction` keeps it and only loses the stale
|
|
15
16
|
* `action` prop, which mirrors what the runtime fallback does: an explicit
|
|
16
17
|
* `onAction` wins.
|
|
18
|
+
*
|
|
19
|
+
* ## Why the wrap is unconditional
|
|
20
|
+
*
|
|
21
|
+
* `onAction` is typed `ActionFn` (`(...args: unknown[]) => unknown`), so a
|
|
22
|
+
* reference to a function declaring a parameter of any narrower type — the
|
|
23
|
+
* usual case being `controller.close`, typed `(options?: CloseOverlayOptions)
|
|
24
|
+
* => void` — does not type-check. Whether a given reference declares such a
|
|
25
|
+
* parameter needs type information and is not decidable from the source, which
|
|
26
|
+
* is why this transform used to leave every reference alone and `apply` asked
|
|
27
|
+
* for a manual pass over all of them.
|
|
28
|
+
*
|
|
29
|
+
* Deciding _whether_ to wrap needs the type. _Performing_ the wrap does not:
|
|
30
|
+
* `() => fn()` calls exactly what `fn` would have been called with by `Action`,
|
|
31
|
+
* minus the arguments — and `onAction` is documented as taking none. So the
|
|
32
|
+
* wrap fixes the reference that needed it and is a no-op for the rest, which
|
|
33
|
+
* makes the decision unnecessary.
|
|
34
|
+
*
|
|
35
|
+
* Two cases it can still change, neither decidable from the source:
|
|
36
|
+
*
|
|
37
|
+
* - A handler that reads the argument `Action` forwards (the trigger's event,
|
|
38
|
+
* e.g. a `PressEvent` from the `Button` inside) and declares it optional or
|
|
39
|
+
* as a rest parameter, so that it type-checks both before and after. It stops
|
|
40
|
+
* receiving that argument, silently. Nothing in Flow documents `onAction` as
|
|
41
|
+
* receiving one.
|
|
42
|
+
* - A possibly-undefined reference, `onAction={props.onAction}`. `undefined` is a
|
|
43
|
+
* valid value for the prop, but calling it is not, so the wrap turns
|
|
44
|
+
* something TypeScript accepted into something it rejects — loudly, at the
|
|
45
|
+
* call site, which is why this is a compile error to fix rather than a
|
|
46
|
+
* regression to find.
|
|
47
|
+
*
|
|
48
|
+
* `apply` names both.
|
|
49
|
+
*
|
|
50
|
+
* Only a bare reference is wrapped: a plain identifier or a member expression.
|
|
51
|
+
* An arrow function and a function expression already are the handler. A call
|
|
52
|
+
* (`makeHandler()`, `close.bind(controller)`) _produces_ the handler, so
|
|
53
|
+
* wrapping it would call the factory on every trigger and throw its result
|
|
54
|
+
* away. A conditional, a `??` chain or an optional member expression is not a
|
|
55
|
+
* reference to one function, so wrapping would be a guess.
|
|
17
56
|
*/
|
|
18
57
|
const actionPropToOnActionTransform = (fileInfo, { j }) => {
|
|
19
58
|
const flowPackages = [
|
|
@@ -22,6 +61,27 @@ const actionPropToOnActionTransform = (fileInfo, { j }) => {
|
|
|
22
61
|
];
|
|
23
62
|
const affectedComponents = new Set(["Action"]);
|
|
24
63
|
const isFlowImport = (source) => flowPackages.some((pkg) => source === pkg || source.startsWith(`${pkg}/`));
|
|
64
|
+
/**
|
|
65
|
+
* Whether a member expression is rooted in a plain reference —
|
|
66
|
+
* `controller.close`, `this.handleSave`, `store.modal.controller.close` —
|
|
67
|
+
* rather than in something evaluated, as `makeController().close` is.
|
|
68
|
+
*
|
|
69
|
+
* An optional link disqualifies the chain. `controller?.close` parses as
|
|
70
|
+
* `OptionalMemberExpression` and never reaches here at all; walking the chain
|
|
71
|
+
* catches a mixed one like `(a?.b).c`. Declining is deliberate: `() =>
|
|
72
|
+
* controller?.close()` short-circuits differently from the value it would
|
|
73
|
+
* replace, and the spelling says the reference may not be there.
|
|
74
|
+
*/
|
|
75
|
+
const hasPlainObjectChain = (expression) => {
|
|
76
|
+
const object = expression.object;
|
|
77
|
+
if (!object || typeof object !== "object" || !("type" in object)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
const typed = object;
|
|
81
|
+
return (typed.type === "ThisExpression" ||
|
|
82
|
+
typed.type === "Identifier" ||
|
|
83
|
+
(typed.type === "MemberExpression" && hasPlainObjectChain(typed)));
|
|
84
|
+
};
|
|
25
85
|
const root = j(fileInfo.source, { parser: "tsx" });
|
|
26
86
|
// Local JSX identifier -> canonical component name (resolves `as` aliases).
|
|
27
87
|
const localToComponent = new Map();
|
|
@@ -69,12 +129,38 @@ const actionPropToOnActionTransform = (fileInfo, { j }) => {
|
|
|
69
129
|
const hasOnAction = attributes.some((attribute) => isNamed(attribute, "onAction"));
|
|
70
130
|
if (hasOnAction) {
|
|
71
131
|
path.node.attributes = attributes.filter((attribute) => !isNamed(attribute, "action"));
|
|
72
|
-
return;
|
|
73
132
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
attribute.
|
|
133
|
+
else {
|
|
134
|
+
for (const attribute of attributes) {
|
|
135
|
+
if (isNamed(attribute, "action") && attribute.type === "JSXAttribute") {
|
|
136
|
+
attribute.name.name = "onAction";
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Whatever the prop was called before, the surviving `onAction` is the one
|
|
141
|
+
// that needs the wrap — including one the consumer had already renamed by
|
|
142
|
+
// hand, which carries the same type error.
|
|
143
|
+
for (const attribute of path.node.attributes ?? []) {
|
|
144
|
+
if (attribute.type !== "JSXAttribute" ||
|
|
145
|
+
!isNamed(attribute, "onAction")) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const container = attribute.value;
|
|
149
|
+
if (container?.type !== "JSXExpressionContainer") {
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
// A bare reference is an identifier or a member expression. Everything
|
|
153
|
+
// else either is the handler already or is a way of producing one.
|
|
154
|
+
const expression = container.expression;
|
|
155
|
+
if (expression.type !== "Identifier" &&
|
|
156
|
+
expression.type !== "MemberExpression") {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (expression.type === "MemberExpression" &&
|
|
160
|
+
!hasPlainObjectChain(expression)) {
|
|
161
|
+
continue;
|
|
77
162
|
}
|
|
163
|
+
attribute.value = j.jsxExpressionContainer(j.arrowFunctionExpression([], j.callExpression(expression, [])));
|
|
78
164
|
}
|
|
79
165
|
});
|
|
80
166
|
return root.toSource();
|
|
@@ -29,6 +29,7 @@ const keptSubpaths = new Set([
|
|
|
29
29
|
// the current export surface
|
|
30
30
|
"internal",
|
|
31
31
|
"flr-universal",
|
|
32
|
+
"tunnel",
|
|
32
33
|
"nextjs",
|
|
33
34
|
"react-hook-form",
|
|
34
35
|
"mittwald-password-tools-js",
|
|
@@ -39,6 +40,21 @@ const keptSubpaths = new Set([
|
|
|
39
40
|
// owned by password-tools-subpath-renamed
|
|
40
41
|
"password-tools",
|
|
41
42
|
]);
|
|
43
|
+
/**
|
|
44
|
+
* Splits a bundler's asset query or fragment off a specifier. `all.css?url` is
|
|
45
|
+
* the subpath `all.css`, requested as a URL — not a subpath named
|
|
46
|
+
* `all.css?url`. Matching the whole string carried the suffix past the
|
|
47
|
+
* leave-alone set and into the catch-all below, which rewrote `import
|
|
48
|
+
* flowStyles from "…/all.css?url"` into a named import of a JS export that does
|
|
49
|
+
* not exist, and `import "…/all-layered.css?inline"` into a side-effect import
|
|
50
|
+
* of the package root — stylesheet gone, no error anywhere.
|
|
51
|
+
*/
|
|
52
|
+
const splitAssetSuffix = (subpath) => {
|
|
53
|
+
const suffixAt = subpath.search(/[?#]/);
|
|
54
|
+
return suffixAt === -1
|
|
55
|
+
? [subpath, ""]
|
|
56
|
+
: [subpath.slice(0, suffixAt), subpath.slice(suffixAt)];
|
|
57
|
+
};
|
|
42
58
|
const importsToPackageRootTransform = (fileInfo, { j }) => {
|
|
43
59
|
const flowPackage = "@mittwald/flow-react-components";
|
|
44
60
|
const root = j(fileInfo.source, {
|
|
@@ -50,14 +66,21 @@ const importsToPackageRootTransform = (fileInfo, { j }) => {
|
|
|
50
66
|
.forEach((i) => {
|
|
51
67
|
const specifiers = i.node.specifiers ?? [];
|
|
52
68
|
const importPath = String(i.node.source.value);
|
|
53
|
-
const importRelativePath = importPath.slice(flowPackage.length + 1);
|
|
69
|
+
const [importRelativePath, assetSuffix] = splitAssetSuffix(importPath.slice(flowPackage.length + 1));
|
|
54
70
|
if (keptSubpaths.has(importRelativePath)) {
|
|
55
71
|
return;
|
|
56
72
|
}
|
|
57
73
|
if (importRelativePath === "all.css" ||
|
|
58
74
|
importRelativePath === "globals.css" ||
|
|
59
75
|
importRelativePath === "global.css") {
|
|
60
|
-
i.node.source.value = `${flowPackage}/all.css`;
|
|
76
|
+
i.node.source.value = `${flowPackage}/all.css${assetSuffix}`;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Everything below rewrites a *module* import: it moves the specifier
|
|
80
|
+
// onto a JS entry and turns a default specifier into a named one. An
|
|
81
|
+
// asset import survives neither, and a suffix reaching this point names a
|
|
82
|
+
// path this transform cannot resolve to an export — leave it to a human.
|
|
83
|
+
if (assetSuffix !== "") {
|
|
61
84
|
return;
|
|
62
85
|
}
|
|
63
86
|
if (importRelativePath.startsWith("react-hook-form")) {
|
|
@@ -23,11 +23,22 @@ const passwordToolsRuleTransform = (fileInfo, { j }) => {
|
|
|
23
23
|
const flowPackages = [
|
|
24
24
|
"@mittwald/flow-react-components/mittwald-password-tools-js",
|
|
25
25
|
];
|
|
26
|
+
/**
|
|
27
|
+
* The same entry under the name it had when this change shipped. It was
|
|
28
|
+
* renamed later (alpha.1000, `password-tools-subpath-renamed`), and `since`
|
|
29
|
+
* puts that rename _after_ this transform — so a consumer coming from before
|
|
30
|
+
* alpha.802 still spells the import `password-tools` when this runs, and
|
|
31
|
+
* matching only the current name left `AsyncRule` untouched for the rename to
|
|
32
|
+
* carry onto an entry that does not export it. Kept out of `flowPackages`
|
|
33
|
+
* because `remoteScope.test.ts` holds every name in there against the export
|
|
34
|
+
* map the packages have _today_, where this one is gone.
|
|
35
|
+
*/
|
|
36
|
+
const renamedFlowPackage = "@mittwald/flow-react-components/password-tools";
|
|
26
37
|
const renames = new Map([
|
|
27
38
|
["AsyncRule", "Rule"],
|
|
28
39
|
["SyncRule", "Rule"],
|
|
29
40
|
]);
|
|
30
|
-
const isFlowImport = (source) => flowPackages.includes(source);
|
|
41
|
+
const isFlowImport = (source) => flowPackages.includes(source) || source === renamedFlowPackage;
|
|
31
42
|
// ast-types models `importKind` on the declaration only, while babel also
|
|
32
43
|
// puts it on the specifier — which is where a per-specifier `type X` lives.
|
|
33
44
|
const isTypeOnly = (specifier) => specifier.importKind === "type";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Renames the `defaultOpen` prop to `isDefaultOpen` on `Popover`,
|
|
5
|
+
* `ContextualHelp` and `ContextMenu`.
|
|
6
|
+
*
|
|
7
|
+
* The scope is deliberately narrow, and here that is not only about same-named
|
|
8
|
+
* components from other packages. `defaultOpen` is react-aria's own prop and
|
|
9
|
+
* Flow passes it straight through on `Select`, `MenuTrigger`, `Tooltip`,
|
|
10
|
+
* `TooltipTrigger`, `DialogTrigger`, `DatePicker` and `DateRangePicker`, where
|
|
11
|
+
* it did not change — renaming it there would remove a working prop.
|
|
12
|
+
*
|
|
13
|
+
* Only JSX elements that resolve to one of the three — imported (named or as a
|
|
14
|
+
* namespace) from `@mittwald/flow-react-components` or
|
|
15
|
+
* `@mittwald/flow-remote-react-components`, including their subpath entries —
|
|
16
|
+
* are touched.
|
|
17
|
+
*
|
|
18
|
+
* An element that already carries `isDefaultOpen` keeps it and only loses the
|
|
19
|
+
* stale `defaultOpen`, which mirrors the runtime: `isDefaultOpen` wins.
|
|
20
|
+
*
|
|
21
|
+
* The other two changes of this migration are not here. `isOpen` and
|
|
22
|
+
* `onOpenChange` changed behaviour, not spelling: whether a given `isOpen` is
|
|
23
|
+
* meant to control the popover, and whether an `onOpenChange` handler performed
|
|
24
|
+
* or suppressed the close, is not decidable from the source. `apply` asks for
|
|
25
|
+
* those by hand.
|
|
26
|
+
*/
|
|
27
|
+
const popoverOpenStatePropsTransform = (fileInfo, { j }) => {
|
|
28
|
+
const flowPackages = [
|
|
29
|
+
"@mittwald/flow-react-components",
|
|
30
|
+
"@mittwald/flow-remote-react-components",
|
|
31
|
+
];
|
|
32
|
+
const affectedComponents = new Set([
|
|
33
|
+
"Popover",
|
|
34
|
+
"ContextualHelp",
|
|
35
|
+
"ContextMenu",
|
|
36
|
+
]);
|
|
37
|
+
const isFlowImport = (source) => flowPackages.some((pkg) => source === pkg || source.startsWith(`${pkg}/`));
|
|
38
|
+
const root = j(fileInfo.source, { parser: "tsx" });
|
|
39
|
+
// Local JSX identifier -> canonical component name (resolves `as` aliases).
|
|
40
|
+
const localToComponent = new Map();
|
|
41
|
+
// Local names of `import * as Flow` namespace imports from a Flow package.
|
|
42
|
+
const flowNamespaces = new Set();
|
|
43
|
+
root
|
|
44
|
+
.find(j.ImportDeclaration)
|
|
45
|
+
.filter((path) => isFlowImport(String(path.node.source.value)))
|
|
46
|
+
.forEach((path) => {
|
|
47
|
+
for (const specifier of path.node.specifiers ?? []) {
|
|
48
|
+
if (specifier.type === "ImportSpecifier" &&
|
|
49
|
+
specifier.imported.type === "Identifier" &&
|
|
50
|
+
affectedComponents.has(specifier.imported.name)) {
|
|
51
|
+
localToComponent.set(String(specifier.local?.name ?? specifier.imported.name), String(specifier.imported.name));
|
|
52
|
+
}
|
|
53
|
+
else if (specifier.type === "ImportNamespaceSpecifier" &&
|
|
54
|
+
specifier.local) {
|
|
55
|
+
flowNamespaces.add(String(specifier.local.name));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
if (localToComponent.size === 0 && flowNamespaces.size === 0) {
|
|
60
|
+
return fileInfo.source;
|
|
61
|
+
}
|
|
62
|
+
let changed = false;
|
|
63
|
+
root.find(j.JSXOpeningElement).forEach((path) => {
|
|
64
|
+
const name = path.node.name;
|
|
65
|
+
let isAffected = false;
|
|
66
|
+
if (name.type === "JSXIdentifier") {
|
|
67
|
+
isAffected = localToComponent.has(name.name);
|
|
68
|
+
}
|
|
69
|
+
else if (name.type === "JSXMemberExpression" &&
|
|
70
|
+
name.object.type === "JSXIdentifier" &&
|
|
71
|
+
name.property.type === "JSXIdentifier") {
|
|
72
|
+
isAffected =
|
|
73
|
+
flowNamespaces.has(name.object.name) &&
|
|
74
|
+
affectedComponents.has(name.property.name);
|
|
75
|
+
}
|
|
76
|
+
if (!isAffected) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const attributes = path.node.attributes ?? [];
|
|
80
|
+
const isNamed = (attribute, key) => attribute.type === "JSXAttribute" &&
|
|
81
|
+
attribute.name.type === "JSXIdentifier" &&
|
|
82
|
+
attribute.name.name === key;
|
|
83
|
+
if (!attributes.some((attribute) => isNamed(attribute, "defaultOpen"))) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
changed = true;
|
|
87
|
+
if (attributes.some((attribute) => isNamed(attribute, "isDefaultOpen"))) {
|
|
88
|
+
path.node.attributes = attributes.filter((attribute) => !isNamed(attribute, "defaultOpen"));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
for (const attribute of attributes) {
|
|
92
|
+
if (isNamed(attribute, "defaultOpen") &&
|
|
93
|
+
attribute.type === "JSXAttribute" &&
|
|
94
|
+
attribute.name.type === "JSXIdentifier") {
|
|
95
|
+
attribute.name.name = "isDefaultOpen";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return changed ? root.toSource() : fileInfo.source;
|
|
100
|
+
};
|
|
101
|
+
exports.default = popoverOpenStatePropsTransform;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const oldPath = "@mittwald/flow-react-components/styles";
|
|
4
|
+
const newPath = "@mittwald/flow-react-components/all.css";
|
|
5
|
+
/**
|
|
6
|
+
* Rewrites the module specifier `@mittwald/flow-react-components/styles` to
|
|
7
|
+
* `@mittwald/flow-react-components/all.css` (alpha.292).
|
|
8
|
+
*
|
|
9
|
+
* The same shape as `password-tools-subpath-renamed`: one exact specifier, in
|
|
10
|
+
* every form that names a module — `import`, `import type`, `export … from`, a
|
|
11
|
+
* side-effect import, `import()` and `require()`. In practice it is nearly
|
|
12
|
+
* always the side-effect form (`import "…/styles"`), which is why that case is
|
|
13
|
+
* the one the fixtures lead with.
|
|
14
|
+
*
|
|
15
|
+
* Exact match on the path, not a prefix: `./styles` was a single export with
|
|
16
|
+
* nothing underneath it, so there is no deeper path to rewrite and no risk of
|
|
17
|
+
* touching an unrelated `styles` of someone else's. A bundler query or fragment
|
|
18
|
+
* (`?url`, `?inline`) is split off before that comparison and carried over — it
|
|
19
|
+
* addresses the export, it does not name a different one.
|
|
20
|
+
*
|
|
21
|
+
* What this cannot reach is an `@import` in a `.css` or `.scss` file —
|
|
22
|
+
* jscodeshift only walks the JavaScript and TypeScript extensions. `apply` says
|
|
23
|
+
* so.
|
|
24
|
+
*/
|
|
25
|
+
const renamedCssExportTransform = (fileInfo, { j }) => {
|
|
26
|
+
const root = j(fileInfo.source, { parser: "tsx" });
|
|
27
|
+
let changed = false;
|
|
28
|
+
// A bundler addresses an asset through a query or fragment on the specifier,
|
|
29
|
+
// so `…/styles?url` is the old export requested as a URL. The rename applies
|
|
30
|
+
// to it just the same: match the path, carry the suffix over. Comparing the
|
|
31
|
+
// whole string leaves it pointing at an export the package no longer has.
|
|
32
|
+
const rewrite = (node) => {
|
|
33
|
+
if (typeof node.value !== "string") {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const suffixAt = node.value.search(/[?#]/);
|
|
37
|
+
const [path, suffix] = suffixAt === -1
|
|
38
|
+
? [node.value, ""]
|
|
39
|
+
: [node.value.slice(0, suffixAt), node.value.slice(suffixAt)];
|
|
40
|
+
if (path !== oldPath) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
node.value = `${newPath}${suffix}`;
|
|
44
|
+
changed = true;
|
|
45
|
+
};
|
|
46
|
+
// import … from "…", import "…"
|
|
47
|
+
root.find(j.ImportDeclaration).forEach((path) => rewrite(path.node.source));
|
|
48
|
+
// export … from "…", export * from "…"
|
|
49
|
+
root
|
|
50
|
+
.find(j.ExportNamedDeclaration)
|
|
51
|
+
.forEach((path) => path.node.source && rewrite(path.node.source));
|
|
52
|
+
root
|
|
53
|
+
.find(j.ExportAllDeclaration)
|
|
54
|
+
.forEach((path) => rewrite(path.node.source));
|
|
55
|
+
// import("…") and require("…")
|
|
56
|
+
root
|
|
57
|
+
.find(j.CallExpression)
|
|
58
|
+
.filter((path) => {
|
|
59
|
+
const callee = path.node.callee;
|
|
60
|
+
return (callee.type === "Import" ||
|
|
61
|
+
(callee.type === "Identifier" && callee.name === "require"));
|
|
62
|
+
})
|
|
63
|
+
.forEach((path) => {
|
|
64
|
+
const [argument] = path.node.arguments;
|
|
65
|
+
if (argument &&
|
|
66
|
+
(argument.type === "StringLiteral" || argument.type === "Literal")) {
|
|
67
|
+
rewrite(argument);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
// Returning the source untouched keeps this file out of the "changed" count.
|
|
71
|
+
return changed ? root.toSource() : fileInfo.source;
|
|
72
|
+
};
|
|
73
|
+
exports.default = renamedCssExportTransform;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Drops `maxWidth` from `TableColumn`, and drops `width`/`minWidth` where they
|
|
5
|
+
* were `null` (alpha.956).
|
|
6
|
+
*
|
|
7
|
+
* Two changes with different decidability, which is why the transform covers
|
|
8
|
+
* both but not equally:
|
|
9
|
+
*
|
|
10
|
+
* - **`maxWidth` always goes.** The prop was removed from the type, so an
|
|
11
|
+
* explicit `maxWidth` attribute is wrong whatever its value is —
|
|
12
|
+
* `maxWidth={400}` and `maxWidth={computed}` alike. Removing it does change
|
|
13
|
+
* the rendered column (there is no maximum any more); that is the migration,
|
|
14
|
+
* not a side effect.
|
|
15
|
+
* - **`width` and `minWidth` only go when the source says `null`.** The type
|
|
16
|
+
* dropped `null`, and `null` meant "no explicit width", which is what
|
|
17
|
+
* omitting the prop means now. Only the literal is decidable:
|
|
18
|
+
* `width={maybeNull}` could be anything at runtime and is left alone, the way
|
|
19
|
+
* `accent-box-color-to-background-color` leaves `color={expression}`.
|
|
20
|
+
*
|
|
21
|
+
* The scope is the same as its neighbours': only JSX elements that resolve to
|
|
22
|
+
* `TableColumn` — imported named, aliased, or through a namespace, from
|
|
23
|
+
* `@mittwald/flow-react-components` or
|
|
24
|
+
* `@mittwald/flow-remote-react-components`, including their subpath entries.
|
|
25
|
+
*
|
|
26
|
+
* A spread (`<TableColumn {...props} />`) carrying `maxWidth` is invisible
|
|
27
|
+
* here. The explicit attributes beside it are still handled; `apply` names the
|
|
28
|
+
* gap.
|
|
29
|
+
*/
|
|
30
|
+
const tableColumnWidthPropsTransform = (fileInfo, { j }) => {
|
|
31
|
+
const flowPackages = [
|
|
32
|
+
"@mittwald/flow-react-components",
|
|
33
|
+
"@mittwald/flow-remote-react-components",
|
|
34
|
+
];
|
|
35
|
+
const affectedComponents = new Set(["TableColumn"]);
|
|
36
|
+
/** Removed from the type — an explicit attribute is wrong at any value. */
|
|
37
|
+
const removedProps = new Set(["maxWidth"]);
|
|
38
|
+
/** Retyped without `null` — remove only where the source literally says so. */
|
|
39
|
+
const nullableProps = new Set(["width", "minWidth"]);
|
|
40
|
+
const isFlowImport = (source) => flowPackages.some((pkg) => source === pkg || source.startsWith(`${pkg}/`));
|
|
41
|
+
/**
|
|
42
|
+
* Whether this JSX attribute value is the literal `null`.
|
|
43
|
+
*
|
|
44
|
+
* Both spellings, because which one appears depends on the parser: babel
|
|
45
|
+
* emits `NullLiteral`, esprima-style parsers a `Literal` whose `value` is
|
|
46
|
+
* `null`. Anything else — an identifier, a call, a ternary — is not decidable
|
|
47
|
+
* from the source and stays.
|
|
48
|
+
*/
|
|
49
|
+
const isNullLiteral = (value) => {
|
|
50
|
+
if (!value || typeof value !== "object" || !("type" in value)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const container = value;
|
|
54
|
+
if (container.type !== "JSXExpressionContainer") {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const expression = container.expression;
|
|
58
|
+
if (!expression ||
|
|
59
|
+
typeof expression !== "object" ||
|
|
60
|
+
!("type" in expression)) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const typed = expression;
|
|
64
|
+
return (typed.type === "NullLiteral" ||
|
|
65
|
+
(typed.type === "Literal" && typed.value === null));
|
|
66
|
+
};
|
|
67
|
+
const root = j(fileInfo.source, { parser: "tsx" });
|
|
68
|
+
// Local JSX identifier -> canonical component name (resolves `as` aliases).
|
|
69
|
+
const localToComponent = new Map();
|
|
70
|
+
// Local names of `import * as Flow` namespace imports from a Flow package.
|
|
71
|
+
const flowNamespaces = new Set();
|
|
72
|
+
root
|
|
73
|
+
.find(j.ImportDeclaration)
|
|
74
|
+
.filter((path) => isFlowImport(String(path.node.source.value)))
|
|
75
|
+
.forEach((path) => {
|
|
76
|
+
for (const specifier of path.node.specifiers ?? []) {
|
|
77
|
+
if (specifier.type === "ImportSpecifier" &&
|
|
78
|
+
specifier.imported.type === "Identifier" &&
|
|
79
|
+
affectedComponents.has(specifier.imported.name)) {
|
|
80
|
+
localToComponent.set(String(specifier.local?.name ?? specifier.imported.name), String(specifier.imported.name));
|
|
81
|
+
}
|
|
82
|
+
else if (specifier.type === "ImportNamespaceSpecifier" &&
|
|
83
|
+
specifier.local) {
|
|
84
|
+
flowNamespaces.add(String(specifier.local.name));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
if (localToComponent.size === 0 && flowNamespaces.size === 0) {
|
|
89
|
+
return fileInfo.source;
|
|
90
|
+
}
|
|
91
|
+
let changed = false;
|
|
92
|
+
root.find(j.JSXOpeningElement).forEach((path) => {
|
|
93
|
+
const name = path.node.name;
|
|
94
|
+
let isAffected = false;
|
|
95
|
+
if (name.type === "JSXIdentifier") {
|
|
96
|
+
isAffected = localToComponent.has(name.name);
|
|
97
|
+
}
|
|
98
|
+
else if (name.type === "JSXMemberExpression" &&
|
|
99
|
+
name.object.type === "JSXIdentifier" &&
|
|
100
|
+
name.property.type === "JSXIdentifier") {
|
|
101
|
+
isAffected =
|
|
102
|
+
flowNamespaces.has(name.object.name) &&
|
|
103
|
+
affectedComponents.has(name.property.name);
|
|
104
|
+
}
|
|
105
|
+
if (!isAffected) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const attributes = path.node.attributes ?? [];
|
|
109
|
+
const kept = attributes.filter((attribute) => {
|
|
110
|
+
if (attribute.type !== "JSXAttribute" ||
|
|
111
|
+
attribute.name.type !== "JSXIdentifier") {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
const attributeName = attribute.name.name;
|
|
115
|
+
if (removedProps.has(attributeName)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if (nullableProps.has(attributeName) && isNullLiteral(attribute.value)) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
});
|
|
123
|
+
if (kept.length !== attributes.length) {
|
|
124
|
+
path.node.attributes = kept;
|
|
125
|
+
changed = true;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
// Returning the source untouched keeps this file out of the "changed" count.
|
|
129
|
+
return changed ? root.toSource() : fileInfo.source;
|
|
130
|
+
};
|
|
131
|
+
exports.default = tableColumnWidthPropsTransform;
|
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
// Source: packages/codemods/src/migrations/<id>/entry.md
|
|
4
4
|
/** Every migration, newest first. Bodies live in `src/migrations`. */
|
|
5
5
|
export const migrations = [
|
|
6
|
+
{
|
|
7
|
+
id: "popover-open-state-props",
|
|
8
|
+
since: "1.1.47",
|
|
9
|
+
title: "Popover: `defaultOpen` renamed, `isOpen` and `onOpenChange` now work",
|
|
10
|
+
kind: "migration",
|
|
11
|
+
action: "codemod",
|
|
12
|
+
remotePackage: true,
|
|
13
|
+
apply: "Rename `defaultOpen` to `isDefaultOpen` on `Popover`, `ContextualHelp` and `ContextMenu` — a codemod does it, scoped to those three. Leave `defaultOpen` alone on `Select`, `MenuTrigger`, `Tooltip`, `TooltipTrigger`, `DialogTrigger`, `DatePicker` and `DateRangePicker`, where it is react-aria's own prop and unchanged. Then check every `isOpen` and `onOpenChange` passed to those three by hand, because both changed behaviour and neither is mechanically decidable. `isOpen` used to be ignored and now controls the popover: a value that is not kept up to date through `onOpenChange` keeps the popover closed. `onOpenChange` used to take over the open state and now only reports it, so a handler that performed the close itself — `onOpenChange={(open) => controller.setOpen(open)}` — can drop that call, and a handler that relied on the prop to *suppress* the close no longer does; use the controller's `onClose` for that.",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "tabler-icons-no-longer-transitive",
|
|
17
|
+
since: "1.1.40",
|
|
18
|
+
title: "@tabler/icons-react is no longer installed alongside Flow",
|
|
19
|
+
kind: "migration",
|
|
20
|
+
action: "manual",
|
|
21
|
+
remotePackage: true,
|
|
22
|
+
apply: "Only affects code that imports from `@tabler/icons-react` — typically a `<Icon><IconSomething /></Icon>` using an icon that is not in Flow's own set. Add the package to your own dependencies (`npm i @tabler/icons-react`); the imports themselves stay unchanged. Flow's own `Icon*` components are unaffected, keep their names, and render exactly as before.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "option-value-inferred-from-mixed-children",
|
|
26
|
+
since: "1.1.12",
|
|
27
|
+
title: "Option: value is inferred from mixed children",
|
|
28
|
+
kind: "migration",
|
|
29
|
+
action: "none",
|
|
30
|
+
remotePackage: true,
|
|
31
|
+
apply: "No code change required for the option itself. An `Option` whose children are text plus an element — text and a `Badge`, text and an icon — now carries that text as its key, where it previously fell back to react-aria's generated `react-aria-N`. Check anywhere such a key was read back: a stored or server-side selection, a `defaultValue`/`value` matched against it, or a test asserting on it. Pass an explicit `value` to pin the key to something other than the display text.",
|
|
32
|
+
},
|
|
6
33
|
{
|
|
7
34
|
id: "use-design-tokens-build-metadata-removed",
|
|
8
35
|
since: "1.0.16",
|
|
@@ -89,9 +116,9 @@ export const migrations = [
|
|
|
89
116
|
since: "0.2.0-alpha.956",
|
|
90
117
|
title: "TableColumn: `maxWidth` removed, `width` and `minWidth` retyped",
|
|
91
118
|
kind: "migration",
|
|
92
|
-
action: "
|
|
119
|
+
action: "codemod",
|
|
93
120
|
remotePackage: true,
|
|
94
|
-
apply: "Remove `maxWidth` from every `TableColumn`. Where `width` or `minWidth` was `null`, omit the prop instead — the type no longer accepts `null`, only `number | string`.",
|
|
121
|
+
apply: "Remove `maxWidth` from every `TableColumn`. Where `width` or `minWidth` was `null`, omit the prop instead — the type no longer accepts `null`, only `number | string`. A codemod does both for the cases it can decide from the source. Two it declines: a `width`/`minWidth` whose value is an expression (`width={maybeNull}`), and a spread that might carry `maxWidth` (`<TableColumn {...props} />`). Check those by hand.",
|
|
95
122
|
},
|
|
96
123
|
{
|
|
97
124
|
id: "table-render-prop-removed",
|
|
@@ -199,7 +226,7 @@ export const migrations = [
|
|
|
199
226
|
kind: "migration",
|
|
200
227
|
action: "codemod",
|
|
201
228
|
remotePackage: true,
|
|
202
|
-
apply: "Rename the `action` prop on `Action` to `onAction`. Not only a rename: the new prop is typed `ActionFn` (`(...args: unknown[]) => unknown`), so a function *reference* that declares a parameter no longer type-checks and needs wrapping — `onAction={() => controller.close()}` rather than `onAction={controller.close}`.
|
|
229
|
+
apply: "Rename the `action` prop on `Action` to `onAction`. Not only a rename: the new prop is typed `ActionFn` (`(...args: unknown[]) => unknown`), so a function *reference* that declares a parameter no longer type-checks and needs wrapping — `onAction={() => controller.close()}` rather than `onAction={controller.close}`. A codemod does both. It wraps every bare reference (`close`, `controller.close`), because the wrap is a no-op for a reference that did not need it. It leaves a value that already is the handler or produces one — an arrow function, a function expression, a call like `makeHandler()` or `close.bind(controller)` — and anything that is not one reference, such as `isOpen ? close : open` or `controller?.close`. Two wraps to look at afterwards: a handler that read the event `Action` forwards stops receiving it, and a possibly-undefined reference (`onAction={props.onAction}`) becomes a call TypeScript rejects — add the guard it asks for.",
|
|
203
230
|
},
|
|
204
231
|
{
|
|
205
232
|
id: "button-props-interfaces",
|
|
@@ -217,15 +244,15 @@ export const migrations = [
|
|
|
217
244
|
kind: "migration",
|
|
218
245
|
action: "codemod",
|
|
219
246
|
remotePackage: false,
|
|
220
|
-
apply: 'Rewrite every subdirectory import from `@mittwald/flow-react-components` to the package root, except `react-hook-form` and `nextjs`, which move to `@mittwald/flow-react-components/react-hook-form` and `@mittwald/flow-react-components/nextjs`. If you hit missing module errors, set `"module": "esnext"` in `tsconfig.json`.',
|
|
247
|
+
apply: 'Rewrite every subdirectory import from `@mittwald/flow-react-components` to the package root, except `react-hook-form` and `nextjs`, which move to `@mittwald/flow-react-components/react-hook-form` and `@mittwald/flow-react-components/nextjs`. Asset imports are not part of this: a CSS specifier stays a CSS specifier — `all.css` and `all-layered.css` unchanged, a stale `global.css` or `globals.css` rewritten to `all.css` — and keeps any bundler query it carries (`?url`, `?inline`, `?raw`). It never becomes a named import from the package root, which has no JS binding behind a stylesheet. If you hit missing module errors, set `"module": "esnext"` in `tsconfig.json`.',
|
|
221
248
|
},
|
|
222
249
|
{
|
|
223
250
|
id: "renamed-css-export",
|
|
224
251
|
since: "0.1.0-alpha.292",
|
|
225
252
|
title: "Renamed CSS export",
|
|
226
253
|
kind: "migration",
|
|
227
|
-
action: "
|
|
254
|
+
action: "codemod",
|
|
228
255
|
remotePackage: false,
|
|
229
|
-
apply: "Replace the import `@mittwald/flow-react-components/styles` with `@mittwald/flow-react-components/all.css`.",
|
|
256
|
+
apply: "Replace the import `@mittwald/flow-react-components/styles` with `@mittwald/flow-react-components/all.css`, keeping any bundler query the specifier carries (`.../styles?url` becomes `.../all.css?url`). A codemod does this for JavaScript and TypeScript files. An `@import` of the old path inside a `.css` or `.scss` file is not covered — search for it by hand.",
|
|
230
257
|
},
|
|
231
258
|
];
|
package/dist/resolve/range.d.ts
CHANGED
|
@@ -47,4 +47,3 @@ export type RangeResult = ResolvedRange | UnresolvedRange;
|
|
|
47
47
|
* fine; two callers computing the fact differently is how they drift.
|
|
48
48
|
*/
|
|
49
49
|
export declare const resolveRange: (revision: string, deps: RangeDeps) => Promise<RangeResult>;
|
|
50
|
-
//# sourceMappingURL=range.d.ts.map
|
package/dist/resolve/target.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-codemods",
|
|
3
|
-
"version": "1.2.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Codemods and an upgrade CLI for consumers of Flow, mittwald's design system",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
7
7
|
"repository": "https://github.com/mittwald/flow",
|
|
8
|
+
"license": "MIT",
|
|
8
9
|
"bin": {
|
|
9
10
|
"flow-codemods": "dist/cli.js"
|
|
10
11
|
},
|
|
@@ -37,5 +38,5 @@
|
|
|
37
38
|
"vitest": "^4.1.11",
|
|
38
39
|
"yaml": "^2.8.1"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f259c3a6cc103d2f765165fd706a530f87788754"
|
|
41
42
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/catalog/entries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,UAAU,EAAE,YAAY,EAAe,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,OAAQ,MAAM,KAAG,MAC+C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/catalog/select.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,YAAY,EAAE,KAAG,YAAY,EAG/D,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,YACf,YAAY,EAAE,UACf,MAAM,KACb,YAAY,EACmD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;CACd"}
|
package/dist/cli/args.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB;AAQD,eAAO,MAAM,cAAc,SAAU,MAAM,EAAE,KAAG,aAqD/C,CAAC"}
|
package/dist/cli/choose.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"choose.d.ts","sourceRoot":"","sources":["../../src/cli/choose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,GAAG,EAAE,OAAO,CAAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf;;;;;;;;OAQG;IACH,IAAI,EAAE,OAAO,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvD,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,4CAMtB,iBAAiB,KAAG,CAAC,CACtB,OAAO,EAAE,YAAY,EAAE,KACpB,OAAO,CAAC,YAAY,EAAE,CAAC,CAwB3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codemod.d.ts","sourceRoot":"","sources":["../../src/cli/codemod.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,aAClB,MAAM,GAAG,SAAS,OACvB,MAAM,WACH,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,KAChC,MAKF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,aAClB,MAAM,GAAG,SAAS,OACvB,MAAM,WACH,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,KAChC,MAKF,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,GAAG,CAAC,EAAE,OAAO,UAAU,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,WACnB,aAAa,qBACW,kBAAkB,KACjD,OAAO,CAAC,MAAM,CA6DhB,CAAC"}
|
package/dist/cli/list.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/cli/list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB;;;;OAIG;IACH,KAAK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B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAsB,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI/C,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,2EAA2E;IAC3E,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,WAS/C,CAAC;AA2BH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,WACb,aAAa,QACf,WAAW,KAChB,OAAO,CAAC,MAAM,CAiNhB,CAAC"}
|
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flowPackages.generated.d.ts","sourceRoot":"","sources":["../src/flowPackages.generated.ts"],"names":[],"mappings":"AAIA,mFAAmF;AACnF,eAAO,MAAM,YAAY,EAAE,MAAM,EAahC,CAAC"}
|
package/dist/git.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,KAAG,OAkCnD,CAAC"}
|
package/dist/install.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAiB9E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB,QAC5B,MAAM,KACV,OAAO,CAAC,cAAc,CACyC,CAAC;AAEnE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,UAAW,KAAK,KAAG,cAiB7C,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,YAAa,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAGpD,CAAC;AAEhB;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,4EA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,KAAG,MAQ5D,CAAC;AAgBF,qEAAqE;AACrE,eAAO,MAAM,UAAU,eAAgB,cAAc,KAAG,OACb,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,QAAQ,YAClC,CAAC,UACH,MAAM,gBACA,MAAM,EAAE,KACrB,CAcF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,iBACjB,cAAc,EAAE,wBACR,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,KACzD,MAAM,GAAG,SAgBX,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.generated.d.ts","sourceRoot":"","sources":["../src/migrations.generated.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,sEAAsE;AACtE,eAAO,MAAM,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EA8PpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/resolve/range.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,aAAa,EAEd,MAAM,eAAe,CAAC;AAGvB;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAC1B,MAAM,QACL,MAAM,KACX,MAAM,GAAG,SASX,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACzE;AAED,eAAO,MAAM,gBAAgB,QAAS,MAAM,KAAG,SAI7C,CAAC;AAEH,MAAM,WAAW,aAAa;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