goldstein 3.3.2 → 4.0.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 +10 -0
- package/README.md +2 -2
- package/bin/gs.js +1 -1
- package/package.json +3 -3
- package/packages/goldstein/index.js +3 -3
package/ChangeLog
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
2023.08.28, v4.0.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 37f9e82 goldstein: async
|
|
5
|
+
- 901a4fa rules: convert-t-raise-to-raise
|
|
6
|
+
- cb5d441 rules: add convert-t-raise-to-raise
|
|
7
|
+
- 86c5230 rules: add
|
|
8
|
+
- 8a8dd67 package: esbuild v0.19.2
|
|
9
|
+
- 8501a14 package: @putout/printer v3.6.0
|
|
10
|
+
|
|
1
11
|
2023.08.09, v3.3.2
|
|
2
12
|
|
|
3
13
|
fix:
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ When you need to compile **Goldstein** to **JavaScript** use:
|
|
|
78
78
|
```js
|
|
79
79
|
import {compile} from 'goldstein';
|
|
80
80
|
|
|
81
|
-
compile(`
|
|
81
|
+
await compile(`
|
|
82
82
|
fn hello() {
|
|
83
83
|
guard text !== "world" else {
|
|
84
84
|
return ""
|
|
@@ -117,7 +117,7 @@ const source = `
|
|
|
117
117
|
|
|
118
118
|
const {keywordFn} = keywords;
|
|
119
119
|
|
|
120
|
-
compile(source, {
|
|
120
|
+
await compile(source, {
|
|
121
121
|
keywords: [
|
|
122
122
|
keywordFn,
|
|
123
123
|
function id(Parser) {
|
package/bin/gs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goldstein",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "JavaScript with no limits",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"wisdom": "madrun wisdom"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@putout/printer": "^
|
|
32
|
+
"@putout/printer": "^3.6.0",
|
|
33
33
|
"acorn": "^8.7.1",
|
|
34
|
-
"esbuild": "^0.
|
|
34
|
+
"esbuild": "^0.19.2",
|
|
35
35
|
"esbuild-node-builtins": "^0.1.0",
|
|
36
36
|
"estree-to-babel": "^6.0.0",
|
|
37
37
|
"putout": "^31.0.3",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {transformAsync} from 'putout';
|
|
2
2
|
import {print} from '@putout/printer';
|
|
3
3
|
import {parse} from './parser.js';
|
|
4
4
|
import estreeToBabel from 'estree-to-babel';
|
|
5
5
|
|
|
6
6
|
export * from './parser.js';
|
|
7
|
-
export const compile = (source, options = {}) => {
|
|
7
|
+
export const compile = async (source, options = {}) => {
|
|
8
8
|
const ast = estreeToBabel(parse(source, options));
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
await transformAsync(ast, source, {
|
|
11
11
|
rules: {
|
|
12
12
|
...options.rules,
|
|
13
13
|
},
|