ts-patch-mongoose 3.1.0 → 3.1.2
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 +31 -25
- package/dist/index.cjs +12 -9
- package/dist/index.d.cts +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +12 -9
- package/package.json +13 -14
- package/src/hooks/update-hooks.ts +8 -3
- package/src/index.ts +8 -5
- package/src/ms.ts +4 -3
- package/src/patch.ts +3 -3
- package/src/types.ts +2 -0
- package/biome.json +0 -47
- package/tests/constants/events.ts +0 -7
- package/tests/em.test.ts +0 -70
- package/tests/helpers.test.ts +0 -373
- package/tests/mongo/.gitignore +0 -3
- package/tests/mongo/server.ts +0 -31
- package/tests/ms.test.ts +0 -113
- package/tests/omit-deep.test.ts +0 -235
- package/tests/patch.test.ts +0 -200
- package/tests/plugin-all-features.test.ts +0 -844
- package/tests/plugin-complex-data.test.ts +0 -2647
- package/tests/plugin-event-created.test.ts +0 -371
- package/tests/plugin-event-deleted.test.ts +0 -400
- package/tests/plugin-event-updated.test.ts +0 -503
- package/tests/plugin-global.test.ts +0 -545
- package/tests/plugin-omit-all.test.ts +0 -349
- package/tests/plugin-patch-history-disabled.test.ts +0 -162
- package/tests/plugin-pre-delete.test.ts +0 -160
- package/tests/plugin-pre-save.test.ts +0 -54
- package/tests/plugin.test.ts +0 -576
- package/tests/schemas/Description.ts +0 -15
- package/tests/schemas/Product.ts +0 -38
- package/tests/schemas/User.ts +0 -22
- package/tsconfig.json +0 -32
- package/vite.config.mts +0 -24
package/tests/schemas/User.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'mongoose'
|
|
2
|
-
|
|
3
|
-
export interface User {
|
|
4
|
-
name: string
|
|
5
|
-
role: string
|
|
6
|
-
createdAt?: Date
|
|
7
|
-
updatedAt?: Date
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const UserSchema = new Schema<User>(
|
|
11
|
-
{
|
|
12
|
-
name: {
|
|
13
|
-
type: String,
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
role: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: true,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
{ timestamps: true },
|
|
22
|
-
)
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["src"],
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"lib": ["ES2022"],
|
|
6
|
-
"types": ["node"],
|
|
7
|
-
"module": "Preserve",
|
|
8
|
-
"moduleResolution": "bundler",
|
|
9
|
-
"outDir": "dist",
|
|
10
|
-
"strict": true,
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"allowUnreachableCode": false,
|
|
13
|
-
"allowUnusedLabels": false,
|
|
14
|
-
"checkJs": true,
|
|
15
|
-
"declaration": true,
|
|
16
|
-
"declarationMap": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"exactOptionalPropertyTypes": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"isolatedModules": true,
|
|
21
|
-
"noEmitOnError": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true,
|
|
23
|
-
"noImplicitOverride": true,
|
|
24
|
-
"noImplicitReturns": true,
|
|
25
|
-
"noUncheckedIndexedAccess": true,
|
|
26
|
-
"noUnusedLocals": true,
|
|
27
|
-
"noUnusedParameters": true,
|
|
28
|
-
"removeComments": true,
|
|
29
|
-
"skipLibCheck": true,
|
|
30
|
-
"sourceMap": true
|
|
31
|
-
}
|
|
32
|
-
}
|
package/vite.config.mts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config'
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
dir: 'tests',
|
|
6
|
-
include: ['**/*.test.ts'],
|
|
7
|
-
name: 'node',
|
|
8
|
-
environment: 'node',
|
|
9
|
-
coverage: {
|
|
10
|
-
provider: 'v8',
|
|
11
|
-
reporter: ['text', 'json', 'html', 'lcov'],
|
|
12
|
-
include: ['src/**/*.ts'],
|
|
13
|
-
exclude: [
|
|
14
|
-
'node_modules/**',
|
|
15
|
-
'dist/**',
|
|
16
|
-
'coverage/**',
|
|
17
|
-
'**/*.d.ts',
|
|
18
|
-
'**/*.config.*',
|
|
19
|
-
'**/tests/**',
|
|
20
|
-
'examples/**',
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
})
|