@technicity/data-service-generator 0.14.3 → 0.14.5

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
@@ -49,8 +49,6 @@ async function main() {
49
49
 
50
50
  - `yarn test`
51
51
 
52
- Note: if running on a M1 machine, need to first run: `docker pull --platform linux/amd64 mysql:5.7.41`
53
-
54
52
  #### Unit Tests
55
53
 
56
54
  Comment out `globalSetup` in `jest.config.js`, then:
@@ -118,7 +118,7 @@ function _stringifyWhere(where, table, escapeId, escape, result) {
118
118
  const operator = keys[0];
119
119
  const operand = v[operator];
120
120
  if (operator === "$neq") {
121
- return `${table}.${escapeId(k)} ${getOperatorNeq(v)} ${printValue(operand)}`;
121
+ return `${table}.${escapeId(k)} ${getOperatorNeq(operand)} ${printValue(operand)}`;
122
122
  }
123
123
  if (operator === "$gt") {
124
124
  return `${table}.${escapeId(k)} > ${printValue(operand)}`;
@@ -59,6 +59,15 @@ const stringifyWhere_1 = require("./stringifyWhere");
59
59
  });
60
60
  strict_1.default.deepEqual(result, "Usr.`userId` != 2 AND Usr.`text` = 'foo'");
61
61
  });
62
+ (0, globals_1.test)("should handle $neq null", () => {
63
+ const result = (0, stringifyWhere_1.stringifyWhere)({
64
+ where: { userId: { $neq: null }, text: "foo" },
65
+ table,
66
+ dialect,
67
+ args
68
+ });
69
+ strict_1.default.deepEqual(result, "Usr.`userId` IS NOT NULL AND Usr.`text` = 'foo'");
70
+ });
62
71
  (0, globals_1.test)("should handle $gt", () => {
63
72
  const result = (0, stringifyWhere_1.stringifyWhere)({
64
73
  where: { userId: { $gt: 2 }, text: "foo" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -25,7 +25,7 @@
25
25
  "json-schema-to-typescript": "10.1.5",
26
26
  "lodash": "^4.17.20",
27
27
  "loglevel": "^1.8.1",
28
- "mssql": "10.0.0",
28
+ "mssql": "^6.3.1",
29
29
  "mysql": "^2.18.1",
30
30
  "prettier": "^2.1.2",
31
31
  "sqlstring": "^2.3.2",
@@ -39,7 +39,7 @@
39
39
  "@swc/jest": "^0.2.24",
40
40
  "@types/fs-extra": "9.0.13",
41
41
  "@types/lodash": "4.14.177",
42
- "@types/mssql": "8.1.2",
42
+ "@types/mssql": "^6.0.7",
43
43
  "@types/node": "^18.14.1",
44
44
  "@types/prettier": "^2.1.5",
45
45
  "@types/sqlstring": "^2.2.1",
@@ -48,5 +48,9 @@
48
48
  "sinon": "12.0.1",
49
49
  "testcontainers": "^9.1.3",
50
50
  "typescript": "4.6.4"
51
+ },
52
+ "resolutions": {
53
+ "xml2js": "0.5.0",
54
+ "tough-cookie": "4.1.3"
51
55
  }
52
56
  }