@web-ts-toolkit/moo 0.4.0 → 0.5.0

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 +25 -13
  2. package/package.json +9 -6
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
- # moo
1
+ # `@web-ts-toolkit/moo`
2
2
 
3
- Helpers for common Mongoose patterns.
4
-
5
- This package includes:
6
-
7
- - partial-index helpers for nullable or empty string fields
8
- - an `isObjectId(...)` guard for strict ObjectId checks
9
- - document plugins for model-bound helper functions and cascade deletes
3
+ Mongoose helpers for schema fields, ObjectId checks, and document plugins.
10
4
 
11
5
  ## Installation
12
6
 
13
7
  ```sh
14
- npm install mongoose @web-ts-toolkit/moo
8
+ pnpm add mongoose @web-ts-toolkit/moo
15
9
  ```
16
10
 
17
- ## Documentation
11
+ Peer dependencies:
18
12
 
19
- - Full package documentation lives in `website/docs/packages/moo.md`.
20
- - Use the Docusaurus site in `website` for the full examples.
13
+ - `mongoose >= 8`
21
14
 
22
- ## Minimal Example
15
+ ## Highlights
16
+
17
+ - partial-index helpers for nullable or empty-string fields
18
+ - strict `isObjectId(...)` guard
19
+ - model-function plugin
20
+ - cascade-delete plugin
21
+
22
+ ## Quick Start
23
23
 
24
24
  ```ts
25
25
  import { Schema } from 'mongoose';
@@ -30,3 +30,15 @@ const userSchema = new Schema({
30
30
  username: uniqueEmptiableString('username'),
31
31
  });
32
32
  ```
33
+
34
+ ## Main Exports
35
+
36
+ - schema helpers such as `uniqueNullableString(...)`
37
+ - `isObjectId(...)`
38
+ - plugins from `@web-ts-toolkit/moo/plugins`
39
+
40
+ ## Documentation
41
+
42
+ Full package documentation lives in `website/docs/packages/moo.md`.
43
+
44
+ - live docs: https://web-ts-toolkit.pages.dev/docs/packages/moo
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@web-ts-toolkit/moo",
3
3
  "description": "Mongoose helpers for schema fields, ObjectId checks, and document plugins",
4
- "version": "0.4.0",
4
+ "homepage": "https://web-ts-toolkit.pages.dev/docs/packages/moo",
5
+ "version": "0.5.0",
6
+ "sideEffects": false,
5
7
  "keywords": [
6
8
  "mongoose",
7
9
  "mongodb",
8
10
  "schema",
9
- "plugin"
11
+ "plugins",
12
+ "objectid"
10
13
  ],
11
14
  "main": "./index.js",
12
15
  "module": "./index.mjs",
@@ -55,19 +58,19 @@
55
58
  "default": "./plugins/model-function.js"
56
59
  }
57
60
  },
61
+ "engines": {
62
+ "node": ">=20"
63
+ },
58
64
  "peerDependencies": {
59
65
  "mongoose": ">=8.0.0"
60
66
  },
61
67
  "dependencies": {
62
- "@web-ts-toolkit/utils": "0.4.0"
68
+ "@web-ts-toolkit/utils": "0.5.0"
63
69
  },
64
70
  "author": "Junmin Ahn",
65
71
  "bugs": {
66
72
  "url": "https://github.com/egose/web-ts-toolkit/issues"
67
73
  },
68
- "engines": {
69
- "node": ">=20"
70
- },
71
74
  "license": "Apache-2.0",
72
75
  "repository": {
73
76
  "type": "git",