@swc/core 1.2.121 → 1.2.122

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,80 @@
5
5
 
6
6
 
7
7
 
8
+ - **(es/compat)** Fix handling of union of the legacy decorator pass (#3057) ([938e544](https://github.com/swc-project/swc/commit/938e544ac55503e91811cfc4e0c333deb2ccc7ed))
9
+
10
+
11
+ - **(es/loader)** Prefer ESM (#3089) ([ba2563f](https://github.com/swc-project/swc/commit/ba2563f59ed819e67a56e39cdcf38a7ccabd8f47))
12
+
13
+
14
+ - **(es/loader)** Update `lru` (#3092) ([15cbe4f](https://github.com/swc-project/swc/commit/15cbe4fcaad7b7b2f7bcc9fd413594a18ede25d8))
15
+
16
+
17
+ - **(es/transforms)** Fix `descturcturing` (#3098) ([df87c2b](https://github.com/swc-project/swc/commit/df87c2b30221f990cdd63125c9ef6036f370145e))
18
+
19
+
20
+ - **(es/typescript)** Export destructured properties in typescript namespaces (#3084) ([31dea3d](https://github.com/swc-project/swc/commit/31dea3dd319a19b75554b061cb1374d12718af24))
21
+
22
+ ### Features
23
+
24
+
25
+
26
+ - **(cli)** Setup packages for CLI (#3070) ([2e89a4f](https://github.com/swc-project/swc/commit/2e89a4f5a8fda133a8d990ecfc0104e64075d15c))
27
+
28
+
29
+ - **(es/dep-graph)** Add `DependencyDescriptor::dynamic_import_assertions` (#3095) ([7d57eb2](https://github.com/swc-project/swc/commit/7d57eb2dc490b4dd7c24c35f4a4df9c13f267d56))
30
+
31
+
32
+ - **(es/lints)** Implement simple validations (#2763) ([f21af5b](https://github.com/swc-project/swc/commit/f21af5bcd600aa94f8bd99b1250524bbc823662c))
33
+
34
+
35
+ - **(es/preset-env)** Upgrade `browserslist-rs` (#3069) ([a1b315a](https://github.com/swc-project/swc/commit/a1b315a114d63aa06856de63d02070d471c271d0))
36
+
37
+
38
+ - **(es/preset-env)** Add ES2022 features to `preset-env` (#3072) ([7beaabd](https://github.com/swc-project/swc/commit/7beaabd533c9f5f368da8baa7365c7e1a30f9512))
39
+
40
+
41
+ - **(es/preset-env)** Add `.js` to generated imports (#3077) ([7d125f5](https://github.com/swc-project/swc/commit/7d125f5cdb0c078cb02958c6d168f9c993f3e830))
42
+
43
+
44
+ - **(node)** Report correct error when `swc_v1` and `swc_v2` is enabled at the same time (#3080) ([f1b8126](https://github.com/swc-project/swc/commit/f1b81266cf895dac28f68151b9c16eaa9401ec43))
45
+
46
+
47
+ - **(node/core)** Include noop swc binaries (#3088) ([42046e1](https://github.com/swc-project/swc/commit/42046e104dfa301a803f3dfd85da2801b0ebad66))
48
+
49
+ ### Miscellaneous Tasks
50
+
51
+
52
+
53
+ - **(repo)** Make `git` faster (#3075) ([8afb5af](https://github.com/swc-project/swc/commit/8afb5af517e87b85ae1bdd8156509850c53fa276))
54
+
55
+
56
+ - **(scripts)** Use `cargo profile instruments` instead of `cargo instruments` (#3086) ([d482d61](https://github.com/swc-project/swc/commit/d482d61b9fd9997367d0dd27e3b90c662064ae3d))
57
+
58
+ ### Performance
59
+
60
+
61
+
62
+ - **(es/hygiene)** Fix performance bug (#3090) ([a81661c](https://github.com/swc-project/swc/commit/a81661c74a59376b15b1211385e95891102d2928))
63
+
64
+ ### Refactor
65
+
66
+
67
+
68
+ - **(es/minifier)** Use `swc_timer` (#3087) ([0e4dce6](https://github.com/swc-project/swc/commit/0e4dce694da75f6fb3848a2f0479410bf3076412))
69
+
70
+ ### Testing
71
+
72
+
73
+
74
+ - **(es/codegen)** Add some tests for sourcemap (#3078) ([0e58950](https://github.com/swc-project/swc/commit/0e5895043ffdc76857f798e0daabc05797ff22ac))
75
+
76
+ ## [1.2.121] - 2021-12-19
77
+
78
+ ### Bug Fixes
79
+
80
+
81
+
8
82
  - **(es/compat)** Fix `block_scoping` (#3058) ([a381fb8](https://github.com/swc-project/swc/commit/a381fb8bce0ed82e7b0a201bb175acb13ce90205))
9
83
 
10
84
 
@@ -43,6 +117,9 @@
43
117
 
44
118
  - **(crates)** Use interactive bump ([276d74f](https://github.com/swc-project/swc/commit/276d74f2e9b508cd96e53c6798f28a7bb47afaed))
45
119
 
120
+
121
+ - **(node)** Publish v1.2.121 ([806c9db](https://github.com/swc-project/swc/commit/806c9db1a1c40e26402a08010ca74bc0f4221dab))
122
+
46
123
  ### Performance
47
124
 
48
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.121",
3
+ "version": "1.2.122",
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.121",
54
- "@swc/core-darwin-x64": "^1.2.121",
55
- "@swc/core-linux-x64-gnu": "^1.2.121",
56
- "@swc/core-linux-x64-musl": "^1.2.121",
57
- "@swc/core-freebsd-x64": "^1.2.121",
58
- "@swc/core-win32-ia32-msvc": "^1.2.121",
59
- "@swc/core-linux-arm64-gnu": "^1.2.121",
60
- "@swc/core-linux-arm-gnueabihf": "^1.2.121",
61
- "@swc/core-darwin-arm64": "^1.2.121",
62
- "@swc/core-android-arm64": "^1.2.121",
63
- "@swc/core-linux-arm64-musl": "^1.2.121",
64
- "@swc/core-win32-arm64-msvc": "^1.2.121"
53
+ "@swc/core-win32-x64-msvc": "^1.2.122",
54
+ "@swc/core-darwin-x64": "^1.2.122",
55
+ "@swc/core-linux-x64-gnu": "^1.2.122",
56
+ "@swc/core-linux-x64-musl": "^1.2.122",
57
+ "@swc/core-freebsd-x64": "^1.2.122",
58
+ "@swc/core-win32-ia32-msvc": "^1.2.122",
59
+ "@swc/core-linux-arm64-gnu": "^1.2.122",
60
+ "@swc/core-linux-arm-gnueabihf": "^1.2.122",
61
+ "@swc/core-darwin-arm64": "^1.2.122",
62
+ "@swc/core-android-arm64": "^1.2.122",
63
+ "@swc/core-linux-arm64-musl": "^1.2.122",
64
+ "@swc/core-win32-arm64-msvc": "^1.2.122"
65
65
  },
66
66
  "types": "./index.d.ts",
67
67
  "scripts": {
@@ -76,6 +76,7 @@
76
76
  "version": "napi version -p scripts/npm"
77
77
  },
78
78
  "devDependencies": {
79
+ "@babel/compat-data": "^7.16.4",
79
80
  "@babel/core": "^7.13.16",
80
81
  "@babel/plugin-proposal-class-properties": "^7.13.0",
81
82
  "@babel/plugin-proposal-decorators": "^7.13.15",
package/.mocha.setup.js DELETED
@@ -1,3 +0,0 @@
1
- // Inject jest's assertion (expect) into global scope for the Mocha
2
- // to use same assertion between node-swc & rest.
3
- global.expect = require('expect');
package/.mocharc.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * https://github.com/swc-project/swc/pull/3009
3
- *
4
- * There are 2 test runners in this repo:
5
- * - jest is being used for unit testing node-swc packages with javascript test cases
6
- * - mocha is being used for cargo's test requires js runtime to validate its transform.
7
- *
8
- * This config is for the mocha test runner invoked by cargo to resolve its global setup file.
9
- */
10
- module.exports = {
11
- require: require.resolve('./.mocha.setup.js')
12
- };
package/cliff.toml DELETED
@@ -1,71 +0,0 @@
1
- # configuration file for git-cliff (0.1.0)
2
-
3
- [changelog]
4
- # changelog header
5
- header = """
6
- # Changelog
7
- """
8
- # template for the changelog body
9
- # https://tera.netlify.app/docs/#introduction
10
- body = """
11
- {% if version %}\
12
- ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
13
- {% else %}\
14
- ## [unreleased]
15
- {% endif %}\
16
- {% for group, commits in commits | group_by(attribute="group") %}
17
- ### {{ group | upper_first }}
18
- {% for commit in commits
19
- | filter(attribute="scope")
20
- | sort(attribute="scope") %}
21
- \n
22
- - **({{commit.scope}})** {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/swc-project/swc/commit/{{ commit.id }}))
23
- {%- if commit.breaking %}
24
- {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
25
- {%- endif -%}
26
- {%- endfor -%}
27
- \n\n
28
- {%- for commit in commits %}
29
- {%- if commit.scope -%}
30
- {% else -%}
31
- \n
32
- - **general**: {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/swc-project/swc/commit/{{ commit.id }}))
33
- {%- if commit.breaking %}
34
- {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
35
- {%- endif -%}
36
- {% endif -%}
37
- {% endfor -%}
38
- {% raw %}\n{% endraw %}\
39
- {% endfor %}\n
40
- """
41
- # remove the leading and trailing whitespaces from the template
42
- trim = true
43
- # changelog footer
44
- footer = """
45
- <!-- generated by git-cliff -->
46
- """
47
-
48
- [git]
49
- # allow only conventional commits
50
- # https://www.conventionalcommits.org
51
- conventional_commits = true
52
- filter_unconventional = false
53
- # regex for parsing and grouping commits
54
- commit_parsers = [
55
- {message = "^feat", group = "Features"},
56
- {message = "^fix", group = "Bug Fixes"},
57
- {message = "^doc", group = "Documentation"},
58
- {message = "^perf", group = "Performance"},
59
- {message = "^refactor", group = "Refactor"},
60
- {message = "^style", group = "Styling"},
61
- {message = "^test", group = "Testing"},
62
- {message = "^chore: Publish", skip = true},
63
- {message = "^chore", group = "Miscellaneous Tasks"},
64
- {body = ".*security", group = "Security"},
65
- ]
66
- # filter out the commits that are not matched by commit parsers
67
- filter_commits = false
68
- # glob pattern for matching git tags
69
- tag_pattern = "v[0-9]*"
70
- # regex for skipping tags
71
- skip_tags = "v0.1.0-beta.1"
package/jest.config.js DELETED
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/__tests__/**/*.m[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
3
- transform: {
4
- },
5
- // transform: {
6
- // "^.+\\.jsx?$": "babel-jest",
7
- // "^.+\\.mjs$": "babel-jest",
8
- // },
9
- testPathIgnorePatterns: ["<rootDir>/build/", "<rootDir>/node_modules/"],
10
- moduleFileExtensions: ["js", "jsx", "mjs"]
11
- }