goldstein 6.0.2 → 6.1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goldstein",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "JavaScript with no limits",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@putout/plugin-declare": "^5.0.0",
|
|
31
31
|
"@putout/plugin-logical-expressions": "^7.0.0",
|
|
32
32
|
"@putout/plugin-try-catch": "^6.0.0",
|
|
33
|
-
"@putout/printer": "^
|
|
33
|
+
"@putout/printer": "^15.0.0",
|
|
34
34
|
"acorn": "^8.7.1",
|
|
35
35
|
"acorn-typescript": "^1.4.13",
|
|
36
36
|
"estree-to-babel": "^11.0.2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {types} from 'putout';
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
variableDeclaration,
|
|
5
|
+
variableDeclarator,
|
|
6
6
|
} = types;
|
|
7
7
|
|
|
8
8
|
export const report = () => `Use 'add-array'`;
|
|
@@ -10,8 +10,8 @@ export const replace = () => ({
|
|
|
10
10
|
'{let __a = __b; if (__c) __d}': ({__a, __b}, path) => {
|
|
11
11
|
const ifPath = path.get('body.1');
|
|
12
12
|
|
|
13
|
-
ifPath.node.test =
|
|
14
|
-
|
|
13
|
+
ifPath.node.test = variableDeclaration('let', [
|
|
14
|
+
variableDeclarator(__a, __b),
|
|
15
15
|
]);
|
|
16
16
|
|
|
17
17
|
return ifPath;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {types} from 'putout';
|
|
2
2
|
import {tokTypes as tt} from '../operator/index.js';
|
|
3
3
|
|
|
4
|
-
const {
|
|
4
|
+
const {identifier} = types;
|
|
5
5
|
|
|
6
6
|
export default function keywordCurry(Parser) {
|
|
7
7
|
return class extends Parser {
|
|
@@ -21,7 +21,7 @@ export default function keywordCurry(Parser) {
|
|
|
21
21
|
if (!isParenL)
|
|
22
22
|
this.raise(this.start, `After '~' should always go '(' when you use curry`);
|
|
23
23
|
|
|
24
|
-
node.callee =
|
|
24
|
+
node.callee = identifier('currify');
|
|
25
25
|
node.arguments = [base, this.parseExpression()];
|
|
26
26
|
|
|
27
27
|
this.expect(tt.parenR);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {types} from 'putout';
|
|
2
2
|
import {tokTypes as tt} from '../operator/index.js';
|
|
3
3
|
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
VariableDeclarator,
|
|
7
|
-
} = types;
|
|
4
|
+
const {variableDeclarator} = types;
|
|
5
|
+
const {variableDeclaration} = types;
|
|
8
6
|
|
|
9
7
|
export default function keywordExportNoConst(Parser) {
|
|
10
8
|
return class extends Parser {
|
|
@@ -42,8 +40,8 @@ export default function keywordExportNoConst(Parser) {
|
|
|
42
40
|
this.checkVariableExport(exports, node.declaration.declarations);
|
|
43
41
|
|
|
44
42
|
if (node.declaration.type === 'ExpressionStatement')
|
|
45
|
-
node.declaration =
|
|
46
|
-
|
|
43
|
+
node.declaration = variableDeclaration('const', [
|
|
44
|
+
variableDeclarator(node.declaration.expression.left, node.declaration.expression.right),
|
|
47
45
|
]);
|
|
48
46
|
else if (node.declaration.id)
|
|
49
47
|
this.checkExport(exports, node.declaration.id, node.declaration.id.start);
|