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
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goldstein",
|
|
3
|
-
"version": "4.
|
|
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": "^
|
|
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
|
+
});
|