mongolite-ts 0.1.9 → 0.1.10

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/README.md CHANGED
@@ -15,6 +15,31 @@ A MongoDB-like client that uses SQLite as its underlying persistent store. Writt
15
15
  * Written in TypeScript with strong typing.
16
16
  * 100% test coverage (aiming for).
17
17
 
18
+ ## Development
19
+
20
+ ### Build Verification
21
+
22
+ The package includes a comprehensive build verification system that ensures the compiled output works correctly in various contexts:
23
+
24
+ 1. **Module Export Test**: Verifies that all classes and interfaces are correctly exported from the compiled module.
25
+
26
+ 2. **Internal Module Resolution Test**: Ensures that all internal module imports work correctly in the compiled output.
27
+
28
+ 3. **Third-Party Usage Test**: Simulates installing the package in a separate project to verify it works correctly when used as a dependency.
29
+
30
+ ```bash
31
+ # Build and verify exports
32
+ npm run verify-build
33
+
34
+ # Test the package as a third-party dependency
35
+ npm run test-third-party
36
+
37
+ # Run all tests including linting, unit tests, and build verification
38
+ npm run test:all
39
+ ```
40
+
41
+ These tests help prevent common module resolution issues that can occur in ESM packages.
42
+
18
43
  ## Installation
19
44
 
20
45
  ```bash
@@ -1,5 +1,5 @@
1
- import { SQLiteDB } from './db';
2
- import { DocumentWithId, Filter, UpdateFilter, InsertOneResult, UpdateResult, DeleteResult, SortCriteria, Projection } from './types';
1
+ import { SQLiteDB } from './db.js';
2
+ import { DocumentWithId, Filter, UpdateFilter, InsertOneResult, UpdateResult, DeleteResult, SortCriteria, Projection } from './types.js';
3
3
  /**
4
4
  * Represents a cursor for find operations, allowing chaining of limit, skip, and sort.
5
5
  */
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { MongoLiteOptions as DBMongoLiteOptions } from './db';
2
- import { MongoLiteCollection } from './collection';
3
- import { DocumentWithId } from './types';
4
- export { MongoLiteCollection } from './collection';
5
- export * from './types';
1
+ import { MongoLiteOptions as DBMongoLiteOptions } from './db.js';
2
+ import { MongoLiteCollection } from './collection.js';
3
+ import { DocumentWithId } from './types.js';
4
+ export { MongoLiteCollection } from './collection.js';
5
+ export * from './types.js';
6
6
  export interface MongoLiteClientOptions extends DBMongoLiteOptions {
7
7
  }
8
8
  type MongoLiteOptions = {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { SQLiteDB } from './db';
2
- import { MongoLiteCollection } from './collection';
3
- export { MongoLiteCollection } from './collection';
4
- export * from './types';
1
+ import { SQLiteDB } from './db.js';
2
+ import { MongoLiteCollection } from './collection.js';
3
+ export { MongoLiteCollection } from './collection.js';
4
+ export * from './types.js';
5
5
  /**
6
6
  * MongoLite class is the main entry point for interacting with the SQLite-backed database.
7
7
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA0C,MAAM,MAAM,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,cAAc,SAAS,CAAC;AAOxB;;GAEG;AACH,MAAM,OAAO,SAAS;IAIpB;;;OAGG;IACH,YAAY,eAAgD,EAAE,UAA4B,EAAE;QAC1F,IAAI,CAAC,EAAE,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,UAAU,CAA4C,IAAY;QAChE,OAAO,IAAI,mBAAmB,CAAI,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA0C,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,cAAc,YAAY,CAAC;AAO3B;;GAEG;AACH,MAAM,OAAO,SAAS;IAIpB;;;OAGG;IACH,YAAY,eAAgD,EAAE,UAA4B,EAAE;QAC1F,IAAI,CAAC,EAAE,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,UAAU,CAA4C,IAAY;QAChE,OAAO,IAAI,mBAAmB,CAAI,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongolite-ts",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "A MongoDB-like client using SQLite as a persistent store, written in TypeScript.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -10,7 +10,10 @@
10
10
  "test": "node --import tsx tests/*.test.ts",
11
11
  "prepare": "npm run build",
12
12
  "lint": "eslint src/**/*.ts tests/**/*.ts",
13
- "lint:fix": "eslint src/**/*.ts tests/**/*.ts --fix"
13
+ "lint:fix": "eslint src/**/*.ts tests/**/*.ts --fix",
14
+ "verify-build": "node --import tsx scripts/verify-build.js",
15
+ "test-third-party": "node scripts/test-third-party-usage.js",
16
+ "test:all": "npm run lint && npm run test && npm run verify-build && npm run test-third-party"
14
17
  },
15
18
  "repository": {
16
19
  "type": "git",