@infitx/decision 1.3.6 → 1.4.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/index.js +1 -1
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.1](https://github.com/infitx-org/release-cd/compare/decision-v1.4.0...decision-v1.4.1) (2026-02-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update allure dependency to version 3.2.0 in decision, match, and rest-fs packages ([b85e14d](https://github.com/infitx-org/release-cd/commit/b85e14db1701c07071f15bd0ed31bdaf7a510d04))
9
+
10
+ ## [1.4.0](https://github.com/infitx-org/release-cd/compare/decision-v1.3.6...decision-v1.4.0) (2026-02-18)
11
+
12
+
13
+ ### Features
14
+
15
+ * allow triggering by rule name / index ([4f2eacd](https://github.com/infitx-org/release-cd/commit/4f2eacd1a03b8c8a9ca63dbb5335f64f081b7d4c))
16
+
3
17
  ## [1.3.6](https://github.com/infitx-org/release-cd/compare/decision-v1.3.5...decision-v1.3.6) (2026-02-11)
4
18
 
5
19
 
package/index.js CHANGED
@@ -21,7 +21,7 @@ module.exports = function decision(config) {
21
21
  const decisions = all ? [] : null;
22
22
  for (const index in rules) {
23
23
  const { rule = index, when, then } = rules[index];
24
- if (match(fact, when)) {
24
+ if (['string', 'number'].includes(typeof fact) ? rule === fact : match(fact, when)) {
25
25
  if (all) {
26
26
  Object.entries(typeof then === 'function' ? then(fact) : then).forEach(([decision, value]) => decisions.push({ rule, decision, ...value }));
27
27
  } else {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@infitx/decision",
3
- "version": "1.3.6",
3
+ "version": "1.4.1",
4
4
  "description": "Decision tables engine",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
7
  "yaml": "^2.8.2",
8
- "@infitx/match": "1.4.4"
8
+ "@infitx/match": "1.5.1"
9
9
  },
10
10
  "devDependencies": {
11
- "allure": "^3.1.0",
11
+ "allure": "^3.2.0",
12
12
  "allure-jest": "^3.4.5",
13
13
  "jest": "^30.2.0",
14
14
  "jest-environment-node": "^30.2.0",