Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@mysticatea mysticatea released this 14 May 07:27
v3.0.0
c3b1d38

💥 Breaking Changes

  • 9a5c4fb, 5361c33 dropped old Node.js support. The new range is ^10.0.0 || ^12.0.0 || >= 14.0.0.
  • 5361c33 added the exports field to package.json. Now direct accesses to internal files are disallowed.
  • c5574ce, 46771e1 changed the result of getFunctionNameWithKind(node) function in some cases.
    • Functions at method places prefer the method name than function's id. E.g., { foo: function bar() {} } is method 'foo'.
    • Arrow functions at method places are now methods. E.g., { foo: () => {} } is method 'foo'.
    • Function expressions at variable initializers or the RHS of assignments are named. E.g. foo = function() {} is function 'foo'.

✨ Enhancements

  • 05b8390 supports the new class features of ES2022: public class fields, private class members, and static of them.
  • 46771e1 added the optional second parameter to getFunctionNameWithKind(node). If you give context.getSourceCode() to that, the getFunctionNameWithKind(node, sourceCode) function handles the name of computed properties. E.g., { [foo]() {} } is method [foo].

🐛 Bug fixes

  • 994ee18 fixed misleading result from getStaticValue() on expressions that re-use Symbol()s (#12)
  • b8820bc fixed isParenthesized() on CatchClause.param should be false (#15)