Missing Changelog for Version 7.x - Unofficial Community Changelog
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js, typescript
調査の方向性
CHANGELOG.md から始め、issue に記載されているとおり、types/index.d.ts、package.json、dist/ ディレクトリの v6.5.0 と v7.3.1 のバージョンを比較します。リリースの背景と互換性の詳細について、issue #372、#408、#417、#379 を確認します。6.2.0–7.3.1 の maintainer 検証済みリリースノートと、v6 から v7 への移行ガイドを作成すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Version 7.x of json-rules-engine represents a major version bump from 6.x, but there is no official changelog documenting the changes. This makes it difficult for users to safely upgrade and understand what breaking changes they need to account for.
The CHANGELOG.md file in the package only goes up to version 6.1.0, leaving versions 6.2.0 through 7.3.1 completely undocumented.
Impact
- Users are hesitant to upgrade due to unknown breaking changes
- Security vulnerability in
jsonpath-plus(CVE-2024-21534) requires upgrading to v7+ - Issue #372 discusses v7 design but doesn't provide a migration guide
- Existing issue about "list of breaking changes v7" shows community need for this information
Unofficial Community Changelog (6.5.0 → 7.3.1)
⚠️ DISCLAIMER: This changelog is based on code comparison and TypeScript definition analysis. It is NOT official and may be incomplete. Users should perform their own testing before upgrading in production environments.
🔴 BREAKING CHANGES
1. Node.js Version Requirement
- v6.5.0: No engine requirement
+ v7.x: Requires Node.js >= 18.0.0
2. Security: jsonpath-plus Dependency Updated
- v6.5.0: jsonpath-plus@^7.2.0 (vulnerable to RCE - CVE-2024-21534)
+ v7.x: jsonpath-plus@^10.3.0 (patched)
This is the primary reason to upgrade to v7.
3. Removed Dependency
- v6.5.0: lodash.isobjectlike@^4.0.0
+ v7.x: Removed (replaced with internal implementation)
Impact: Internal change only, should not affect user code
4. API Change: addOperator() Return Type
// v6.5.0
engine.addOperator(operator): Map<string, Operator>
// v7.x
engine.addOperator(operator): void
Impact: Code that uses the return value of addOperator() will break.
Example of breaking code:
// This will break in v7
const operators = engine.addOperator('customOp', callback);
operators.get('customOp'); // ❌ operators is now void
// Instead, operators should be tracked separately
engine.addOperator('customOp', callback); // ✅ Returns void in v7
5. Deprecation: rule.ruleEvent Property
// v6.5.0
rule.event // ✅ Available
// v7.x
rule.ruleEvent // ⚠️ Deprecated (still works but shows warning)
rule.event // ✅ Preferred
Impact: Soft breaking change - existing code using rule.event continues to work
6. Event Handler Type Signature
// v6.5.0
engine.on('success', handler: EventHandler): this
engine.on('failure', handler: EventHandler): this
// v7.x
engine.on<T = Event>(eventName: string, handler: EventHandler<T>): this
Impact: More flexible, backwards compatible for JavaScript users. TypeScript users get better type inference.
✨ NEW FEATURES
7. Operator Decorators (Major new feature)
New APIs:
engine.addOperatorDecorator(decorator: OperatorDecorator): void
engine.addOperatorDecorator<A, B, NextA, NextB>(
decoratorName: string,
callback: OperatorDecoratorEvaluator<A, B, NextA, NextB>
): void
engine.removeOperatorDecorator(decorator: OperatorDecorator | string): boolean
// New class
class OperatorDecorator {
constructor(
name: string,
evaluator: OperatorDecoratorEvaluator<A, B, NextA, NextB>,
validator?: (factValue: A) => boolean
)
}
Allows wrapping operators with additional logic for preprocessing, logging, or custom validation.
New distribution files added:
dist/operator-decorator.jsdist/operator-map.jsdist/engine-default-operator-decorators.js
8. Enhanced Result Types
New TypeScript types for better result handling:
TopLevelConditionResultRuleResultSerializableConditionResultPropertiesBooleanConditionResultProperties- Various condition result types (
AllConditionsResult,AnyConditionsResult,NotConditionsResult,ConditionReferenceResult)
Enhanced RuleResult interface:
interface RuleResult {
toJSON(): string;
toJSON<T extends boolean>(stringify: T): T extends true ? string : RuleResultSerializable;
}
📝 MIGRATION CHECKLIST
When upgrading from v6.x to v7.x:
- ✅ Verify Node.js version is >= 18.0.0
- 🔍 Search codebase for
addOperator()usage and remove any code that depends on its return value - 🔍 (Optional) Search for
rule.ruleEventand replace withrule.event - ⚠️ IMPORTANT: Update Jest/Vitest configs that map
jsonpath-plusto use v10.3.0 CommonJS build (see #417) - 🧪 Run full test suite
- 🔬 Test in a staging environment before production deployment
Search commands:
# Find addOperator usage
grep -r "addOperator" --include="*.ts" --include="*.js"
# Find deprecated ruleEvent usage
grep -r "\.ruleEvent" --include="*.ts" --include="*.js"
⚠️ KNOWN ISSUE: ESM/CommonJS Compatibility (#417)
As reported in Issue #417, jsonpath-plus@10.x serves ESM modules for browsers, but json-rules-engine v7.3.1 only supports CommonJS. This causes issues in browser environments and test runners like Jest/Vitest.
Workaround for Jest/Vitest:
// jest.config.js or vitest.config.js
moduleNameMapper: {
"^jsonpath-plus$":
"<rootDir>/node_modules/.pnpm/jsonpath-plus@10.3.0/node_modules/jsonpath-plus/dist/index-node-cjs.cjs"
}
Impact: If you're running json-rules-engine in browser tests, you'll need to configure your test runner to use the CommonJS build of jsonpath-plus.
Request to Maintainers
Could the maintainers please:
- Update the CHANGELOG.md with official release notes for versions 6.2.0 through 7.3.1
- Document any breaking changes that were introduced
- Provide a migration guide from v6 to v7
- Consider publishing release notes for future versions on the GitHub Releases page
Having an official changelog is crucial for:
- Understanding breaking changes before upgrading
- Planning migration efforts
- Maintaining trust in semantic versioning
- Helping users upgrade safely to get the security fix for
jsonpath-plus
The security vulnerability in jsonpath-plus makes upgrading to v7 important, but the lack of documentation makes users hesitant to do so.
How This Changelog Was Created
This unofficial changelog was created by:
- Comparing TypeScript definitions (
types/index.d.ts) between v6.5.0 and v7.3.1 - Analyzing
package.jsondifferences (dependencies, engines) - Comparing distribution files (
dist/directory) - Reviewing Issue #372 for v7 design goals
- Testing the changes in a real project
⚠️ This is NOT an exhaustive list. There may be additional changes, bug fixes, or subtle behavior differences not captured here.
Community Contributions Welcome
If others have found additional breaking changes or differences not listed here, please comment below so we can build a more complete picture of what changed in v7.
Related Issues
- #372 - version 7 - Design
- #408 - list of breaking changes v7 (community request for changelog)
- #417 - jsonpath-plus expects browser to use ESM (ESM/CommonJS compatibility issue)
- #379 - PR: fix(deps): update dependency jsonpath-plus to 10.0.0 due to vulnerability
References
Community Members: Please add your findings in the comments if you discover additional changes during your upgrade process.
Maintainers: Thank you for this excellent library! An official changelog would be greatly appreciated by the community. 🙏
- 主要言語
- JavaScript
- スター
- 3.1k
- フォーク
- 507
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CacheControl/json-rules-engine のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CacheControl/json-rules-engine#427 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
CacheControl/json-rules-engine#424 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
CacheControl/json-rules-engine#421 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
CacheControl/json-rules-engine#417 · リアクション 1 件 ·
-
High severity security flaw in JSONPath Plus allows Remote Code Execution - please update dependency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
CacheControl/json-rules-engine#413 · コメント 4 件 ·
CacheControl/json-rules-engine の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/studio#4908 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sugarlabs/musicblocks#8847 ·