@swc/core 1.2.117 → 1.2.121

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 (115) hide show
  1. package/.mocha.setup.js +3 -0
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +3410 -0
  4. package/{LICENSE-APACHE → LICENSE} +0 -0
  5. package/cliff.toml +71 -0
  6. package/index.js +4 -1
  7. package/package.json +17 -13
  8. package/types.d.ts +2 -1
  9. package/.husky/pre-push +0 -5
  10. package/.prettierrc +0 -4
  11. package/LICENSE-MIT +0 -25
  12. package/crates/rplugin/README.md +0 -6
  13. package/crates/swc/src/config/array.json +0 -29
  14. package/crates/swc/src/config/issue-1532.json +0 -11
  15. package/crates/swc/src/config/object.json +0 -9
  16. package/crates/swc_atoms/words.txt +0 -676
  17. package/crates/swc_bundler/README.md +0 -13
  18. package/crates/swc_bundler/assets/a.js +0 -7
  19. package/crates/swc_bundler/assets/main.js +0 -3
  20. package/crates/swc_css_parser/README.md +0 -28
  21. package/crates/swc_ecma_minifier/.eslintrc +0 -47
  22. package/crates/swc_ecma_minifier/README.md +0 -41
  23. package/crates/swc_ecma_minifier/package.json +0 -22
  24. package/crates/swc_ecma_minifier/src/lists/domprops.json +0 -7771
  25. package/crates/swc_ecma_minifier/src/lists/jsprops.json +0 -317
  26. package/crates/swc_ecma_parser/colors.js +0 -68
  27. package/crates/swc_ecma_preset_env/src/corejs2/builtin.json +0 -1660
  28. package/crates/swc_ecma_preset_env/src/corejs3/compat.json +0 -3096
  29. package/crates/swc_ecma_preset_env/src/corejs3/entries.json +0 -8321
  30. package/crates/swc_ecma_preset_env/src/corejs3/modules-by-versions.json +0 -350
  31. package/crates/swc_ecma_preset_env/src/transform_data.json +0 -449
  32. package/crates/swc_ecma_preset_env/src/transform_data_bugfixes.json +0 -79
  33. package/crates/swc_ecma_transforms/package.json +0 -9
  34. package/crates/swc_ecma_transforms_base/src/helpers/_apply_decorated_descriptor.js +0 -24
  35. package/crates/swc_ecma_transforms_base/src/helpers/_array_with_holes.js +0 -3
  36. package/crates/swc_ecma_transforms_base/src/helpers/_array_without_holes.js +0 -9
  37. package/crates/swc_ecma_transforms_base/src/helpers/_assert_this_initialized.js +0 -7
  38. package/crates/swc_ecma_transforms_base/src/helpers/_async_generator.js +0 -96
  39. package/crates/swc_ecma_transforms_base/src/helpers/_async_generator_delegate.js +0 -51
  40. package/crates/swc_ecma_transforms_base/src/helpers/_async_iterator.js +0 -17
  41. package/crates/swc_ecma_transforms_base/src/helpers/_async_to_generator.js +0 -35
  42. package/crates/swc_ecma_transforms_base/src/helpers/_await_async_generator.js +0 -3
  43. package/crates/swc_ecma_transforms_base/src/helpers/_await_value.js +0 -3
  44. package/crates/swc_ecma_transforms_base/src/helpers/_class_call_check.js +0 -5
  45. package/crates/swc_ecma_transforms_base/src/helpers/_class_check_private_static_access.js +0 -1
  46. package/crates/swc_ecma_transforms_base/src/helpers/_class_name_tdz_error.js +0 -3
  47. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_field_destructure.js +0 -25
  48. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_field_get.js +0 -7
  49. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_field_loose_base.js +0 -7
  50. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_field_set.js +0 -14
  51. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_method_get.js +0 -7
  52. package/crates/swc_ecma_transforms_base/src/helpers/_class_private_method_set.js +0 -3
  53. package/crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_spec_get.js +0 -7
  54. package/crates/swc_ecma_transforms_base/src/helpers/_class_static_private_field_spec_set.js +0 -12
  55. package/crates/swc_ecma_transforms_base/src/helpers/_class_static_private_method_get.js +0 -3
  56. package/crates/swc_ecma_transforms_base/src/helpers/_construct.js +0 -29
  57. package/crates/swc_ecma_transforms_base/src/helpers/_create_class.js +0 -15
  58. package/crates/swc_ecma_transforms_base/src/helpers/_create_super.js +0 -14
  59. package/crates/swc_ecma_transforms_base/src/helpers/_decorate.js +0 -420
  60. package/crates/swc_ecma_transforms_base/src/helpers/_defaults.js +0 -14
  61. package/crates/swc_ecma_transforms_base/src/helpers/_define_enumerable_properties.js +0 -22
  62. package/crates/swc_ecma_transforms_base/src/helpers/_define_property.js +0 -14
  63. package/crates/swc_ecma_transforms_base/src/helpers/_extends.js +0 -17
  64. package/crates/swc_ecma_transforms_base/src/helpers/_get.js +0 -19
  65. package/crates/swc_ecma_transforms_base/src/helpers/_get_prototype_of.js +0 -6
  66. package/crates/swc_ecma_transforms_base/src/helpers/_inherits.js +0 -14
  67. package/crates/swc_ecma_transforms_base/src/helpers/_inherits_loose.js +0 -5
  68. package/crates/swc_ecma_transforms_base/src/helpers/_initializer_define_property.js +0 -9
  69. package/crates/swc_ecma_transforms_base/src/helpers/_initializer_warning_helper.js +0 -3
  70. package/crates/swc_ecma_transforms_base/src/helpers/_instanceof.js +0 -7
  71. package/crates/swc_ecma_transforms_base/src/helpers/_interop_require_default.js +0 -5
  72. package/crates/swc_ecma_transforms_base/src/helpers/_interop_require_wildcard.js +0 -24
  73. package/crates/swc_ecma_transforms_base/src/helpers/_is_native_function.js +0 -3
  74. package/crates/swc_ecma_transforms_base/src/helpers/_is_native_reflect_construct.js +0 -11
  75. package/crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array.js +0 -3
  76. package/crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array_limit.js +0 -25
  77. package/crates/swc_ecma_transforms_base/src/helpers/_iterable_to_array_limit_loose.js +0 -11
  78. package/crates/swc_ecma_transforms_base/src/helpers/_jsx.js +0 -47
  79. package/crates/swc_ecma_transforms_base/src/helpers/_new_arrow_check.js +0 -5
  80. package/crates/swc_ecma_transforms_base/src/helpers/_non_iterable_rest.js +0 -3
  81. package/crates/swc_ecma_transforms_base/src/helpers/_non_iterable_spread.js +0 -3
  82. package/crates/swc_ecma_transforms_base/src/helpers/_object_spread.js +0 -18
  83. package/crates/swc_ecma_transforms_base/src/helpers/_object_without_properties.js +0 -18
  84. package/crates/swc_ecma_transforms_base/src/helpers/_object_without_properties_loose.js +0 -14
  85. package/crates/swc_ecma_transforms_base/src/helpers/_possible_constructor_return.js +0 -7
  86. package/crates/swc_ecma_transforms_base/src/helpers/_read_only_error.js +0 -3
  87. package/crates/swc_ecma_transforms_base/src/helpers/_set.js +0 -48
  88. package/crates/swc_ecma_transforms_base/src/helpers/_set_prototype_of.js +0 -8
  89. package/crates/swc_ecma_transforms_base/src/helpers/_skip_first_generator_next.js +0 -7
  90. package/crates/swc_ecma_transforms_base/src/helpers/_sliced_to_array.js +0 -3
  91. package/crates/swc_ecma_transforms_base/src/helpers/_sliced_to_array_loose.js +0 -3
  92. package/crates/swc_ecma_transforms_base/src/helpers/_super_prop_base.js +0 -8
  93. package/crates/swc_ecma_transforms_base/src/helpers/_tagged_template_literal.js +0 -11
  94. package/crates/swc_ecma_transforms_base/src/helpers/_tagged_template_literal_loose.js +0 -8
  95. package/crates/swc_ecma_transforms_base/src/helpers/_throw.js +0 -3
  96. package/crates/swc_ecma_transforms_base/src/helpers/_to_array.js +0 -3
  97. package/crates/swc_ecma_transforms_base/src/helpers/_to_consumable_array.js +0 -3
  98. package/crates/swc_ecma_transforms_base/src/helpers/_to_primitive.js +0 -12
  99. package/crates/swc_ecma_transforms_base/src/helpers/_to_property_key.js +0 -4
  100. package/crates/swc_ecma_transforms_base/src/helpers/_type_of.js +0 -3
  101. package/crates/swc_ecma_transforms_base/src/helpers/_wrap_async_generator.js +0 -5
  102. package/crates/swc_ecma_transforms_base/src/helpers/_wrap_native_super.js +0 -33
  103. package/crates/swc_estree_ast/README.md +0 -3
  104. package/crates/swc_estree_compat/README.md +0 -11
  105. package/crates/swc_plugin/README.md +0 -3
  106. package/crates/testing_macros/README.md +0 -3
  107. package/crates/wasm/__tests__/error.js +0 -11
  108. package/crates/wasm/__tests__/simple.js +0 -33
  109. package/crates/wasm/example/index.js +0 -47
  110. package/crates/wasm/example/package.json +0 -15
  111. package/crates/wasm/example/readme.txt +0 -21
  112. package/crates/wasm/example/webpack.config.js +0 -10
  113. package/crates/wasm/package.json +0 -5
  114. package/cspell.json +0 -135
  115. package/deny.toml +0 -211
package/deny.toml DELETED
@@ -1,211 +0,0 @@
1
- # This template contains all of the possible sections and their default values
2
-
3
- # Note that all fields that take a lint level have these possible values:
4
- # * deny - An error will be produced and the check will fail
5
- # * warn - A warning will be produced, but the check will not fail
6
- # * allow - No warning or error will be produced, though in some cases a note
7
- # will be
8
-
9
- # The values provided in this template are the default values that will be used
10
- # when any section or field is not specified in your own configuration
11
-
12
- # If 1 or more target triples (and optionally, target_features) are specified,
13
- # only the specified targets will be checked when running `cargo deny check`.
14
- # This means, if a particular package is only ever used as a target specific
15
- # dependency, such as, for example, the `nix` crate only being used via the
16
- # `target_family = "unix"` configuration, that only having windows targets in
17
- # this list would mean the nix crate, as well as any of its exclusive
18
- # dependencies not shared by any other crates, would be ignored, as the target
19
- # list here is effectively saying which targets you are building for.
20
- targets = [
21
- # The triple can be any string, but only the target triples built in to
22
- # rustc (as of 1.40) can be checked against actual config expressions
23
- #{ triple = "x86_64-unknown-linux-musl" },
24
- # You can also specify which target_features you promise are enabled for a
25
- # particular target. target_features are currently not validated against
26
- # the actual valid features supported by the target architecture.
27
- #{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
28
- ]
29
-
30
- # This section is considered when running `cargo deny check advisories`
31
- # More documentation for the advisories section can be found here:
32
- # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
33
- [advisories]
34
- # The path where the advisory database is cloned/fetched into
35
- db-path = "~/.cargo/advisory-db"
36
- # The url(s) of the advisory databases to use
37
- db-urls = ["https://github.com/rustsec/advisory-db"]
38
- # The lint level for security vulnerabilities
39
- vulnerability = "deny"
40
- # The lint level for unmaintained crates
41
- unmaintained = "warn"
42
- # The lint level for crates that have been yanked from their source registry
43
- yanked = "warn"
44
- # The lint level for crates with security notices. Note that as of
45
- # 2019-12-17 there are no security notice advisories in
46
- # https://github.com/rustsec/advisory-db
47
- notice = "warn"
48
- # A list of advisory IDs to ignore. Note that ignored advisories will still
49
- # output a note when they are encountered.
50
- ignore = [
51
- #"RUSTSEC-0000-0000",
52
- "RUSTSEC-2020-0071",
53
- "RUSTSEC-2020-0159",
54
- ]
55
- # Threshold for security vulnerabilities, any vulnerability with a CVSS score
56
- # lower than the range specified will be ignored. Note that ignored advisories
57
- # will still output a note when they are encountered.
58
- # * None - CVSS Score 0.0
59
- # * Low - CVSS Score 0.1 - 3.9
60
- # * Medium - CVSS Score 4.0 - 6.9
61
- # * High - CVSS Score 7.0 - 8.9
62
- # * Critical - CVSS Score 9.0 - 10.0
63
- #severity-threshold =
64
-
65
- # This section is considered when running `cargo deny check licenses`
66
- # More documentation for the licenses section can be found here:
67
- # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
68
- [licenses]
69
- # The lint level for crates which do not have a detectable license
70
- unlicensed = "deny"
71
- # List of explictly allowed licenses
72
- # See https://spdx.org/licenses/ for list of possible licenses
73
- # [possible values: any SPDX 3.11 short identifier (+ optional exception)].
74
- allow = [
75
- "MIT",
76
- "Apache-2.0",
77
- "BSD-2-Clause",
78
- "BSD-2-Clause-Patent",
79
- "BSD-3-Clause",
80
- "CC0-1.0",
81
- "ISC",
82
- "Zlib",
83
- "MPL-2.0",
84
- ]
85
- # List of explictly disallowed licenses
86
- # See https://spdx.org/licenses/ for list of possible licenses
87
- # [possible values: any SPDX 3.11 short identifier (+ optional exception)].
88
- deny = [
89
- #"Nokia",
90
- ]
91
- # Lint level for licenses considered copyleft
92
- copyleft = "deny"
93
- # Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
94
- # * both - The license will be approved if it is both OSI-approved *AND* FSF
95
- # * either - The license will be approved if it is either OSI-approved *OR* FSF
96
- # * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
97
- # * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
98
- # * neither - This predicate is ignored and the default lint level is used
99
- allow-osi-fsf-free = "neither"
100
- # Lint level used when no other predicates are matched
101
- # 1. License isn't in the allow or deny lists
102
- # 2. License isn't copyleft
103
- # 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
104
- default = "deny"
105
- # The confidence threshold for detecting a license from license text.
106
- # The higher the value, the more closely the license text must be to the
107
- # canonical license text of a valid SPDX license file.
108
- # [possible values: any between 0.0 and 1.0].
109
- confidence-threshold = 0.8
110
- # Allow 1 or more licenses on a per-crate basis, so that particular licenses
111
- # aren't accepted for every possible crate as with the normal allow list
112
- exceptions = [
113
- # Each entry is the crate and version constraint, and its specific allow
114
- # list
115
- #{ allow = ["Zlib"], name = "adler32", version = "*" },
116
- ]
117
-
118
- # Some crates don't have (easily) machine readable licensing information,
119
- # adding a clarification entry for it allows you to manually specify the
120
- # licensing information
121
- #[[licenses.clarify]]
122
- # The name of the crate the clarification applies to
123
- #name = "ring"
124
- # The optional version constraint for the crate
125
- #version = "*"
126
- # The SPDX expression for the license requirements of the crate
127
- #expression = "MIT AND ISC AND OpenSSL"
128
- # One or more files in the crate's source used as the "source of truth" for
129
- # the license expression. If the contents match, the clarification will be used
130
- # when running the license check, otherwise the clarification will be ignored
131
- # and the crate will be checked normally, which may produce warnings or errors
132
- # depending on the rest of your configuration
133
- #license-files = [
134
- # Each entry is a crate relative path, and the (opaque) hash of its contents
135
- #{ path = "LICENSE", hash = 0xbd0eed23 }
136
- #]
137
-
138
- [licenses.private]
139
- # If true, ignores workspace crates that aren't published, or are only
140
- # published to private registries
141
- ignore = false
142
- # One or more private registries that you might publish crates to, if a crate
143
- # is only published to private registries, and ignore is true, the crate will
144
- # not have its license(s) checked
145
- registries = [
146
- #"https://sekretz.com/registry
147
- ]
148
-
149
- # This section is considered when running `cargo deny check bans`.
150
- # More documentation about the 'bans' section can be found here:
151
- # https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
152
- [bans]
153
- # Lint level for when multiple versions of the same crate are detected
154
- multiple-versions = "allow"
155
- # Lint level for when a crate version requirement is `*`
156
- wildcards = "allow"
157
- # The graph highlighting used when creating dotgraphs for crates
158
- # with multiple versions
159
- # * lowest-version - The path to the lowest versioned duplicate is highlighted
160
- # * simplest-path - The path to the version with the fewest edges is highlighted
161
- # * all - Both lowest-version and simplest-path are used
162
- highlight = "all"
163
- # List of crates that are allowed. Use with care!
164
- allow = [
165
- #{ name = "ansi_term", version = "=0.11.0" },
166
- ]
167
- # List of crates to deny
168
- deny = [
169
- # Each entry the name of a crate and a version range. If version is
170
- # not specified, all versions will be matched.
171
- #{ name = "ansi_term", version = "=0.11.0" },
172
- #
173
- # Wrapper crates can optionally be specified to allow the crate when it
174
- # is a direct dependency of the otherwise banned crate
175
- #{ name = "ansi_term", version = "=0.11.0", wrappers = [] },
176
- ]
177
- # Certain crates/versions that will be skipped when doing duplicate detection.
178
- skip = [
179
- #{ name = "ansi_term", version = "=0.11.0" },
180
- ]
181
- # Similarly to `skip` allows you to skip certain crates during duplicate
182
- # detection. Unlike skip, it also includes the entire tree of transitive
183
- # dependencies starting at the specified crate, up to a certain depth, which is
184
- # by default infinite
185
- skip-tree = [
186
- #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
187
- ]
188
-
189
- # This section is considered when running `cargo deny check sources`.
190
- # More documentation about the 'sources' section can be found here:
191
- # https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
192
- [sources]
193
- # Lint level for what to happen when a crate from a crate registry that is not
194
- # in the allow list is encountered
195
- unknown-registry = "warn"
196
- # Lint level for what to happen when a crate from a git repository that is not
197
- # in the allow list is encountered
198
- unknown-git = "warn"
199
- # List of URLs for allowed crate registries. Defaults to the crates.io index
200
- # if not specified. If it is specified but empty, no registries are allowed.
201
- allow-registry = ["https://github.com/rust-lang/crates.io-index"]
202
- # List of URLs for allowed Git repositories
203
- allow-git = []
204
-
205
- [sources.allow-org]
206
- # 1 or more github.com organizations to allow git sources for
207
- github = []
208
- # 1 or more gitlab.com organizations to allow git sources for
209
- gitlab = []
210
- # 1 or more bitbucket.org organizations to allow git sources for
211
- bitbucket = []