@woodsportal/hubspot-kit 1.0.34 → 1.0.35
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/CHANGELOG.md +7 -0
- package/dist/cli.js +29 -2
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
- package/scripts/node-loader-interop.mjs +20 -0
- package/scripts/run-dev.mjs +57 -42
- package/scripts/vite/ensure-dev-kit-shims.js +39 -14
- package/scripts/vite/ensure-dev-kit-shims.test.mjs +47 -0
- package/scripts/vite/react-dev-plugin-options.js +1 -1
- package/vite/vite.config.dev.mjs +91 -66
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
- **CSS entries** — shared `tailwind.css.config.css`; documented never-merge rules on `main.dev.css` / `main.prod.css`
|
|
20
20
|
- **`wp doctor`** — CSS pipeline checks (prefix, `.temp` @source, `skipRuntimeCss`, `module.css` dw utilities, CDN `require_css` warning)
|
|
21
21
|
|
|
22
|
+
## 1.0.35 — 2026-06-08
|
|
23
|
+
|
|
24
|
+
### Dev server
|
|
25
|
+
- **Vite config load** — lazy-load kit plugins (defer `@babel/*` prefix plugin) so Node 22.18+ / 23.x do not crash with `getStatus` during config import; `wp doctor` warns on affected Node versions (Node 24 LTS recommended)
|
|
26
|
+
- **Windows dev shims** — create `.wphs/.kit-module-config` via directory junction (or copy fallback) and bootstrap shims via copy when symlinks fail; fixes `jsxDEV` export errors from `react/jsx-dev-runtime`
|
|
27
|
+
- **Vite dev** — pre-bundle React JSX runtimes and dedupe `react` / `react-dom`
|
|
28
|
+
|
|
22
29
|
## 1.0.34 — 2026-06-08
|
|
23
30
|
|
|
24
31
|
### Dev server
|
package/dist/cli.js
CHANGED
|
@@ -835,6 +835,19 @@ function formatProjectViteSpawn(spawn2) {
|
|
|
835
835
|
return [spawn2.command, ...spawn2.prefixArgs].join(" ");
|
|
836
836
|
}
|
|
837
837
|
|
|
838
|
+
// src/lib/node-loader-interop.ts
|
|
839
|
+
var NODE_LTS_RECOMMENDED = "24";
|
|
840
|
+
function nodeLoaderInteropWarning() {
|
|
841
|
+
const [major, minor] = process.versions.node.split(".").map(Number);
|
|
842
|
+
if (major === 22 && minor >= 18) {
|
|
843
|
+
return `Node 22.18+ can fail loading Vite config (getStatus). Upgrade to Node ${NODE_LTS_RECOMMENDED} LTS or the latest Node 22 patch.`;
|
|
844
|
+
}
|
|
845
|
+
if (major === 23 && minor < 4) {
|
|
846
|
+
return `Node 23.0\u201323.3 can fail loading Vite config (getStatus). Upgrade to Node ${NODE_LTS_RECOMMENDED} LTS.`;
|
|
847
|
+
}
|
|
848
|
+
return null;
|
|
849
|
+
}
|
|
850
|
+
|
|
838
851
|
// src/cli/commands/doctor.ts
|
|
839
852
|
function checkNode() {
|
|
840
853
|
const major = Number(process.versions.node.split(".")[0]);
|
|
@@ -843,7 +856,7 @@ function checkNode() {
|
|
|
843
856
|
name: "node",
|
|
844
857
|
ok,
|
|
845
858
|
message: ok ? `Node ${process.versions.node}` : `Node ${process.versions.node} (need >= 20)`,
|
|
846
|
-
remediation: ok ? void 0 : "Install Node
|
|
859
|
+
remediation: ok ? void 0 : "Install Node 24 LTS (recommended) or Node 20 LTS.",
|
|
847
860
|
severity: "error"
|
|
848
861
|
};
|
|
849
862
|
}
|
|
@@ -1448,6 +1461,16 @@ function checkModuleConfigUiDeps(ctx) {
|
|
|
1448
1461
|
};
|
|
1449
1462
|
});
|
|
1450
1463
|
}
|
|
1464
|
+
function checkNodeLoaderInterop() {
|
|
1465
|
+
const warning = nodeLoaderInteropWarning();
|
|
1466
|
+
return {
|
|
1467
|
+
name: "node-loader-interop",
|
|
1468
|
+
ok: !warning,
|
|
1469
|
+
message: warning ?? `Node ${process.versions.node} (Vite config load OK)`,
|
|
1470
|
+
remediation: warning ?? void 0,
|
|
1471
|
+
severity: "warn"
|
|
1472
|
+
};
|
|
1473
|
+
}
|
|
1451
1474
|
function checkViteInstalled(ctx) {
|
|
1452
1475
|
if (isThemeProject(ctx.config) && !existsSync7(resolve8(ctx.projectRoot, "vite.config.dev.mjs"))) {
|
|
1453
1476
|
return null;
|
|
@@ -1481,7 +1504,7 @@ async function gatherDoctorChecks(ctx) {
|
|
|
1481
1504
|
{
|
|
1482
1505
|
title: "Checking Node, Vite, and kit scripts",
|
|
1483
1506
|
task: async () => {
|
|
1484
|
-
checks.push(checkNode(), checkKitScripts());
|
|
1507
|
+
checks.push(checkNode(), checkNodeLoaderInterop(), checkKitScripts());
|
|
1485
1508
|
const uploadOnlyNote = checkUploadOnlyNote(ctx);
|
|
1486
1509
|
if (uploadOnlyNote) {
|
|
1487
1510
|
checks.push(uploadOnlyNote);
|
|
@@ -1897,6 +1920,10 @@ import { resolve as resolve11 } from "path";
|
|
|
1897
1920
|
import { spawn } from "child_process";
|
|
1898
1921
|
async function runDev(ctx, options) {
|
|
1899
1922
|
const port = options.port ?? 3e3;
|
|
1923
|
+
const nodeWarning = nodeLoaderInteropWarning();
|
|
1924
|
+
if (nodeWarning) {
|
|
1925
|
+
ctx.logger.warn(nodeWarning);
|
|
1926
|
+
}
|
|
1900
1927
|
const env = {
|
|
1901
1928
|
...process.env,
|
|
1902
1929
|
WP_HS_PROJECT_ROOT: ctx.projectRoot
|