mongolite-ts 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/README.md +27 -28
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # MongoLite-TS
1
+ # MongoLite
2
2
 
3
- [![CI](https://github.com/YOUR_USERNAME/mongolite-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/YOUR_USERNAME/mongolite-ts/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/semics-tech/mongolite/actions/workflows/ci.yml/badge.svg)](https://github.com/semics-tech/mongolite/actions/workflows/ci.yml)
4
4
  [![NPM version](https://img.shields.io/npm/v/mongolite-ts.svg)](https://www.npmjs.com/package/mongolite-ts)
5
- [![Coverage Status](https://coveralls.io/repos/github/YOUR_USERNAME/mongolite-ts/badge.svg?branch=main)](https://coveralls.io/github/YOUR_USERNAME/mongolite-ts?branch=main)
5
+ [![Codecov](https://codecov.io/gh/semics-tech/mongolite/branch/master/graph/badge.svg)](https://codecov.io/gh/semics-tech/mongolite)
6
6
 
7
7
  A MongoDB-like client that uses SQLite as its underlying persistent store. Written in TypeScript, this package provides a familiar API for developers accustomed to MongoDB, while leveraging the simplicity and file-based nature of SQLite. It supports basic CRUD operations and JSON querying capabilities.
8
8
 
@@ -15,31 +15,6 @@ 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
-
43
18
  ## Installation
44
19
 
45
20
  ```bash
@@ -272,6 +247,30 @@ The `update` parameter in `updateOne` supports the following:
272
247
  3. Build the project: `npm run build`
273
248
  4. Run tests: `npm test`
274
249
 
250
+
251
+ ### Build Verification
252
+
253
+ The package includes a comprehensive build verification system that ensures the compiled output works correctly in various contexts:
254
+
255
+ 1. **Module Export Test**: Verifies that all classes and interfaces are correctly exported from the compiled module.
256
+
257
+ 2. **Internal Module Resolution Test**: Ensures that all internal module imports work correctly in the compiled output.
258
+
259
+ 3. **Third-Party Usage Test**: Simulates installing the package in a separate project to verify it works correctly when used as a dependency.
260
+
261
+ ```bash
262
+ # Build and verify exports
263
+ npm run verify-build
264
+
265
+ # Test the package as a third-party dependency
266
+ npm run test-third-party
267
+
268
+ # Run all tests including linting, unit tests, and build verification
269
+ npm run test:all
270
+ ```
271
+
272
+ These tests help prevent common module resolution issues that can occur in ESM packages.
273
+
275
274
  ## Contributing
276
275
 
277
276
  Contributions are welcome! Please open an issue or submit a pull request.
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "mongolite-ts",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "build": "tsc",
10
- "test": "node --import tsx tests/*.test.ts",
10
+ "test": "node --import tsx --test tests/*.test.ts",
11
+ "test:coverage": "c8 --reporter=lcov --reporter=text node --import tsx --test tests/*.test.ts",
11
12
  "prepare": "npm run build",
12
13
  "lint": "eslint src/**/*.ts tests/**/*.ts",
13
14
  "lint:fix": "eslint src/**/*.ts tests/**/*.ts --fix",
@@ -39,6 +40,7 @@
39
40
  "@types/sqlite3": "^3.1.11",
40
41
  "@typescript-eslint/eslint-plugin": "^7.9.0",
41
42
  "@typescript-eslint/parser": "^7.9.0",
43
+ "c8": "^9.1.0",
42
44
  "eslint": "^8.57.0",
43
45
  "eslint-config-prettier": "^9.1.0",
44
46
  "eslint-plugin-prettier": "^5.1.3",