Releases: edloidas/roll-parser
Releases · edloidas/roll-parser
v3.0.0-alpha.0
First alpha of the v3 rewrite. Stage 1 (core engine) is complete; Stage 2 (dice mechanics) is largely in place.
Added
Core engine (Stage 1):
- Lexer and token system (#3)
- Pratt parser and AST types (#4)
- Seedable RNG system with
SeededRNG(xorshift128) andMockRNGhelpers (#5) - AST evaluator with keep/drop modifiers (
kh,kl,dh,dl) (#6) - Public
roll(notation, options)API withRollResult/DieResulttypes (#7) roll-parserCLI with--help,--version,--verbose,--seedflags; ESM + CJS dual build (#8)
Dice mechanics (Stage 2):
- Percentile dice notation (
d%) (#35) - Fate/Fudge dice (
dF) (#36) - Math functions:
floor(),ceil(),round(),abs(),max(),min()(#37) - Exploding dice —
!(standard),!!(compound),!p(penetrating) — with optional compare points (#38) - Reroll mechanics (
r,ro) with compare points (#39) - Success counting / dice pools with
>,>=,<,<=,=operators andfNfailure tagging (#40) - PF2e Degrees of Success via the
vskeyword, with nat-20/1 upgrade/downgrade (#41)
Changed
- BREAKING: complete rewrite from v2.x. Public API, semantics, and notation coverage are not compatible with the 2.x line. Pin to
roll-parser@2.3.2for the legacy implementation. - Public API surface trimmed:
Lexer,Parser,lex,TokenType,Token, and mock RNG exports removed from the root entry.createMockRngmoved to theroll-parser/testingsubpath. Added typedRollParserErrorbase class withRollParserErrorCodeunion andisRollParserError()type guard (#24)
Fixed
- Modifier chaining now matches the Roll20 standard: chained modifiers are flattened and each applies independently to the full pool; drop sets are unioned (#12)
- Dice count safety limit via
maxDiceoption (default 10,000), enforced across the whole expression to prevent DoS via additive groups like5000d6+5000d6(#19) - Parser and evaluator correctness: duplicate
keptmodifier entries, implicit modifier count defaulting to 1 (4d6kh→4d6kh1),criticalflag suppression whensides === 1, negative--seedCLI values (#21)
v2.3.2
v2.3.1
v2.3.0
v2.2.0
v2.1.1
v2.1.0
Notable changes
Updated:
- Roll and parse&roll methods are now using converters, so the plain objects can be passed without risks.
parse()andparseAndRoll()functions will returnnull, ifnullor `undefined is passed.
Added:
- Converters to convert any parameters to
RollandWodRollobjects.