@swc/core 1.2.152 → 1.2.153

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/package.json +14 -14
  3. package/types.d.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,47 @@
5
5
 
6
6
 
7
7
 
8
+ - **(api/rust)** Fix transform comment api (#3962) ([fcbd3c5](https://github.com/swc-project/swc/commit/fcbd3c5c5849418b911d87d3a0b36eb84bef1a68))
9
+
10
+
11
+ - **(es)** Adjust tracing span level (#3911) ([ca071fb](https://github.com/swc-project/swc/commit/ca071fb705210ec33698dbce81069156de4fcf7a))
12
+
13
+
14
+ - **(es/codegen)** Fix sourcemap issue caused by reserved `BytePos` values (#3948) ([e8018c5](https://github.com/swc-project/swc/commit/e8018c54d4581c43c72d27e51d0aa36a64881a9e))
15
+
16
+
17
+ - **(es/compat)** Refer this in constructor when `super_is_callable_constructor` is set (#3944) ([de8a711](https://github.com/swc-project/swc/commit/de8a7116cd587a6ddb8d734ffd96cdacd076f48c))
18
+
19
+
20
+ - **(es/lints)** Don't visit types while collecting `const` (#3967) ([c6b5371](https://github.com/swc-project/swc/commit/c6b5371c51413577165543eddb78e7d051f3d376))
21
+
22
+
23
+ - **(es/minifier)** Preserve fuction parameters used for template literals in `evaluate` and `reduce_vars` (#3949) ([91a302a](https://github.com/swc-project/swc/commit/91a302a672a70a34fe693fa84d65ba87901d0f36))
24
+
25
+
26
+ - **(es/parser)** Parse if-else chain iteratively (#3961) ([76e6468](https://github.com/swc-project/swc/commit/76e646804a025e2a451314013a437e79a6cd8ce2))
27
+
28
+
29
+ - **(node-swc/types)** Add `reserved` to `TerserMangleOptions` (#3959) ([70a68a7](https://github.com/swc-project/swc/commit/70a68a785091845c5e66ab3fe0fd52cc47f11a80))
30
+
31
+ ### Features
32
+
33
+
34
+
35
+ - **(css/codegen)** Support source map (#3958) ([5a6ebd3](https://github.com/swc-project/swc/commit/5a6ebd36ee7a35e81e4f3b0961106a41f83f6b7f))
36
+
37
+
38
+ - **(es)** Add an option to preserve all comments (#3815) ([c5a0c9a](https://github.com/swc-project/swc/commit/c5a0c9a0ab2345aa9c41a40100d049a144dfb70f))
39
+
40
+
41
+ - **(es/lints)** Refine error message (#3952) ([579aeb7](https://github.com/swc-project/swc/commit/579aeb7cfacb38d822634e5c82b209bd311ac9b2))
42
+
43
+ ## [1.2.152] - 2022-03-10
44
+
45
+ ### Bug Fixes
46
+
47
+
48
+
8
49
  - **(es)** Don't create `.swc` if not required (#3937) ([46e9d3f](https://github.com/swc-project/swc/commit/46e9d3f62e07b5aaeac9a9f73bb4b5573ad69b27))
9
50
 
10
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.152",
3
+ "version": "1.2.153",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -107,18 +107,18 @@
107
107
  "url": "https://opencollective.com/swc"
108
108
  },
109
109
  "optionalDependencies": {
110
- "@swc/core-win32-x64-msvc": "1.2.152",
111
- "@swc/core-darwin-x64": "1.2.152",
112
- "@swc/core-linux-x64-gnu": "1.2.152",
113
- "@swc/core-linux-x64-musl": "1.2.152",
114
- "@swc/core-freebsd-x64": "1.2.152",
115
- "@swc/core-win32-ia32-msvc": "1.2.152",
116
- "@swc/core-linux-arm64-gnu": "1.2.152",
117
- "@swc/core-linux-arm-gnueabihf": "1.2.152",
118
- "@swc/core-darwin-arm64": "1.2.152",
119
- "@swc/core-android-arm64": "1.2.152",
120
- "@swc/core-linux-arm64-musl": "1.2.152",
121
- "@swc/core-win32-arm64-msvc": "1.2.152",
122
- "@swc/core-android-arm-eabi": "1.2.152"
110
+ "@swc/core-win32-x64-msvc": "1.2.153",
111
+ "@swc/core-darwin-x64": "1.2.153",
112
+ "@swc/core-linux-x64-gnu": "1.2.153",
113
+ "@swc/core-linux-x64-musl": "1.2.153",
114
+ "@swc/core-freebsd-x64": "1.2.153",
115
+ "@swc/core-win32-ia32-msvc": "1.2.153",
116
+ "@swc/core-linux-arm64-gnu": "1.2.153",
117
+ "@swc/core-linux-arm-gnueabihf": "1.2.153",
118
+ "@swc/core-darwin-arm64": "1.2.153",
119
+ "@swc/core-android-arm64": "1.2.153",
120
+ "@swc/core-linux-arm64-musl": "1.2.153",
121
+ "@swc/core-win32-arm64-msvc": "1.2.153",
122
+ "@swc/core-android-arm-eabi": "1.2.153"
123
123
  }
124
124
  }
package/types.d.ts CHANGED
@@ -87,6 +87,7 @@ export interface TerserMangleOptions {
87
87
  keep_private_props?: boolean;
88
88
  ie8?: boolean;
89
89
  safari10?: boolean;
90
+ reserved?: string[];
90
91
  }
91
92
  export interface TerserManglePropertiesOptions {
92
93
  }
@@ -348,6 +349,7 @@ export interface JscConfig {
348
349
  [from: string]: [string];
349
350
  };
350
351
  minify?: JsMinifyOptions;
352
+ preserveAllComments?: boolean;
351
353
  }
352
354
  export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022";
353
355
  export declare type ParserConfig = TsParserConfig | EsParserConfig;