@swc/core 1.3.41 → 1.3.42

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 CHANGED
@@ -5,6 +5,48 @@
5
5
 
6
6
 
7
7
 
8
+ - **(bindings/node)** Fix loading of `spack.config.js` (#7105) ([a4d1af1](https://github.com/swc-project/swc/commit/a4d1af18deabe79caa959eb654ca1ebc2d9f6867))
9
+
10
+
11
+ - **(es/ast)** Fix `EqIgnoreSpan` impl of `Number` (#7112) ([6a570a3](https://github.com/swc-project/swc/commit/6a570a334c787358d67ae6c590a7fd0e916f35e8))
12
+
13
+
14
+ - **(es/compat)** Don't modify private fields from `reserved_words` pass (#7113) ([2bc631d](https://github.com/swc-project/swc/commit/2bc631df8792d2f1356b5ef2dbf3ee0c46ecbd4f))
15
+
16
+
17
+ - **(es/minifier)** Pass `keep_*` in config to `compress` and `mangle` (#7102) ([6a1201c](https://github.com/swc-project/swc/commit/6a1201cfc44fe5ae3d8599669fd8032c82e6c580))
18
+
19
+
20
+ - **(es/minifier)** Don't inline into arrow heads (#7099) ([610e1bb](https://github.com/swc-project/swc/commit/610e1bb581a04fe9b871dd7afa0cf81ab9ee7fa8))
21
+
22
+
23
+ - **(es/parser)** Fix parsing of static accessors (#7108) ([dd2b16d](https://github.com/swc-project/swc/commit/dd2b16db9ec77e515dcd38f68f8020d70d0f9ac9))
24
+
25
+ ### Features
26
+
27
+
28
+
29
+ - **(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)
30
+
31
+ **Description:**
32
+
33
+ Full refactor of the "calc" simplification to be more compliant with the spec. ([df09d2f](https://github.com/swc-project/swc/commit/df09d2fd4bef3ab83efbe46f8e3d42d26bbae95d))
34
+
35
+ ### Refactor
36
+
37
+
38
+
39
+ - **(es/fixer)** Move comments with the insertion order (#7097) ([f250f24](https://github.com/swc-project/swc/commit/f250f243cba49b9cdcdc920d37c92662c14941bc))
40
+
41
+
42
+ - **(es/resolver)** Make syntax context for unresolved and top-level stable (#7096) ([c114f00](https://github.com/swc-project/swc/commit/c114f006b4ea388ef9a4503e935d59e92a647ecf))
43
+
44
+ ## [1.3.41] - 2023-03-17
45
+
46
+ ### Bug Fixes
47
+
48
+
49
+
8
50
  - **(bindings/cli)** Change order of checking inputs to workaround a Windows issue (#7077) ([7bbec92](https://github.com/swc-project/swc/commit/7bbec92d234ddb47b51a014937d1ec7c1cb571c7))
9
51
 
10
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
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.41",
142
- "@swc/core-darwin-x64": "1.3.41",
143
- "@swc/core-linux-x64-gnu": "1.3.41",
144
- "@swc/core-linux-x64-musl": "1.3.41",
145
- "@swc/core-win32-ia32-msvc": "1.3.41",
146
- "@swc/core-linux-arm64-gnu": "1.3.41",
147
- "@swc/core-linux-arm-gnueabihf": "1.3.41",
148
- "@swc/core-darwin-arm64": "1.3.41",
149
- "@swc/core-linux-arm64-musl": "1.3.41",
150
- "@swc/core-win32-arm64-msvc": "1.3.41"
141
+ "@swc/core-win32-x64-msvc": "1.3.42",
142
+ "@swc/core-darwin-x64": "1.3.42",
143
+ "@swc/core-linux-x64-gnu": "1.3.42",
144
+ "@swc/core-linux-x64-musl": "1.3.42",
145
+ "@swc/core-win32-ia32-msvc": "1.3.42",
146
+ "@swc/core-linux-arm64-gnu": "1.3.42",
147
+ "@swc/core-linux-arm-gnueabihf": "1.3.42",
148
+ "@swc/core-darwin-arm64": "1.3.42",
149
+ "@swc/core-linux-arm64-musl": "1.3.42",
150
+ "@swc/core-win32-arm64-msvc": "1.3.42"
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 file = typeof f === 'string' ? f : path.resolve('spack.config.js');
42
- let configFromFile = require(file);
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
  }