@blumintinc/eslint-plugin-blumint 1.20.178 → 1.20.179

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/lib/index.js CHANGED
@@ -223,7 +223,7 @@ function noFrontendImportsFromFunctionsPatterns(pattern) {
223
223
  module.exports = {
224
224
  meta: {
225
225
  name: '@blumintinc/eslint-plugin-blumint',
226
- version: '1.20.178',
226
+ version: '1.20.179',
227
227
  },
228
228
  parseOptions: {
229
229
  ecmaVersion: 2020,
@@ -156,12 +156,25 @@ function isRealtimeType(node) {
156
156
  function isRealtimeAnnotation(annotation) {
157
157
  return isRealtimeType(annotation?.typeAnnotation);
158
158
  }
159
- /** Whether an initializer constructs the Realtime Database batch manager. */
159
+ /**
160
+ * Whether an initializer constructs the Realtime Database batch manager.
161
+ *
162
+ * The wrappers TypeScript writes around a value — `as T`, `satisfies T`, `!`,
163
+ * `<T>` — restate the expression's TYPE; none of them changes which class is
164
+ * constructed, so the construction underneath one is what the carve-out reads.
165
+ * {@link isRealtimeType} already looks through the type-level wrappers, and
166
+ * keying this arm on a bare `NewExpression` drifted the two apart: a field
167
+ * initialized `new RealtimeBatchManager() as RealtimeBatchManager` fell through
168
+ * to the Firestore arm and was told to call `set(…, { merge: true })` on a
169
+ * manager that has no `set` method at all, which no spelling of the code
170
+ * satisfies (#2150).
171
+ */
160
172
  function isRealtimeInstance(node) {
161
- if (node?.type !== utils_1.AST_NODE_TYPES.NewExpression) {
173
+ const constructed = node ? unwrapAssertions(node) : null;
174
+ if (constructed?.type !== utils_1.AST_NODE_TYPES.NewExpression) {
162
175
  return false;
163
176
  }
164
- const { callee } = node;
177
+ const { callee } = constructed;
165
178
  if (callee.type === utils_1.AST_NODE_TYPES.Identifier) {
166
179
  return callee.name === REALTIME_BATCH_MANAGER;
167
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.20.178",
3
+ "version": "1.20.179",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "version": "1.20.179",
4
+ "date": "2026-08-26T23:40:36.587Z",
5
+ "rules": [
6
+ {
7
+ "name": "enforce-firestore-set-merge",
8
+ "changeType": "fix",
9
+ "issues": [
10
+ 2150
11
+ ],
12
+ "summary": "unwrap assertions in the RealtimeDB carve-out (closes #2150)"
13
+ }
14
+ ]
15
+ },
2
16
  {
3
17
  "version": "1.20.178",
4
18
  "date": "2026-08-26T22:11:53.342Z",