Skip to content

Commit

Permalink
refactor(with-storage-sync): move files
Browse files Browse the repository at this point in the history
  • Loading branch information
mzkmnk committed Jan 19, 2025
1 parent df5449c commit 9bc6440
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 95 deletions.
7 changes: 0 additions & 7 deletions apps/demo/src/app/lazy-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,4 @@ export const lazyRoutes: Route[] = [
loadComponent: () =>
import('./reset/todo.component').then((m) => m.TodoComponent),
},
{
path: 'indexeddb-sync',
loadComponent: () =>
import('./todo-indexeddb-sync/todo-indexeddb-sync.component').then(
(m) => m.TodoIndexeddbSyncComponent
),
},
];

This file was deleted.

2 changes: 1 addition & 1 deletion libs/ngrx-toolkit/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

export default {
displayName: 'ngrx-toolkit',
setupFiles: ['fake-indexeddb/auto'],
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/libs/ngrx-toolkit',
Expand Down
7 changes: 5 additions & 2 deletions libs/ngrx-toolkit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export {
export * from './lib/with-call-state';
export * from './lib/with-undo-redo';
export * from './lib/with-data-service';
export { withStorageSync, SyncConfig } from './lib/with-storage-sync';
export * from './lib/with-pagination';
export { withReset, setResetState } from './lib/with-reset';
export { withIndexeddbSync } from './lib/with-indexeddb-sync';
export {
withStorageSync,
SyncConfig,
} from './lib/storageSync/with-storage-sync';
export { withIndexeddb } from './lib/storageSync/with-indexeddb';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getState, patchState, signalStore, withState } from '@ngrx/signals';
import { withStorageSync } from './with-storage-sync';
import { withStorageSync } from '../with-storage-sync';
import { TestBed } from '@angular/core/testing';

interface StateObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export type IndexedDBSyncConfig = {
autoSync?: boolean;
};

export function withIndexeddbSync<
export function withIndexeddb<
State extends object,
Input extends SignalStoreFeatureResult
>({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@
"ts-node": "10.9.1",
"typescript": "5.6.3",
"typescript-eslint": "^8.19.0"
}
},
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
}

0 comments on commit 9bc6440

Please sign in to comment.