@briza/illogical 1.7.2 → 1.7.4

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/changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # illogical changelog
2
2
 
3
+ ## 1.7.3
4
+
5
+ - Updating tsconfig and other dependencies.
6
+
3
7
  ## 1.7.2
4
8
 
5
9
  - Resolving performance issues on simplify and removing unnecessary unsafeSimplify.
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "@briza/illogical",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "A micro conditional javascript engine used to parse the raw logical and comparison expressions, evaluate the expression in the given data context, and provide access to a text form of the given expressions.",
5
- "main": "lib/illogical.js",
6
- "module": "lib/illogical.esm.js",
7
- "typings": "types/index.d.ts",
5
+ "main": "./lib/illogical.js",
6
+ "module": "./lib/illogical.esm.js",
7
+ "types": "./types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./types/index.d.ts",
11
+ "require": "./lib/illogical.js",
12
+ "import": "./lib/illogical.esm.js"
13
+ }
14
+ },
8
15
  "files": [
9
16
  "/lib",
10
17
  "/types",
@@ -19,7 +26,7 @@
19
26
  "type-check": "tsc --noEmit",
20
27
  "build:types": "tsc --emitDeclarationOnly",
21
28
  "build:js": "rollup -c",
22
- "build": "npm run build:types && npm run build:js",
29
+ "build": "rm -rf types && npm run build:types && npm run build:js",
23
30
  "docs": "typedoc src && git checkout docs/.nojekyll",
24
31
  "test": "jest",
25
32
  "lint": "eslint --max-warnings 0 \"src/**/*.{ts,js}\"",
@@ -42,31 +49,33 @@
42
49
  "rules"
43
50
  ],
44
51
  "devDependencies": {
45
- "@babel/core": "^7.27.3",
52
+ "@babel/core": "^7.28.5",
46
53
  "@babel/plugin-proposal-class-properties": "^7.18.6",
47
- "@babel/preset-env": "^7.25.3",
48
- "@babel/preset-typescript": "^7.24.7",
49
- "@rollup/plugin-babel": "^6.0.4",
50
- "@rollup/plugin-commonjs": "^26.0.1",
51
- "@rollup/plugin-eslint": "^9.0.5",
52
- "@rollup/plugin-node-resolve": "^15.2.3",
53
- "@types/jest": "^29.5.12",
54
- "@typescript-eslint/eslint-plugin": "^8.0.1",
55
- "@typescript-eslint/parser": "^8.0.1",
56
- "eslint": "^8.57.0",
57
- "eslint-config-prettier": "^9.1.0",
58
- "eslint-import-resolver-typescript": "^3.6.1",
59
- "eslint-plugin-import": "^2.29.1",
54
+ "@babel/preset-env": "^7.28.5",
55
+ "@babel/preset-typescript": "^7.28.5",
56
+ "@eslint/eslintrc": "^3.3.3",
57
+ "@eslint/js": "^9.39.2",
58
+ "@rollup/plugin-babel": "^6.1.0",
59
+ "@rollup/plugin-commonjs": "^26.0.3",
60
+ "@rollup/plugin-eslint": "^9.1.0",
61
+ "@rollup/plugin-node-resolve": "^15.3.1",
62
+ "@types/jest": "^29.5.14",
63
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
64
+ "@typescript-eslint/parser": "^8.54.0",
65
+ "eslint": "^9.39.2",
66
+ "eslint-config-prettier": "^9.1.2",
67
+ "eslint-import-resolver-typescript": "^3.10.1",
68
+ "eslint-plugin-import": "^2.32.0",
60
69
  "eslint-plugin-node": "^11.1.0",
61
- "eslint-plugin-prettier": "^5.2.1",
62
- "eslint-plugin-promise": "^7.1.0",
70
+ "eslint-plugin-prettier": "^5.5.5",
71
+ "eslint-plugin-promise": "^7.2.1",
63
72
  "eslint-plugin-simple-import-sort": "^12.1.1",
64
73
  "jest": "^29.7.0",
65
74
  "license-checker": "^25.0.1",
66
- "prettier": "^3.3.3",
67
- "rollup": "^4.41.1",
68
- "ts-jest": "^29.2.4",
69
- "typedoc": "^0.26.5",
70
- "typescript": "^5.5.4"
75
+ "prettier": "^3.6.2",
76
+ "rollup": "^4.52.5",
77
+ "ts-jest": "^29.4.5",
78
+ "typedoc": "^0.26.11",
79
+ "typescript": "^5.6.3"
71
80
  }
72
81
  }
package/types/index.d.ts CHANGED
@@ -30,6 +30,7 @@ import { ExpressionInput, Input } from './parser';
30
30
  import { Options } from './parser/options';
31
31
  export { defaultOptions } from './parser/options';
32
32
  export { isEvaluable, OPERATOR_EQ, OPERATOR_NE, OPERATOR_GT, OPERATOR_GE, OPERATOR_LT, OPERATOR_LE, OPERATOR_IN, OPERATOR_NOT_IN, OPERATOR_PREFIX, OPERATOR_SUFFIX, OPERATOR_OVERLAP, OPERATOR_UNDEFINED, OPERATOR_PRESENT, OPERATOR_AND, OPERATOR_OR, OPERATOR_NOR, OPERATOR_XOR, OPERATOR_NOT, OPERATOR_DIVIDE, OPERATOR_MULTIPLY, OPERATOR_SUBTRACT, OPERATOR_SUM, };
33
+ export type { Context, ExpressionInput };
33
34
  /**
34
35
  * Condition engine
35
36
  */
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyAnd: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,6 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifySum: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
4
- export declare const simplifySubtract: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
5
- export declare const simplifyMultiply: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
6
- export declare const simplifyDivide: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,7 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const simplifyGt: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
5
- export declare const simplifyGe: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
6
- export declare const simplifyLt: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
7
- export declare const simplifyLe: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,5 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const simplifyEq: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
5
- export declare const simplifyNe: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyIn: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,4 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const simplifyNor: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyNotIn: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyNot: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyOr: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,3 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyOverlap: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,5 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const simplifyPrefix: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
5
- export declare const simplifySuffix: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,4 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const simplifyPresent: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
4
- export declare const simplifyUndefined: (simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;
@@ -1,4 +0,0 @@
1
- import { Context, Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const unsafeSimplify: (context: Context, opts: Options, strictKeys?: Set<string>, optionalKeys?: Set<string>) => (input: Input) => Input | Evaluable;
@@ -1,12 +0,0 @@
1
- import { Evaluable, Result } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- export declare const isTrueResult: (value: Input) => value is true;
4
- export declare const isFalseResult: (value: Input) => value is false;
5
- export declare const isNonFalseResult: (operand: Input | Evaluable) => operand is Input;
6
- export declare const isNonTrueResult: (operand: Input | Evaluable) => operand is Input;
7
- export declare const resultToInputInternal: (value: Result) => Input | undefined;
8
- export declare const resultToInput: (value: Result) => Input | undefined;
9
- export declare const areAllNumbers: (results: Input[]) => results is number[];
10
- export declare const areAllInputs: (values: (Input | Evaluable)[]) => values is Input[];
11
- export declare const getInputValues: (results: Input[]) => number[] | false;
12
- export declare const extractValues: (input: Input | Evaluable) => Result[];
@@ -1,4 +0,0 @@
1
- import { Evaluable } from '../common/evaluable';
2
- import { Input } from '../parser';
3
- import { Options } from '../parser/options';
4
- export declare const simplifyXor: (opts: Options, simplifyInput: (input: Input) => Input | Evaluable) => (input: Input[] | [string, ...Input[]]) => Input | Evaluable;