@opra/mongodb 0.17.3 → 0.18.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.
@@ -4,15 +4,14 @@ function transformSort(sort) {
4
4
  if (!(sort && sort.length))
5
5
  return;
6
6
  const out = {};
7
- if (sort)
8
- sort.forEach(k => {
9
- if (k.startsWith('-'))
10
- out[k.substring(1)] = -1;
11
- else if (k.startsWith('+'))
12
- out[k.substring(1)] = 1;
13
- else
14
- out[k] = 1;
15
- });
7
+ sort.forEach(k => {
8
+ if (k.startsWith('-'))
9
+ out[k.substring(1)] = -1;
10
+ else if (k.startsWith('+'))
11
+ out[k.substring(1)] = 1;
12
+ else
13
+ out[k] = 1;
14
+ });
16
15
  return out;
17
16
  }
18
17
  exports.default = transformSort;
@@ -2,14 +2,13 @@ export default function transformSort(sort) {
2
2
  if (!(sort && sort.length))
3
3
  return;
4
4
  const out = {};
5
- if (sort)
6
- sort.forEach(k => {
7
- if (k.startsWith('-'))
8
- out[k.substring(1)] = -1;
9
- else if (k.startsWith('+'))
10
- out[k.substring(1)] = 1;
11
- else
12
- out[k] = 1;
13
- });
5
+ sort.forEach(k => {
6
+ if (k.startsWith('-'))
7
+ out[k.substring(1)] = -1;
8
+ else if (k.startsWith('+'))
9
+ out[k.substring(1)] = 1;
10
+ else
11
+ out[k] = 1;
12
+ });
14
13
  return out;
15
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/mongodb",
3
- "version": "0.17.3",
3
+ "version": "0.18.0",
4
4
  "description": "Opra MongoDB adapter package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "build:cjs": "tsc -b tsconfig-build-cjs.json",
17
17
  "build:esm": "tsc -b tsconfig-build-esm.json",
18
18
  "postbuild": "cp README.md package.json ../../LICENSE ../../build/mongodb && cp ../../package.cjs.json ../../build/mongodb/cjs/package.json",
19
- "lint": "eslint .",
19
+ "lint": "eslint . --max-warnings=0",
20
20
  "test": "jest",
21
21
  "cover": "jest --collect-coverage",
22
22
  "clean": "npm run clean:src && npm run clean:dist && npm run clean:cover",
@@ -33,8 +33,8 @@
33
33
  "ts-gems": "^2.4.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@opra/common": "^0.17.3",
37
- "@opra/core": "^0.17.3",
36
+ "@opra/common": "^0.18.0",
37
+ "@opra/core": "^0.18.0",
38
38
  "mongodb": ">=4.x.x"
39
39
  },
40
40
  "type": "module",
@@ -64,4 +64,4 @@
64
64
  "mongodb",
65
65
  "adapter"
66
66
  ]
67
- }
67
+ }