@furystack/mongodb-store 11.0.4 → 11.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,205 +1,215 @@
1
- # Changelog
2
-
3
- ## [11.0.4] - 2026-09-18
4
-
5
- ### ⬆️ Dependencies
6
-
7
- - Updated dependencies
8
-
9
- ## [11.0.3] - 2026-08-26
10
-
11
- ### ⬆️ Dependencies
12
-
13
- - Updated dependencies
14
- - Bumped `mongodb` to `7.5.0` and raised dev `typescript` to `^7.0.2`, `@types/node` to `^26.1.1`, and `vitest` to `^4.1.10`. No source changes — dependency bump only.
15
-
16
- ## [11.0.2] - 2026-06-05
17
-
18
- ### 👷 CI
19
-
20
- - Raised the minimum supported Node.js to `>=24.0.0` (Node 24 LTS) in `engines`, dropping Node 22.
21
-
22
- ### ⬆️ Dependencies
23
-
24
- - Bumped dev `vitest` to `^4.1.8`. No source changes — dev-tooling bump only.
25
-
26
- ## [11.0.1] - 2026-05-21
27
-
28
- ### ♻️ Refactoring
29
-
30
- ### `update` throws `NotFoundError` for missing entities
31
-
32
- `MongodbStore.update` now throws `NotFoundError` from `@furystack/core` (instead of a plain `Error`) when no document matches the given id. Callers can branch on `instanceof NotFoundError` without parsing messages. The message was tightened from `... cannot update!` to `... cannot update` — substring matches that look for `cannot update` keep working.
33
-
34
- ### ⬆️ Dependencies
35
-
36
- - Bump `mongodb` to `7.2.0`.
37
- - Bump dev `vitest` to `^4.1.5`.
38
- - Bumped `@types/node` to `^25.9.1` and `vitest` to `^4.1.7`. No source changes — dev-tooling bump only.
39
-
40
- ### 📚 Documentation
41
-
42
- - Rewrote JSDoc on `MongodbStore`, `defineMongodbStore`, and `MongoClientFactory` to follow the new value-test guidance: dropped restate-the-type narration, called out the lazy-init contract, the `_id`/`ObjectId` coercion behavior, and the fact that the store has no `[Symbol.asyncDispose]` because client lifetime belongs to the factory.
43
-
44
- ## [11.0.0] - 2026-04-25
45
-
46
- ### 💥 Breaking Changes
47
-
48
- Stores are now first-class DI tokens. See the [v7 migration guide](../../docs/migrations/v7-functional-di.md) for rationale, recipes, and pitfalls.
49
-
50
- - Removed `useMongoDb(...)`. Declare the store at module scope with `defineMongoDbStore<T, PK>({ name, model, primaryKey, url, db, collection, options? })`.
51
- - `MongoClientFactory` is now an exported interface + `defineService({ lifetime: 'singleton' })` token. It pools `MongoClient` instances per URL and closes every pooled client on injector teardown.
52
- - Dropped the unused `EventHub<{ onClientCreated, onDisposed }>` surface from the factory (no consumers in-repo).
53
-
54
- ## [10.1.7] - 2026-04-17
55
-
56
- ### ⬆️ Dependencies
57
-
58
- - Raised `@types/node` to ^25.6.0, `typescript` to ^6.0.3, and `vitest` to ^4.1.4 so package development matches the workspace toolchain.
59
-
60
- ## [10.1.6] - 2026-03-27
61
-
62
- ### ⬆️ Dependencies
63
-
64
- - Updated `vitest` to ^4.1.2
65
-
66
- ## [10.1.5] - 2026-03-25
67
-
68
- ### 📦 Build
69
-
70
- - Removed deprecated `baseUrl` from tsconfig.json for TypeScript 6 compatibility
71
-
72
- ### ⬆️ Dependencies
73
-
74
- - Upgraded `typescript` from ^5.9.3 to ^6.0.2
75
- - Upgraded `vitest` from ^4.1.0 to ^4.1.1
76
- - Upgraded `mongodb` from 7.1.0 to 7.1.1
77
-
78
- ## [10.1.4] - 2026-03-19
79
-
80
- ### ✨ Features
81
-
82
- - Updated `@furystack/core` dependency to the latest major version.
83
- - Added `MongoClientFactory` lifecycle events (`onClientCreated`, `onDisposed`).
84
-
85
- ### ⬆️ Dependencies
86
-
87
- - Upgraded `vite` from ^7.3.1 to ^8.0.0 for improved build performance and new features
88
- - Upgraded `vitest` from ^4.0.18 to ^4.1.0
89
- - Upgraded `@vitest/coverage-istanbul` from ^4.0.18 to ^4.1.0
90
-
91
- ## [10.1.3] - 2026-03-10
92
-
93
- ### ⬆️ Dependencies
94
-
95
- - Updated `@furystack/core` dependency to the new major version
96
-
97
- ## [10.1.2] - 2026-03-07
98
-
99
- ### ⬆️ Dependencies
100
-
101
- - Updated `@types/node` from `^25.3.1` to `^25.3.5`
102
-
103
- ## [10.1.1] - 2026-03-06
104
-
105
- ### ⬆️ Dependencies
106
-
107
- - Updated internal FuryStack dependencies
108
-
109
- ## [10.1.0] - 2026-03-03
110
-
111
- ### ✨ Features
112
-
113
- ### Lifecycle events in `MongoClientFactory`
114
-
115
- `MongoClientFactory` now extends `EventHub` and emits events for client lifecycle:
116
-
117
- - `onClientCreated` — emitted when a new MongoDB client is created, with `{ url }`
118
- - `onDisposed` — emitted when the factory is disposed
119
-
120
- ```typescript
121
- const factory = injector.getInstance(MongoClientFactory)
122
-
123
- factory.addListener('onClientCreated', ({ url }) => {
124
- console.log(`MongoDB client created for ${url}`)
125
- })
126
- ```
127
-
128
- ### 🧪 Tests
129
-
130
- - Added tests for `onClientCreated` event emission on new client creation
131
- - Added test verifying `onClientCreated` is not emitted when returning a cached client
132
-
133
- ## [10.0.41] - 2026-02-26
134
-
135
- ### ⬆️ Dependencies
136
-
137
- - Updated internal `@furystack/*` dependencies
138
- - Bumped `@types/node` from ^25.3.0 to ^25.3.1
139
-
140
- ## [10.0.40] - 2026-02-26
141
-
142
- ### 📝 Documentation
143
-
144
- - Added tip about wrapping the physical store with a Repository DataSet for application-level data access
145
-
146
- ## [10.0.39] - 2026-02-22
147
-
148
- ### ⬆️ Dependencies
149
-
150
- - Updated `@furystack/core` dependency
151
-
152
- ## [10.0.38] - 2026-02-19
153
-
154
- ### ⬆️ Dependencies
155
-
156
- - Updated `@furystack/core`
157
-
158
- ## [10.0.37] - 2026-02-11
159
-
160
- ### ♻️ Refactoring
161
-
162
- - Replaced semaphore-based initialization lock with promise deduplication for MongoDB collection setup. Concurrent calls to `getCollection()` now reuse a single in-flight initialization promise instead of queuing behind a semaphore. On initialization failure, the promise is reset to allow retry.
163
-
164
- ### ⬆️ Dependencies
165
-
166
- - Bump `mongodb` from `7.0.0` to `7.1.0`
167
- - Bump `vitest` from `^4.0.17` to `^4.0.18`
168
- - Bump `@types/node` from `^25.0.10` to `^25.2.3`
169
- - Removed `semaphore-async-await` dependency
170
- - Updated internal dependencies
171
-
172
- ## [10.0.36] - 2026-02-09
173
-
174
- ### ⬆️ Dependencies
175
-
176
- - Updated `@furystack/core` dependency
177
- - Updated `@furystack/*` dependencies
178
-
179
- ## [10.0.35] - 2026-01-26
180
-
181
- ### 🔧 Chores
182
-
183
- - Standardized author format, improved keywords, removed obsolete `gitHead`, added `engines` (Node 22+) and `sideEffects: false`
184
-
185
- ## [10.0.34] - 2026-01-26
186
-
187
- ### 🔧 Chores
188
-
189
- - Fixed repository URL in package.json from `furystack/core` to `furystack/furystack`
190
-
191
- ## [10.0.33] - 2026-01-26
192
-
193
- ### ⬆️ Dependencies
194
-
195
- - Updated `@furystack/inject` with fix for singleton injector reference being overwritten by child injectors
196
-
197
- ## [10.0.32] - 2026-01-22
198
-
199
- ### ⬆️ Dependencies
200
-
201
- - Dependency updates
202
-
203
- ### 🔧 Chores
204
-
205
- - Migrated to centralized changelog management system
1
+ # Changelog
2
+
3
+ ## [11.0.5] - 2026-11-14
4
+
5
+ ### Dependencies
6
+
7
+ - Patch release to include updated FuryStack dependency versions
8
+
9
+ ### ⬆️ Dependencies
10
+
11
+ - Updated dependencies
12
+
13
+ ## [11.0.4] - 2026-09-18
14
+
15
+ ### ⬆️ Dependencies
16
+
17
+ - Updated dependencies
18
+
19
+ ## [11.0.3] - 2026-08-26
20
+
21
+ ### ⬆️ Dependencies
22
+
23
+ - Updated dependencies
24
+ - Bumped `mongodb` to `7.5.0` and raised dev `typescript` to `^7.0.2`, `@types/node` to `^26.1.1`, and `vitest` to `^4.1.10`. No source changes — dependency bump only.
25
+
26
+ ## [11.0.2] - 2026-06-05
27
+
28
+ ### 👷 CI
29
+
30
+ - Raised the minimum supported Node.js to `>=24.0.0` (Node 24 LTS) in `engines`, dropping Node 22.
31
+
32
+ ### ⬆️ Dependencies
33
+
34
+ - Bumped dev `vitest` to `^4.1.8`. No source changes — dev-tooling bump only.
35
+
36
+ ## [11.0.1] - 2026-05-21
37
+
38
+ ### ♻️ Refactoring
39
+
40
+ ### `update` throws `NotFoundError` for missing entities
41
+
42
+ `MongodbStore.update` now throws `NotFoundError` from `@furystack/core` (instead of a plain `Error`) when no document matches the given id. Callers can branch on `instanceof NotFoundError` without parsing messages. The message was tightened from `... cannot update!` to `... cannot update` — substring matches that look for `cannot update` keep working.
43
+
44
+ ### ⬆️ Dependencies
45
+
46
+ - Bump `mongodb` to `7.2.0`.
47
+ - Bump dev `vitest` to `^4.1.5`.
48
+ - Bumped `@types/node` to `^25.9.1` and `vitest` to `^4.1.7`. No source changes — dev-tooling bump only.
49
+
50
+ ### 📚 Documentation
51
+
52
+ - Rewrote JSDoc on `MongodbStore`, `defineMongodbStore`, and `MongoClientFactory` to follow the new value-test guidance: dropped restate-the-type narration, called out the lazy-init contract, the `_id`/`ObjectId` coercion behavior, and the fact that the store has no `[Symbol.asyncDispose]` because client lifetime belongs to the factory.
53
+
54
+ ## [11.0.0] - 2026-04-25
55
+
56
+ ### 💥 Breaking Changes
57
+
58
+ Stores are now first-class DI tokens. See the [v7 migration guide](../../docs/migrations/v7-functional-di.md) for rationale, recipes, and pitfalls.
59
+
60
+ - Removed `useMongoDb(...)`. Declare the store at module scope with `defineMongoDbStore<T, PK>({ name, model, primaryKey, url, db, collection, options? })`.
61
+ - `MongoClientFactory` is now an exported interface + `defineService({ lifetime: 'singleton' })` token. It pools `MongoClient` instances per URL and closes every pooled client on injector teardown.
62
+ - Dropped the unused `EventHub<{ onClientCreated, onDisposed }>` surface from the factory (no consumers in-repo).
63
+
64
+ ## [10.1.7] - 2026-04-17
65
+
66
+ ### ⬆️ Dependencies
67
+
68
+ - Raised `@types/node` to ^25.6.0, `typescript` to ^6.0.3, and `vitest` to ^4.1.4 so package development matches the workspace toolchain.
69
+
70
+ ## [10.1.6] - 2026-03-27
71
+
72
+ ### ⬆️ Dependencies
73
+
74
+ - Updated `vitest` to ^4.1.2
75
+
76
+ ## [10.1.5] - 2026-03-25
77
+
78
+ ### 📦 Build
79
+
80
+ - Removed deprecated `baseUrl` from tsconfig.json for TypeScript 6 compatibility
81
+
82
+ ### ⬆️ Dependencies
83
+
84
+ - Upgraded `typescript` from ^5.9.3 to ^6.0.2
85
+ - Upgraded `vitest` from ^4.1.0 to ^4.1.1
86
+ - Upgraded `mongodb` from 7.1.0 to 7.1.1
87
+
88
+ ## [10.1.4] - 2026-03-19
89
+
90
+ ### ✨ Features
91
+
92
+ - Updated `@furystack/core` dependency to the latest major version.
93
+ - Added `MongoClientFactory` lifecycle events (`onClientCreated`, `onDisposed`).
94
+
95
+ ### ⬆️ Dependencies
96
+
97
+ - Upgraded `vite` from ^7.3.1 to ^8.0.0 for improved build performance and new features
98
+ - Upgraded `vitest` from ^4.0.18 to ^4.1.0
99
+ - Upgraded `@vitest/coverage-istanbul` from ^4.0.18 to ^4.1.0
100
+
101
+ ## [10.1.3] - 2026-03-10
102
+
103
+ ### ⬆️ Dependencies
104
+
105
+ - Updated `@furystack/core` dependency to the new major version
106
+
107
+ ## [10.1.2] - 2026-03-07
108
+
109
+ ### ⬆️ Dependencies
110
+
111
+ - Updated `@types/node` from `^25.3.1` to `^25.3.5`
112
+
113
+ ## [10.1.1] - 2026-03-06
114
+
115
+ ### ⬆️ Dependencies
116
+
117
+ - Updated internal FuryStack dependencies
118
+
119
+ ## [10.1.0] - 2026-03-03
120
+
121
+ ### ✨ Features
122
+
123
+ ### Lifecycle events in `MongoClientFactory`
124
+
125
+ `MongoClientFactory` now extends `EventHub` and emits events for client lifecycle:
126
+
127
+ - `onClientCreated` — emitted when a new MongoDB client is created, with `{ url }`
128
+ - `onDisposed` — emitted when the factory is disposed
129
+
130
+ ```typescript
131
+ const factory = injector.getInstance(MongoClientFactory)
132
+
133
+ factory.addListener('onClientCreated', ({ url }) => {
134
+ console.log(`MongoDB client created for ${url}`)
135
+ })
136
+ ```
137
+
138
+ ### 🧪 Tests
139
+
140
+ - Added tests for `onClientCreated` event emission on new client creation
141
+ - Added test verifying `onClientCreated` is not emitted when returning a cached client
142
+
143
+ ## [10.0.41] - 2026-02-26
144
+
145
+ ### ⬆️ Dependencies
146
+
147
+ - Updated internal `@furystack/*` dependencies
148
+ - Bumped `@types/node` from ^25.3.0 to ^25.3.1
149
+
150
+ ## [10.0.40] - 2026-02-26
151
+
152
+ ### 📝 Documentation
153
+
154
+ - Added tip about wrapping the physical store with a Repository DataSet for application-level data access
155
+
156
+ ## [10.0.39] - 2026-02-22
157
+
158
+ ### ⬆️ Dependencies
159
+
160
+ - Updated `@furystack/core` dependency
161
+
162
+ ## [10.0.38] - 2026-02-19
163
+
164
+ ### ⬆️ Dependencies
165
+
166
+ - Updated `@furystack/core`
167
+
168
+ ## [10.0.37] - 2026-02-11
169
+
170
+ ### ♻️ Refactoring
171
+
172
+ - Replaced semaphore-based initialization lock with promise deduplication for MongoDB collection setup. Concurrent calls to `getCollection()` now reuse a single in-flight initialization promise instead of queuing behind a semaphore. On initialization failure, the promise is reset to allow retry.
173
+
174
+ ### ⬆️ Dependencies
175
+
176
+ - Bump `mongodb` from `7.0.0` to `7.1.0`
177
+ - Bump `vitest` from `^4.0.17` to `^4.0.18`
178
+ - Bump `@types/node` from `^25.0.10` to `^25.2.3`
179
+ - Removed `semaphore-async-await` dependency
180
+ - Updated internal dependencies
181
+
182
+ ## [10.0.36] - 2026-02-09
183
+
184
+ ### ⬆️ Dependencies
185
+
186
+ - Updated `@furystack/core` dependency
187
+ - Updated `@furystack/*` dependencies
188
+
189
+ ## [10.0.35] - 2026-01-26
190
+
191
+ ### 🔧 Chores
192
+
193
+ - Standardized author format, improved keywords, removed obsolete `gitHead`, added `engines` (Node 22+) and `sideEffects: false`
194
+
195
+ ## [10.0.34] - 2026-01-26
196
+
197
+ ### 🔧 Chores
198
+
199
+ - Fixed repository URL in package.json from `furystack/core` to `furystack/furystack`
200
+
201
+ ## [10.0.33] - 2026-01-26
202
+
203
+ ### ⬆️ Dependencies
204
+
205
+ - Updated `@furystack/inject` with fix for singleton injector reference being overwritten by child injectors
206
+
207
+ ## [10.0.32] - 2026-01-22
208
+
209
+ ### ⬆️ Dependencies
210
+
211
+ - Dependency updates
212
+
213
+ ### 🔧 Chores
214
+
215
+ - Migrated to centralized changelog management system