@lowdefy/operators-mql 4.0.0-rc.0 → 4.0.0-rc.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ function aggregate(data, pipeline) {
45
45
  const agg = new mingo.Aggregator(pipeline);
46
46
  return agg.run(data);
47
47
  }
48
- function expr(data, expr1) {
48
+ function expr(data, expr) {
49
49
  if (data === null) {
50
50
  data = {};
51
51
  }
@@ -55,9 +55,9 @@ function expr(data, expr1) {
55
55
  const agg = new mingo.Aggregator([
56
56
  {
57
57
  $project: {
58
- value: expr1
58
+ value: expr
59
59
  }
60
- },
60
+ }
61
61
  ]);
62
62
  const res = agg.run([
63
63
  data
@@ -66,17 +66,17 @@ function expr(data, expr1) {
66
66
  default: null
67
67
  });
68
68
  }
69
- function test(data, test1) {
69
+ function test(data, test) {
70
70
  if (data === null) {
71
71
  data = {};
72
72
  }
73
73
  if (!type.isObject(data)) {
74
74
  throw new Error('Data must be of type object.');
75
75
  }
76
- if (!type.isObject(test1)) {
76
+ if (!type.isObject(test)) {
77
77
  throw new Error('Query test must be of type object.');
78
78
  }
79
- const query = new mingo.Query(test1);
79
+ const query = new mingo.Query(test);
80
80
  return query.test(data);
81
81
  }
82
82
  const meta = {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/operators-mql",
3
- "version": "4.0.0-rc.0",
3
+ "version": "4.0.0-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -39,22 +39,22 @@
39
39
  "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
40
40
  "clean": "rm -rf dist",
41
41
  "prepublishOnly": "pnpm build",
42
- "test": "jest --coverage"
42
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/helpers": "4.0.0-rc.0",
46
- "@lowdefy/operators": "4.0.0-rc.0",
47
- "mingo": "6.0.6"
45
+ "@lowdefy/helpers": "4.0.0-rc.2",
46
+ "@lowdefy/operators": "4.0.0-rc.2",
47
+ "mingo": "6.2.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@swc/cli": "0.1.57",
51
- "@swc/core": "1.2.194",
52
- "@swc/jest": "0.2.21",
50
+ "@swc/cli": "0.1.59",
51
+ "@swc/core": "1.3.24",
52
+ "@swc/jest": "0.2.24",
53
53
  "jest": "28.1.0",
54
54
  "jest-environment-jsdom": "28.1.0"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "f6872d7ff6da421710096536fce7b2016ef8f35c"
59
+ "gitHead": "ac0dec732efb3b3cb06c82941d8f829c9fa65dff"
60
60
  }