@makoai/app-sdk 2.24.0 → 2.25.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/README.md CHANGED
@@ -616,6 +616,10 @@ Run it in an app folder (or pass several). It exits 1 on a finding;
616
616
  - `local-shadcn`: a `src/components/ui/<name>.tsx` the SDK ships.
617
617
  - `react-version` (2.24): React below 19 in an app that uses shadcn
618
618
  (`src/components/ui`, radix-ui, or the SDK's `/components` or `/menu`).
619
+ From 2.25 it also flags React 19 with recharts 2 and no react-is 19
620
+ override. recharts 2 reads chart children with react-is 18, which drops
621
+ anything inside a `<>` fragment: a chart loses its reference lines. The
622
+ fix is `"pnpm": { "overrides": { "react-is": "^19.1.10" } }`.
619
623
 
620
624
  `--rules=react-version` runs only the named rules (2.24).
621
625
 
package/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  * in a page (or this export) says which SDK a deployed app actually runs.
39
39
  * Kept in step with package.json by snapshot.test.mjs.
40
40
  */
41
- export const SDK_VERSION = "2.24.0";
41
+ export const SDK_VERSION = "2.25.0";
42
42
  if (typeof window !== "undefined") {
43
43
  try {
44
44
  window.__MAKO_APP_SDK__ = SDK_VERSION;
package/lint.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // mako-app-lint (2.21; react-version and --rules from 2.24): app rules a
2
+ // mako-app-lint (2.21; react-version and --rules from 2.24, recharts check
3
+ // 2.25): app rules a
3
4
  // reviewer kept repeating.
4
5
  //
5
6
  // utc-display getUTC*, timeZone: "UTC" or toISOString().slice in display
@@ -11,6 +12,10 @@
11
12
  // radix-ui, or the SDK's /components or /menu). shadcn's stock
12
13
  // components pass refs as props, which React 18 drops: on
13
14
  // 18 Nov 2026 a Calendar's arrow keys stopped moving focus.
15
+ // Also React 19 with recharts 2 and no react-is 19 override:
16
+ // recharts 2 reads chart children with react-is 18, which
17
+ // drops anything in a <> fragment (19 Nov 2026: reference
18
+ // lines vanished from a chart).
14
19
  //
15
20
  // Usage: npx mako-app-lint [app dir …] [--warn] [--rules=a,b]. Exit 1 on
16
21
  // findings unless --warn. --rules runs only the named rules. A line ending in `// mako-lint-ignore utc-display` is skipped (a
@@ -48,7 +53,12 @@ export function minMajor(range) {
48
53
  return m ? Number(m[1]) : null;
49
54
  }
50
55
 
51
- /** react-version: React below 19 with shadcn in the app. */
56
+ /** The react-is range an override pins: pnpm.overrides, npm overrides or yarn resolutions. */
57
+ function reactIsOverride(pkg) {
58
+ return pkg.pnpm?.overrides?.["react-is"] ?? pkg.overrides?.["react-is"] ?? pkg.resolutions?.["react-is"];
59
+ }
60
+
61
+ /** react-version: React below 19 with shadcn, or React 19 with recharts 2 on react-is 18. */
52
62
  function reactVersionFindings(appDir) {
53
63
  const pj = path.join(appDir, "package.json");
54
64
  if (!existsSync(pj)) return [];
@@ -60,7 +70,16 @@ function reactVersionFindings(appDir) {
60
70
  }
61
71
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
62
72
  const major = minMajor(deps.react);
63
- if (major == null || major >= 19) return [];
73
+ if (major == null) return [];
74
+ if (major >= 19) {
75
+ if (minMajor(deps.recharts) !== 2 || (minMajor(reactIsOverride(pkg)) ?? 0) >= 19) return [];
76
+ return [{
77
+ file: "package.json",
78
+ line: 1,
79
+ rule: "react-version",
80
+ message: `React ${deps.react} with recharts ${deps.recharts}: recharts 2 reads chart children with react-is 18, which drops anything in a <> fragment. Add "pnpm": { "overrides": { "react-is": "^19.1.10" } }`,
81
+ }];
82
+ }
64
83
  const why = [];
65
84
  if (existsSync(path.join(appDir, "src", "components", "ui"))) why.push("src/components/ui");
66
85
  if (Object.keys(deps).some(d => d === "radix-ui" || d.startsWith("@radix-ui/"))) why.push("radix-ui");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makoai/app-sdk",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "description": "Mako app SDK: data bindings (useQuery/useDuckDB), URL state, theme, and the house dashboard kit (/ui).",
5
5
  "license": "MIT",
6
6
  "repository": {