trilean-sql 2.2.3 → 2.2.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.
@@ -48,6 +48,9 @@ const sqliteSubjectOptions = {
48
48
  function compile(node, options = subjectOptions) {
49
49
  return require_compile.compilePredicateNode(node, options);
50
50
  }
51
+ /**
52
+ * Named rather than written twice, so each case's expected `params` is the same value the tree was built from rather than a literal that could drift away from it.
53
+ */
51
54
  const ADULT_AGE = 18;
52
55
  const SAMPLE_AGE = 40;
53
56
  const EXCLUDED_AGE = 7;
@@ -3,6 +3,9 @@ import { PredicateNode } from "trilean";
3
3
  //#region src/compile-test-helpers.d.ts
4
4
  /** Compiles against `subjectOptions` by default, so each split `compile.*.test.ts` file below only has to name a dialect/column configuration explicitly when it actually differs from the shared default. */
5
5
  export declare function compile(node: PredicateNode, options?: Readonly<SqlCompileOptions>): CompiledSql;
6
+ /**
7
+ * Named rather than written twice, so each case's expected `params` is the same value the tree was built from rather than a literal that could drift away from it.
8
+ */
6
9
  export declare const ADULT_AGE = 18;
7
10
  export declare const SAMPLE_AGE = 40;
8
11
  export declare const EXCLUDED_AGE = 7;
@@ -3,6 +3,9 @@ import { PredicateNode } from "trilean";
3
3
  //#region src/compile-test-helpers.d.ts
4
4
  /** Compiles against `subjectOptions` by default, so each split `compile.*.test.ts` file below only has to name a dialect/column configuration explicitly when it actually differs from the shared default. */
5
5
  export declare function compile(node: PredicateNode, options?: Readonly<SqlCompileOptions>): CompiledSql;
6
+ /**
7
+ * Named rather than written twice, so each case's expected `params` is the same value the tree was built from rather than a literal that could drift away from it.
8
+ */
6
9
  export declare const ADULT_AGE = 18;
7
10
  export declare const SAMPLE_AGE = 40;
8
11
  export declare const EXCLUDED_AGE = 7;
@@ -47,6 +47,9 @@ const sqliteSubjectOptions = {
47
47
  function compile(node, options = subjectOptions) {
48
48
  return compilePredicateNode(node, options);
49
49
  }
50
+ /**
51
+ * Named rather than written twice, so each case's expected `params` is the same value the tree was built from rather than a literal that could drift away from it.
52
+ */
50
53
  const ADULT_AGE = 18;
51
54
  const SAMPLE_AGE = 40;
52
55
  const EXCLUDED_AGE = 7;
package/package.json CHANGED
@@ -1,17 +1,40 @@
1
1
  {
2
2
  "name": "trilean-sql",
3
- "version": "2.2.3",
4
3
  "description": "Compiles a trilean predicate tree into a parameterised SQL WHERE fragment, pushing three-valued logic down onto the database's own NULL propagation instead of evaluating it in process.",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/ExaDev/trilean.git",
9
- "directory": "packages/trilean-sql"
10
- },
11
- "homepage": "https://github.com/ExaDev/trilean/tree/main/packages/trilean-sql",
4
+ "version": "2.2.5",
12
5
  "bugs": {
13
6
  "url": "https://github.com/ExaDev/trilean/issues"
14
7
  },
8
+ "dependencies": {
9
+ "trilean": "1.7.2",
10
+ "trilean-regex": "1.0.4"
11
+ },
12
+ "devDependencies": {
13
+ "@arethetypeswrong/cli": "^0.18.5",
14
+ "@electric-sql/pglite": "^0.5.8",
15
+ "@exadev/eslint-config": "3.0.0",
16
+ "@testcontainers/postgresql": "^12.1.0",
17
+ "@types/better-sqlite3": "^9.6.0",
18
+ "@types/node": "^26.4.0",
19
+ "@types/pg": "^8.15.6",
20
+ "@vitest/coverage-v8": "^5.0.0",
21
+ "better-sqlite3": "^13.0.3",
22
+ "eslint": "^10.9.1",
23
+ "eslint-config-prettier": "^10.1.8",
24
+ "eslint-plugin-prettier": "^5.5.6",
25
+ "globals": "^17.11.0",
26
+ "pg": "^8.16.3",
27
+ "prettier": "^3.9.6",
28
+ "publint": "^0.3.24",
29
+ "tsdown": "^0.23.0",
30
+ "turbo": "^2.10.12",
31
+ "typescript": "^6.0.3",
32
+ "typescript-eslint": "^8.68.0",
33
+ "vitest": "^5.0.0"
34
+ },
35
+ "engines": {
36
+ "node": ">=20"
37
+ },
15
38
  "exports": {
16
39
  ".": {
17
40
  "types": {
@@ -30,76 +53,53 @@
30
53
  "require": "./dist/*.cjs"
31
54
  }
32
55
  },
33
- "main": "./dist/index.cjs",
34
- "module": "./dist/index.js",
35
- "types": "./dist/index.d.ts",
36
56
  "files": [
37
57
  "dist"
38
58
  ],
59
+ "homepage": "https://github.com/ExaDev/trilean/tree/main/packages/trilean-sql",
60
+ "keywords": [
61
+ "postgres",
62
+ "predicate",
63
+ "predicate-pushdown",
64
+ "query-builder",
65
+ "rules-engine",
66
+ "sql",
67
+ "sqlite",
68
+ "three-valued-logic",
69
+ "trilean"
70
+ ],
71
+ "license": "MIT",
72
+ "main": "./dist/index.cjs",
73
+ "module": "./dist/index.js",
39
74
  "publishConfig": {
40
75
  "access": "public",
41
76
  "provenance": true,
42
77
  "registry": "https://registry.npmjs.org/"
43
78
  },
44
- "sideEffects": false,
45
- "engines": {
46
- "node": ">=20"
47
- },
48
- "license": "MIT",
49
- "dependencies": {
50
- "trilean": "1.7.0",
51
- "trilean-regex": "1.0.3"
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "git+https://github.com/ExaDev/trilean.git",
82
+ "directory": "packages/trilean-sql"
52
83
  },
53
84
  "scripts": {
54
- "build": "turbo run _build",
55
85
  "_build": "tsdown",
56
- "lint": "turbo run _lint",
57
86
  "_lint": "eslint . --fix --cache --max-warnings 0",
58
- "typecheck": "turbo run _typecheck _typecheck:attw",
87
+ "_prepush": "true",
88
+ "_test": "vitest run --project unit",
89
+ "_test:coverage": "vitest run --project unit --coverage",
90
+ "_test:integration": "vitest run --project integration",
59
91
  "_typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.node.json",
60
92
  "_typecheck:attw": "attw --pack",
93
+ "build": "turbo run _build",
94
+ "lint": "turbo run _lint",
95
+ "prepublishOnly": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run test:integration && pnpm run build && publint && attw --pack",
96
+ "prepush": "turbo run _prepush",
61
97
  "test": "turbo run _test",
62
- "_test": "vitest run --project unit",
63
98
  "test:coverage": "turbo run _test:coverage",
64
- "_test:coverage": "vitest run --project unit --coverage",
65
99
  "test:integration": "turbo run _test:integration",
66
- "_test:integration": "vitest run --project integration",
67
- "prepush": "turbo run _prepush",
68
- "_prepush": "true",
69
- "prepublishOnly": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run test:integration && pnpm run build && publint && attw --pack"
100
+ "typecheck": "turbo run _typecheck _typecheck:attw"
70
101
  },
71
- "keywords": [
72
- "sql",
73
- "postgres",
74
- "sqlite",
75
- "predicate",
76
- "three-valued-logic",
77
- "query-builder",
78
- "predicate-pushdown",
79
- "trilean",
80
- "rules-engine"
81
- ],
82
- "devDependencies": {
83
- "@arethetypeswrong/cli": "^0.18.5",
84
- "@electric-sql/pglite": "^0.5.8",
85
- "@exadev/eslint-config": "2.12.1",
86
- "@testcontainers/postgresql": "^12.1.0",
87
- "@types/better-sqlite3": "^9.6.0",
88
- "@types/node": "^26.4.0",
89
- "@types/pg": "^8.15.6",
90
- "@vitest/coverage-v8": "^5.0.0",
91
- "better-sqlite3": "^13.0.3",
92
- "eslint": "^10.9.1",
93
- "eslint-config-prettier": "^10.1.8",
94
- "eslint-plugin-prettier": "^5.5.6",
95
- "globals": "^17.11.0",
96
- "pg": "^8.16.3",
97
- "prettier": "^3.9.6",
98
- "publint": "^0.3.24",
99
- "tsdown": "^0.23.0",
100
- "turbo": "^2.10.12",
101
- "typescript": "^6.0.3",
102
- "typescript-eslint": "^8.68.0",
103
- "vitest": "^5.0.0"
104
- }
102
+ "sideEffects": false,
103
+ "type": "module",
104
+ "types": "./dist/index.d.ts"
105
105
  }