Skip to content

Releases: edloidas/roll-parser

v3.0.0-alpha.0

20 Apr 00:56
7c0ced4

Choose a tag to compare

v3.0.0-alpha.0 Pre-release
Pre-release

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) and MockRNG helpers (#5)
  • AST evaluator with keep/drop modifiers (kh, kl, dh, dl) (#6)
  • Public roll(notation, options) API with RollResult / DieResult types (#7)
  • roll-parser CLI with --help, --version, --verbose, --seed flags; 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 and fN failure tagging (#40)
  • PF2e Degrees of Success via the vs keyword, 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.2 for the legacy implementation.
  • Public API surface trimmed: Lexer, Parser, lex, TokenType, Token, and mock RNG exports removed from the root entry. createMockRng moved to the roll-parser/testing subpath. Added typed RollParserError base class with RollParserErrorCode union and isRollParserError() 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 maxDice option (default 10,000), enforced across the whole expression to prevent DoS via additive groups like 5000d6+5000d6 (#19)
  • Parser and evaluator correctness: duplicate kept modifier entries, implicit modifier count defaulting to 1 (4d6kh4d6kh1), critical flag suppression when sides === 1, negative --seed CLI values (#21)

v2.3.2

04 Jun 19:59

Choose a tag to compare

Notable changes

Updated:

  • Fixed invalid rolls handling, when used in the terminal.

v2.3.1

04 Jun 13:57

Choose a tag to compare

Notable changes

Updated:

  • Fixed missing link to executables in package.json

v2.3.0

04 Jun 13:45

Choose a tag to compare

Notable changes

Added:

  • Binaries to be able to run roll-parser from the console.

v2.2.0

04 Jun 13:44

Choose a tag to compare

Notable changes

Added:

  • Browser full and minified bundle

v2.1.1

31 May 15:58

Choose a tag to compare

Notable changes

Updated:

  • Fixed random function name typo: ramdom => random

v2.1.0

31 May 14:56

Choose a tag to compare

Notable changes

Updated:

  • Roll and parse&roll methods are now using converters, so the plain objects can be passed without risks.
  • parse() and parseAndRoll() functions will return null, if null or `undefined is passed.

Added:

  • Converters to convert any parameters to Roll and WodRoll objects.

v2.0.3

31 May 08:18

Choose a tag to compare

Notable changes

Updated:

  • Fixed rollClassic() generating identical values each dice roll.
  • Fixed rollWod() incorrectly counting the number of success dice rolls.

v2.0.2

31 May 08:13

Choose a tag to compare

Notable changes

Updated:

  • Fixed npm package config by adding src dir to distribution.

v2.0.1

30 May 09:07

Choose a tag to compare

npm distribution is broken for this version. Fixed in v2.0.2.

Notable changes

Updated:

  • Documentation and README fixes.