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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-react-adam",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Create opinionated React apps with TypeScript, Vite, Wouter, and Tailwind CSS",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v6
15
+ - uses: actions/checkout@v7
16
16
 
17
17
  - name: Setup Node.js
18
18
  uses: actions/setup-node@v6
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v6
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@v6
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@v6
47
+ uses: actions/upload-artifact@v7
48
48
  if: always()
49
49
  with:
50
50
  name: allure-results
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v6
15
+ - uses: actions/checkout@v7
16
16
 
17
17
  - name: Setup Node.js
18
18
  uses: actions/setup-node@v6
@@ -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";
@@ -25,26 +25,32 @@
25
25
  "wouter": "3.10.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@eslint/js": "9.39.4",
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": "5.2.0",
33
- "eslint": "9.39.4",
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": "2.32.0",
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": "62.0.0",
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": "5.9.3",
47
+ "typescript": "6.0.3",
47
48
  "typescript-eslint": "8.63.0",
48
- "vite": "7.3.6"
49
+ "vite": "8.1.4"
50
+ },
51
+ "overrides": {
52
+ "eslint-plugin-jsx-a11y": {
53
+ "eslint": "$eslint"
54
+ }
49
55
  }
50
56
  }
@@ -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
- load().catch(() => {
44
- // Preloading is opportunistic: if it fails (offline, a deploy replaced
45
- // the chunk), the real import on navigation will surface the error.
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 window.requestIdleCallback === "function") {
68
- window.requestIdleCallback(callback);
71
+ if (typeof globalThis.requestIdleCallback === "function") {
72
+ globalThis.requestIdleCallback(callback);
69
73
  } else {
70
- window.setTimeout(callback, 1500);
74
+ globalThis.setTimeout(callback, 1500);
71
75
  }
72
76
  };
73
77
 
@@ -20,7 +20,7 @@ export function useUrlState(
20
20
  const urlValue = params.get(key);
21
21
  const value = urlValue
22
22
  ? typeof defaultValue === "number"
23
- ? Number.parseInt(urlValue, 10)
23
+ ? Number(urlValue)
24
24
  : urlValue
25
25
  : defaultValue;
26
26
 
@@ -1,6 +1,4 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  import tailwindcss from "@tailwindcss/vite";
3
- // eslint-disable-next-line import/no-unresolved
4
2
  import react from "@vitejs/plugin-react";
5
3
  import { defineConfig } from "vite";
6
4