@swc/core 1.2.111 → 1.2.115
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/crates/{swc_babel_ast → swc_estree_ast}/README.md +0 -0
- package/crates/{swc_babel_compat → swc_estree_compat}/README.md +0 -0
- package/cspell.json +7 -1
- package/package.json +16 -14
- package/crates/swc_babel_visit/README.md +0 -24
- package/crates/swc_ecma_preset_env/package.json +0 -8
- package/crates/swc_ecma_preset_env/src/query.js +0 -27
|
File without changes
|
|
File without changes
|
package/cspell.json
CHANGED
|
@@ -41,13 +41,17 @@
|
|
|
41
41
|
"deps",
|
|
42
42
|
"Deque",
|
|
43
43
|
"Deser",
|
|
44
|
+
"deserialization",
|
|
45
|
+
"docsrs",
|
|
44
46
|
"dont",
|
|
45
47
|
"DWORD",
|
|
48
|
+
"ecma",
|
|
46
49
|
"ecmascript",
|
|
47
50
|
"eddyb",
|
|
48
51
|
"elems",
|
|
49
52
|
"esbuild",
|
|
50
53
|
"esms",
|
|
54
|
+
"estree",
|
|
51
55
|
"eval",
|
|
52
56
|
"Eval",
|
|
53
57
|
"exponentation",
|
|
@@ -125,5 +129,7 @@
|
|
|
125
129
|
"unimpl",
|
|
126
130
|
"untrusted"
|
|
127
131
|
],
|
|
128
|
-
"flagWords": [
|
|
132
|
+
"flagWords": [
|
|
133
|
+
"actally"
|
|
134
|
+
]
|
|
129
135
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.115",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -50,18 +50,18 @@
|
|
|
50
50
|
"@node-rs/helper": "^1.0.0"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"@swc/core-win32-x64-msvc": "^1.2.
|
|
54
|
-
"@swc/core-darwin-x64": "^1.2.
|
|
55
|
-
"@swc/core-linux-x64-gnu": "^1.2.
|
|
56
|
-
"@swc/core-linux-x64-musl": "^1.2.
|
|
57
|
-
"@swc/core-freebsd-x64": "^1.2.
|
|
58
|
-
"@swc/core-win32-ia32-msvc": "^1.2.
|
|
59
|
-
"@swc/core-linux-arm64-gnu": "^1.2.
|
|
60
|
-
"@swc/core-linux-arm-gnueabihf": "^1.2.
|
|
61
|
-
"@swc/core-darwin-arm64": "^1.2.
|
|
62
|
-
"@swc/core-android-arm64": "^1.2.
|
|
63
|
-
"@swc/core-linux-arm64-musl": "^1.2.
|
|
64
|
-
"@swc/core-win32-arm64-msvc": "^1.2.
|
|
53
|
+
"@swc/core-win32-x64-msvc": "^1.2.115",
|
|
54
|
+
"@swc/core-darwin-x64": "^1.2.115",
|
|
55
|
+
"@swc/core-linux-x64-gnu": "^1.2.115",
|
|
56
|
+
"@swc/core-linux-x64-musl": "^1.2.115",
|
|
57
|
+
"@swc/core-freebsd-x64": "^1.2.115",
|
|
58
|
+
"@swc/core-win32-ia32-msvc": "^1.2.115",
|
|
59
|
+
"@swc/core-linux-arm64-gnu": "^1.2.115",
|
|
60
|
+
"@swc/core-linux-arm-gnueabihf": "^1.2.115",
|
|
61
|
+
"@swc/core-darwin-arm64": "^1.2.115",
|
|
62
|
+
"@swc/core-android-arm64": "^1.2.115",
|
|
63
|
+
"@swc/core-linux-arm64-musl": "^1.2.115",
|
|
64
|
+
"@swc/core-win32-arm64-msvc": "^1.2.115"
|
|
65
65
|
},
|
|
66
66
|
"types": "./index.d.ts",
|
|
67
67
|
"scripts": {
|
|
@@ -87,9 +87,11 @@
|
|
|
87
87
|
"@swc/helpers": "^0.2.10",
|
|
88
88
|
"@types/jest": "^26.0.23",
|
|
89
89
|
"@types/node": "^14.14.41",
|
|
90
|
+
"acorn": "^8.6.0",
|
|
91
|
+
"acorn-jsx": "^5.3.2",
|
|
90
92
|
"axios": "^0.21.1",
|
|
91
93
|
"babel-plugin-transform-node-env-inline": "^0.4.3",
|
|
92
|
-
"
|
|
94
|
+
"benchmark": "^2.1.4",
|
|
93
95
|
"class-validator": "^0.13.1",
|
|
94
96
|
"core-js": "^2.6.11",
|
|
95
97
|
"cross-env": "^7.0.3",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Visitor pattern implementation for Babel AST.
|
|
2
|
-
|
|
3
|
-
### Example
|
|
4
|
-
|
|
5
|
-
```rust
|
|
6
|
-
// Visit all Identifier nodes in the Babel AST and change the optional field to
|
|
7
|
-
// Some(true) for each of them.
|
|
8
|
-
|
|
9
|
-
use swc_babel_visit::{VisitMut, VisitMutWith};
|
|
10
|
-
use swc_babel_ast::{Identifier, File};
|
|
11
|
-
|
|
12
|
-
struct Visitor;
|
|
13
|
-
|
|
14
|
-
impl VisitMut for Visitor {
|
|
15
|
-
fn visit_mut_identifier(&mut self, node: &mut Identifier) {
|
|
16
|
-
node.optional = Some(true);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let ast: File = get_babel_ast();
|
|
21
|
-
let mut v = Visitor {};
|
|
22
|
-
ast.visit_mut_with(&mut v);
|
|
23
|
-
```
|
|
24
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var browserslist;
|
|
4
|
-
try{
|
|
5
|
-
browserslist = require('browserslist');
|
|
6
|
-
} catch (e){
|
|
7
|
-
console.error('swc: You have to install `browserslist` to use `env`');
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var target = JSON.parse(process.argv[1]);
|
|
13
|
-
target = target.browsers ? target.browsers : target;
|
|
14
|
-
target = Array.isArray(target) ? target : typeof target === 'string' ? [target] : Object.keys(target).map(function (k) {
|
|
15
|
-
return k + " " + target[k];
|
|
16
|
-
});
|
|
17
|
-
target = target.filter(function (v) {
|
|
18
|
-
return !v.startsWith('esmodules') && !!v;
|
|
19
|
-
}); // console.log('Target: ', target);
|
|
20
|
-
|
|
21
|
-
var browsers = browserslist(target && target.length ? target : undefined, {
|
|
22
|
-
mobileToDesktop: true
|
|
23
|
-
});
|
|
24
|
-
browsers = browsers.filter(function (v) {
|
|
25
|
-
return !v.includes("TP");
|
|
26
|
-
});
|
|
27
|
-
console.log(JSON.stringify(browsers));
|