From 53ac7188aa60e745b716af8e3e657e9ad15b6a0d Mon Sep 17 00:00:00 2001 From: Tane Morgan <464864+tanem@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:28:46 +1300 Subject: [PATCH] Migrate examples to vite and latest codesandbox template config --- .github/copilot-instructions.md | 25 +++++++++++ README.md | 22 +++++----- examples/hoc/.codesandbox/tasks.json | 36 ++++++++++++++++ examples/hoc/.devcontainer/devcontainer.json | 4 ++ examples/hoc/package.json | 15 +++---- examples/hoc/tsconfig.json | 6 ++- examples/material-ui/.codesandbox/tasks.json | 36 ++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/material-ui/package.json | 15 +++---- examples/material-ui/tsconfig.json | 6 ++- .../.codesandbox/tasks.json | 36 ++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/multiple-instances/package.json | 15 +++---- examples/multiple-instances/tsconfig.json | 6 ++- .../next-app-router/.codesandbox/tasks.json | 42 +++++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/next-app-router/package.json | 6 +-- examples/next-app-router/tsconfig.json | 4 +- .../next-pages-router/.codesandbox/tasks.json | 42 +++++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/next-pages-router/package.json | 9 ++-- examples/next-pages-router/tsconfig.json | 4 +- .../original-design/.codesandbox/tasks.json | 36 ++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/original-design/package.json | 15 +++---- examples/original-design/tsconfig.json | 6 ++- examples/plain-js/.codesandbox/tasks.json | 36 ++++++++++++++++ .../plain-js/.devcontainer/devcontainer.json | 4 ++ examples/plain-js/package.json | 7 ++-- .../react-router-v6/.codesandbox/tasks.json | 36 ++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/react-router-v6/package.json | 15 +++---- examples/react-router-v6/tsconfig.json | 6 ++- examples/render-props/.codesandbox/tasks.json | 36 ++++++++++++++++ .../.devcontainer/devcontainer.json | 4 ++ examples/render-props/package.json | 15 +++---- examples/render-props/tsconfig.json | 6 ++- examples/umd-dev/.codesandbox/tasks.json | 26 ++++++++++++ .../umd-dev/.devcontainer/devcontainer.json | 4 ++ examples/umd-prod/.codesandbox/tasks.json | 26 ++++++++++++ .../umd-prod/.devcontainer/devcontainer.json | 4 ++ renovate.json | 5 +++ 42 files changed, 566 insertions(+), 74 deletions(-) create mode 100644 examples/hoc/.codesandbox/tasks.json create mode 100644 examples/hoc/.devcontainer/devcontainer.json create mode 100644 examples/material-ui/.codesandbox/tasks.json create mode 100644 examples/material-ui/.devcontainer/devcontainer.json create mode 100644 examples/multiple-instances/.codesandbox/tasks.json create mode 100644 examples/multiple-instances/.devcontainer/devcontainer.json create mode 100644 examples/next-app-router/.codesandbox/tasks.json create mode 100644 examples/next-app-router/.devcontainer/devcontainer.json create mode 100644 examples/next-pages-router/.codesandbox/tasks.json create mode 100644 examples/next-pages-router/.devcontainer/devcontainer.json create mode 100644 examples/original-design/.codesandbox/tasks.json create mode 100644 examples/original-design/.devcontainer/devcontainer.json create mode 100644 examples/plain-js/.codesandbox/tasks.json create mode 100644 examples/plain-js/.devcontainer/devcontainer.json create mode 100644 examples/react-router-v6/.codesandbox/tasks.json create mode 100644 examples/react-router-v6/.devcontainer/devcontainer.json create mode 100644 examples/render-props/.codesandbox/tasks.json create mode 100644 examples/render-props/.devcontainer/devcontainer.json create mode 100644 examples/umd-dev/.codesandbox/tasks.json create mode 100644 examples/umd-dev/.devcontainer/devcontainer.json create mode 100644 examples/umd-prod/.codesandbox/tasks.json create mode 100644 examples/umd-prod/.devcontainer/devcontainer.json diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ba85c9a5d..fda04c747 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -60,6 +60,31 @@ Managed by Renovate (`config:js-lib` preset): - Always run `npm test` after changes; use `npm run test:src` for quick source-only feedback during development +## Examples + +Examples live in `examples/` and are designed to open on CodeSandbox. Their +"platform" dependencies (vite, @vitejs/plugin-react, next, typescript, +@types/react, @types/react-dom) must match the official CodeSandbox +sandbox-templates at +https://github.com/codesandbox/sandbox-templates/tree/main. + +Reference templates: + +- Vite-based examples → `react-vite` / `react-vite-ts` +- Next.js examples → `nextjs` + +Renovate is disabled for `examples/**` (via `ignorePaths` in +`renovate.json`). Updates are manual: check the reference template, update all +examples in one commit, and verify at least one example still opens correctly +on CodeSandbox. + +Example-specific deps (e.g. `@mui/material`, `react-router-dom`, +`react-transition-group`) are not governed by the templates: update these as +needed but test on CodeSandbox before merging. + +Do not bump vite, @vitejs/plugin-react, next, or typescript in examples +beyond the versions in the reference templates. + ## Versioning Strict semver — no breaking changes without a major version bump, including diff --git a/README.md b/README.md index 051c72a6f..d476a6576 100644 --- a/README.md +++ b/README.md @@ -94,17 +94,17 @@ render(, document.getElementById('root')) ## Live Examples -- HOC: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/hoc) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/hoc) -- Material UI: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/material-ui) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/material-ui) -- Multiple Instances: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/multiple-instances) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/multiple-instances) -- Next App Router: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/next-app-router) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/next-app-router) -- Next Pages Router: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/next-pages-router) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/next-pages-router) -- Original Design: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/original-design) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/original-design) -- Plain JS: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/plain-js) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/plain-js) -- React Router V6: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/react-router-v6) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/react-router-v6) -- Render Props: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/render-props) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/render-props) -- UMD Build (Development): [Source](https://github.com/tanem/react-nprogress/tree/master/examples/umd-dev) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/umd-dev) -- UMD Build (Production): [Source](https://github.com/tanem/react-nprogress/tree/master/examples/umd-prod) | [Sandbox](https://codesandbox.io/s/github/tanem/react-nprogress/tree/master/examples/umd-prod) +- HOC: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/hoc) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/hoc) +- Material UI: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/material-ui) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/material-ui) +- Multiple Instances: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/multiple-instances) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/multiple-instances) +- Next App Router: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/next-app-router) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/next-app-router) +- Next Pages Router: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/next-pages-router) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/next-pages-router) +- Original Design: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/original-design) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/original-design) +- Plain JS: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/plain-js) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/plain-js) +- React Router V6: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/react-router-v6) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/react-router-v6) +- Render Props: [Source](https://github.com/tanem/react-nprogress/tree/master/examples/render-props) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/render-props) +- UMD Build (Development): [Source](https://github.com/tanem/react-nprogress/tree/master/examples/umd-dev) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/umd-dev) +- UMD Build (Production): [Source](https://github.com/tanem/react-nprogress/tree/master/examples/umd-prod) | [Sandbox](https://codesandbox.io/p/devbox/github/tanem/react-nprogress/tree/master/examples/umd-prod) ## API diff --git a/examples/hoc/.codesandbox/tasks.json b/examples/hoc/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/hoc/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/hoc/.devcontainer/devcontainer.json b/examples/hoc/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/hoc/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/hoc/package.json b/examples/hoc/package.json index 6dc68ec4d..dcd6c33d7 100644 --- a/examples/hoc/package.json +++ b/examples/hoc/package.json @@ -13,15 +13,16 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/hoc/tsconfig.json b/examples/hoc/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/hoc/tsconfig.json +++ b/examples/hoc/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/material-ui/.codesandbox/tasks.json b/examples/material-ui/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/material-ui/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/material-ui/.devcontainer/devcontainer.json b/examples/material-ui/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/material-ui/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/material-ui/package.json b/examples/material-ui/package.json index fb8c9f57e..05d6ee73f 100644 --- a/examples/material-ui/package.json +++ b/examples/material-ui/package.json @@ -16,15 +16,16 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/material-ui/tsconfig.json b/examples/material-ui/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/material-ui/tsconfig.json +++ b/examples/material-ui/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/multiple-instances/.codesandbox/tasks.json b/examples/multiple-instances/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/multiple-instances/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/multiple-instances/.devcontainer/devcontainer.json b/examples/multiple-instances/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/multiple-instances/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/multiple-instances/package.json b/examples/multiple-instances/package.json index 86ec969d5..e0a045e00 100644 --- a/examples/multiple-instances/package.json +++ b/examples/multiple-instances/package.json @@ -13,15 +13,16 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/multiple-instances/tsconfig.json b/examples/multiple-instances/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/multiple-instances/tsconfig.json +++ b/examples/multiple-instances/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/next-app-router/.codesandbox/tasks.json b/examples/next-app-router/.codesandbox/tasks.json new file mode 100644 index 000000000..b23cb690f --- /dev/null +++ b/examples/next-app-router/.codesandbox/tasks.json @@ -0,0 +1,42 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "Start Dev Server", + "command": "pnpm run dev", + "runAtStart": true, + "preview": { + "port": 3000 + }, + "restartOn": { + "files": ["./pnpm-lock.yaml"] + } + }, + "build": { + "name": "build", + "command": "pnpm run build", + "runAtStart": false + }, + "start": { + "name": "Start Server", + "command": "pnpm run start", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install", + "restartOn": { + "files": ["./package.json"] + } + } + } +} diff --git a/examples/next-app-router/.devcontainer/devcontainer.json b/examples/next-app-router/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/next-app-router/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/next-app-router/package.json b/examples/next-app-router/package.json index 959e6c354..91a283aeb 100644 --- a/examples/next-app-router/package.json +++ b/examples/next-app-router/package.json @@ -18,8 +18,8 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/node": "24.10.13", - "@types/react": "19.2.14", - "typescript": "5.9.3" + "@types/node": "^20", + "@types/react": "^19.0.0", + "typescript": "^5" } } diff --git a/examples/next-app-router/tsconfig.json b/examples/next-app-router/tsconfig.json index abe252433..a4fa25757 100644 --- a/examples/next-app-router/tsconfig.json +++ b/examples/next-app-router/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "ES2017", "lib": [ "dom", "dom.iterable", @@ -16,7 +16,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "react-jsx", + "jsx": "preserve", "incremental": true, "plugins": [ { diff --git a/examples/next-pages-router/.codesandbox/tasks.json b/examples/next-pages-router/.codesandbox/tasks.json new file mode 100644 index 000000000..b23cb690f --- /dev/null +++ b/examples/next-pages-router/.codesandbox/tasks.json @@ -0,0 +1,42 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "Start Dev Server", + "command": "pnpm run dev", + "runAtStart": true, + "preview": { + "port": 3000 + }, + "restartOn": { + "files": ["./pnpm-lock.yaml"] + } + }, + "build": { + "name": "build", + "command": "pnpm run build", + "runAtStart": false + }, + "start": { + "name": "Start Server", + "command": "pnpm run start", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install", + "restartOn": { + "files": ["./package.json"] + } + } + } +} diff --git a/examples/next-pages-router/.devcontainer/devcontainer.json b/examples/next-pages-router/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/next-pages-router/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/next-pages-router/package.json b/examples/next-pages-router/package.json index 4a5b88852..1e1c67dca 100644 --- a/examples/next-pages-router/package.json +++ b/examples/next-pages-router/package.json @@ -6,9 +6,8 @@ ], "version": "0.1.0", "private": true, - "main": "index.js", "scripts": { - "dev": "next", + "dev": "next dev", "build": "next build", "start": "next start" }, @@ -19,8 +18,8 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/node": "24.10.13", - "@types/react": "19.2.14", - "typescript": "4.9.5" + "@types/node": "^20", + "@types/react": "^19.0.0", + "typescript": "^5" } } diff --git a/examples/next-pages-router/tsconfig.json b/examples/next-pages-router/tsconfig.json index e6bb8eb43..acdab0137 100644 --- a/examples/next-pages-router/tsconfig.json +++ b/examples/next-pages-router/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "ES2017", "lib": [ "dom", "dom.iterable", @@ -13,7 +13,7 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/examples/original-design/.codesandbox/tasks.json b/examples/original-design/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/original-design/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/original-design/.devcontainer/devcontainer.json b/examples/original-design/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/original-design/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/original-design/package.json b/examples/original-design/package.json index 70c6b8280..e56d696ed 100644 --- a/examples/original-design/package.json +++ b/examples/original-design/package.json @@ -13,15 +13,16 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/original-design/tsconfig.json b/examples/original-design/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/original-design/tsconfig.json +++ b/examples/original-design/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/plain-js/.codesandbox/tasks.json b/examples/plain-js/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/plain-js/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/plain-js/.devcontainer/devcontainer.json b/examples/plain-js/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/plain-js/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/plain-js/package.json b/examples/plain-js/package.json index 4b6bbb556..4ffb0eb15 100644 --- a/examples/plain-js/package.json +++ b/examples/plain-js/package.json @@ -13,12 +13,13 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@vitejs/plugin-react": "5.1.4", - "vite": "7.3.1" + "@vitejs/plugin-react": "^4.3.4", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/react-router-v6/.codesandbox/tasks.json b/examples/react-router-v6/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/react-router-v6/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/react-router-v6/.devcontainer/devcontainer.json b/examples/react-router-v6/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/react-router-v6/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/react-router-v6/package.json b/examples/react-router-v6/package.json index a4f7d7f14..ec1182261 100644 --- a/examples/react-router-v6/package.json +++ b/examples/react-router-v6/package.json @@ -15,16 +15,17 @@ "react-transition-group": "4.4.5" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", "@types/react-transition-group": "4.4.12", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/react-router-v6/tsconfig.json b/examples/react-router-v6/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/react-router-v6/tsconfig.json +++ b/examples/react-router-v6/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/render-props/.codesandbox/tasks.json b/examples/render-props/.codesandbox/tasks.json new file mode 100644 index 000000000..0c1f1db17 --- /dev/null +++ b/examples/render-props/.codesandbox/tasks.json @@ -0,0 +1,36 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "dev": { + "name": "dev", + "command": "pnpm dev", + "runAtStart": true, + "preview": { + "port": 5173 + } + }, + "build": { + "name": "build", + "command": "pnpm build", + "runAtStart": false + }, + "preview": { + "name": "preview", + "command": "pnpm preview", + "runAtStart": false + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/render-props/.devcontainer/devcontainer.json b/examples/render-props/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/render-props/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/render-props/package.json b/examples/render-props/package.json index a89218413..41b5c08ba 100644 --- a/examples/render-props/package.json +++ b/examples/render-props/package.json @@ -13,15 +13,16 @@ "react-dom": "19.2.4" }, "devDependencies": { - "@types/react": "19.2.14", - "@types/react-dom": "19.2.3", - "@vitejs/plugin-react": "5.1.4", - "typescript": "5.9.3", - "vite": "7.3.1" + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "^5.7.2", + "vite": "^6.0.3" }, "scripts": { "dev": "vite", - "build": "tsc -b && vite build", - "preview": "vite preview" + "build": "tsc && vite build", + "preview": "vite preview", + "start": "vite" } } diff --git a/examples/render-props/tsconfig.json b/examples/render-props/tsconfig.json index daafd20bd..afb9ce332 100644 --- a/examples/render-props/tsconfig.json +++ b/examples/render-props/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { "target": "ES2020", + "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", - "moduleResolution": "bundler", "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", "strict": true diff --git a/examples/umd-dev/.codesandbox/tasks.json b/examples/umd-dev/.codesandbox/tasks.json new file mode 100644 index 000000000..2c06633c6 --- /dev/null +++ b/examples/umd-dev/.codesandbox/tasks.json @@ -0,0 +1,26 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "start": { + "name": "start", + "command": "pnpm start", + "runAtStart": true, + "preview": { + "port": 1234 + } + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/umd-dev/.devcontainer/devcontainer.json b/examples/umd-dev/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/umd-dev/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/examples/umd-prod/.codesandbox/tasks.json b/examples/umd-prod/.codesandbox/tasks.json new file mode 100644 index 000000000..658497b9b --- /dev/null +++ b/examples/umd-prod/.codesandbox/tasks.json @@ -0,0 +1,26 @@ +{ + "setupTasks": [ + { + "name": "Update pnpm", + "command": "npm i -g pnpm@latest" + }, + { + "name": "Install Dependencies", + "command": "pnpm install" + } + ], + "tasks": { + "start": { + "name": "start", + "command": "pnpm start", + "runAtStart": true, + "preview": { + "port": 1235 + } + }, + "install": { + "name": "install dependencies", + "command": "pnpm install" + } + } +} diff --git a/examples/umd-prod/.devcontainer/devcontainer.json b/examples/umd-prod/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3139d4259 --- /dev/null +++ b/examples/umd-prod/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Devcontainer", + "image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest" +} diff --git a/renovate.json b/renovate.json index ea61690ed..0f3598351 100644 --- a/renovate.json +++ b/renovate.json @@ -7,6 +7,11 @@ ":dependencyDashboard", ":enableVulnerabilityAlerts" ], + "ignorePaths": [ + "**/node_modules/**", + "**/test/**", + "**/examples/**" + ], "lockFileMaintenance": { "enabled": true },