create-react-adam 0.4.0 → 0.5.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/package.json +1 -1
- package/template/.github/workflows/check.yml +1 -1
- package/template/.github/workflows/e2e.yml +3 -3
- package/template/.github/workflows/lighthouse.yml +1 -1
- package/template/eslint.config.js +1 -1
- package/template/eslint.config.no-webp.js +1 -1
- package/template/package.json +13 -7
- package/template/src/routes.ts +11 -7
- package/template/src/utils/useUrlState.ts +1 -1
- package/template/vite.config.ts +0 -2
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
16
|
|
|
17
17
|
- name: Setup Node.js
|
|
18
18
|
uses: actions/setup-node@v6
|
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
run: npm run test:e2e
|
|
37
37
|
|
|
38
38
|
- name: Upload Playwright report
|
|
39
|
-
uses: actions/upload-artifact@
|
|
39
|
+
uses: actions/upload-artifact@v7
|
|
40
40
|
if: always()
|
|
41
41
|
with:
|
|
42
42
|
name: playwright-report
|
|
@@ -44,7 +44,7 @@ jobs:
|
|
|
44
44
|
retention-days: 30
|
|
45
45
|
|
|
46
46
|
- name: Upload Allure results
|
|
47
|
-
uses: actions/upload-artifact@
|
|
47
|
+
uses: actions/upload-artifact@v7
|
|
48
48
|
if: always()
|
|
49
49
|
with:
|
|
50
50
|
name: allure-results
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import eslint from "@eslint/js";
|
|
2
2
|
import prettier from "eslint-config-prettier";
|
|
3
3
|
import deMorgan from "eslint-plugin-de-morgan";
|
|
4
|
-
import importPlugin from "eslint-plugin-import";
|
|
4
|
+
import importPlugin from "eslint-plugin-import-x";
|
|
5
5
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
6
6
|
import promisePlugin from "eslint-plugin-promise";
|
|
7
7
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import eslint from "@eslint/js";
|
|
2
2
|
import prettier from "eslint-config-prettier";
|
|
3
3
|
import deMorgan from "eslint-plugin-de-morgan";
|
|
4
|
-
import importPlugin from "eslint-plugin-import";
|
|
4
|
+
import importPlugin from "eslint-plugin-import-x";
|
|
5
5
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
6
6
|
import promisePlugin from "eslint-plugin-promise";
|
|
7
7
|
import reactHooks from "eslint-plugin-react-hooks";
|
package/template/package.json
CHANGED
|
@@ -25,26 +25,32 @@
|
|
|
25
25
|
"wouter": "3.10.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@eslint/js": "
|
|
28
|
+
"@eslint/js": "10.0.1",
|
|
29
29
|
"@tailwindcss/vite": "4.3.2",
|
|
30
30
|
"@types/react": "19.2.17",
|
|
31
31
|
"@types/react-dom": "19.2.3",
|
|
32
|
-
"@vitejs/plugin-react": "
|
|
33
|
-
"eslint": "
|
|
32
|
+
"@vitejs/plugin-react": "6.0.3",
|
|
33
|
+
"eslint": "10.6.0",
|
|
34
34
|
"eslint-config-prettier": "10.1.8",
|
|
35
|
+
"eslint-import-resolver-typescript": "4.4.5",
|
|
35
36
|
"eslint-plugin-de-morgan": "2.1.2",
|
|
36
|
-
"eslint-plugin-import": "
|
|
37
|
+
"eslint-plugin-import-x": "4.17.1",
|
|
37
38
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
38
39
|
"eslint-plugin-promise": "7.3.0",
|
|
39
40
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
40
41
|
"eslint-plugin-react-refresh": "0.5.3",
|
|
41
|
-
"eslint-plugin-unicorn": "
|
|
42
|
+
"eslint-plugin-unicorn": "71.1.0",
|
|
42
43
|
"prettier": "3.9.5",
|
|
43
44
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
44
45
|
"prettier-plugin-tailwindcss": "0.8.0",
|
|
45
46
|
"tailwindcss": "4.3.2",
|
|
46
|
-
"typescript": "
|
|
47
|
+
"typescript": "6.0.3",
|
|
47
48
|
"typescript-eslint": "8.63.0",
|
|
48
|
-
"vite": "
|
|
49
|
+
"vite": "8.1.4"
|
|
50
|
+
},
|
|
51
|
+
"overrides": {
|
|
52
|
+
"eslint-plugin-jsx-a11y": {
|
|
53
|
+
"eslint": "$eslint"
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
}
|
package/template/src/routes.ts
CHANGED
|
@@ -40,10 +40,14 @@ export const routeImports: Record<string, PageLoader> = {
|
|
|
40
40
|
export function preloadRoute(path: string): void {
|
|
41
41
|
const load = routeImports[path];
|
|
42
42
|
if (!load) return;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
void (async () => {
|
|
44
|
+
try {
|
|
45
|
+
await load();
|
|
46
|
+
} catch {
|
|
47
|
+
// Preloading is opportunistic: if it fails (offline, a deploy replaced
|
|
48
|
+
// the chunk), the real import on navigation will surface the error.
|
|
49
|
+
}
|
|
50
|
+
})();
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
let hasStartedIdlePreload = false;
|
|
@@ -64,10 +68,10 @@ export function preloadAllRoutesWhenIdle(): void {
|
|
|
64
68
|
|
|
65
69
|
// Safari has no requestIdleCallback; a timeout is a close-enough stand-in.
|
|
66
70
|
const scheduleIdle = (callback: () => void): void => {
|
|
67
|
-
if (typeof
|
|
68
|
-
|
|
71
|
+
if (typeof globalThis.requestIdleCallback === "function") {
|
|
72
|
+
globalThis.requestIdleCallback(callback);
|
|
69
73
|
} else {
|
|
70
|
-
|
|
74
|
+
globalThis.setTimeout(callback, 1500);
|
|
71
75
|
}
|
|
72
76
|
};
|
|
73
77
|
|
package/template/vite.config.ts
CHANGED