Skip to content

Commit 9f32139

Browse files
committed
perf: remove unused dependencies
1 parent b6e5cd2 commit 9f32139

File tree

13 files changed

+25
-129
lines changed

13 files changed

+25
-129
lines changed

package-lock.json

Lines changed: 13 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"dependencies": {
2626
"@magnetarjs/types": "*",
2727
"@magnetarjs/utils": "*",
28-
"filter-anything": "^4.0.2",
2928
"getorset-anything": "^1.0.1",
3029
"is-what": "^5.0.2",
3130
"map-anything": "^3.0.1",

packages/plugin-firestore-admin/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"dependencies": {
3333
"@magnetarjs/types": "*",
3434
"@magnetarjs/utils-firestore": "*",
35-
"flatten-anything": "^4.0.1",
3635
"getorset-anything": "^1.0.1",
3736
"is-what": "^5.0.2",
3837
"merge-anything": "^6.0.2",

packages/plugin-firestore/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@magnetarjs/types": "*",
3333
"@magnetarjs/utils": "*",
3434
"@magnetarjs/utils-firestore": "*",
35-
"flatten-anything": "^4.0.1",
3635
"getorset-anything": "^1.0.1",
3736
"is-what": "^5.0.2",
3837
"merge-anything": "^6.0.2",

packages/plugin-simple-store/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"@magnetarjs/types": "*",
3030
"@magnetarjs/utils": "*",
3131
"copy-anything": "^4.0.2",
32-
"filter-anything": "^4.0.2",
3332
"getorset-anything": "^1.0.1",
3433
"is-what": "^5.0.2",
3534
"merge-anything": "^6.0.2",

packages/plugin-simple-store/src/CreatePlugin.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {
88
import { getPathWhereIdentifier } from '@magnetarjs/types'
99
import { filterDataPerClauses } from '@magnetarjs/utils'
1010
import { copy } from 'copy-anything'
11-
import { pick } from 'filter-anything'
1211
import { mapGetOrSet, objGetOrSet } from 'getorset-anything'
1312
import { isArray, isNumber, isPlainObject } from 'is-what'
1413
import { deleteActionFactory } from './actions/delete.js'
@@ -126,14 +125,7 @@ export const CreatePlugin: MagnetarPlugin<SimpleStoreOptions> = (
126125
if (docId) return dataCollectionMap.get(docId)
127126
// if it's a collection, we must return the dataCollectionMap but with applied query clauses
128127
// but remember, the return type MUST be a map with id as keys and the docs as value
129-
const clauses: Clauses = pick(pluginModuleConfig, [
130-
'query',
131-
'where',
132-
'orderBy',
133-
'limit',
134-
'startAfter',
135-
])
136-
128+
const clauses: Clauses = pluginModuleConfig
137129
return filterDataPerClauses(dataCollectionMap, clauses)
138130
}
139131

@@ -174,14 +166,7 @@ export const CreatePlugin: MagnetarPlugin<SimpleStoreOptions> = (
174166
if (isNumber(count)) return count
175167

176168
// if we didn't have any cached count yet, we must return the size of the dataCollectionMap but with applied query clauses
177-
const clauses: Clauses = pick(pluginModuleConfig, [
178-
'query',
179-
'where',
180-
'orderBy',
181-
'limit',
182-
'startAfter',
183-
])
184-
169+
const clauses: Clauses = pluginModuleConfig
185170
const dataCollectionMap = objGetOrSet(data, collectionPath, () => new Map())
186171
const dataFiltered = filterDataPerClauses(dataCollectionMap, clauses)
187172
return dataFiltered.size

packages/plugin-vue3/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@magnetarjs/types": "*",
3333
"@magnetarjs/utils": "*",
3434
"copy-anything": "^4.0.2",
35-
"filter-anything": "^4.0.2",
3635
"getorset-anything": "^1.0.1",
3736
"is-what": "^5.0.2",
3837
"merge-anything": "^6.0.2",

packages/plugin-vue3/src/CreatePlugin.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {
88
import { getPathWhereIdentifier } from '@magnetarjs/types'
99
import { filterDataPerClauses } from '@magnetarjs/utils'
1010
import { copy } from 'copy-anything'
11-
import { pick } from 'filter-anything'
1211
import { mapGetOrSet, objGetOrSet } from 'getorset-anything'
1312
import { isArray, isNumber, isPlainObject } from 'is-what'
1413
import { reactive } from 'vue'
@@ -134,14 +133,7 @@ export const CreatePlugin: MagnetarPlugin<Vue3StoreOptions> = (
134133
if (docId) return dataCollectionMap.get(docId)
135134
// if it's a collection, we must return the dataCollectionMap but with applied query clauses
136135
// but remember, the return type MUST be a map with id as keys and the docs as value
137-
const clauses: Clauses = pick(pluginModuleConfig, [
138-
'query',
139-
'where',
140-
'orderBy',
141-
'limit',
142-
'startAfter',
143-
])
144-
136+
const clauses: Clauses = pluginModuleConfig
145137
return filterDataPerClauses(dataCollectionMap, clauses)
146138
}
147139

@@ -182,14 +174,7 @@ export const CreatePlugin: MagnetarPlugin<Vue3StoreOptions> = (
182174
if (isNumber(count)) return count
183175

184176
// if we didn't have any cached count yet, we must return the size of the dataCollectionMap but with applied query clauses
185-
const clauses: Clauses = pick(pluginModuleConfig, [
186-
'query',
187-
'where',
188-
'orderBy',
189-
'limit',
190-
'startAfter',
191-
])
192-
177+
const clauses: Clauses = pluginModuleConfig
193178
const dataCollectionMap = objGetOrSet(data, collectionPath, () => reactive(new Map()))
194179
const dataFiltered = filterDataPerClauses(dataCollectionMap, clauses)
195180
return dataFiltered.size

packages/test-utils/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"@magnetarjs/types": "*",
2626
"@magnetarjs/utils": "*",
2727
"copy-anything": "^4.0.2",
28-
"filter-anything": "^4.0.2",
2928
"getorset-anything": "^1.0.1",
3029
"is-what": "^5.0.2",
3130
"merge-anything": "^6.0.2",

packages/test-utils/src/PluginLocalMock/CreatePlugin.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type {
88
import { getPathWhereIdentifier } from '@magnetarjs/types'
99
import { filterDataPerClauses } from '@magnetarjs/utils'
1010
import { copy } from 'copy-anything'
11-
import { pick } from 'filter-anything'
1211
import { mapGetOrSet, objGetOrSet } from 'getorset-anything'
1312
import { isArray, isNumber, isPlainObject } from 'is-what'
1413
import { deleteActionFactory } from './actions/delete.js'
@@ -127,14 +126,7 @@ export const CreatePlugin: MagnetarPlugin<StorePluginOptions> = (
127126
if (docId) return dataCollectionMap.get(docId)
128127
// if it's a collection, we must return the dataCollectionMap but with applied query clauses
129128
// but remember, the return type MUST be a map with id as keys and the docs as value
130-
const clauses: Clauses = pick(pluginModuleConfig, [
131-
'query',
132-
'where',
133-
'orderBy',
134-
'limit',
135-
'startAfter',
136-
])
137-
129+
const clauses: Clauses = pluginModuleConfig
138130
return filterDataPerClauses(dataCollectionMap, clauses)
139131
}
140132

@@ -175,14 +167,7 @@ export const CreatePlugin: MagnetarPlugin<StorePluginOptions> = (
175167
if (isNumber(count)) return count
176168

177169
// if we didn't have any cached count yet, we must return the size of the dataCollectionMap but with applied query clauses
178-
const clauses: Clauses = pick(pluginModuleConfig, [
179-
'query',
180-
'where',
181-
'orderBy',
182-
'limit',
183-
'startAfter',
184-
])
185-
170+
const clauses: Clauses = pluginModuleConfig
186171
const dataCollectionMap = objGetOrSet(data, collectionPath, () => new Map())
187172
const dataFiltered = filterDataPerClauses(dataCollectionMap, clauses)
188173
return dataFiltered.size

0 commit comments

Comments
 (0)