diff --git a/.gitignore b/.gitignore index 90ca341..295bc70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,6 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies node_modules -.pnp -.pnp.js - -# testing +package-lock.json +dist coverage - -# next.js -.next/ -out/ -build - -# misc .DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -# turbo -.turbo - -/dist \ No newline at end of file +.next/ \ No newline at end of file diff --git a/package.json b/package.json index b5b2b3b..377c982 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "zustand": "4.5.2" }, "peerDependencies": { - "zustand": "^4.3.0" + "zustand": "^4.3.0 || ^5.0.0" }, "peerDependenciesMeta": { "zustand": { diff --git a/tests/__tests__/react.test.tsx b/tests/__tests__/react.test.tsx index 2518885..9ff4833 100644 --- a/tests/__tests__/react.test.tsx +++ b/tests/__tests__/react.test.tsx @@ -45,8 +45,8 @@ describe('React Re-renders when state changes', () => { }); // React Code from examples/web/pages/reactive.tsx -import { TemporalState, temporal } from '../../src'; -import { StoreApi, useStore, create } from 'zustand'; +import { type TemporalState, temporal } from '../../src'; +import { type StoreApi, useStore, create } from 'zustand'; interface MyState { bears: number; diff --git a/tests/package.json b/tests/package.json index bf0ece5..c02a6d3 100644 --- a/tests/package.json +++ b/tests/package.json @@ -21,7 +21,6 @@ "microdiff": "1.4.0", "react": "18.3.1", "react-dom": "18.3.1", - "vite": "5.2.12", "vitest": "1.6.0", "vitest-localstorage-mock": "0.1.2", "zustand": "4.5.2" diff --git a/tests/vitest.config.ts b/tests/vitest.config.ts index 8c99e48..4f6d5d1 100644 --- a/tests/vitest.config.ts +++ b/tests/vitest.config.ts @@ -1,5 +1,4 @@ -/// <reference types="vitest" /> -import { defineConfig } from 'vite'; +import { defineConfig } from 'vitest/config' export default defineConfig({ test: { diff --git a/tsconfig.json b/tsconfig.json index 0b6ce5d..db32182 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,36 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "display": "zundo", "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "target": "ESNext", + "baseUrl": ".", "composite": false, "declaration": true, "declarationMap": true, "esModuleInterop": true, + "exactOptionalPropertyTypes": true, "forceConsistentCasingInFileNames": true, - "inlineSources": false, "isolatedModules": true, - "moduleResolution": "node", + "module": "esnext", + "moduleDetection": "force", + "moduleResolution": "bundler", + "noEmit": true, + "noImplicitOverride": true, + "noUncheckedIndexedAccess": true, "noUnusedLocals": false, "noUnusedParameters": false, - "preserveWatchOutput": true, + "outDir": "dist", + "rootDir": ".", "skipLibCheck": true, - "strict": true + "strict": true, + "target": "esnext", + "verbatimModuleSyntax": true }, - "exclude": ["node_modules", "dist"], - "include": ["src"] + "display": "zundo", + "exclude": [ + "node_modules", + "dist" + ], + "include": [ + "src/**/*", + "tests/**/*" + ] } \ No newline at end of file