@orkestrel/scaffold 0.0.123 → 0.0.124

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.
@@ -73,13 +73,13 @@ produces the JSON Schema, and seeds fixtures.
73
73
 
74
74
  ### Factories
75
75
 
76
- | Name | Kind | Signature | Summary |
77
- | ----------------------- | -------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
78
- | `createDatabase` | function | `<const T extends TableMap>(options: DatabaseOptions<T>) => DatabaseInterface<T>` | Creates a database over a driver and a declared `tables` schema. |
79
- | `createMemoryDriver` | function | `() => DriverInterface` | Creates the in-memory reference `DriverInterface`. |
80
- | `createJSONDriver` | function | `(path: string) => DriverInterface` | Creates a persistent JSON-file `DriverInterface` for a given path. |
81
- | `createSQLiteDriver` | function | `(options?: SQLiteDriverOptions) => DriverInterface` | Creates a trusted-mode, server-native SQLite `DriverInterface` for a database path, or for `:memory:` when the options bag omits one. |
82
- | `createIndexedDBDriver` | function | `(name: string) => DriverInterface` | Creates a persistent IndexedDB `DriverInterface` for a browser database name. |
76
+ | Name | Kind | Signature | Summary |
77
+ | ----------------------- | -------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
78
+ | `createDatabase` | function | `<const T extends TableMap>(options: DatabaseOptions<T>) => DatabaseInterface<T>` | Creates a database over a driver and a declared `tables` schema. |
79
+ | `createMemoryDriver` | function | `() => DriverInterface` | Creates the in-memory reference `DriverInterface`. |
80
+ | `createJSONDriver` | function | `(path: string) => DriverInterface` | Creates a persistent JSON-file `DriverInterface` for a given path. |
81
+ | `createSQLiteDriver` | function | `(options: SQLiteDriverOptions) => DriverInterface` | Creates a trusted-mode, server-native SQLite `DriverInterface` for a database path, or for `:memory:` when explicitly requested. |
82
+ | `createIndexedDBDriver` | function | `(name: string) => DriverInterface` | Creates a persistent IndexedDB `DriverInterface` for a browser database name. |
83
83
 
84
84
  ### Classes
85
85
 
@@ -89,7 +89,7 @@ produces the JSON Schema, and seeds fixtures.
89
89
  | `DriverIterator` | class | `new <T>(source: AsyncIterator<T>, guard: () => void) => AsyncIterableIterator<T>` | Forms the internal continuation boundary for a root driver async iterator. |
90
90
  | `MemoryDriver` | class | `new () => DriverInterface` | Implements the reference `DriverInterface` — nested maps, no I/O. |
91
91
  | `JSONDriver` | class | `new (path: string) => DriverInterface` | Implements a persistent `DriverInterface` backed by a single JSON file — the reference `MemoryDriver` plus file load / flush. |
92
- | `SQLiteDriver` | class | `new (options?: SQLiteDriverOptions) => DriverInterface` | Implements the `DriverInterface` over SQLite — the server-native, trusted-mode backend built on the published `@orkestrel/sqlite` synchronous wrapper. |
92
+ | `SQLiteDriver` | class | `new (options: SQLiteDriverOptions) => DriverInterface` | Implements the `DriverInterface` over SQLite — the server-native, trusted-mode backend built on the published `@orkestrel/sqlite` synchronous wrapper. |
93
93
  | `IndexedDBDriver` | class | `new (name: string) => DriverInterface` | Implements the `DriverInterface` over IndexedDB — the persistent browser backend, built on the published `@orkestrel/indexeddb` wrapper. |
94
94
  | `StreamPage` | class | `new (offset: number) => StreamPage` | Tracks the matching-row position of one streaming page. |
95
95
  | `JSONTransaction` | class | `new (memory: MemoryDriver, schema: readonly TableSchema[], identities: ReadonlyMap<string, object>) => JSONTransaction` | Owns the isolated memory store and schema of one JSON transaction. |
@@ -296,7 +296,7 @@ Pure helpers behind the query engine's pattern matching.
296
296
  | `DriverInterface` | interface | `{ open(), close(), snapshot(), transaction?() }` | Declares the storage primitive every backend implements — the whole of the bridge. |
297
297
  | `DatabaseOptions` | interface | `{ on?, error?, driver, tables, primary?, indexes?, name?, generator?, version? }` | Options for `createDatabase`. |
298
298
  | `CompiledSQL` | interface | `{ sql, parameters }` | Represents a parameterized SQL fragment or statement plus its bind values. The `@orkestrel/database/server` entry point exports this type. |
299
- | `SQLiteDriverOptions` | interface | `{ path?, readonly?, timeout?, references?, pragmas? }` | Configures `createSQLiteDriver`. The `@orkestrel/database/server` entry point exports this type. |
299
+ | `SQLiteDriverOptions` | interface | `{ path, readonly?, timeout?, references?, pragmas? }` | Configures `createSQLiteDriver`. The `@orkestrel/database/server` entry point exports this type. |
300
300
  | `QueryPlan` | interface | `{ index?, range? }` | Represents a pushdown plan — an optional index and optional `IDBKeyRange` used to narrow a read. An omitted `index` selects the primary store; an omitted `range` performs a full scan. The plan is always a superset of the matching rows; the core engine refines it to the exact result. An empty plan (`{}`) is a primary-store full scan. The `@orkestrel/database/browser` entry point exports this type. |
301
301
  | `TableDefinition` | interface | `{ primary, columns, schema }` | Represents one table's portable definition, produced by `export` — the unit of schema / migration exchange across environments. |
302
302
  | `DatabaseStorageInterface` | interface | `{ table() }` | Represents a database view valid only inside one `DatabaseInterface.transaction` scope. |
@@ -1579,7 +1579,7 @@ rejects, and invalidates the capability after settlement. The database-level
1579
1579
  import type { TableSchema } from '@orkestrel/database'
1580
1580
  import { createSQLiteDriver } from '@orkestrel/database/server'
1581
1581
 
1582
- const driver = createSQLiteDriver()
1582
+ const driver = createSQLiteDriver({ path: ':memory:' })
1583
1583
  const schema: readonly TableSchema[] = [
1584
1584
  {
1585
1585
  name: 'users',
@@ -2321,7 +2321,7 @@ import { createSQLiteDriver } from '@orkestrel/database/server'
2321
2321
  import { integerShape, stringShape } from '@orkestrel/contract'
2322
2322
 
2323
2323
  const db = createDatabase({
2324
- driver: createSQLiteDriver({ path: 'data/app.sqlite' }), // or createSQLiteDriver() for ':memory:'
2324
+ driver: createSQLiteDriver({ path: 'data/app.sqlite' }), // or createSQLiteDriver({ path: ':memory:' }) for memory
2325
2325
  tables: { users: { id: stringShape(), name: stringShape(), age: integerShape() } },
2326
2326
  })
2327
2327
  await db.table('users').set({ id: 'u1', name: 'Ada', age: 36 }) // persisted to app.sqlite
@@ -2545,7 +2545,7 @@ mapMigrationError(fault) // → the same, but an UPGRADE fault becomes 'MIGRATIO
2545
2545
  - [`tests/src/core/TransactionScope.test.ts`](../tests/src/core/TransactionScope.test.ts) — direct transaction-lifetime coverage: `accepting` and the `check` refusal, synchronous admission through `track`, a synchronous operation throw captured as a rejection, unawaited work contained by `drain`, the drain loop re-reading work another tracked operation admitted, first-failure identity preserved across repeated drains, and `stream`'s per-continuation boundary leaving an idle iterator unpinned.
2546
2546
  - [`tests/src/core/DatabaseContext.test.ts`](../tests/src/core/DatabaseContext.test.ts) — direct shared-context coverage: `register`'s identical-schema merge, its `VALIDATION` conflict, and its `CONFLICT` / `CLOSED` refusals; idle → open → closed transitions emitted once with one shared readiness promise; root admission, its transaction-time `CONFLICT`, and close-time drain; transaction commit / rollback events and value or error propagation, nested-transaction refusal, entry-only signal checking, and a fresh `TransactionScope` per attempt; explicit migration's missing-hook and post-open refusals; and versioned reconciliation's fresh stamp, newer-store rejection, differing-schema rejection, and same-version no-op.
2547
2547
  - [`tests/src/core/DatabaseTransaction.test.ts`](../tests/src/core/DatabaseTransaction.test.ts) — direct transaction-view coverage: the typed table `table()` builds over the scoped driver, its writes landing straight on that driver, the scope `CONFLICT` after settlement, the `NOT_FOUND` refusal for an undeclared table, a per-table primary override, a scoped table refusing work started after settlement, and the configured generator minting a key for a keyless write.
2548
- - [`tests/src/server/factories.test.ts`](../tests/src/server/factories.test.ts) — `createJSONDriver` / `createSQLiteDriver` each return a working `DriverInterface` instance (a round-trip end to end), drive the core `createDatabase` stack, and persist across a reopen; `createSQLiteDriver` defaults to an in-memory database when its options bag is omitted.
2548
+ - [`tests/src/server/factories.test.ts`](../tests/src/server/factories.test.ts) — `createJSONDriver` / `createSQLiteDriver` each return a working `DriverInterface` instance (a round-trip end to end), drive the core `createDatabase` stack, and persist across a reopen; `createSQLiteDriver` requires a path and opens an in-memory database only with `path: ':memory:'`.
2549
2549
  - [`tests/src/server/drivers/JSONDriver.test.ts`](../tests/src/server/drivers/JSONDriver.test.ts) — `JSONDriver` persistence plus atomic insert and the exclusive point-mutation queue: queued abort/no late start, active staging restoration, cleanup-success error precedence, deterministic real-filesystem persistence-plus-cleanup dual failure with exact evidence and queue recovery, read isolation, concurrent-writer ordering, fail-closed real-filesystem coverage for non-absence reads, invalid syntax/documents/table sets/containers/rows/metadata, byte preservation, no partial publication, application-invalid row retention, payload-safe rejection, strict stream paging, and same-instance external-repair retry; synchronous root/scoped stamp and migration ownership, deeply frozen distinct copy-out, deployed-schema-first open, isolated callback/root-migration candidates whose rows/schema/metadata publish only after file replacement succeeds, transaction-time root scan/stream continuation conflicts with terminal cleanup, and post-native-rollback rejection replacement.
2550
2550
  - [`tests/src/server/drivers/SQLiteDriver.test.ts`](../tests/src/server/drivers/SQLiteDriver.test.ts) — `SQLiteDriver`'s native surface: deployed-metadata-first open and reconciliation; fail-closed malformed metadata, physical schema disagreement, and persisted-table loss before DDL, including deterministic first-loss evidence, physical non-recreation, external repair, and same-driver retry; root/scoped stamp/migration ownership and distinct deeply frozen copy-out; atomic insert/duplicate `CONFLICT`; point-mutation abort boundaries; strict direct records/aggregate/stream paging; native exact-or-refine query and aggregate paths; repeatable schema-aware snapshot capture/replay plus real dropped-table and exclusive-lock failure containment/recovery; atomic `MigrationInput` schema/rows/metadata at the root; fixed-literal savepoint containment for a caught migration failure while its callback transaction remains active; candidate-schema publication only after commit; callback transaction barriers/invalidation including root continuation cleanup; payload-safe rejection; post-native-rollback rejection replacement; backend-fault mapping; and engine parity.
2551
2551
  - [`tests/src/server/helpers.test.ts`](../tests/src/server/helpers.test.ts) — the SQLite bridge: `quoteIdentifier`, codecs, row extraction, `deriveSQLiteIndexName` exact bytes, and the `matchesConditionExactly` / `matchesOrderExactly` / `matchesQueryExactly` / `matchesAggregateExactly` / `matchesSQLiteAffinity` predicates.
@@ -2,24 +2,26 @@
2
2
 
3
3
  > A stateful newline-delimited-JSON (NDJSON) stream parser: a self-contained handle
4
4
  > that turns string chunks into the complete records decoded so far, skips a blank
5
- > line, and skips a malformed or non-record line unless strict mode refuses it.
5
+ > line, and refuses a malformed or non-record line unless `strict: false` skips it.
6
6
 
7
7
  `parse(chunk)` appends `chunk` to an internal buffer and splits it on `\n`: every
8
8
  line before the last is `\n`-terminated, hence complete, and is parsed to a record,
9
9
  while the final segment is held back for the next call, so a line split across chunk
10
10
  boundaries is reassembled the moment its closing `\n` arrives. Each trimmed line is
11
11
  filtered — a blank or whitespace-only line (including one whose only content was a
12
- CRLF's trailing `\r`) is skipped, and by default malformed JSON is skipped silently
13
- and a non-record value (an array, a primitive, `null`) is dropped — so only plain
14
- records come back, and a line the stream never terminates is never emitted even when
15
- the buffered text already happens to be valid JSON. With `strict: true` the parser
16
- refuses such a line instead: `parse` throws an `NDJSONError` with code `'SYNTAX'`
17
- for a complete line that is not valid JSON and `'RECORD'` for a complete line that is
18
- not a plain record. The throwing call returns no record, discards the lines after the
19
- refused line in the same call too, and leaves the parser cleared, as `clear()` leaves
20
- it. Blank lines are skipped, and lines are split and trimmed, the same way in both
21
- modes. An unterminated line throws nothing until a later chunk completes it, so a
22
- caller ends a stream with `parse('\n')`. `clear()` drops the buffered partial
12
+ CRLF's trailing `\r`) is skipped — so only plain records come back, and a line the
13
+ stream never terminates is never emitted even when the buffered text already happens
14
+ to be valid JSON. By default the parser refuses a line it cannot return: `parse`
15
+ throws an `NDJSONError` with code `'SYNTAX'` for a complete line that is not valid
16
+ JSON and `'RECORD'` for a complete line that is not a plain record. The throwing call
17
+ returns no record, discards the lines after the refused line in the same call too, and
18
+ leaves the parser cleared, as `clear()` leaves it. With `strict: false` the parser
19
+ skips such a line instead, for a caller that prefers the records it can read over a
20
+ refusal. Blank lines are skipped, and lines are split and trimmed, the same way in both
21
+ modes. A chunk that is not a string throws `'SYNTAX'` in both modes, because joining it
22
+ to the buffer would corrupt the line it holds. An unterminated line throws nothing until
23
+ a later chunk completes it, so a caller ends a stream with `parse('\n')`, which refuses
24
+ a half record unless the parser is lenient. `clear()` drops the buffered partial
23
25
  line so a handle can be reused for a fresh stream. Nothing else is wired in: no
24
26
  Emitter, no server, HTTP, or agent coupling. Pair it with a streaming `TextDecoder`
25
27
  when reading a byte stream — the decoder handles partial characters, the parser
@@ -47,8 +49,8 @@ parser.clear() // drop any buffered partial - ready for a fresh stream
47
49
  | Name | Kind | Signature | Summary |
48
50
  | ----------------------- | --------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
49
51
  | `NDJSONParserInterface` | interface | `{ parse(), clear() }` | Represents the stateful NDJSON (newline-delimited JSON) stream-parser contract a consumer holds — a `parse` that turns each string chunk into the complete records decoded so far, and a `clear` that drops the buffered partial line. |
50
- | `NDJSONParserOptions` | interface | `{ strict? }` | Configures the parser `createNDJSONParser` builds and the `NDJSONParser` constructor accepts — `strict` decides whether a complete line that is not a JSON object is skipped or refused. |
51
- | `NDJSONErrorCode` | type | `'SYNTAX' \| 'RECORD'` | Names the machine-readable code an `NDJSONError` carries — `'SYNTAX'` for a complete line that is not valid JSON, and `'RECORD'` for a complete line that is valid JSON but not a plain record. |
52
+ | `NDJSONParserOptions` | interface | `{ strict? }` | Configures the parser `createNDJSONParser` builds and the `NDJSONParser` constructor accepts — `strict` decides whether a complete line that is not a JSON object is refused or skipped. |
53
+ | `NDJSONErrorCode` | type | `'SYNTAX' \| 'RECORD'` | Names the machine-readable code an `NDJSONError` carries — `'SYNTAX'` for a chunk that is not a string or a complete line that is not valid JSON, and `'RECORD'` for a complete line that is valid JSON but not a plain record. |
52
54
 
53
55
  Types a helper's parameter as `NDJSONParserInterface` and returns the records
54
56
  its `parse` call completes:
@@ -63,20 +65,20 @@ function feed(parser: NDJSONParserInterface, chunk: string): readonly Record<str
63
65
 
64
66
  ### Errors
65
67
 
66
- A strict parser throws an `NDJSONError`, and `isNDJSONError` narrows a caught value to
67
- one:
68
+ A parser throws an `NDJSONError` unless `strict: false` skips the line, and
69
+ `isNDJSONError` narrows a caught value to one:
68
70
 
69
- | Name | Kind | Signature | Summary |
70
- | --------------- | -------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
71
- | `NDJSONError` | class | `new (code: NDJSONErrorCode, message: string) => NDJSONError` | Represents the refusal of a complete NDJSON line by a strict parser, carrying the machine-readable `NDJSONErrorCode` a `catch` branches on. |
72
- | `isNDJSONError` | function | `(value: unknown) => value is NDJSONError` | Narrows an unknown caught value to an `NDJSONError`. |
71
+ | Name | Kind | Signature | Summary |
72
+ | --------------- | -------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `NDJSONError` | class | `new (code: NDJSONErrorCode, message: string) => NDJSONError` | Represents a parser's refusal of a chunk or of a complete NDJSON line, carrying the machine-readable `NDJSONErrorCode` a `catch` branches on. |
74
+ | `isNDJSONError` | function | `(value: unknown) => value is NDJSONError` | Narrows an unknown caught value to an `NDJSONError`. |
73
75
 
74
76
  Catches the refusal of a truncated line and branches on its code:
75
77
 
76
78
  ```ts
77
79
  import { createNDJSONParser, isNDJSONError } from '@orkestrel/ndjson'
78
80
 
79
- const parser = createNDJSONParser({ strict: true })
81
+ const parser = createNDJSONParser()
80
82
  try {
81
83
  parser.parse('{"a":\n')
82
84
  } catch (error) {
@@ -111,16 +113,16 @@ parser.parse('{"c":3}') // [] — buffered until its trailing newline arrives
111
113
  parser.parse('\n') // [{ c: 3 }]
112
114
  ```
113
115
 
114
- #### Create a strict parser
116
+ #### Refuse a line
115
117
 
116
- Creates a parser that refuses a non-record line, then shows that the refusal dropped the
117
- partial line the same call carried:
118
+ Refuses a non-record line by default, then shows that the refusal dropped the partial
119
+ line the same call carried:
118
120
 
119
121
  ```ts
120
122
  import { createNDJSONParser, isNDJSONError } from '@orkestrel/ndjson'
121
123
 
122
- const parser = createNDJSONParser({ strict: true })
123
- parser.parse('{"a":1}\n\n') // [{ a: 1 }] - a blank line is still skipped
124
+ const parser = createNDJSONParser()
125
+ parser.parse('{"a":1}\n\n') // [{ a: 1 }] - a blank line is skipped
124
126
  try {
125
127
  parser.parse('[1,2]\n{"b"')
126
128
  } catch (error) {
@@ -130,6 +132,17 @@ parser.parse('\n') // [] - the refusal dropped the partial line
130
132
  parser.parse('{"b":2}\n') // [{ b: 2 }]
131
133
  ```
132
134
 
135
+ #### Create a lenient parser
136
+
137
+ Creates a parser that skips what the default refuses:
138
+
139
+ ```ts
140
+ import { createNDJSONParser } from '@orkestrel/ndjson'
141
+
142
+ const parser = createNDJSONParser({ strict: false })
143
+ parser.parse('not json\n\n{"a":1}\n[1,2]\n') // [{ a: 1 }] - malformed, blank, and non-record lines skipped
144
+ ```
145
+
133
146
  ### Classes
134
147
 
135
148
  | Name | Kind | Signature | Summary |
@@ -143,13 +156,13 @@ surface.
143
156
 
144
157
  #### `NDJSONParserInterface`
145
158
 
146
- | Method | Returns | Summary |
147
- | ------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
- | `parse` | `readonly Record<string, unknown>[]` | Appends `chunk` to the buffer and returns every complete `\n`-terminated line parsed to a record, skipping a malformed or non-record line unless the parser is strict; the trailing partial line is retained for the next call unless a strict refusal in the same call clears the buffer, so a line split across a chunk boundary is reassembled when its closing `\n` arrives. |
149
- | `clear` | `void` | Drops any buffered partial line, leaving the handle ready for a fresh stream. |
159
+ | Method | Returns | Summary |
160
+ | ------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
161
+ | `parse` | `readonly Record<string, unknown>[]` | Appends `chunk` to the buffer and returns every complete `\n`-terminated line parsed to a record, refusing a malformed or non-record line unless the parser is lenient; the trailing partial line is retained for the next call unless a refusal in the same call clears the buffer, so a line split across a chunk boundary is reassembled when its closing `\n` arrives. |
162
+ | `clear` | `void` | Drops any buffered partial line, leaving the handle ready for a fresh stream. |
150
163
 
151
- `parse` holds an unterminated line indefinitely, unless a strict refusal in the
152
- same call clears the buffer, and the buffer has no size limit, so a caller fronting an
164
+ `parse` holds an unterminated line indefinitely, unless a refusal in the same call
165
+ clears the buffer, and the buffer has no size limit, so a caller fronting an
153
166
  untrusted upstream enforces its own byte cap.
154
167
 
155
168
  ```ts
@@ -164,8 +177,8 @@ parser.parse('{"c":3}\n') // [{ c: 3 }]
164
177
 
165
178
  ## Tests
166
179
 
167
- - [`tests/guides.test.ts`](../tests/guides.test.ts) — the `## Surface` ↔ `src/core` bijection (value and type exports), the `NDJSONParserInterface` ↔ `NDJSONParser` method bijection, and the equality gate: every `Summary` cell against its declaration's description paragraph, the titled `Create a parser` and `Create a strict parser` fences against the `@example` blocks of those titles (pinned so the titled pairs cannot be retired silently), and the README pitch against this guide's tagline. It also runs the flagship fences, the strict and Errors fences included, and asserts the values their comments claim.
168
- - [`tests/src/core/NDJSONParser.test.ts`](../tests/src/core/NDJSONParser.test.ts) — that `parse` returns the same records however a stream is cut into chunks, skipping malformed, blank, and non-record lines, withholding a line the stream never terminates, and never throwing on any input by default; and that a strict parser refuses each malformed line as `'SYNTAX'` and each non-record line as `'RECORD'` with a fixed message, returns no record from the refusing call and leaves the parser cleared, keeps its records however a clean stream is cut into chunks, trims every Unicode space `String.prototype.trim` strips, and returns what the default returns when `strict` is `false`.
180
+ - [`tests/guides.test.ts`](../tests/guides.test.ts) — the `## Surface` ↔ `src/core` bijection (value and type exports), the `NDJSONParserInterface` ↔ `NDJSONParser` method bijection, and the equality gate: every `Summary` cell against its declaration's description paragraph, the titled `Create a parser`, `Refuse a line`, and `Create a lenient parser` fences against the `@example` blocks of those titles (pinned so the titled pairs cannot be retired silently), and the README pitch against this guide's tagline. It also runs the flagship fences, the refusal, lenient, and Errors fences included, and asserts the values their comments claim.
181
+ - [`tests/src/core/NDJSONParser.test.ts`](../tests/src/core/NDJSONParser.test.ts) — that `parse` returns the same records however a stream is cut into chunks, skipping blank lines and withholding a line the stream never terminates; that the default parser, and one built with any `strict` value but `false`, refuses each malformed line as `'SYNTAX'` and each non-record line as `'RECORD'` with a fixed message, returns no record from the refusing call and leaves the parser cleared, keeps its records however a clean stream is cut into chunks, and trims every Unicode space `String.prototype.trim` strips; that a chunk that is not a string is refused in both modes; and that a `strict: false` parser skips what the default refuses and never throws on a line.
169
182
  - [`tests/src/core/errors.test.ts`](../tests/src/core/errors.test.ts) — that `isNDJSONError` accepts an `NDJSONError` and a subclass, refuses a look-alike, a transparent proxy, a plain object carrying the brand, and an unknown code, and that the constructor stamps a hidden, fixed brand.
170
183
  - [`tests/policy.test.ts`](../tests/policy.test.ts) — repository coding law: source placement, exports, readonly contracts, syntax, and the prose this guide is written in.
171
184
  - [`tests/config.test.ts`](../tests/config.test.ts) — the root configuration's aliases and projects, the policy Oxlint plugin's rules against its rule tester, and the configuration helpers.