Skip to content

Commit ddce8b1

Browse files
committed
update to node-v22
1 parent 8fdd63d commit ddce8b1

32 files changed

+152
-144
lines changed

.release-please-config.json

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
{
2-
"release-type": "node",
3-
"monorepo-tags": true,
4-
"include-component-in-tag": true,
5-
"packages": {
6-
"packages/core": {
7-
"package-name": "@react-zero-ui/core",
8-
"release-type": "node"
9-
},
10-
"packages/cli": {
11-
"package-name": "create-zero-ui",
12-
"release-type": "node"
13-
}
14-
}
15-
}
2+
"release-type": "node",
3+
"monorepo-tags": true,
4+
"include-component-in-tag": true,
5+
"packages": {
6+
"packages/core": { "package-name": "@react-zero-ui/core", "release-type": "node" },
7+
"packages/cli": { "package-name": "create-zero-ui", "release-type": "node" }
8+
}
9+
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Pre‑render your UI once, flip a `data-*` attribute to update — that's it.
2020

2121
## 🚀 Live Demo
2222

23-
| Example | Link | What it shows | Link to Code |
24-
| --- | --- | --- | --- |
25-
| Interactive menu with render tracker | <a href="https://zero-ui.dev/" target="_blank" rel="noopener noreferrer"><strong>Main Demo↗</strong></a> | Compare Zero‑UI vs. React side‑by‑side while toggling a menu. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo" target="_blank" rel="noopener noreferrer">Github</a> |
26-
| React benchmark (10 000 nested nodes) | <a href="https://zero-ui.dev/react" target="_blank" rel="noopener noreferrer"><strong>React 10k↗</strong></a> | How long the traditional React render path takes. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/react" target="_blank" rel="noopener noreferrer">Github</a> |
23+
| Example | Link | What it shows | Link to Code |
24+
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
25+
| Interactive menu with render tracker | <a href="https://zero-ui.dev/" target="_blank" rel="noopener noreferrer"><strong>Main Demo↗</strong></a> | Compare Zero‑UI vs. React side‑by‑side while toggling a menu. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo" target="_blank" rel="noopener noreferrer">Github</a> |
26+
| React benchmark (10 000 nested nodes) | <a href="https://zero-ui.dev/react" target="_blank" rel="noopener noreferrer"><strong>React 10k↗</strong></a> | How long the traditional React render path takes. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/react" target="_blank" rel="noopener noreferrer">Github</a> |
2727
| Zero‑UI benchmark (10 000 nested nodes) | <a href="https://zero-ui.dev/zero-ui" target="_blank" rel="noopener noreferrer"><strong style="text-align: nowrap;">Zero‑UI 10k↗</strong></a> | Identical DOM, but powered by Zero‑UI's `data-*` switch. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/zero-ui" target="_blank" rel="noopener noreferrer">Github</a> |
2828

2929
---

examples/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
"tailwindcss": "^4.1.10",
3434
"typescript": "^5"
3535
}
36-
}
36+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "react-zero-ui-monorepo",
33
"private": true,
44
"type": "module",
5+
"engines": {
6+
"node": ">=22"
7+
},
58
"workspaces": [
69
"packages/*"
710
],
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { bodyAttributes } from "@zero-ui/attributes";import './globals.css';
1+
import { bodyAttributes } from '@zero-ui/attributes';
2+
import './globals.css';
23

34
export default function RootLayout({ children }) {
4-
return (
5-
<html lang="en">
6-
<body {...bodyAttributes}
7-
className="bg-red test-ww this is to test the body tag"
8-
id="88">
5+
return (
6+
<html lang="en">
7+
<body
8+
{...bodyAttributes}
9+
className="bg-red test-ww this is to test the body tag"
10+
id="88">
911
{children}
1012
</body>
11-
</html>);
12-
13-
}
13+
</html>
14+
);
15+
}

packages/core/__tests__/helpers/loadCli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from 'node:path';
44

55
export async function loadCliFromFixture(fixtureDir) {
66
const r = createRequire(path.join(fixtureDir, 'package.json'));
7-
const modulePath = r.resolve('../../../dist/cli/init.cjs'); // get the path
7+
const modulePath = r.resolve('../../../dist/cli/init.js'); // get the path
88
const mod = r(modulePath); // actually require the module
99
console.log('[Global Setup] Loaded CLI from fixture:', modulePath);
1010
// Return a wrapper function that changes directory before running CLI

packages/core/__tests__/helpers/resetProjectState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import fs from 'node:fs';
33
import path from 'node:path';
44
import { rmSync } from 'node:fs';
5-
import { overwriteFile } from './overwriteFile';
5+
import { overwriteFile } from './overwriteFile.js';
66

77
/**
88
* Reset everything the Zero-UI CLI generates inside a fixture.

packages/core/__tests__/unit/ast.test.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const fs = require('fs');
44
const path = require('path');
55
const os = require('os');
66
const { performance } = require('node:perf_hooks');
7-
const { findAllSourceFiles } = require('../../dist/postcss/helpers.cjs');
8-
const { collectUseUIHooks, extractVariants } = require('../../dist/postcss/ast-parsing.cjs');
7+
const { findAllSourceFiles } = require('../../dist/postcss/helpers');
8+
const { collectUseUIHooks, extractVariants } = require('../../dist/postcss/ast-parsing');
99

1010
const ComponentImports = readFile(path.join(__dirname, './fixtures/test-components.jsx'));
1111
const AllPatternsComponent = readFile(path.join(__dirname, './fixtures/ts-test-components.tsx'));

packages/core/__tests__/unit/cli.test.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function cleanupTestDir(testDir) {
5656
function runCLIScript(targetDir, timeout = 30000) {
5757
return new Promise((resolve, reject) => {
5858
// Updated path to the correct CLI script location
59-
const binScript = path.resolve(__dirname, '../../../cli/bin.js');
59+
const binScript = path.resolve(__dirname, '../../../cli/bin');
6060

6161
const child = spawn('node', [binScript, '.'], { cwd: targetDir, stdio: ['pipe', 'pipe', 'pipe'] });
6262

@@ -296,7 +296,7 @@ export function TestComponent() {
296296
fs.writeFileSync(path.join(componentDir, 'TestComponent.jsx'), testComponent);
297297

298298
// Import and run the library CLI directly
299-
const { runZeroUiInit } = require('../../dist/cli/postInstall.cjs');
299+
const { runZeroUiInit } = require('../../dist/cli/postInstall');
300300

301301
// Mock console to capture output
302302
const originalConsoleLog = console.log;
@@ -354,7 +354,7 @@ test('Library CLI handles errors gracefully', async () => {
354354
};
355355

356356
try {
357-
const { runZeroUiInit } = require('../../dist/cli/postInstall.cjs');
357+
const { runZeroUiInit } = require('../../dist/cli/postInstall');
358358

359359
// This should complete without errors in most cases
360360
await runZeroUiInit();
@@ -523,7 +523,7 @@ export function Toggle() {
523523
fs.writeFileSync(path.join(componentsDir, 'Toggle.jsx'), component2);
524524

525525
// Import and run the library CLI
526-
const { runZeroUiInit } = require('../../dist/cli/postInstall.cjs');
526+
const { runZeroUiInit } = require('../../dist/cli/postInstall');
527527

528528
const originalConsoleLog = console.log;
529529
const logMessages = [];

packages/core/__tests__/unit/index.test.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const os = require('os');
77
// This file is the entry point for the react-zero-ui library, that uses postcss to trigger the build process
88
const plugin = require('../../dist/postcss/index.cjs');
99

10-
const { patchTsConfig, toKebabCase, patchPostcssConfig, patchViteConfig } = require('../../dist/postcss/helpers.cjs');
10+
const { patchTsConfig, toKebabCase, patchPostcssConfig, patchViteConfig } = require('../../dist/postcss/helpers.js');
1111

1212
function getAttrFile() {
1313
return path.join(process.cwd(), '.zero-ui', 'attributes.js');
@@ -23,7 +23,7 @@ async function runTest(files, callback) {
2323

2424
// Clear the global file cache to prevent stale entries from previous tests
2525
try {
26-
const astParsing = require('../../dist/postcss/ast-parsing.cjs');
26+
const astParsing = require('../../dist/postcss/ast-parsing.js');
2727
if (astParsing.clearCache) {
2828
astParsing.clearCache();
2929
}

0 commit comments

Comments
 (0)