bestax-migrate 2.1.6 → 2.2.1

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.
Files changed (64) hide show
  1. package/README.md +13 -8
  2. package/dist/cli.d.ts +53 -0
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +159 -9
  5. package/dist/sources/_shared/imports.d.ts +46 -0
  6. package/dist/sources/_shared/imports.d.ts.map +1 -0
  7. package/dist/sources/_shared/imports.js +152 -0
  8. package/dist/sources/{react-bulma-components → _shared}/jsx-utils.d.ts +20 -12
  9. package/dist/sources/_shared/jsx-utils.d.ts.map +1 -0
  10. package/dist/sources/{react-bulma-components → _shared}/jsx-utils.js +15 -10
  11. package/dist/sources/_shared/make-styles-transform.d.ts +37 -0
  12. package/dist/sources/_shared/make-styles-transform.d.ts.map +1 -0
  13. package/dist/sources/_shared/make-styles-transform.js +440 -0
  14. package/dist/sources/_shared/props.d.ts +20 -0
  15. package/dist/sources/_shared/props.d.ts.map +1 -0
  16. package/dist/sources/{react-bulma-components → _shared}/props.js +11 -7
  17. package/dist/sources/_shared/semver-range.d.ts +31 -0
  18. package/dist/sources/_shared/semver-range.d.ts.map +1 -0
  19. package/dist/sources/_shared/semver-range.js +186 -0
  20. package/dist/sources/_shared/specials-utils.d.ts +45 -0
  21. package/dist/sources/_shared/specials-utils.d.ts.map +1 -0
  22. package/dist/sources/_shared/specials-utils.js +124 -0
  23. package/dist/sources/rbx/deps.d.ts +18 -0
  24. package/dist/sources/rbx/deps.d.ts.map +1 -0
  25. package/dist/sources/rbx/deps.js +192 -0
  26. package/dist/sources/rbx/index.d.ts +3 -0
  27. package/dist/sources/rbx/index.d.ts.map +1 -0
  28. package/dist/sources/rbx/index.js +10 -0
  29. package/dist/sources/rbx/mapping.d.ts +49 -0
  30. package/dist/sources/rbx/mapping.d.ts.map +1 -0
  31. package/dist/sources/rbx/mapping.js +924 -0
  32. package/dist/sources/rbx/responsive.d.ts +30 -0
  33. package/dist/sources/rbx/responsive.d.ts.map +1 -0
  34. package/dist/sources/rbx/responsive.js +279 -0
  35. package/dist/sources/rbx/specials.d.ts +21 -0
  36. package/dist/sources/rbx/specials.d.ts.map +1 -0
  37. package/dist/sources/rbx/specials.js +706 -0
  38. package/dist/sources/rbx/styles.d.ts +21 -0
  39. package/dist/sources/rbx/styles.d.ts.map +1 -0
  40. package/dist/sources/rbx/styles.js +29 -0
  41. package/dist/sources/rbx/transform.d.ts +25 -0
  42. package/dist/sources/rbx/transform.d.ts.map +1 -0
  43. package/dist/sources/rbx/transform.js +911 -0
  44. package/dist/sources/react-bulma-components/deps.d.ts.map +1 -1
  45. package/dist/sources/react-bulma-components/deps.js +17 -3
  46. package/dist/sources/react-bulma-components/responsive.d.ts +1 -1
  47. package/dist/sources/react-bulma-components/responsive.d.ts.map +1 -1
  48. package/dist/sources/react-bulma-components/responsive.js +1 -1
  49. package/dist/sources/react-bulma-components/specials.d.ts +3 -9
  50. package/dist/sources/react-bulma-components/specials.d.ts.map +1 -1
  51. package/dist/sources/react-bulma-components/specials.js +4 -91
  52. package/dist/sources/react-bulma-components/styles.d.ts +9 -9
  53. package/dist/sources/react-bulma-components/styles.d.ts.map +1 -1
  54. package/dist/sources/react-bulma-components/styles.js +17 -389
  55. package/dist/sources/react-bulma-components/transform.d.ts.map +1 -1
  56. package/dist/sources/react-bulma-components/transform.js +378 -101
  57. package/dist/sources/registry.d.ts.map +1 -1
  58. package/dist/sources/registry.js +2 -0
  59. package/dist/types.d.ts +8 -0
  60. package/dist/types.d.ts.map +1 -1
  61. package/package.json +8 -7
  62. package/dist/sources/react-bulma-components/jsx-utils.d.ts.map +0 -1
  63. package/dist/sources/react-bulma-components/props.d.ts +0 -15
  64. package/dist/sources/react-bulma-components/props.d.ts.map +0 -1
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Stylesheet migration for rbx apps.
3
+ *
4
+ * Same shared factory as every other source — the Bulma 0.9 → v1 rewriting is
5
+ * identical.
6
+ *
7
+ * Note what it does NOT do: a `bulma-*` extension import in Sass is left in
8
+ * place with a TODO, not removed. The JS/CSS-import side in transform.ts does
9
+ * the same for `bulma-badge`/`bulma-divider`/`bulma-pageloader`/`bulma-tooltip`
10
+ * (kept, with a TODO), and the manifest pass reports rather than removes the
11
+ * packages, since markup outside rbx may still use the extension's classes. A
12
+ * Sass `@import` of one may be pulling in customisation the codemod cannot see,
13
+ * so it is flagged for a human instead.
14
+ *
15
+ * rbx's own stylesheet is `rbx/rbx` (its Sass entry, usually imported as
16
+ * `~rbx/rbx` after `~bulma/bulma`) or the prebuilt `rbx/index.css`. Both
17
+ * carry rbx's fixes on top of a full Bulma root, so they are replaced with a
18
+ * Bulma v1 root rather than dropped.
19
+ */
20
+ export declare const transformStyles: import("../../types.js").StylesTransform;
21
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,eAAO,MAAM,eAAe,0CAQ1B,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Stylesheet migration for rbx apps.
3
+ *
4
+ * Same shared factory as every other source — the Bulma 0.9 → v1 rewriting is
5
+ * identical.
6
+ *
7
+ * Note what it does NOT do: a `bulma-*` extension import in Sass is left in
8
+ * place with a TODO, not removed. The JS/CSS-import side in transform.ts does
9
+ * the same for `bulma-badge`/`bulma-divider`/`bulma-pageloader`/`bulma-tooltip`
10
+ * (kept, with a TODO), and the manifest pass reports rather than removes the
11
+ * packages, since markup outside rbx may still use the extension's classes. A
12
+ * Sass `@import` of one may be pulling in customisation the codemod cannot see,
13
+ * so it is flagged for a human instead.
14
+ *
15
+ * rbx's own stylesheet is `rbx/rbx` (its Sass entry, usually imported as
16
+ * `~rbx/rbx` after `~bulma/bulma`) or the prebuilt `rbx/index.css`. Both
17
+ * carry rbx's fixes on top of a full Bulma root, so they are replaced with a
18
+ * Bulma v1 root rather than dropped.
19
+ */
20
+ import { makeStylesTransform } from '../_shared/make-styles-transform.js';
21
+ export const transformStyles = makeStylesTransform({
22
+ packageName: 'rbx',
23
+ guideUrl: 'https://bestax.io/docs/guides/getting-started/migration/rbx',
24
+ rootStylesheetSuffixes: [
25
+ '/rbx(?:\\.s[ac]ss)?',
26
+ '/index(?:\\.min)?\\.css',
27
+ '/dist/rbx(?:\\.min)?\\.css',
28
+ ],
29
+ });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The rbx (v2) → @allxsmith/bestax-bulma transform.
3
+ *
4
+ * Passes, in order:
5
+ * 1. resolve imports (named/namespace) and `const { Item } = Card`-style
6
+ * destructuring into canonical rbx component paths
7
+ * 2. per-element: structural special → rename → responsive flattening →
8
+ * component prop map → universal helper props → badge/tooltip wrapping
9
+ * 3. rewrite imports: drop rbx, add one merged bestax-bulma import; keep a
10
+ * trimmed rbx import (with a TODO) only for components that have no
11
+ * bestax equivalent (Generic, Tile, List, …)
12
+ *
13
+ * Anything unsafe gets a `// TODO(bestax-migrate)` comment on the enclosing
14
+ * statement plus an entry in the run report.
15
+ *
16
+ * The pass that has no react-bulma-components counterpart is the last one.
17
+ * rbx exposes badges and tooltips as *helper props on any element*, backed by
18
+ * the bulma-badge / bulma-tooltip extensions; bestax has real `Badge` and
19
+ * `Tooltip` components. So `<Button tooltip="hi" />` is a wrapping rewrite,
20
+ * not a rename.
21
+ */
22
+ import type { API, FileInfo } from 'jscodeshift';
23
+ import type { TransformOptions } from '../../types.js';
24
+ export default function transform(fileInfo: FileInfo, api: API, options?: TransformOptions): string | undefined;
25
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/sources/rbx/transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA0DvD,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,OAAO,GAAE,gBAAqB,GAC7B,MAAM,GAAG,SAAS,CAu/BpB"}