Releases: humanwhocodes/momoa
Releases · humanwhocodes/momoa
momoa-js: v3.0.0
3.0.0 (2023-03-15)
Breaking Changes
- The
comments
option toparse()
andtokenize()
has been removed and replaced with themode
option, which can be either"json"
for JSON parsing or"jsonc"
to parse JSON with C-style comments. - The
type
property on tokens has been expanded:"Punctuator"
has been removed and replaced with specific token types for each of the former punctuator characters,"LBrace"
,"RBrace"
,"LBracket"
,"RBracket"
,"Comma"
, and"Colon"
- The
value
property has been removed from tokens in order to improve performance. You can easily retrieve the value of any token viatext.slice(token.loc.start.offset, token.loc.end.offset)
ortext.slice(token.range[0], token.range[1])
(ifranges: true
is used). - A new
Element
node as been introduced to be the parent node of each array element (similar toMember
inObject.members
). This allows you to easily look up the AST to determine if a value is inside of an array or not.
Features
@humanwhocodes/momoa v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
v1.0.1
v1.0.0
- 5206d54 Fix: Allow traversal with just enter or just exit (@nzakas)
- 5715b35 New: Add ranges option to parse() and tokenize() (@nzakas)
- 4ba561a Chore: Properly label evaluate() tests (@nzakas)
- e650b91 Breaking: loc.index -> loc.offset for compat with existing formats (@nzakas)
- 3a9087b Breaking: Align AST node types with spec terminology (@nzakas)
- 9f0de16 Breaking: interpret() -> evaluate() (@nzakas)
v0.2.1
- 1e3376c Upgrade: Bump lodash from 4.17.11 to 4.17.15 (#2) (@dependabot[bot])
- bbfaf16 Upgrade: Bump eslint-utils from 1.3.1 to 1.4.2 (#1) (@dependabot[bot])