Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

espurify

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

espurify - npm Package Versions

23

3.1.0

Diff

Changelog

Source

3.1.0 (2024-07-04)

Features
  • Support ES2023 and ES2024 (a03f0b2e)
twada
published 3.0.0 •

Changelog

Source

3.0.0 (2022-07-17)

Features
Breaking Changes

This release will not affect most users immediately. There are three notable changes.

  1. espurify function is still exported as default but deprecated in favor of named exports aiming ESM era, and will be removed in future major releases. Please use espurify.purifyAst instead.

  2. espurify.cloneWithWhitelist is still exported but deprecated in favor of more inclusive language and will be removed in future major releases. Please use espurify.cloneWithAllowlist instead.

  3. Some new properties will appear in purified AST and may affect deep-equality of the tree, since default ecmaVersion is changed from 2018 to 2022 which add some properties to existing Nodes.

-  CallExpression: ['type', 'callee', 'arguments'],
+  CallExpression: ['type', 'callee', 'arguments', 'optional'],
-  ExportAllDeclaration: ['type', 'source'],
+  ExportAllDeclaration: ['type', 'source', 'exported'],
-  Literal: ['type', 'value', 'regex'],
+  Literal: ['type', 'value', 'regex', 'bigint'],

To make espurify's behavior same as v2, please use espurify.customize function with ecmaVersion: 2018 option.

const purify = espurify.customize({ ecmaVersion: 2018 });
const clonedAst = purify(originalAst);
twada
published 2.1.1 •

Changelog

Source

2.1.1 (2021-03-29)

Bug Fixes
twada
published 2.1.0 •

Changelog

Source

2.1.0 (2021-03-26)

Features
  • Support ES2020 grammar
    • support ChainExpression
    • support ImportExpression
    • support exported property of ExportAllDeclaration
    • support BigInt literals
twada
published 2.0.0 •

Changelog

Source

2.0.0 (2018-11-23)

Breaking Changes

We drop support of ancient (= before ES6) environments. Please use polyfills by your own.

We stopped providing prebuilt bundle for browsers. Please build your own by your bundler. We also dropped bower support. Please use npm instead.

twada
published 1.8.1 •

Changelog

Source
twada
published 1.8.0 •

twada
published 1.7.0 •

Changelog

Source
twada
published 1.6.1 •

Changelog

Source

1.6.1 (2017-02-13)

Bug Fixes
  • fix property order of ConditionalExpression (01c13ada)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc