# escorn

## 0.7.0

### Minor Changes

- [#50](https://github.com/preactjs/escorn/pull/50) [`23d11fe`](https://github.com/preactjs/escorn/commit/23d11fe8d5d7a66f01ac77ae4648fd69c06f1763) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add `runtime` plugin to allow runtime-specific optimizations. This mostly concerns globals like `process` or `window`. So far special behavior has been added for `node` and `browser` as a runtime

### Patch Changes

- [#49](https://github.com/preactjs/escorn/pull/49) [`e00221f`](https://github.com/preactjs/escorn/commit/e00221fd4d58e9ae28fe6c1120482609da08c759) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add support for eliminating conditions and simplifying any binary expressions

* [#47](https://github.com/preactjs/escorn/pull/47) [`59c92a7`](https://github.com/preactjs/escorn/commit/59c92a7b3d1efe5f23cde956ceb27425b2059a65) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Resolve logical `||` expressions

## 0.6.3

### Patch Changes

- [#45](https://github.com/preactjs/escorn/pull/45) [`afb0094`](https://github.com/preactjs/escorn/commit/afb0094c27d3f55d18edadd98c43f74a2d34f511) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix path list indices getting out of sync on remove

* [#46](https://github.com/preactjs/escorn/pull/46) [`c00d319`](https://github.com/preactjs/escorn/commit/c00d3197a95ea602328ad903db7f0b73cc81fe6a) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Optimize: Remove unnecessary variable init

- [#44](https://github.com/preactjs/escorn/pull/44) [`1b54919`](https://github.com/preactjs/escorn/commit/1b5491905b1deacf09ac7d5b8c11444776cd258b) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix `exports.foo = 2` with literal as init

* [#43](https://github.com/preactjs/escorn/pull/43) [`c973f3f`](https://github.com/preactjs/escorn/commit/c973f3f4632e2042b70e68b9e509e4c551f6ade1) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix error when `cloneDeep` when node contained `null`

- [#46](https://github.com/preactjs/escorn/pull/46) [`f1134ed`](https://github.com/preactjs/escorn/commit/f1134ed9b8df44c65f5f12f1a1c2cfb44c147edd) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Optimize: Eliminate undefined typeof expressions

* [#41](https://github.com/preactjs/escorn/pull/41) [`ac132fd`](https://github.com/preactjs/escorn/commit/ac132fd2c3a45c5538ccac435e4059d09fd902d4) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix visitors enter/exit called in wrong order

- [#46](https://github.com/preactjs/escorn/pull/46) [`d581e5b`](https://github.com/preactjs/escorn/commit/d581e5bd09245d1a8c30e22bf209a4f482a65927) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Elminate falsy logical expressions

## 0.6.2

### Patch Changes

- [#39](https://github.com/preactjs/escorn/pull/39) [`b7a6062`](https://github.com/preactjs/escorn/commit/b7a6062152deddca9841e327e30ca741a9663400) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix wrong visitor called when node was removed or replaced by a previous plugin in the chain.

* [#36](https://github.com/preactjs/escorn/pull/36) [`f0b8e80`](https://github.com/preactjs/escorn/commit/f0b8e8034fba4b0871948a032f1bb52faf7858b0) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix getters and setters not being transformed

- [#38](https://github.com/preactjs/escorn/pull/38) [`faf3740`](https://github.com/preactjs/escorn/commit/faf37401d6bef8a82ab3b4288743e306f1bf7ecf) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix directives not being converted to babel nodes

## 0.6.1

### Patch Changes

- [#34](https://github.com/preactjs/escorn/pull/34) [`bdab1de`](https://github.com/preactjs/escorn/commit/bdab1deeb67e11fe705d8df1c444a9b90e2ce571) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix default function parameters inside objects not transformed

## 0.6.0

### Minor Changes

- [#28](https://github.com/preactjs/escorn/pull/28) [`74c9deb`](https://github.com/preactjs/escorn/commit/74c9debc99e97cf844c78c276cf225449e441b10) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add comments to AST nodes

* [#33](https://github.com/preactjs/escorn/pull/33) [`9b9de72`](https://github.com/preactjs/escorn/commit/9b9de7283d6bc5bd5a4677dc39a5365a12973e19) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add plugin to replace `process.env.FOO`-style member expressions or plain identifiers like `__DEV__`.

- [#33](https://github.com/preactjs/escorn/pull/33) [`b70a4ee`](https://github.com/preactjs/escorn/commit/b70a4eec5012ea6f7f2b28bea5c850a768493236) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add optimize plugin to remove rendundant code

* [#33](https://github.com/preactjs/escorn/pull/33) [`616baf3`](https://github.com/preactjs/escorn/commit/616baf31e6f826e336beb10a8a9b07e6e359e429) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add plugin to transpile CommonJS to ESM

### Patch Changes

- [#31](https://github.com/preactjs/escorn/pull/31) [`ce56a0f`](https://github.com/preactjs/escorn/commit/ce56a0fdfafbd7151f0ec36cfcdc6d173ca2c845) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Keep `#__PURE__` comments by default

* [#30](https://github.com/preactjs/escorn/pull/30) [`4d16077`](https://github.com/preactjs/escorn/commit/4d16077a50c4562dd1beec73215dc7b08979e1f1) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix export statement whitespace generation

- [#30](https://github.com/preactjs/escorn/pull/30) [`ec5d4f8`](https://github.com/preactjs/escorn/commit/ec5d4f8b6b252d7f0dfa6129bffad05125d5a34d) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Don't continue walk when node was removed

* [#29](https://github.com/preactjs/escorn/pull/29) [`686a8ad`](https://github.com/preactjs/escorn/commit/686a8adb8ec82f7c83a55c8009ad216f81bbfcdc) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add missing `path.remove()`

- [#30](https://github.com/preactjs/escorn/pull/30) [`3125fa3`](https://github.com/preactjs/escorn/commit/3125fa3e02cdd98f83f54b6f0daa1a9a014280e4) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix incorrect TypeScript types for `t.clone()` and `t.cloneDeep()`

* [#32](https://github.com/preactjs/escorn/pull/32) [`fe41149`](https://github.com/preactjs/escorn/commit/fe41149a97f9550b5fd19840154a9ed74241a206) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix operator types being typed as `string`

- [#32](https://github.com/preactjs/escorn/pull/32) [`1ed8a3b`](https://github.com/preactjs/escorn/commit/1ed8a3b75aee01703f13bc800e7ffa3238d43b86) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix function declarations not tracked in scope

* [#32](https://github.com/preactjs/escorn/pull/32) [`1d3e71c`](https://github.com/preactjs/escorn/commit/1d3e71c7a99622e231052c1b3cd905e325fcf2c6) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix class declaration not tracked in scope

- [#30](https://github.com/preactjs/escorn/pull/30) [`868ac2f`](https://github.com/preactjs/escorn/commit/868ac2f1ac14291db4fa7e0b2f2be2240ed44875) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix missing `body` property on `Program` in TypeScript types

* [#32](https://github.com/preactjs/escorn/pull/32) [`401f579`](https://github.com/preactjs/escorn/commit/401f579b38347cda04fa72985b6e9a1bca23f9d6) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add missing `.insertBefore()` path method

- [#26](https://github.com/preactjs/escorn/pull/26) [`3633794`](https://github.com/preactjs/escorn/commit/363379428de1fc0a563e4a5c38f9f73ad27043f4) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix compilation error with static class fields

## 0.5.1

### Patch Changes

- [#23](https://github.com/preactjs/escorn/pull/23) [`4077c9e`](https://github.com/preactjs/escorn/commit/4077c9eae5fefad422109e298b05353a2119cb39) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Support undefined nodes in `is*` assertions

* [#21](https://github.com/preactjs/escorn/pull/21) [`bd6beb6`](https://github.com/preactjs/escorn/commit/bd6beb6010db492c167ee6eedfbb2805672dfed4) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix missing union for `AwaitExpression` type

- [#24](https://github.com/preactjs/escorn/pull/24) [`c797568`](https://github.com/preactjs/escorn/commit/c79756834aaddd0d1cb53729ba931d2445388486) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Update acorn-import-assertions to fix esm error

## 0.5.0

### Minor Changes

- [#18](https://github.com/marvinhagemeister/escorn/pull/18) [`060c183`](https://github.com/marvinhagemeister/escorn/commit/060c183f228708f60f968ba884491062882ba805) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add line and column information to any errors thrown from visitors

### Patch Changes

- [#16](https://github.com/marvinhagemeister/escorn/pull/16) [`8609630`](https://github.com/marvinhagemeister/escorn/commit/86096301725babb1de2e89e5fd69cf15505e85c4) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix `name` entry in sourcemap containing acorn AST nodes

* [#20](https://github.com/marvinhagemeister/escorn/pull/20) [`4555de7`](https://github.com/marvinhagemeister/escorn/commit/4555de7c6e21b20a199280d2909ef624ca5d9295) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix esm error caused by acorn-import-assertions

## 0.4.1

### Patch Changes

- [#12](https://github.com/marvinhagemeister/escorn/pull/12) [`a2bd8eb`](https://github.com/marvinhagemeister/escorn/commit/a2bd8eb428d2b2b0b598785b56602a56a8906a72) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix wrong ESM entry path in `package.json`

* [#13](https://github.com/marvinhagemeister/escorn/pull/13) [`011963b`](https://github.com/marvinhagemeister/escorn/commit/011963b1e0c3acafee3b523103a6966f89bd4335) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix missing comma `ClassMethod` generation

## 0.4.0

### Minor Changes

- [#7](https://github.com/marvinhagemeister/escorn/pull/7) [`64b8a18`](https://github.com/marvinhagemeister/escorn/commit/64b8a18fa655c20a933ef2bfee56b18f0df73c0b) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add proper ESM entry

### Patch Changes

- [#7](https://github.com/marvinhagemeister/escorn/pull/7) [`52f28ba`](https://github.com/marvinhagemeister/escorn/commit/52f28baf4672043df30d5d0da0e23ea03112a516) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix `ObjectProperty` nodes not transformed

* [#7](https://github.com/marvinhagemeister/escorn/pull/7) [`8e0fddc`](https://github.com/marvinhagemeister/escorn/commit/8e0fddc3fd45a36373c24bb880bf99264549311c) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix `RegExpLiteral` flags ignored during transform

- [#11](https://github.com/marvinhagemeister/escorn/pull/11) [`8c6e6ee`](https://github.com/marvinhagemeister/escorn/commit/8c6e6ee667dd5c804b7384de2779b83a47d38b01) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix incorrect traversal order after path's have been requeued via `path.replaceWith()`

## 0.3.0

### Minor Changes

- [#5](https://github.com/marvinhagemeister/escorn/pull/5) [`5b7aafc`](https://github.com/marvinhagemeister/escorn/commit/5b7aafc98e8b51514a2a4c366f47ce9941d4442b) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Add support for transforming import assertions

### Patch Changes

- [#5](https://github.com/marvinhagemeister/escorn/pull/5) [`c66c74b`](https://github.com/marvinhagemeister/escorn/commit/c66c74b0ea58c1892f76939905e74c20b81639ff) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Fix parser typings mismatch

## 0.2.0

### Minor Changes

- [#3](https://github.com/marvinhagemeister/escorn/pull/3) [`2d2fb8a`](https://github.com/marvinhagemeister/escorn/commit/2d2fb8ae12f9a89af9a8fd3ea562e92acb6e28a5) Thanks [@marvinhagemeister](https://github.com/marvinhagemeister)! - Allow users to user their own `acorn` parser instance
