diff --git a/apps/web/pages/separate.tsx b/apps/web/pages/separate.tsx new file mode 100644 index 0000000..cd97b10 --- /dev/null +++ b/apps/web/pages/separate.tsx @@ -0,0 +1,73 @@ +import { temporal } from "zundo"; +import create from "zustand"; + +interface MyState { + bears: number; + increment: () => void; + decrement: () => void; +} + +const useStore = create( + temporal((set) => ({ + bears: 0, + increment: () => set((state) => ({ bears: state.bears + 1 })), + decrement: () => set((state) => ({ bears: state.bears - 1 })), + })), +); +const useTemporalStore = create(useStore.temporal); + +const UndoBar = () => { + const { undo, redo, futureStates, pastStates } = useTemporalStore(); + return ( +
+ past states: {JSON.stringify(pastStates)} +
+ future states: {JSON.stringify(futureStates)} +
+ + +
+ ); +}; + +const StateBar = () => { + const store = useStore(); + const { bears, increment, decrement } = store; + return ( +
+ current state: {JSON.stringify(store)} +
+
+ bears: {bears} +
+ + +
+ ); +}; + +const App = () => { + return ( +
+

+ {" "} + + 🐻 + {" "} + + ♻️ + {" "} + Zundo! +

+ +
+ +
+ ); +}; + +export default App; \ No newline at end of file diff --git a/packages/zundo/__tests__/options.test.ts b/packages/zundo/__tests__/options.test.ts index 8f5c9a6..e64bb76 100644 --- a/packages/zundo/__tests__/options.test.ts +++ b/packages/zundo/__tests__/options.test.ts @@ -69,15 +69,15 @@ describe('Middleware options', () => { store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(2); - expect(pastStates[0]).toEqual({ + expect(store.temporal.getState().pastStates.length).toBe(2); + expect(store.temporal.getState().pastStates[0]).toEqual({ count: 0, count2: 0, increment: expect.any(Function), decrement: expect.any(Function), doNothing: expect.any(Function), }); - expect(pastStates[1]).toEqual({ + expect(store.temporal.getState().pastStates[1]).toEqual({ count: 1, count2: 1, increment: expect.any(Function), @@ -95,17 +95,17 @@ describe('Middleware options', () => { }); const { pastStates, futureStates } = storeWithPartialize.temporal.getState(); - expect(pastStates.length).toBe(0); - expect(futureStates.length).toBe(0); + expect(storeWithPartialize.temporal.getState().pastStates.length).toBe(0); + expect(storeWithPartialize.temporal.getState().futureStates.length).toBe(0); act(() => { storeWithPartialize.getState().increment(); storeWithPartialize.getState().increment(); }); - expect(pastStates.length).toBe(2); - expect(pastStates[0]).toEqual({ + expect(storeWithPartialize.temporal.getState().pastStates.length).toBe(2); + expect(storeWithPartialize.temporal.getState().pastStates[0]).toEqual({ count: 0, }); - expect(pastStates[1]).toEqual({ + expect(storeWithPartialize.temporal.getState().pastStates[1]).toEqual({ count: 1, }); expect(storeWithPartialize.getState()).toContain({ count: 2, count2: 2 }); @@ -119,16 +119,16 @@ describe('Middleware options', () => { }); const { undo, pastStates, futureStates } = storeWithPartialize.temporal.getState(); - expect(pastStates.length).toBe(0); - expect(futureStates.length).toBe(0); + expect(storeWithPartialize.temporal.getState().pastStates.length).toBe(0); + expect(storeWithPartialize.temporal.getState().futureStates.length).toBe(0); act(() => { storeWithPartialize.getState().increment(); storeWithPartialize.getState().increment(); undo(); }); - expect(futureStates.length).toBe(1); - expect(futureStates[0]).toEqual({ + expect(storeWithPartialize.temporal.getState().futureStates.length).toBe(1); + expect(storeWithPartialize.temporal.getState().futureStates[0]).toEqual({ count: 2, }); expect(storeWithPartialize.getState()).toEqual({ @@ -141,8 +141,8 @@ describe('Middleware options', () => { act(() => { undo(); }); - expect(futureStates.length).toBe(2); - expect(futureStates[1]).toEqual({ + expect(storeWithPartialize.temporal.getState().futureStates.length).toBe(2); + expect(storeWithPartialize.temporal.getState().futureStates[1]).toEqual({ count: 1, }); expect(storeWithPartialize.getState()).toEqual({ diff --git a/packages/zundo/__tests__/zundo.test.ts b/packages/zundo/__tests__/zundo.test.ts index 243a6a8..c046480 100644 --- a/packages/zundo/__tests__/zundo.test.ts +++ b/packages/zundo/__tests__/zundo.test.ts @@ -92,16 +92,16 @@ describe('temporal middleware', () => { store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(3); + expect(store.temporal.getState().pastStates.length).toBe(3); act(() => { undo(2); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); expect(store.getState().count).toBe(1); act(() => { undo(); }); - expect(pastStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(0); expect(store.getState().count).toBe(0); }); }); @@ -133,17 +133,17 @@ describe('temporal middleware', () => { store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(3); + expect(store.temporal.getState().pastStates.length).toBe(3); act(() => { undo(2); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); expect(store.getState().count).toBe(1); - expect(futureStates.length).toBe(2); + expect(store.temporal.getState().futureStates.length).toBe(2); act(() => { redo(2); }); - expect(pastStates.length).toBe(3); + expect(store.temporal.getState().pastStates.length).toBe(3); expect(store.getState().count).toBe(3); }); }); @@ -155,56 +155,56 @@ describe('temporal middleware', () => { act(() => { store.getState().increment(); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); act(() => { store.getState().increment(); store.getState().decrement(); }); - expect(pastStates.length).toBe(3); + expect(store.temporal.getState().pastStates.length).toBe(3); act(() => { undo(2); }); - expect(pastStates.length).toBe(1); - expect(futureStates.length).toBe(2); + expect(store.temporal.getState().pastStates.length).toBe(1); + expect(store.temporal.getState().futureStates.length).toBe(2); act(() => { redo(); }); - expect(pastStates.length).toBe(2); - expect(futureStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(2); + expect(store.temporal.getState().futureStates.length).toBe(1); act(() => { clear(); }); - expect(pastStates.length).toBe(0); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); }); it('should update pastStates', () => { const { undo, redo, clear, pastStates } = store.temporal.getState(); - expect(pastStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(0); act(() => { store.getState().increment(); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); act(() => { store.getState().decrement(); }); - expect(pastStates.length).toBe(2); + expect(store.temporal.getState().pastStates.length).toBe(2); act(() => { undo(); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); act(() => { undo(); }); - expect(pastStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(0); act(() => { redo(); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); act(() => { clear(); }); - expect(pastStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(0); }); it('should update futureStates', () => { @@ -213,24 +213,24 @@ describe('temporal middleware', () => { act(() => { store.getState().increment(); }); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); act(() => { store.getState().increment(); store.getState().decrement(); }); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); act(() => { undo(2); }); - expect(futureStates.length).toBe(2); + expect(store.temporal.getState().futureStates.length).toBe(2); act(() => { redo(); }); - expect(futureStates.length).toBe(1); + expect(store.temporal.getState().futureStates.length).toBe(1); act(() => { clear(); }); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); }); it('properly tracks state values after clearing', () => { @@ -242,40 +242,40 @@ describe('temporal middleware', () => { store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(3); + expect(store.temporal.getState().pastStates.length).toBe(3); act(() => { clear(); }); - expect(pastStates.length).toBe(0); - expect(futureStates.length).toBe(0); - expect(pastStates).toEqual([]); - expect(futureStates).toEqual([]); + expect(store.temporal.getState().pastStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); + expect(store.temporal.getState().pastStates).toEqual([]); + expect(store.temporal.getState().futureStates).toEqual([]); expect(store.getState().count).toBe(3); act(() => { store.getState().increment(); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); expect(store.getState().count).toBe(4); act(() => { store.getState().increment(); store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(4); + expect(store.temporal.getState().pastStates.length).toBe(4); expect(store.getState().count).toBe(7); act(() => { undo(3); }); - expect(pastStates.length).toBe(1); + expect(store.temporal.getState().pastStates.length).toBe(1); expect(store.getState().count).toBe(4); - expect(futureStates.length).toBe(3); + expect(store.temporal.getState().futureStates.length).toBe(3); act(() => { clear(); }); - expect(pastStates.length).toBe(0); - expect(futureStates.length).toBe(0); - expect(pastStates).toEqual([]); - expect(futureStates).toEqual([]); + expect(store.temporal.getState().pastStates.length).toBe(0); + expect(store.temporal.getState().futureStates.length).toBe(0); + expect(store.temporal.getState().pastStates).toEqual([]); + expect(store.temporal.getState().futureStates).toEqual([]); expect(store.getState().count).toBe(4); }); @@ -289,20 +289,20 @@ describe('temporal middleware', () => { store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(3); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(3); + expect(store.temporal.getState().futureStates.length).toBe(0); act(() => { undo(2); }); - expect(pastStates.length).toBe(1); - expect(futureStates.length).toBe(2); + expect(store.temporal.getState().pastStates.length).toBe(1); + expect(store.temporal.getState().futureStates.length).toBe(2); act(() => { store.getState().increment(); store.getState().increment(); store.getState().increment(); }); - expect(pastStates.length).toBe(4); - expect(futureStates.length).toBe(0); + expect(store.temporal.getState().pastStates.length).toBe(4); + expect(store.temporal.getState().futureStates.length).toBe(0); }); describe('temporal tracking status', () => { diff --git a/packages/zundo/src/temporal.ts b/packages/zundo/src/temporal.ts index 6151eef..2d7caf3 100644 --- a/packages/zundo/src/temporal.ts +++ b/packages/zundo/src/temporal.ts @@ -22,40 +22,45 @@ export const createVanillaTemporal = ( pastStates, futureStates, undo: (steps = 1) => { - if (pastStates.length === 0) { + const ps = get().pastStates.slice(); + const fs = get().futureStates.slice(); + if (ps.length === 0) { return; } - const skippedPastStates = pastStates.splice( - pastStates.length - (steps - 1), + const skippedPastStates = ps.splice( + ps.length - (steps - 1), ); - const pastState = pastStates.pop(); + const pastState = ps.pop(); if (pastState) { - futureStates.push(partialize(userGet())); + fs.push(partialize(userGet())); userSet(pastState); } - futureStates.push(...skippedPastStates); + fs.push(...skippedPastStates); + set({ pastStates: ps, futureStates: fs }); }, redo: (steps = 1) => { - if (futureStates.length === 0) { + const ps = get().pastStates.slice(); + const fs = get().futureStates.slice(); + if (fs.length === 0) { return; } - const skippedFutureStates = futureStates.splice( - futureStates.length - (steps - 1), + const skippedFutureStates = fs.splice( + fs.length - (steps - 1), ); - const futureState = futureStates.pop(); + const futureState = fs.pop(); if (futureState) { - pastStates.push(partialize(userGet())); + ps.push(partialize(userGet())); userSet(futureState); } - pastStates.push(...skippedFutureStates); + ps.push(...skippedFutureStates); + set({ pastStates: ps, futureStates: fs }); }, clear: () => { - pastStates.length = 0; - futureStates.length = 0; + set({ pastStates: [], futureStates: [] }); }, trackingStatus: 'tracking', pause: () => { @@ -70,19 +75,20 @@ export const createVanillaTemporal = ( __internal: { onSave, handleUserSet: (pastState) => { - const { trackingStatus, pastStates, futureStates, __internal } = + const { trackingStatus, pastStates, __internal } = get(); + const ps = pastStates.slice(); const currentState = partialize(userGet()); if ( trackingStatus === 'tracking' && !equality(currentState, pastState) ) { - if (limit && pastStates.length >= limit) { - pastStates.shift(); + if (limit && ps.length >= limit) { + ps.shift(); } - pastStates.push(pastState); - futureStates.length = 0; + ps.push(pastState); __internal.onSave?.(pastState, currentState); + set({ pastStates: ps, futureStates: [] }); } }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03e026e..430d711 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.4 +lockfileVersion: 5.3 importers: @@ -26,7 +26,7 @@ importers: typescript: 4.7.4 ui: workspace:* dependencies: - next: 12.2.5_biqbaboplfbrettd7655fr4n2y + next: 12.2.5_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 ui: link:../../packages/ui @@ -59,7 +59,7 @@ importers: dependencies: '@types/lodash.throttle': 4.1.7 lodash.throttle: 4.1.1 - next: 12.2.5_biqbaboplfbrettd7655fr4n2y + next: 12.2.5_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 ui: link:../../packages/ui @@ -83,7 +83,7 @@ importers: typescript: 4.7.4 dependencies: eslint: 8.22.0 - eslint-config-next: 12.2.5_4rv7y5c6xz3vfxwhbrcxxi73bq + eslint-config-next: 12.2.5_eslint@8.22.0+typescript@4.7.4 eslint-config-prettier: 8.5.0_eslint@8.22.0 eslint-plugin-react: 7.30.1_eslint@8.22.0 typescript: 4.7.4 @@ -101,13 +101,13 @@ importers: tsconfig: workspace:* typescript: latest devDependencies: - '@types/react': 18.0.21 - '@types/react-dom': 18.0.6 - eslint: 8.24.0 + '@types/react': 18.0.25 + '@types/react-dom': 18.0.9 + eslint: 8.27.0 eslint-config-custom: link:../eslint-config-custom react: 18.2.0 tsconfig: link:../tsconfig - typescript: 4.8.3 + typescript: 4.9.3 packages/zundo: specifiers: @@ -197,8 +197,8 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/eslintrc/1.3.2: - resolution: {integrity: sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==} + /@eslint/eslintrc/1.3.3: + resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -224,8 +224,8 @@ packages: transitivePeerDependencies: - supports-color - /@humanwhocodes/config-array/0.10.5: - resolution: {integrity: sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug==} + /@humanwhocodes/config-array/0.11.7: + resolution: {integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -472,6 +472,12 @@ packages: '@types/react': 18.0.21 dev: true + /@types/react-dom/18.0.9: + resolution: {integrity: sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==} + dependencies: + '@types/react': 18.0.25 + dev: true + /@types/react/18.0.17: resolution: {integrity: sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==} dependencies: @@ -488,11 +494,19 @@ packages: csstype: 3.1.0 dev: true + /@types/react/18.0.25: + resolution: {integrity: sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==} + dependencies: + '@types/prop-types': 15.7.5 + '@types/scheduler': 0.16.2 + csstype: 3.1.0 + dev: true + /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true - /@typescript-eslint/parser/5.30.4_4rv7y5c6xz3vfxwhbrcxxi73bq: + /@typescript-eslint/parser/5.30.4_eslint@8.22.0+typescript@4.7.4: resolution: {integrity: sha512-/ge1HtU63wVoED4VnlU2o+FPFmi017bPYpeSrCmd8Ycsti4VSxXrmcpXXm7JpI4GT0Aa7qviabv1PEp6L5bboQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1557,7 +1571,7 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-next/12.2.5_4rv7y5c6xz3vfxwhbrcxxi73bq: + /eslint-config-next/12.2.5_eslint@8.22.0+typescript@4.7.4: resolution: {integrity: sha512-SOowilkqPzW6DxKp3a3SYlrfPi5Ajs9MIzp9gVfUDxxH9QFM5ElkR1hX5m/iICJuvCbWgQqFBiA3mCMozluniw==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 @@ -1568,11 +1582,11 @@ packages: dependencies: '@next/eslint-plugin-next': 12.2.5 '@rushstack/eslint-patch': 1.1.4 - '@typescript-eslint/parser': 5.30.4_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/parser': 5.30.4_eslint@8.22.0+typescript@4.7.4 eslint: 8.22.0 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_2iahngt3u2tkbdlu6s4gkur3pu - eslint-plugin-import: 2.26.0_kaqyldjkrznqkwiyqgievht7b4 + eslint-import-resolver-typescript: 2.7.1_d200769a7ba6a6a08d74f4b865523b7d + eslint-plugin-import: 2.26.0_5021858d2a8e5b05591881904a9e7f0f eslint-plugin-jsx-a11y: 6.6.0_eslint@8.22.0 eslint-plugin-react: 7.30.1_eslint@8.22.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.22.0 @@ -1600,7 +1614,7 @@ packages: - supports-color dev: false - /eslint-import-resolver-typescript/2.7.1_2iahngt3u2tkbdlu6s4gkur3pu: + /eslint-import-resolver-typescript/2.7.1_d200769a7ba6a6a08d74f4b865523b7d: resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} engines: {node: '>=4'} peerDependencies: @@ -1609,7 +1623,7 @@ packages: dependencies: debug: 4.3.4 eslint: 8.22.0 - eslint-plugin-import: 2.26.0_kaqyldjkrznqkwiyqgievht7b4 + eslint-plugin-import: 2.26.0_5021858d2a8e5b05591881904a9e7f0f glob: 7.2.3 is-glob: 4.0.3 resolve: 1.22.1 @@ -1618,7 +1632,7 @@ packages: - supports-color dev: false - /eslint-module-utils/2.7.3_l6lvrjd2sthp7fxx3zjnqygimy: + /eslint-module-utils/2.7.3_5f9758a47a94ceff96f7de52d860c866: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -1636,16 +1650,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.30.4_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/parser': 5.30.4_eslint@8.22.0+typescript@4.7.4 debug: 3.2.7 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_2iahngt3u2tkbdlu6s4gkur3pu + eslint-import-resolver-typescript: 2.7.1_d200769a7ba6a6a08d74f4b865523b7d find-up: 2.1.0 transitivePeerDependencies: - supports-color dev: false - /eslint-plugin-import/2.26.0_kaqyldjkrznqkwiyqgievht7b4: + /eslint-plugin-import/2.26.0_5021858d2a8e5b05591881904a9e7f0f: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -1655,14 +1669,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.30.4_4rv7y5c6xz3vfxwhbrcxxi73bq + '@typescript-eslint/parser': 5.30.4_eslint@8.22.0+typescript@4.7.4 array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.22.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_l6lvrjd2sthp7fxx3zjnqygimy + eslint-module-utils: 2.7.3_5f9758a47a94ceff96f7de52d860c866 has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -1746,13 +1760,13 @@ packages: eslint: 8.22.0 eslint-visitor-keys: 2.1.0 - /eslint-utils/3.0.0_eslint@8.24.0: + /eslint-utils/3.0.0_eslint@8.27.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.24.0 + eslint: 8.27.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1811,15 +1825,15 @@ packages: transitivePeerDependencies: - supports-color - /eslint/8.24.0: - resolution: {integrity: sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==} + /eslint/8.27.0: + resolution: {integrity: sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.2 - '@humanwhocodes/config-array': 0.10.5 - '@humanwhocodes/gitignore-to-minimatch': 1.0.2 + '@eslint/eslintrc': 1.3.3 + '@humanwhocodes/config-array': 0.11.7 '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -1827,7 +1841,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint-utils: 3.0.0_eslint@8.27.0 eslint-visitor-keys: 3.3.0 espree: 9.4.0 esquery: 1.4.0 @@ -1837,12 +1851,12 @@ packages: find-up: 5.0.0 glob-parent: 6.0.2 globals: 13.15.0 - globby: 11.1.0 grapheme-splitter: 1.0.4 ignore: 5.2.0 import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 + is-path-inside: 3.0.3 js-sdsl: 4.1.4 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 @@ -2229,6 +2243,11 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + /is-path-inside/3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -2463,7 +2482,7 @@ packages: escalade: 3.1.1 dev: true - /next/12.2.5_biqbaboplfbrettd7655fr4n2y: + /next/12.2.5_react-dom@18.2.0+react@18.2.0: resolution: {integrity: sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==} engines: {node: '>=12.22.0'} hasBin: true @@ -3259,6 +3278,12 @@ packages: hasBin: true dev: true + /typescript/4.9.3: + resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /unbox-primitive/1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: