@e22m4u/js-repository-mongodb-adapter 0.3.3 → 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.
package/README.md CHANGED
@@ -24,9 +24,9 @@ npm install @e22m4u/js-repository-mongodb-adapter
24
24
  Пример:
25
25
 
26
26
  ```js
27
- import {Schema} from '@e22m4u/js-repository';
27
+ import {DatabaseSchema} from '@e22m4u/js-repository';
28
28
 
29
- const schema = new Schema();
29
+ const schema = new DatabaseSchema();
30
30
 
31
31
  // объявление источника
32
32
  schema.defineDatasource({
package/eslint.config.js CHANGED
@@ -19,7 +19,7 @@ export default [{
19
19
  rules: {
20
20
  ...eslintJs.configs.recommended.rules,
21
21
  ...eslintPrettierConfig.rules,
22
- ...eslintMochaPlugin.configs.flat.recommended.rules,
22
+ ...eslintMochaPlugin.configs.recommended.rules,
23
23
  ...eslintChaiExpectPlugin.configs['recommended-flat'].rules,
24
24
  },
25
25
  files: ['src/**/*.js'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e22m4u/js-repository-mongodb-adapter",
3
- "version": "0.3.3",
3
+ "version": "0.5.0",
4
4
  "description": "MongoDB адаптер для @e22m4u/js-repository",
5
5
  "author": "e22m4u <e22m4u@yandex.ru>",
6
6
  "license": "MIT",
@@ -38,30 +38,30 @@
38
38
  "prepare": "husky"
39
39
  },
40
40
  "dependencies": {
41
- "mongodb": "6.15.0"
41
+ "mongodb": "6.16.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@e22m4u/js-format": "~0.1.0",
45
- "@e22m4u/js-repository": "~0.2.4",
45
+ "@e22m4u/js-repository": "~0.3.0",
46
46
  "@e22m4u/js-service": "~0.2.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@commitlint/cli": "~19.8.0",
50
- "@commitlint/config-conventional": "~19.8.0",
51
- "@eslint/js": "~9.25.1",
49
+ "@commitlint/cli": "~19.8.1",
50
+ "@commitlint/config-conventional": "~19.8.1",
51
+ "@eslint/js": "~9.29.0",
52
52
  "c8": "~10.1.3",
53
53
  "chai": "~5.2.0",
54
54
  "chai-as-promised": "~8.0.1",
55
55
  "dotenv": "~16.5.0",
56
- "esbuild": "~0.25.3",
57
- "eslint": "~9.25.1",
58
- "eslint-config-prettier": "~10.1.2",
56
+ "esbuild": "~0.25.5",
57
+ "eslint": "~9.29.0",
58
+ "eslint-config-prettier": "~10.1.5",
59
59
  "eslint-plugin-chai-expect": "~3.1.0",
60
- "eslint-plugin-mocha": "~10.5.0",
61
- "globals": "~16.0.0",
60
+ "eslint-plugin-mocha": "~11.1.0",
61
+ "globals": "~16.2.0",
62
62
  "husky": "~9.1.7",
63
- "mocha": "~11.1.0",
64
- "prettier": "~3.5.3",
63
+ "mocha": "~11.7.1",
64
+ "prettier": "~3.6.1",
65
65
  "rimraf": "~6.0.1"
66
66
  }
67
67
  }
@@ -2,10 +2,10 @@ import {expect} from 'chai';
2
2
  import {ObjectId} from 'mongodb';
3
3
  import {MongoClient} from 'mongodb';
4
4
  import {format} from '@e22m4u/js-format';
5
- import {Schema} from '@e22m4u/js-repository';
6
5
  import {DataType} from '@e22m4u/js-repository';
7
6
  import {createMongodbUrl} from './utils/index.js';
8
7
  import {MongodbAdapter} from './mongodb-adapter.js';
8
+ import {DatabaseSchema} from '@e22m4u/js-repository';
9
9
  import {AdapterRegistry} from '@e22m4u/js-repository';
10
10
  import {InvalidOperatorValueError} from '@e22m4u/js-repository';
11
11
  import {DEFAULT_PRIMARY_KEY_PROPERTY_NAME as DEF_PK} from '@e22m4u/js-repository';
@@ -20,7 +20,7 @@ const MDB_CLIENT = new MongoClient(createMongodbUrl(CONFIG));
20
20
  const ADAPTERS_STACK = [];
21
21
 
22
22
  function createSchema() {
23
- const schema = new Schema();
23
+ const schema = new DatabaseSchema();
24
24
  const adapter = new MongodbAdapter(schema.container, CONFIG);
25
25
  ADAPTERS_STACK.push(adapter);
26
26
  schema.defineDatasource({name: 'mongodb', adapter: 'mongodb'});