ast-monkey-traverse 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 3.0.3 (2021-11-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
11
+
12
+ ### Features
13
+
14
+ - migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ - programs now are in ES Modules and won't work with Common JS require()
19
+
6
20
  ## 3.0.1 (2021-09-13)
7
21
 
8
22
  ### Bug Fixes
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name ast-monkey-traverse
3
3
  * @fileoverview Utility library to traverse AST
4
- * @version 3.0.2
4
+ * @version 3.0.3
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-monkey-traverse/}
@@ -11,7 +11,7 @@ import clone from 'lodash.clonedeep';
11
11
  import isObj from 'lodash.isplainobject';
12
12
  import { parent } from 'ast-monkey-util';
13
13
 
14
- var version$1 = "3.0.2";
14
+ var version$1 = "3.0.3";
15
15
 
16
16
  const version = version$1;
17
17
  function traverse(tree1, cb1) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name ast-monkey-traverse
3
3
  * @fileoverview Utility library to traverse AST
4
- * @version 3.0.2
4
+ * @version 3.0.3
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-monkey-traverse/}
@@ -11,8 +11,8 @@
11
11
  /**
12
12
  * @name ast-monkey-util
13
13
  * @fileoverview Utility library of AST helper functions
14
- * @version 2.0.2
14
+ * @version 2.0.3
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/ast-monkey-util/}
18
- */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.2",Object.defineProperty(t,"__esModule",{value:!0})}));
18
+ */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.3",Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ast-monkey-traverse",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Utility library to traverse AST",
5
5
  "keywords": [
6
6
  "ast",
@@ -45,11 +45,13 @@
45
45
  "types": "types/index.d.ts",
46
46
  "scripts": {
47
47
  "build": "rollup -c",
48
- "esbuild": "node '../../scripts/esbuild.js'",
49
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
50
48
  "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
49
+ "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
50
+ "clean_types": "../../scripts/cleanTypes.js",
51
51
  "dev": "rollup -c --dev",
52
52
  "devunittest": "npm run dev && tap --only -R 'base'",
53
+ "esbuild": "node '../../scripts/esbuild.js'",
54
+ "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
53
55
  "format": "npm run lect && npm run prettier && npm run lint",
54
56
  "lect": "lect",
55
57
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -57,13 +59,11 @@
57
59
  "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
58
60
  "republish": "npm publish || :",
59
61
  "tap": "tap",
60
- "tsc": "tsc",
61
62
  "pretest": "npm run build",
62
63
  "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
63
64
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
64
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
65
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
66
- "clean_types": "../../scripts/cleanTypes.js"
65
+ "tsc": "tsc",
66
+ "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
67
67
  },
68
68
  "tap": {
69
69
  "check-coverage": false,
@@ -94,52 +94,52 @@
94
94
  }
95
95
  },
96
96
  "dependencies": {
97
- "@babel/runtime": "^7.15.4",
98
- "ast-monkey-util": "^2.0.2",
97
+ "@babel/runtime": "^7.16.0",
98
+ "ast-monkey-util": "^2.0.3",
99
99
  "lodash.clonedeep": "^4.5.0",
100
100
  "lodash.isplainobject": "^4.0.6"
101
101
  },
102
102
  "devDependencies": {
103
- "@babel/cli": "^7.15.4",
104
- "@babel/core": "^7.15.5",
105
- "@babel/node": "^7.15.4",
106
- "@babel/plugin-external-helpers": "^7.14.5",
107
- "@babel/plugin-proposal-class-properties": "^7.14.5",
108
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
109
- "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
110
- "@babel/plugin-proposal-optional-chaining": "^7.14.5",
111
- "@babel/plugin-transform-runtime": "^7.15.0",
112
- "@babel/preset-env": "^7.15.6",
113
- "@babel/preset-typescript": "^7.15.0",
114
- "@babel/register": "^7.15.3",
103
+ "@babel/cli": "^7.16.0",
104
+ "@babel/core": "^7.16.0",
105
+ "@babel/node": "^7.16.0",
106
+ "@babel/plugin-external-helpers": "^7.16.0",
107
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
108
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
109
+ "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
110
+ "@babel/plugin-proposal-optional-chaining": "^7.16.0",
111
+ "@babel/plugin-transform-runtime": "^7.16.0",
112
+ "@babel/preset-env": "^7.16.0",
113
+ "@babel/preset-typescript": "^7.16.0",
114
+ "@babel/register": "^7.16.0",
115
115
  "@istanbuljs/esm-loader-hook": "^0.1.2",
116
116
  "@rollup/plugin-babel": "^5.3.0",
117
- "@rollup/plugin-commonjs": "^20.0.0",
117
+ "@rollup/plugin-commonjs": "^21.0.1",
118
118
  "@rollup/plugin-json": "^4.1.0",
119
- "@rollup/plugin-node-resolve": "^13.0.4",
119
+ "@rollup/plugin-node-resolve": "^13.0.6",
120
120
  "@rollup/plugin-strip": "^2.1.0",
121
- "@rollup/plugin-typescript": "^8.2.5",
121
+ "@rollup/plugin-typescript": "^8.3.0",
122
122
  "@types/lodash.clonedeep": "^4.5.6",
123
123
  "@types/lodash.isplainobject": "^4.0.6",
124
- "@types/node": "^16.9.1",
124
+ "@types/node": "^16.11.6",
125
125
  "@types/tap": "^15.0.5",
126
- "@typescript-eslint/eslint-plugin": "^4.31.0",
127
- "@typescript-eslint/parser": "^4.31.0",
128
- "core-js": "^3.17.3",
126
+ "@typescript-eslint/eslint-plugin": "^5.2.0",
127
+ "@typescript-eslint/parser": "^5.2.0",
128
+ "core-js": "^3.19.0",
129
129
  "cross-env": "^7.0.3",
130
- "eslint": "^7.32.0",
131
- "lect": "^0.18.2",
130
+ "eslint": "^8.1.0",
131
+ "lect": "^0.18.3",
132
132
  "lodash.isequal": "^4.5.0",
133
- "object-path": "^0.11.7",
134
- "rollup": "^2.56.3",
133
+ "object-path": "^0.11.8",
134
+ "rollup": "^2.59.0",
135
135
  "rollup-plugin-ascii": "^0.0.3",
136
136
  "rollup-plugin-banner": "^0.2.1",
137
137
  "rollup-plugin-cleanup": "^3.2.1",
138
138
  "rollup-plugin-dts": "^4.0.0",
139
139
  "rollup-plugin-terser": "^7.0.2",
140
- "tap": "^15.0.9",
140
+ "tap": "^15.0.10",
141
141
  "tslib": "^2.3.1",
142
- "typescript": "^4.4.3"
142
+ "typescript": "^4.4.4"
143
143
  },
144
144
  "engines": {
145
145
  "node": ">=12"