@swc/core 1.3.41 → 1.3.44
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.md +122 -0
- package/package.json +11 -11
- package/spack.d.ts +1 -0
- package/spack.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,128 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(css/codegen)** Preserve `raw` of numbers (#7131) ([150c2b6](https://github.com/swc-project/swc/commit/150c2b6fbaef976c6ee97438d1b9b7ffe4b210be))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(css/compat)** Remove usage of `box_syntax` (#7153) ([6f0bf66](https://github.com/swc-project/swc/commit/6f0bf665c29abaa64c60fb43053f96e465d3e041))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/compat)** Handle import/export in `reserved_word` (#7165) ([065d11c](https://github.com/swc-project/swc/commit/065d11cb9bd49f36825b3b707e4e9ecfcc64e17b))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/compat)** Fix the position for temp var injection (#7171) ([23fb8c5](https://github.com/swc-project/swc/commit/23fb8c5563a8e5f79d256bb27bdbdfd56944ccbc))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/react)** Respect `import_source` in new jsx (#7128) ([5d7acfd](https://github.com/swc-project/swc/commit/5d7acfd9cbbb9780879d0d7a046f716572a477f7))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/renamer)** Don't use symbols used by declarations if `eval` exists (#7116) ([6d9763e](https://github.com/swc-project/swc/commit/6d9763e8c0f5cef7689961e7eb11dc7199e8cd08))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(es/visit)** Fix handling of `Program` of `AndThen` (#7120) ([d50689e](https://github.com/swc-project/swc/commit/d50689eab0e82a68c84fcacdd8ce5c9009a65100))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(fast-graph)** Use fxhash instead of ahash to make iteration order consistent (#7133) ([b13eb4c](https://github.com/swc-project/swc/commit/b13eb4c81192a57a7e69b10a2d4530ccd91150f8))
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(es)** Fix doc url (#7123) ([1e4abcb](https://github.com/swc-project/swc/commit/1e4abcb11d4c5884cc6559db8e86ecd7fbd96e5d))
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(css/parser)** Add `legacy_ie` to the `ParserConfig` (#7109) ([5e58b3e](https://github.com/swc-project/swc/commit/5e58b3e5f6dfe6a7ede97c3e8a2f7436db964113))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- **(es/react)** Support script within automatic runtime (#7126) ([05a2815](https://github.com/swc-project/swc/commit/05a2815e6ceb6d12e122be4e4ef84281d398f8c2))
|
|
45
|
+
|
|
46
|
+
### Miscellaneous Tasks
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
- **(cargo)** Refactor `Cargo.toml` to reduce merge conflict (#7139) ([2826198](https://github.com/swc-project/swc/commit/28261985b00c23fd1411a8f782c04439d4e4919c))
|
|
51
|
+
|
|
52
|
+
### Refactor
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
- **(ast)** Make serde optional (#7138) ([30bc086](https://github.com/swc-project/swc/commit/30bc0860526c0983042c60a039a1f5acee47830c))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
- **(es)** Remove needless build scripts to reduce compile time (#7129) ([dfe1a3f](https://github.com/swc-project/swc/commit/dfe1a3f4964ba58fdd676c184fdff0919fa78b26))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
- **(es/codegen)** Extract code from generic functions to reduce compile time (#7127) ([08fa94f](https://github.com/swc-project/swc/commit/08fa94fc737c2c3522227c1275e4a1d93c2a8611))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
- **(es/parser)** Remove `EnumKind` to reduce compile time (#7137) ([915f747](https://github.com/swc-project/swc/commit/915f747cb7ba972e47e249b5a5ba9573dd68f607))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
- **(macros)** Reduce compile time (#7132) ([2154a3f](https://github.com/swc-project/swc/commit/2154a3f117d9ea7cc2f12856d6e7f2b33a255d26))
|
|
69
|
+
|
|
70
|
+
### Build
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
- **(cargo)** Update `rustc` to `nightly-2023-03-28` (#7154) ([e445502](https://github.com/swc-project/swc/commit/e445502072d8ebfcbe0da0cb59f3d6a85d4a2087))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
- **(cargo)** Revert rustc upgrade (#7162) ([12546c8](https://github.com/swc-project/swc/commit/12546c853a67210e840efd61452041ef8db00d3a))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
- **(cargo)** Update `rustc` to `nightly-2023-03-20` (#7170) ([0259a74](https://github.com/swc-project/swc/commit/0259a7465fc5122cf2f297f962f7f0209f619251))
|
|
81
|
+
|
|
82
|
+
## [1.3.42] - 2023-03-22
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
- **(bindings/node)** Fix loading of `spack.config.js` (#7105) ([a4d1af1](https://github.com/swc-project/swc/commit/a4d1af18deabe79caa959eb654ca1ebc2d9f6867))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
- **(es/ast)** Fix `EqIgnoreSpan` impl of `Number` (#7112) ([6a570a3](https://github.com/swc-project/swc/commit/6a570a334c787358d67ae6c590a7fd0e916f35e8))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
- **(es/compat)** Don't modify private fields from `reserved_words` pass (#7113) ([2bc631d](https://github.com/swc-project/swc/commit/2bc631df8792d2f1356b5ef2dbf3ee0c46ecbd4f))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
- **(es/minifier)** Pass `keep_*` in config to `compress` and `mangle` (#7102) ([6a1201c](https://github.com/swc-project/swc/commit/6a1201cfc44fe5ae3d8599669fd8032c82e6c580))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
- **(es/minifier)** Don't inline into arrow heads (#7099) ([610e1bb](https://github.com/swc-project/swc/commit/610e1bb581a04fe9b871dd7afa0cf81ab9ee7fa8))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
- **(es/parser)** Fix parsing of static accessors (#7108) ([dd2b16d](https://github.com/swc-project/swc/commit/dd2b16db9ec77e515dcd38f68f8020d70d0f9ac9))
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
- **(es/resolver)** Make scope context identical to the vars (#7095) ([0f09e35](https://github.com/swc-project/swc/commit/0f09e356c38268ac10223d0d44dd253949bcbc59))- **general**: Feat(css/minifier) Follow the CSS spec more rigorously (#6291)
|
|
110
|
+
|
|
111
|
+
**Description:**
|
|
112
|
+
|
|
113
|
+
Full refactor of the "calc" simplification to be more compliant with the spec. ([df09d2f](https://github.com/swc-project/swc/commit/df09d2fd4bef3ab83efbe46f8e3d42d26bbae95d))
|
|
114
|
+
|
|
115
|
+
### Refactor
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
- **(es/fixer)** Move comments with the insertion order (#7097) ([f250f24](https://github.com/swc-project/swc/commit/f250f243cba49b9cdcdc920d37c92662c14941bc))
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
- **(es/resolver)** Make syntax context for unresolved and top-level stable (#7096) ([c114f00](https://github.com/swc-project/swc/commit/c114f006b4ea388ef9a4503e935d59e92a647ecf))
|
|
123
|
+
|
|
124
|
+
## [1.3.41] - 2023-03-17
|
|
125
|
+
|
|
126
|
+
### Bug Fixes
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
8
130
|
- **(bindings/cli)** Change order of checking inputs to workaround a Windows issue (#7077) ([7bbec92](https://github.com/swc-project/swc/commit/7bbec92d234ddb47b51a014937d1ec7c1cb571c7))
|
|
9
131
|
|
|
10
132
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.44",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -138,16 +138,16 @@
|
|
|
138
138
|
"url": "https://opencollective.com/swc"
|
|
139
139
|
},
|
|
140
140
|
"optionalDependencies": {
|
|
141
|
-
"@swc/core-win32-x64-msvc": "1.3.
|
|
142
|
-
"@swc/core-darwin-x64": "1.3.
|
|
143
|
-
"@swc/core-linux-x64-gnu": "1.3.
|
|
144
|
-
"@swc/core-linux-x64-musl": "1.3.
|
|
145
|
-
"@swc/core-win32-ia32-msvc": "1.3.
|
|
146
|
-
"@swc/core-linux-arm64-gnu": "1.3.
|
|
147
|
-
"@swc/core-linux-arm-gnueabihf": "1.3.
|
|
148
|
-
"@swc/core-darwin-arm64": "1.3.
|
|
149
|
-
"@swc/core-linux-arm64-musl": "1.3.
|
|
150
|
-
"@swc/core-win32-arm64-msvc": "1.3.
|
|
141
|
+
"@swc/core-win32-x64-msvc": "1.3.44",
|
|
142
|
+
"@swc/core-darwin-x64": "1.3.44",
|
|
143
|
+
"@swc/core-linux-x64-gnu": "1.3.44",
|
|
144
|
+
"@swc/core-linux-x64-musl": "1.3.44",
|
|
145
|
+
"@swc/core-win32-ia32-msvc": "1.3.44",
|
|
146
|
+
"@swc/core-linux-arm64-gnu": "1.3.44",
|
|
147
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.44",
|
|
148
|
+
"@swc/core-darwin-arm64": "1.3.44",
|
|
149
|
+
"@swc/core-linux-arm64-musl": "1.3.44",
|
|
150
|
+
"@swc/core-win32-arm64-msvc": "1.3.44"
|
|
151
151
|
},
|
|
152
152
|
"files": [
|
|
153
153
|
"CHANGELOG.md",
|
package/spack.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Options } from "./types";
|
|
2
2
|
export type BundleInput = BundleOptions | BundleOptions[];
|
|
3
|
+
export declare const isLocalFile: RegExp;
|
|
3
4
|
export declare function compileBundleOptions(config: BundleInput | string | undefined): Promise<BundleInput>;
|
|
4
5
|
/**
|
|
5
6
|
* Usage: In `spack.config.js` / `spack.config.ts`, you can utilize type annotations (to get autocompletions) like
|
package/spack.js
CHANGED
|
@@ -32,14 +32,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.config = exports.compileBundleOptions = void 0;
|
|
35
|
+
exports.config = exports.compileBundleOptions = exports.isLocalFile = void 0;
|
|
36
36
|
const path = __importStar(require("path"));
|
|
37
|
+
exports.isLocalFile = /^\.{0,2}\//; // starts with '/' './' '../'
|
|
37
38
|
function compileBundleOptions(config) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
40
|
const f = config === undefined ? '.' : config;
|
|
40
41
|
try {
|
|
41
|
-
const
|
|
42
|
-
|
|
42
|
+
const filepath = typeof f === 'string' ? f : 'spack.config.js';
|
|
43
|
+
const fileModule = exports.isLocalFile.test(filepath) ? path.resolve(filepath) : filepath;
|
|
44
|
+
let configFromFile = require(fileModule);
|
|
43
45
|
if (configFromFile.default) {
|
|
44
46
|
configFromFile = configFromFile.default;
|
|
45
47
|
}
|