goldstein 4.6.0 → 4.7.0

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 CHANGED
@@ -1,3 +1,9 @@
1
+ 2023.10.04, v4.7.0
2
+
3
+ feature:
4
+ - 136f4a9 goldstein: convert: rm useless import of try-catch
5
+ - fcb8679 package: estree-to-babel v8.0.0
6
+
1
7
  2023.10.03, v4.6.0
2
8
 
3
9
  feature:
package/README.md CHANGED
@@ -164,6 +164,7 @@ parse(`
164
164
  ```
165
165
 
166
166
  You can parse to **ESTree**:
167
+
167
168
  ```
168
169
  const options = {
169
170
  type: 'estree',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goldstein",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "JavaScript with no limits",
@@ -36,13 +36,14 @@
36
36
  "acorn": "^8.7.1",
37
37
  "esbuild": "^0.19.2",
38
38
  "esbuild-node-builtins": "^0.1.0",
39
- "estree-to-babel": "^7.0.0",
39
+ "estree-to-babel": "^8.0.0",
40
40
  "putout": "^32.0.1",
41
41
  "try-catch": "^3.0.1"
42
42
  },
43
43
  "license": "MIT",
44
44
  "devDependencies": {
45
45
  "@cloudcmd/stub": "^4.0.1",
46
+ "@putout/test": "^7.1.0",
46
47
  "c8": "^8.0.0",
47
48
  "check-dts": "^0.7.1",
48
49
  "escover": "^3.4.0",
@@ -1,6 +1,7 @@
1
1
  import estreeToBabel from 'estree-to-babel';
2
2
  import {transform} from 'putout';
3
3
  import {print} from '../printer/index.js';
4
+ import * as removeImportTry from './remove-import-try/index.js';
4
5
  import * as applyTry from './apply-try/index.js';
5
6
  import {
6
7
  fixEmpty,
@@ -13,6 +14,7 @@ export const convert = (source) => {
13
14
  transform(ast, source, {
14
15
  plugins: [
15
16
  ['apply-try', applyTry],
17
+ ['remove-import-try', removeImportTry],
16
18
  ],
17
19
  });
18
20
 
@@ -0,0 +1,7 @@
1
+ export const report = () => `Remove import of 'tryCatch/tryToCatch'`;
2
+ export const replace = () => ({
3
+ 'import tryCatch from "try-catch"': '',
4
+ 'import tryToCatch from "try-to-catch"': '',
5
+ 'const tryCatch = require("try-catch")': '',
6
+ 'const tryToCatch = require("try-to-catch")': '',
7
+ });