bestax-migrate 2.34.1 → 2.34.2
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/sources/_shared/specials-utils.d.ts +11 -0
- package/dist/sources/_shared/specials-utils.d.ts.map +1 -1
- package/dist/sources/_shared/specials-utils.js +13 -0
- package/dist/sources/bloomer/specials.d.ts.map +1 -1
- package/dist/sources/bloomer/specials.js +2 -2
- package/dist/sources/rbx/mapping.d.ts.map +1 -1
- package/dist/sources/rbx/mapping.js +3 -1
- package/dist/sources/rbx/specials.d.ts.map +1 -1
- package/dist/sources/rbx/specials.js +4 -2
- package/dist/sources/react-bulma-components/specials.d.ts.map +1 -1
- package/dist/sources/react-bulma-components/specials.js +2 -1
- package/package.json +11 -13
|
@@ -116,6 +116,17 @@ export declare function keepTitleLevel(ctx: TransformContext, path: ASTPath<any>
|
|
|
116
116
|
* `<p className="help" href="/x">`, which does not compile.
|
|
117
117
|
*/
|
|
118
118
|
export declare function dropLinkAttrsForPlainTag(ctx: TransformContext, path: ASTPath<any>, element: any, tag: string, where: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Flag a `Heading` label that became a plain element carrying `heading`.
|
|
121
|
+
*
|
|
122
|
+
* Each library source has a `Heading` that rendered Bulma 0.9's `.heading`
|
|
123
|
+
* label, and bestax has no component for it, so it stays plain markup with
|
|
124
|
+
* the class. Bulma v1 has no rule for `.heading`, so the class styles nothing
|
|
125
|
+
* there. One rule and one message keep the sources agreeing about that
|
|
126
|
+
* (#1370). The message suggests the helper props for a small, uppercase,
|
|
127
|
+
* semibold label, or a `.heading` rule of the app's own.
|
|
128
|
+
*/
|
|
129
|
+
export declare function flagDroppedHeading(ctx: TransformContext, path: ASTPath<any>, tag: string): void;
|
|
119
130
|
/** Attribute filter a source applies before an element becomes plain HTML. */
|
|
120
131
|
export type AttrStrip = (ctx: TransformContext, path: ASTPath<any>, attrs: any[], where: string) => any[];
|
|
121
132
|
/**
|
|
@@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AAM,CAAC;IACd,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,WAAW,GAClB,MAAM,EAAE,CAiEV;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,IAAI,CA2CN;AAED,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,KAAK,EAAE,GAAG,EAAE,EACZ,KAAK,EAAE,MAAM,KACV,GAAG,EAAE,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS;4BAG7C,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,OACP,MAAM,aACA,MAAM,GAAG,SAAS,SACtB,MAAM,KACZ,aAAa;6BA2CT,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,SACL,MAAM,YACH,MAAM,GAAG,MAAM,EAAE,KAC1B,aAAa,GAAG,IAAI;EA8CxB"}
|
|
1
|
+
{"version":3,"file":"specials-utils.d.ts","sourceRoot":"","sources":["../../../src/sources/_shared/specials-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE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7D,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,WAAW,GAClB,MAAM,EAAE,CAiEV;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,IAAI,CA2CN;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,GAAG,EAAE,MAAM,GACV,IAAI,CAON;AAED,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,KAAK,EAAE,GAAG,EAAE,EACZ,KAAK,EAAE,MAAM,KACV,GAAG,EAAE,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS;4BAG7C,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,OACP,MAAM,aACA,MAAM,GAAG,SAAS,SACtB,MAAM,KACZ,aAAa;6BA2CT,gBAAgB,QACf,OAAO,CAAC,GAAG,CAAC,WACT,GAAG,SACL,MAAM,YACH,MAAM,GAAG,MAAM,EAAE,KAC1B,aAAa,GAAG,IAAI;EA8CxB"}
|
|
@@ -349,6 +349,19 @@ export function dropLinkAttrsForPlainTag(ctx, path, element, tag, where) {
|
|
|
349
349
|
ctx.dirty = true;
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Flag a `Heading` label that became a plain element carrying `heading`.
|
|
354
|
+
*
|
|
355
|
+
* Each library source has a `Heading` that rendered Bulma 0.9's `.heading`
|
|
356
|
+
* label, and bestax has no component for it, so it stays plain markup with
|
|
357
|
+
* the class. Bulma v1 has no rule for `.heading`, so the class styles nothing
|
|
358
|
+
* there. One rule and one message keep the sources agreeing about that
|
|
359
|
+
* (#1370). The message suggests the helper props for a small, uppercase,
|
|
360
|
+
* semibold label, or a `.heading` rule of the app's own.
|
|
361
|
+
*/
|
|
362
|
+
export function flagDroppedHeading(ctx, path, tag) {
|
|
363
|
+
addTodo(ctx, path, 'component:Heading', `Bulma v1 dropped the \`.heading\` styles, so the \`heading\` class on this plain <${tag}> styles nothing; restyle it with bestax helpers (e.g. \`<Paragraph textSize="7" textTransform="uppercase" textWeight="semibold" mb="1">\`) or a \`.heading\` rule of your own`);
|
|
364
|
+
}
|
|
352
365
|
/**
|
|
353
366
|
* The two structural rewrites every source needs, bound to that source's own
|
|
354
367
|
* attribute strip (its modifier vocabulary is the one thing that differs):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,
|
|
1
|
+
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/bloomer/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAUL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAoqC9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAQf;AAED,eAAO,MAAM,aAAa,UAAwB,CAAC"}
|
|
@@ -15,7 +15,7 @@ import { addAttr, attrSource, addTodo, attributesOf, findAttr, literalValueOf, m
|
|
|
15
15
|
import { applyPropAction } from '../_shared/props.js';
|
|
16
16
|
import { aTag } from '../_shared/articles.js';
|
|
17
17
|
import { AS_UNIONS } from '../_shared/polymorphic.js';
|
|
18
|
-
import { applyIconProps, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
18
|
+
import { applyIconProps, flagDroppedHeading, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
20
20
|
const stripModifierProps = makeStripModifierProps(UNIVERSAL_PROPS, RESPONSIVE_PROPS);
|
|
21
21
|
/**
|
|
@@ -328,8 +328,8 @@ const SPECIALS = {
|
|
|
328
328
|
* plain element bloomer rendered, and the TODO says the styling is gone.
|
|
329
329
|
*/
|
|
330
330
|
heading(ctx, path, element) {
|
|
331
|
-
addTodo(ctx, path, 'component:Heading', 'Bulma v1 dropped the `.heading` styles, so this plain <p className="heading"> renders unstyled; restyle it with bestax helpers (e.g. `textSize="7" textTransform="uppercase" textWeight="semibold"`) or your own class');
|
|
332
331
|
const tag = plainTag(ctx, path, element, 'p', 'Heading');
|
|
332
|
+
flagDroppedHeading(ctx, path, tag);
|
|
333
333
|
return replaceWithPlain(ctx, path, element, tag, 'heading', 'Heading');
|
|
334
334
|
},
|
|
335
335
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["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AAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAShE,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAytBpD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA2FhD,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAAS,CAM3E"}
|
|
@@ -228,7 +228,9 @@ export const MAPPING = {
|
|
|
228
228
|
},
|
|
229
229
|
},
|
|
230
230
|
},
|
|
231
|
-
Heading
|
|
231
|
+
// rbx's Heading is Bulma's `.heading` label, whose styles Bulma v1 no
|
|
232
|
+
// longer ships — bestax has no component for it.
|
|
233
|
+
Heading: { status: 'partial', special: 'heading' },
|
|
232
234
|
Highlight: {
|
|
233
235
|
status: 'todo',
|
|
234
236
|
todo: `\`Highlight\` (syntax-highlighted <pre>) has no bestax equivalent; use \`<Pre>\` plus your own highlighter (${DOCS}/api/elements/pre)`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAYL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAYL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAYL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAk2B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { BADGE_PROPS, RESPONSIVE_BREAKPOINTS, TOOLTIP_PROPS, UNIVERSAL_PROPS, } from './mapping.js';
|
|
17
17
|
import { addAttr, addTodo, buildJsxName, attributesOf, findAttr, jsxNameParts, literalValueOf, makeAttr, plainElement, removeAttr, resolveBooleanish, } from '../_shared/jsx-utils.js';
|
|
18
|
-
import { alignTarget, applyIconProps, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, mergeClassName, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
18
|
+
import { alignTarget, applyIconProps, flagDroppedHeading, keepTitleLevel, makeStripModifierProps, makeStructuralHelpers, mergeClassName, modifierClass, parseIconClasses, restrictAsToTargets, } from '../_shared/specials-utils.js';
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
20
20
|
const stripModifierProps = makeStripModifierProps(UNIVERSAL_PROPS, RESPONSIVE_BREAKPOINTS, 'innerRef');
|
|
21
21
|
/**
|
|
@@ -59,9 +59,11 @@ const { replaceWithPlain, collapseOntoChild } = makeStructuralHelpers((ctx, path
|
|
|
59
59
|
const SPECIALS = {
|
|
60
60
|
/**
|
|
61
61
|
* rbx's `Heading` is Bulma's `.heading` label (small caps), not a title —
|
|
62
|
-
* bestax has no component for it, so it becomes a plain <p
|
|
62
|
+
* bestax has no component for it, so it becomes a plain <p>, and the TODO
|
|
63
|
+
* says Bulma v1 no longer styles the class.
|
|
63
64
|
*/
|
|
64
65
|
heading(ctx, path, element) {
|
|
66
|
+
flagDroppedHeading(ctx, path, 'p');
|
|
65
67
|
return replaceWithPlain(ctx, path, element, 'p', 'heading', 'Heading');
|
|
66
68
|
},
|
|
67
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAWL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"specials.d.ts","sourceRoot":"","sources":["../../../src/sources/react-bulma-components/specials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAWL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,aAAa,EAAE,CAAC;AAy3B9B,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,EAClB,OAAO,EAAE,GAAG,GACX,aAAa,CAIf;AAED,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAGjE,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { RESPONSIVE_BREAKPOINTS, UNIVERSAL_PROPS } from './mapping.js';
|
|
11
11
|
import { addAttr, addTodo, attributesOf, buildJsxName, findAttr, literalValueOf, makeAttr, plainElement, removeAttr, resolveBooleanish, } from '../_shared/jsx-utils.js';
|
|
12
12
|
import { enforcePolymorphicProps } from '../_shared/polymorphic.js';
|
|
13
|
-
import { alignTarget, dropLinkAttrsForPlainTag, keepTitleLevel, makeStripModifierProps, mergeClassName, applyIconProps, parseIconClasses, } from '../_shared/specials-utils.js';
|
|
13
|
+
import { alignTarget, dropLinkAttrsForPlainTag, flagDroppedHeading, keepTitleLevel, makeStripModifierProps, mergeClassName, applyIconProps, parseIconClasses, } from '../_shared/specials-utils.js';
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
15
|
/**
|
|
16
16
|
* The attributes a plain-element rewrite keeps: the modifier strip decides
|
|
@@ -139,6 +139,7 @@ const SPECIALS = {
|
|
|
139
139
|
// independently, so it rides along on the paragraph as `heading subtitle`
|
|
140
140
|
// (dropping it would be the same silent loss the dynamic guard prevents).
|
|
141
141
|
if (headingTruthy && !subtitleDynamic) {
|
|
142
|
+
flagDroppedHeading(ctx, path, 'p');
|
|
142
143
|
removeAttr(element, headingAttr);
|
|
143
144
|
const className = mergeClassName(ctx, path, element, subtitleTruthy ? 'heading subtitle' : 'heading', 'Heading');
|
|
144
145
|
// The seventh hand-built plain rewrite in this file, and the one that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-migrate",
|
|
3
|
-
"version": "2.34.
|
|
3
|
+
"version": "2.34.2",
|
|
4
4
|
"description": "Codemods for migrating existing React apps from other Bulma libraries to @allxsmith/bestax-bulma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,28 +34,26 @@
|
|
|
34
34
|
"url": "https://github.com/allxsmith/bestax/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@babel/parser": "^7.29.
|
|
37
|
+
"@babel/parser": "^7.29.11",
|
|
38
38
|
"chalk": "^6.0.1",
|
|
39
39
|
"commander": "^15.0.0",
|
|
40
40
|
"jscodeshift": "^17.3.0",
|
|
41
|
-
"parse5": "^
|
|
41
|
+
"parse5": "^8.0.1",
|
|
42
42
|
"property-information": "^7.2.0",
|
|
43
|
-
"@allxsmith/bestax-bulma": "^5.57.
|
|
43
|
+
"@allxsmith/bestax-bulma": "^5.57.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@jest/globals": "^30.0.0",
|
|
47
|
-
"@types/jest": "^30.0.0",
|
|
48
46
|
"@types/jscodeshift": "^17.3.0",
|
|
49
|
-
"@types/node": "^26.6.
|
|
47
|
+
"@types/node": "^26.6.6",
|
|
50
48
|
"@types/react": "^19.3.0",
|
|
51
49
|
"@types/react-dom": "^19.3.0",
|
|
50
|
+
"@vitest/coverage-istanbul": "^5.0.5",
|
|
52
51
|
"classnames": "^2.5.1",
|
|
53
52
|
"clsx": "^2.1.1",
|
|
54
|
-
"jest": "^30.2.0",
|
|
55
53
|
"react": "^19.3.1",
|
|
56
54
|
"react-dom": "^19.3.1",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
55
|
+
"typescript": "^6.0.3",
|
|
56
|
+
"vitest": "^5.0.5"
|
|
59
57
|
},
|
|
60
58
|
"publishConfig": {
|
|
61
59
|
"access": "public"
|
|
@@ -63,9 +61,9 @@
|
|
|
63
61
|
"scripts": {
|
|
64
62
|
"build": "tsc",
|
|
65
63
|
"dev": "tsc --watch",
|
|
66
|
-
"test": "
|
|
67
|
-
"test:watch": "
|
|
68
|
-
"test:coverage": "
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:watch": "vitest",
|
|
66
|
+
"test:coverage": "vitest run --coverage",
|
|
69
67
|
"lint": "eslint src e2e",
|
|
70
68
|
"typecheck": "tsc --noEmit",
|
|
71
69
|
"validate:corpus": "pnpm run build && node scripts/validate-corpus.mjs",
|