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

ast-monkey-traverse

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-monkey-traverse - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

10

CHANGELOG.md

@@ -6,2 +6,12 @@ # Change Log

## 3.0.0 (2021-09-09)
### Features
- migrate to ES Modules ([8c9d95d](https://github.com/codsen/codsen/commit/8c9d95d5dea0b769c2f070397141918a4893d575))
### BREAKING CHANGES
- programs now are in ES Modules and won't work with Common JS require()
## 2.1.0 (2021-05-24)

@@ -8,0 +18,0 @@

4

dist/ast-monkey-traverse.esm.js
/**
* @name ast-monkey-traverse
* @fileoverview Utility library to traverse AST
* @version 2.1.0
* @version 3.0.0
* @author Roy Revelt, Codsen Ltd

@@ -14,3 +14,3 @@ * @license MIT

var version$1 = "2.1.0";
var version$1 = "3.0.0";

@@ -17,0 +17,0 @@ const version = version$1;

/**
* @name ast-monkey-traverse
* @fileoverview Utility library to traverse AST
* @version 2.1.0
* @version 3.0.0
* @author Roy Revelt, Codsen Ltd

@@ -14,6 +14,6 @@ * @license MIT

* @fileoverview Utility library of AST helper functions
* @version 1.4.0
* @version 2.0.0
* @author Roy Revelt, Codsen Ltd
* @license MIT
* {@link https://codsen.com/os/ast-monkey-util/}
*/function y(t){if(t.includes(".")){const e=t.lastIndexOf(".");if(!t.slice(0,e).includes("."))return t.slice(0,e);for(let r=e-1;r--;)if("."===t[r])return t.slice(r+1,e)}return null}t.traverse=function(t,e){return function t(e,r,o,c){const u=n(e);let a;const i={depth:-1,path:"",...o};if(i.depth+=1,Array.isArray(u))for(let e=0,o=u.length;e<o&&!c.now;e++){const o=i.path?`${i.path}.${e}`:`${e}`;void 0!==u[e]?(i.parent=n(u),i.parentType="array",i.parentKey=y(o),a=t(r(u[e],void 0,{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)&&e<u.length?(u.splice(e,1),e-=1):u[e]=a):u.splice(e,1)}else if(p(u))for(const e in u){if(c.now&&null!=e)break;const o=i.path?`${i.path}.${e}`:e;0===i.depth&&null!=e&&(i.topmostKey=e),i.parent=n(u),i.parentType="object",i.parentKey=y(o),a=t(r(e,u[e],{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="2.1.0",Object.defineProperty(t,"__esModule",{value:!0})}));
*/function y(t){if(t.includes(".")){const e=t.lastIndexOf(".");if(!t.slice(0,e).includes("."))return t.slice(0,e);for(let r=e-1;r--;)if("."===t[r])return t.slice(r+1,e)}return null}t.traverse=function(t,e){return function t(e,r,o,c){const u=n(e);let a;const i={depth:-1,path:"",...o};if(i.depth+=1,Array.isArray(u))for(let e=0,o=u.length;e<o&&!c.now;e++){const o=i.path?`${i.path}.${e}`:`${e}`;void 0!==u[e]?(i.parent=n(u),i.parentType="array",i.parentKey=y(o),a=t(r(u[e],void 0,{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)&&e<u.length?(u.splice(e,1),e-=1):u[e]=a):u.splice(e,1)}else if(p(u))for(const e in u){if(c.now&&null!=e)break;const o=i.path?`${i.path}.${e}`:e;0===i.depth&&null!=e&&(i.topmostKey=e),i.parent=n(u),i.parentType="object",i.parentKey=y(o),a=t(r(e,u[e],{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="3.0.0",Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "ast-monkey-traverse",
"version": "2.1.0",
"version": "3.0.0",
"description": "Utility library to traverse AST",

@@ -40,5 +40,7 @@ "keywords": [

},
"main": "dist/ast-monkey-traverse.cjs.js",
"module": "dist/ast-monkey-traverse.esm.js",
"browser": "dist/ast-monkey-traverse.umd.js",
"type": "module",
"exports": {
"script": "./dist/ast-monkey-traverse.umd.js",
"default": "./dist/ast-monkey-traverse.esm.js"
},
"types": "types/index.d.ts",

@@ -63,3 +65,3 @@ "scripts": {

"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
"unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
"clean_cov": "../../scripts/leaveCoverageTotalOnly.js",

@@ -69,2 +71,3 @@ "clean_types": "../../scripts/cleanTypes.js"

"tap": {
"check-coverage": false,
"coverage-report": [

@@ -74,5 +77,6 @@ "json-summary",

],
"nyc-arg": [
"--exclude=**/*.cjs.js",
"--exclude=**/*.umd.js"
"node-arg": [
"--no-warnings",
"--experimental-loader",
"@istanbuljs/esm-loader-hook"
],

@@ -97,4 +101,4 @@ "timeout": 0

"dependencies": {
"@babel/runtime": "^7.14.0",
"ast-monkey-util": "^1.4.0",
"@babel/runtime": "^7.15.4",
"ast-monkey-util": "^2.0.0",
"lodash.clonedeep": "^4.5.0",

@@ -104,42 +108,46 @@ "lodash.isplainobject": "^4.0.6"

"devDependencies": {
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/node": "^7.14.2",
"@babel/plugin-external-helpers": "^7.12.13",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-object-rest-spread": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@babel/preset-typescript": "^7.13.0",
"@babel/register": "^7.13.16",
"@babel/cli": "^7.15.4",
"@babel/core": "^7.15.5",
"@babel/node": "^7.15.4",
"@babel/plugin-external-helpers": "^7.14.5",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.15.6",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-typescript": "^7.15.0",
"@babel/register": "^7.15.3",
"@istanbuljs/esm-loader-hook": "^0.1.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-strip": "^2.0.1",
"@rollup/plugin-typescript": "^8.2.1",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-strip": "^2.1.0",
"@rollup/plugin-typescript": "^8.2.5",
"@types/lodash.clonedeep": "^4.5.6",
"@types/lodash.isplainobject": "^4.0.6",
"@types/node": "^15.6.0",
"@types/tap": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^4.24.0",
"@typescript-eslint/parser": "^4.24.0",
"core-js": "^3.12.1",
"@types/node": "^16.9.1",
"@types/tap": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"core-js": "^3.17.3",
"cross-env": "^7.0.3",
"eslint": "^7.27.0",
"lect": "^0.17.0",
"eslint": "^7.32.0",
"lect": "^0.18.0",
"lodash.isequal": "^4.5.0",
"object-path": "^0.11.5",
"rollup": "^2.49.0",
"object-path": "^0.11.7",
"rollup": "^2.56.3",
"rollup-plugin-ascii": "^0.0.3",
"rollup-plugin-banner": "^0.2.1",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^3.0.1",
"rollup-plugin-dts": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"tap": "^14.11.0",
"tslib": "^2.2.0",
"typescript": "^4.2.4"
"tap": "^15.0.9",
"tslib": "^2.3.1",
"typescript": "^4.4.2"
},
"engines": {
"node": ">=12"
}
}
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