github-actions[bot]
714bf1dd7f
Release crates v0.19.0 ( #4137 )
...
## [0.19.0] - 2024-07-09
- b936162 ast/ast_builder: [**BREAKING**] Shorter allocator utility
method names. (#4122 ) (rzvxa)
### Features
- 485c871 ast: Allow conversion from `Expression` into `Statement` with
`FromIn` trait. (#4124 ) (rzvxa)
### Refactor
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-09 20:32:06 +08:00
github-actions[bot]
e29cdbfe40
Release crates v0.18.0 ( #4136 )
...
## [0.18.0] - 2024-07-09
- d347aed ast: [**BREAKING**] Generate `ast_builder.rs`. (#3890 ) (rzvxa)
### Features
- c6c16a5 minifier: Dce all conditional expressions (#4135 ) (Boshen)
- 365d9ba oxc_codegen: Generate annotation comments before
`CallExpression` and `NewExpression` (#4119 ) (IWANABETHATGUY)
- 3a0f2aa parser: Check for illegal modifiers in modules and namespaces
(#4126 ) (DonIsaac)
- 2f53bdf semantic: Check for abstract ClassElements in non-abstract
classes (#4127 ) (DonIsaac)
- c4ee9f8 semantic: Check for abstract initializations and
implementations (#4125 ) (Don Isaac)
- 44c7fe3 span: Add various implementations of `FromIn` for `Atom`.
(#4090 ) (rzvxa)
### Bug Fixes
- cb1af04 isolated-declarations: Remove the `async` and `generator`
keywords from `MethodDefinition` (#4130 ) (Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-09 19:56:10 +08:00
rzvxa
0b433108be
feat(ast_codegen): add cli arguments to use with oxc_ast_codegen executable. ( #4117 )
...
```
Usage: oxc_ast_codegen [--dry-run] [--no-fmt] [--schema=ARG]
Available options:
--dry-run Runs all generators but won't write anything down.
--no-fmt Don't run cargo fmt at the end
--schema=ARG Path of output `schema.json`.
-h, --help Prints help information
```
2024-07-09 03:42:11 +00:00
rzvxa
44c7fe39ee
feat(span): add various implementations of FromIn for Atom. ( #4090 )
2024-07-08 15:32:57 +00:00
github-actions[bot]
c3f08ce8e0
Release crates v0.17.2 ( #4115 )
...
## [0.17.2] - 2024-07-08
### Features
- 115ac3b allocator: Introduce `FromIn` and `IntoIn` traits. (#4088 )
(rzvxa)
- 720983a napi/transform: Allow setting `sourceType` to `transform`
(#4113 ) (Boshen)
- e386b62 semantic: Check for invalid type import assignments (#4097 )
(DonIsaac)
### Bug Fixes
- 5472b7c codegen: 256 indentations level is not enough for codegen
(Boshen)
- 5c31236 isolated-declarations: Keep literal value for readonly
property (#4106 ) (Dunqing)
- e67c7d1 isolated-declarations: Do not infer type for private
parameters (#4105 ) (Dunqing)
- 3fcad5e isolated_declarations: Remove nested AssignmentPatterns from
inside parameters (#4077 ) (michaelm)
- f8d77e4 isolated_declarations: Infer type of template literal
expressions as string (#4068 ) (michaelm)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100 ) (Don
Isaac)
- 4413e2d transformer: Missing initializer for readonly consructor
properties (#4103 ) (Don Isaac)
### Performance
- 7ed27b7 isolated-declarations: Use `FxHashSet` instead of `Vec` to
speed up the `contain` (#4074 ) (Dunqing)
- 9114c8e semantic: Keep a single map of unresolved references (#4107 )
(Luca Bruno)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-08 19:16:33 +08:00
Boshen
a873522ee1
chore: refresh Cargo.lock
2024-07-08 18:31:05 +08:00
renovate[bot]
ec14168900
chore(deps): update rust crates ( #4086 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [oxc-browserslist](https://togithub.com/oxc-project/oxc-browserslist )
| workspace.dependencies | patch | `1.0.1` -> `1.0.2` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver ) |
workspace.dependencies | patch | `1.9.2` -> `1.9.3` |
| [serde](https://serde.rs )
([source](https://togithub.com/serde-rs/serde )) | workspace.dependencies
| patch | `1.0.203` -> `1.0.204` |
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.119` -> `1.0.120` |
| [trybuild](https://togithub.com/dtolnay/trybuild ) |
workspace.dependencies | patch | `1.0.96` -> `1.0.97` |
---
### Release Notes
<details>
<summary>oxc-project/oxc-browserslist (oxc-browserslist)</summary>
###
[`v1.0.2`](https://togithub.com/oxc-project/oxc-browserslist/blob/HEAD/CHANGELOG.md#102---2024-07-01 )
[Compare
Source](https://togithub.com/oxc-project/oxc-browserslist/compare/oxc-browserslist-v1.0.1...oxc-browserslist-v1.0.2 )
##### Other
- *(deps)* update npm packages
([#​52](https://togithub.com/oxc-project/oxc-browserslist/pull/52 ))
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
###
[`v1.9.3`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#193---2024-07-03 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.9.2...oxc_resolver-v1.9.3 )
##### Fixed
- tsconfig project reference it self should throw error
([#​211](https://togithub.com/oxc-project/oxc-resolver/pull/211 ))
##### Other
- *(napi)* make napi binary smaller with minimal tracing features
([#​213](https://togithub.com/oxc-project/oxc-resolver/pull/213 ))
- *(napi)* remove tokio
([#​212](https://togithub.com/oxc-project/oxc-resolver/pull/212 ))
- *(deps)* update rust crate dashmap to v6
([#​209](https://togithub.com/oxc-project/oxc-resolver/pull/209 ))
</details>
<details>
<summary>serde-rs/serde (serde)</summary>
###
[`v1.0.204`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.204 )
[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.203...v1.0.204 )
- Apply #\[diagnostic::on_unimplemented] attribute on Rust 1.78+ to
suggest adding serde derive or enabling a "serde" feature flag in
dependencies
([#​2767](https://togithub.com/serde-rs/serde/issues/2767 ), thanks
[@​weiznich](https://togithub.com/weiznich ))
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.120`](https://togithub.com/serde-rs/json/releases/tag/v1.0.120 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.119...v1.0.120 )
- Correctly specify required version of `indexmap` dependency
([#​1152](https://togithub.com/serde-rs/json/issues/1152 ), thanks
[@​cforycki](https://togithub.com/cforycki ))
</details>
<details>
<summary>dtolnay/trybuild (trybuild)</summary>
###
[`v1.0.97`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.97 )
[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.96...1.0.97 )
- Normalize number of types listed in *"the following other types
implement trait"* diagnostics
([#​277](https://togithub.com/dtolnay/trybuild/issues/277 ))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-07 17:13:34 +00:00
github-actions[bot]
0c7f3eecc6
Release oxlint v0.5.3 ( #4082 )
...
## [0.5.3] - 2024-07-07
### Features
- 1681b11 linter: Eslint-plugin-jest/consistent-test-it (#4053 )
(cinchen)
- 6876490 linter: Add rule no-undefined (#4041 ) (jordan boyer)
- bf04dee linter: Implement unicorn/no-negation-in-equality-check
(#4034 ) (Nissim Chekroun)
- aa45604 linter/eslint: Implement no-multi-str (#4038 ) (Jelle van der
Waa)
### Bug Fixes
- 7b2dc3b linter: Fix panic in import/namespace (#4080 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-07 19:31:03 +08:00
Dunqing
54b3b6c0da
chore(benchmark): add isolated declarations ( #4078 )
2024-07-07 17:14:48 +08:00
github-actions[bot]
51d56d37ff
Release crates v0.17.1 ( #4075 )
...
## [0.17.1] - 2024-07-06
### Bug Fixes
- aa585d3 ast_codegen, ast: Visit `ExpressionArrayElement` as
`Expression`. (#4061 ) (rzvxa)
- 564a75a codegen: Missing TypeParameters in TSConstructSignature
(#4063 ) (michaelm)
- adee728 isolated_declarations: Don't report an error for parameters if
they are ObjectPattern or ArrayPattern with an explicit type (#4065 )
(michaelm)
- 1b8f208 isolated_declarations: Correct emit for private static methods
(#4064 ) (michaelm)
- 719fb96 minifier: Omit dce `undefined` which can be a shadowed
variable (#4073 ) (Boshen)
- 150f4d9 napi/transform: Display error with spanned messages (Boshen)
### Performance
- 7fe2a2f parser: Do not copy comments (#4067 ) (overlookmotel)
### Refactor
- 8fa98e0 ast: Inline trivial functions and shorten code (#4066 )
(overlookmotel)
- 65aee19 isolated-declarations: Reorganize scope tree (#4070 ) (Luca
Bruno)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-07 01:29:52 +08:00
Boshen
150f4d90fc
fix(napi/transform): display error with spanned messages
2024-07-05 23:41:39 +08:00
github-actions[bot]
224f5ef2cc
Release crates v0.17.0 ( #4059 )
...
## [0.17.0] - 2024-07-05
- e32b4bc ast: [**BREAKING**] Store trivia comments in a sorted slice
(#4045 ) (Luca Bruno)
- 1df6ac0 ast: [**BREAKING**] Rename `visit_enum_memeber` to
`visit_ts_enum_member`. (#4000 ) (rzvxa)
- 4a0eaa0 ast: [**BREAKING**] Rename `visit_enum` to
`visit_ts_enum_declaration`. (#3998 ) (rzvxa)
- c98d8aa ast: [**BREAKING**] Rename `visit_arrow_expression` to
`visit_arrow_function_expression`. (#3995 ) (rzvxa)
### Features
- 1854a52 ast_codegen: Introduce the `#[span]` hint. (#4012 ) (rzvxa)
- 7538af1 ast_codegen: Add visit generator (#3954 ) (rzvxa)
- 7768d23 isolated-declarations: Support optional class methods (#4035 )
(Egor Blinov)
- 0da9dfb minifier: Add constant folding to remove dead code (#4058 )
(Boshen)
### Bug Fixes
- aaac2d8 codegen: Preserve parentheses from AST instead calculating
from operator precedence (#4055 ) (Boshen)
- 5e5b1b1 codegen: Correct accessibility emit for class
formal-parameters/methods/properties (#4042 ) (Egor Blinov)
- 7844734 codegen: Missing const keyword in TSTypeParamter (#4022 )
(Dunqing)
- 6254a41 codegen: Missing TypeParamters in TSCallSignature (#4021 )
(Dunqing)
- 3d29e9c isolated-declarations: Eliminate imports incorrectly when they
are used in `TSInferType` (#4043 ) (Dunqing)
- 02ea19a isolated-declarations: Should emit `export {}` when only
having `ImportDeclaration` (#4026 ) (Dunqing)
- 7c915f4 isolated-declarations: Binding elements with export should
report an error (#4025 ) (Dunqing)
- 05a047c isolated-declarations: Method following an abstract method
gets dropped (#4024 ) (Dunqing)
- c043bec isolated_declarations: Add mapped-type constraint to the scope
(#4037 ) (Egor Blinov)
- b007553 isolated_declarations: Fix readonly specifier on class
constructor params (#4030 ) (Egor Blinov)
- da62839 isolated_declarations: Inferring literal types for readonly
class fileds (#4027 ) (Egor Blinov)
### Refactor
- b51f75b ast_codegen: No longer outputs discard variable for empty
visitors. (#4008 ) (rzvxa)
- edb557c minifier: Add a folder struct for constant folding (#4057 )
(Boshen)
- 243c9f3 parser: Use function instead of trait to parse list with rest
element (#4028 ) (Boshen)
- 1dacb1f parser: Use function instead of trait to parse delimited lists
(#4014 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-05 15:46:50 +08:00
Boshen
0da9dfbf09
feat(minifier): add constant folding to remove dead code ( #4058 )
2024-07-05 15:44:01 +08:00
Boshen
aaac2d8775
fix(codegen): preserve parentheses from AST instead calculating from operator precedence ( #4055 )
...
…operator precedence
Calculating from operator precedence is currently unsafe and will result
incorrect semantics.
2024-07-05 14:01:17 +08:00
burlinchen
38e7351a91
chore(napi): Refactor async parsing functions to remove tokio dependency ( #4049 )
...
Resolves #4044
- Added `use napi::{bindgen_prelude::AsyncTask, Task}` to handle async
tasks without tokio.
- Introduced `ResolveTask` struct implementing `Task` for asynchronous
parsing.
- Replaced `parse_sync` function implementation with `parse_with_return`
to reuse code.
- Refactored `parse_async` to use `AsyncTask` and `ResolveTask` for
async parsing.
- Removed tokio dependency by avoiding `tokio::spawn` and using
`AsyncTask` for async operations.
This refactor enhances code readability and removes the dependency on
tokio, streamlining the async task handling within the napi framework.
2024-07-04 20:31:19 +08:00
github-actions[bot]
b66ad0b675
Release oxlint v0.6.0 ( #4029 )
...
## [0.6.0] - 2024-07-02
- c98d8aa ast: [**BREAKING**] Rename `visit_arrow_expression` to
`visit_arrow_function_expression`. (#3995 ) (rzvxa)
### Features
- dc6d45e ast,codegen: Add `TSParenthesizedType` and print type
parentheses correctly (#3979 ) (Boshen)
- b257d53 linter: Support report
`@typescript-eslint/consistent-type-imports` (#3895 ) (mysteryven)
- 2114475 linter: Implement @typescript-eslint/no-dynamic-delete (#3971 )
(kaykdm)
- 10a3c9a linter/eslint-plugin-react: Implement no-set-state (#3975 )
(Jelle van der Waa)
### Bug Fixes
- 432d6d9 linter: Find disabled directives using the message's `Span`.
(#4010 ) (rzvxa)
- dbbb6fc linter: Global variable check should always check builtin
variables (#3973 ) (Boshen)
### Performance
- 1eac3d2 semantic: Use `Atom<'a>` for `Reference`s (#3972 ) (Don Isaac)
### Refactor
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-02 22:07:52 +08:00
rzvxa
7538af12d8
feat(ast_codegen): add visit generator ( #3954 )
...
~~The generated code is only here for the sake of my own comparison (instead of manually keeping a backup of the old generated file). I would clean this up as soon as it is ready, submit some parts of it as the down stack, and stack the actual generated code on top of this. So please don't let the huge diff distract you, It won't have many conflicts since almost all of these are the generated visit code, which is completely contained to its own module(other than some minor renaming refactors).~~
The order of function definitions is a bit different, I've used a depth-first search, We can switch to a breadth-first one to align functions more closely to the original.
2024-07-02 10:18:45 +00:00
github-actions[bot]
e2c9015ef6
Release crates v0.16.3 ( #4013 )
...
## [0.16.3] - 2024-07-02
### Features
- b257d53 linter: Support report
`@typescript-eslint/consistent-type-imports` (#3895 ) (mysteryven)
### Bug Fixes
- 23038ad codegen: Print `TSFunctionType` inside `TSTypeAssertion`
(#3999 ) (Boshen)
- d995f94 semantic: Resolve reference incorrectly when a parameter
references a parameter that hasn't been defined yet (#4004 ) (Dunqing)
- bdee156 transformer/typescript: `declare class` incorrectly preserved
as runtime class (#3997 ) (Dunqing)
- a50ce3d transformer/typescript: Missing initializer for class
constructor arguments with `private` and `protected` modifier (#3996 )
(Dunqing)
### Refactor
- 0fe22a8 ast: Reorder fields to reflect their visit order. (#3994 )
(rzvxa)
- d0eac46 parser: Use function instead of trait to parse normal lists
(#4003 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-07-02 12:47:29 +08:00
renovate[bot]
765f6cc1c7
chore(deps): update rust crate dashmap to v6 ( #3987 )
2024-07-01 11:25:09 +08:00
renovate[bot]
c53d981e45
chore(deps): update rust crates ( #3988 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [bitflags](https://togithub.com/bitflags/bitflags ) |
workspace.dependencies | minor | `2.5.0` -> `2.6.0` |
| [log](https://togithub.com/rust-lang/log ) | workspace.dependencies |
patch | `0.4.21` -> `0.4.22` |
| [mime_guess](https://togithub.com/abonander/mime_guess ) |
workspace.dependencies | patch | `2.0.4` -> `2.0.5` |
| [num-bigint](https://togithub.com/rust-num/num-bigint ) |
workspace.dependencies | patch | `0.4.5` -> `0.4.6` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver ) |
workspace.dependencies | minor | `1.8.2` -> `1.9.2` |
| [serde_json](https://togithub.com/serde-rs/json ) |
workspace.dependencies | patch | `1.0.117` -> `1.0.119` |
---
### Release Notes
<details>
<summary>bitflags/bitflags (bitflags)</summary>
###
[`v2.6.0`](https://togithub.com/bitflags/bitflags/blob/HEAD/CHANGELOG.md#260 )
[Compare
Source](https://togithub.com/bitflags/bitflags/compare/2.5.0...2.6.0 )
#### What's Changed
- Sync CHANGELOG.md with github release notes by
[@​dextero](https://togithub.com/dextero ) in
[https://github.com/bitflags/bitflags/pull/402 ](https://togithub.com/bitflags/bitflags/pull/402 )
- Update error messages and zerocopy by
[@​KodrAus](https://togithub.com/KodrAus ) in
[https://github.com/bitflags/bitflags/pull/403 ](https://togithub.com/bitflags/bitflags/pull/403 )
- Bump minimum declared versions of dependencies by
[@​dextero](https://togithub.com/dextero ) in
[https://github.com/bitflags/bitflags/pull/404 ](https://togithub.com/bitflags/bitflags/pull/404 )
- chore(deps): bump serde_derive and bytemuck versions by
[@​joshka](https://togithub.com/joshka ) in
[https://github.com/bitflags/bitflags/pull/405 ](https://togithub.com/bitflags/bitflags/pull/405 )
- add OSFF Scorecard workflow by
[@​KodrAus](https://togithub.com/KodrAus ) in
[https://github.com/bitflags/bitflags/pull/396 ](https://togithub.com/bitflags/bitflags/pull/396 )
- Update stderr messages by
[@​KodrAus](https://togithub.com/KodrAus ) in
[https://github.com/bitflags/bitflags/pull/408 ](https://togithub.com/bitflags/bitflags/pull/408 )
- Fix typo by
[@​waywardmonkeys](https://togithub.com/waywardmonkeys ) in
[https://github.com/bitflags/bitflags/pull/410 ](https://togithub.com/bitflags/bitflags/pull/410 )
- Allow specifying outer attributes in impl mode by
[@​KodrAus](https://togithub.com/KodrAus ) in
[https://github.com/bitflags/bitflags/pull/411 ](https://togithub.com/bitflags/bitflags/pull/411 )
#### New Contributors
- [@​dextero](https://togithub.com/dextero ) made their first
contribution in
[https://github.com/bitflags/bitflags/pull/402 ](https://togithub.com/bitflags/bitflags/pull/402 )
- [@​joshka](https://togithub.com/joshka ) made their first
contribution in
[https://github.com/bitflags/bitflags/pull/405 ](https://togithub.com/bitflags/bitflags/pull/405 )
- [@​waywardmonkeys](https://togithub.com/waywardmonkeys ) made
their first contribution in
[https://github.com/bitflags/bitflags/pull/410 ](https://togithub.com/bitflags/bitflags/pull/410 )
**Full Changelog**:
https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0
</details>
<details>
<summary>rust-lang/log (log)</summary>
###
[`v0.4.22`](https://togithub.com/rust-lang/log/blob/HEAD/CHANGELOG.md#0422---2024-06-27 )
[Compare
Source](https://togithub.com/rust-lang/log/compare/0.4.21...0.4.22 )
</details>
<details>
<summary>rust-num/num-bigint (num-bigint)</summary>
###
[`v0.4.6`](https://togithub.com/rust-num/num-bigint/blob/HEAD/RELEASES.md#Release-046-2024-06-27 )
[Compare
Source](https://togithub.com/rust-num/num-bigint/compare/num-bigint-0.4.5...num-bigint-0.4.6 )
- [Fixed compilation on `x86_64-unknown-linux-gnux32`.][312]
**Contributors**: [@​cuviper](https://togithub.com/cuviper ),
[@​ralphtandetzky](https://togithub.com/ralphtandetzky ),
[@​yhx-12243](https://togithub.com/yhx-12243 )
[312]: https://togithub.com/rust-num/num-bigint/pull/312
</details>
<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>
###
[`v1.9.2`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#192---2024-06-30 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.9.1...oxc_resolver-v1.9.2 )
##### Added
- *(napi)* add tracing via `OXC_LOG:DEBUG`
([#​202](https://togithub.com/oxc-project/oxc_resolver/pull/202 ))
##### Other
- document directory is an absolute path for `resolve(directory,
specifier)`
([#​206](https://togithub.com/oxc-project/oxc_resolver/pull/206 ))
- add a broken tsconfig test
([#​205](https://togithub.com/oxc-project/oxc_resolver/pull/205 ))
- improve code coverage for src/error.rs
([#​204](https://togithub.com/oxc-project/oxc_resolver/pull/204 ))
- skip resolving extension alias when `options.extension_alias` is empty
([#​203](https://togithub.com/oxc-project/oxc_resolver/pull/203 ))
- add npm badge to crates.io
###
[`v1.9.1`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#191---2024-06-29 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.9.0...oxc_resolver-v1.9.1 )
##### Added
- strip symbols and enable LTO
([#​197](https://togithub.com/oxc-project/oxc_resolver/pull/197 ))
##### Other
- improve call to `Path::ends_with`
([#​199](https://togithub.com/oxc-project/oxc_resolver/pull/199 ))
- list \[profile.release] explicitly
([#​198](https://togithub.com/oxc-project/oxc_resolver/pull/198 ))
###
[`v1.9.0`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#190---2024-06-28 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.8.4...oxc_resolver-v1.9.0 )
##### Added
- export package.json `type` and `sideEffects` field by default for
bundlers
([#​196](https://togithub.com/oxc-project/oxc-resolver/pull/196 ))
###
[`v1.8.4`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#184---2024-06-27 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.8.3...oxc_resolver-v1.8.4 )
##### Other
- skip searching for package.json when `alias_fields` is not provided
([#​194](https://togithub.com/oxc-project/oxc_resolver/pull/194 ))
###
[`v1.8.3`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#183---2024-06-26 )
[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.8.2...oxc_resolver-v1.8.3 )
- *(napi*) release wasi build
</details>
<details>
<summary>serde-rs/json (serde_json)</summary>
###
[`v1.0.119`](https://togithub.com/serde-rs/json/releases/tag/v1.0.119 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.118...v1.0.119 )
- Add `serde_json::Map::shift_insert`
([#​1149](https://togithub.com/serde-rs/json/issues/1149 ), thanks
[@​joshka](https://togithub.com/joshka ))
###
[`v1.0.118`](https://togithub.com/serde-rs/json/releases/tag/v1.0.118 )
[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.117...v1.0.118 )
- Implement Hash for serde_json::Value
([#​1127](https://togithub.com/serde-rs/json/issues/1127 ), thanks
[@​edwardycl](https://togithub.com/edwardycl ))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 00:44:13 +00:00
github-actions[bot]
3870ed5a24
Release crates v0.16.2 ( #3983 )
...
## [0.16.2] - 2024-06-30
### Features
- dc6d45e ast,codegen: Add `TSParenthesizedType` and print type
parentheses correctly (#3979 ) (Boshen)
- 63f36da parser: Parse modifiers with `parse_modifiers` (take 2)
(#3977 ) (DonIsaac)
### Bug Fixes
- dac617d codegen: Print some missing typescript attributes (#3980 )
(Boshen)
- bd1141d isolated-declarations: If declarations is referenced in
`declare global` then keep it (#3982 ) (Dunqing)
### Performance
- b234ddd semantic: Only check for jsdoc if jsdoc building is enabled
(Boshen)
- 1eac3d2 semantic: Use `Atom<'a>` for `Reference`s (#3972 ) (Don Isaac)
- 0c81fbe syntax: Use `NonZeroU32` for `SymbolId` and `ReferenceId`
(#3970 ) (Boshen)
### Refactor
- 5845057 transformer: Pass in symbols and scopes (#3978 ) (Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-30 19:59:15 +08:00
underfin
9bc36ed5d3
chore: bump napi 3.0.0-alpha.3 ( #3953 )
...
Keep version same as rolldown, avoid release build error.
2024-06-30 18:25:06 +08:00
Boshen
5845057bff
refactor(transformer): pass in symbols and scopes ( #3978 )
...
This PR adds a new method `build_with_symbols_and_scopes` to make semantic building optional, there may be prior steps that has the semantic data already built.
2024-06-30 06:33:48 +00:00
github-actions[bot]
21b964b214
Release oxlint v0.5.1 ( #3967 )
...
## [0.5.1] - 2024-06-29
### Features
- f64ad4b semantic: Make jsdoc building optional (turned off by default)
(#3955 ) (Boshen)
### Bug Fixes
- c26975a linter: Only show the filename for max-lines (#3966 ) (Boshen)
- 94329e4 linter: Handle useful but empty constructors in
no-useless-constructor (#3951 ) (DonIsaac)
- 6498a08 linter: No-useless-spread fixer with multiple spread elements
(#3950 ) (DonIsaac)
- 750cb43 oxlint: Gate custom allocators by feature flag (#3945 ) (Luca
Bruno)
### Refactor
- 1cca2a8 eslint: Convert with_labels to with_label where applicable
(#3946 ) (Jelle van der Waa)
- 2705df9 linter: Improve diagnostic labeling (#3960 ) (DonIsaac)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-29 17:01:56 +08:00
github-actions[bot]
fa50e9737e
Release crates v0.16.1 ( #3968 )
...
## [0.16.1] - 2024-06-29
### Features
- 7b38bde parser: Parse modifiers with `parse_modifiers` (#3948 )
(DonIsaac)
- f64ad4b semantic: Make jsdoc building optional (turned off by default)
(#3955 ) (Boshen)
### Bug Fixes
- 51e54f9 codegen: Should print `TSModuleDeclarationKind` instead of
just `module` (#3957 ) (Dunqing)
- 31e4c3b isolated-declarations: `declare global {}` should be kept even
if it is not exported (#3956 ) (Dunqing)
### Refactor
- 2705df9 linter: Improve diagnostic labeling (#3960 ) (DonIsaac)
- 15ec254 semantic: Remove the unused `Semantic::build2` function
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-29 16:53:09 +08:00
github-actions[bot]
4e3e1a39eb
Release crates v0.16.0 ( #3930 )
...
## [0.16.0] - 2024-06-26
- 6796891 ast: [**BREAKING**] Rename all instances of `BigintLiteral` to
`BigIntLiteral`. (#3898 ) (rzvxa)
- 1f85f1a ast: [**BREAKING**] Revert adding `span` field to the
`BindingPattern` type. (#3899 ) (rzvxa)
- ae09a97 ast: [**BREAKING**] Remove `Modifiers` from ts nodes (#3846 )
(Boshen)
- 1af5ed3 ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`const` on `EnumDeclaration` (#3845 ) (Boshen)
- 0673677 ast: [**BREAKING**] Replace `Modifiers` with `declare` on
`Function` (#3844 ) (Boshen)
- ee6ec4e ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`abstract` on `Class` (#3841 ) (Boshen)
- 9b38119 ast: [**BREAKING**] Replace `Modifiers` with `declare` on
`VariableDeclaration` (#3839 ) (Boshen)
- cfcef24 ast: [**BREAKING**] Add `directives` field to `TSModuleBlock`
(#3830 ) (Boshen)
- 4456034 ast: [**BREAKING**] Add `IdentifierReference` to
`ExportSpecifier` (#3820 ) (Boshen)
### Features
- 497769c ast: Add some visitor functions (#3785 ) (Dunqing)
- 4b06dc7 ast: Add TSType::TSIntrinsicKeyword to is_keyword (#3775 )
(Dunqing)
- 5847e16 ast,parser: Add `intrinsic` keyword (#3767 ) (Boshen)
- 2e026e1 ast_codegen: Generate `ast_kind.rs`. (#3888 ) (rzvxa)
- 09f4d3c ast_codegen: Add `ImplGetSpanGenerator`. (#3852 ) (rzvxa)
- 3e78f98 cfg: Add depth first search with hash sets. (#3771 ) (rzvxa)
- 01da2f7 codegen: Print TSThisParameter for TSCallSignatureDeclaration
and TSMethodSignature (#3792 ) (Dunqing)
- 2821e0e codegen: Print readonly keyword for TSIndexSignature (#3791 )
(Dunqing)
- 97575d8 codegen: Print TSClassImplements and TSThisParameter (#3786 )
(Dunqing)
- 5e2baf3 isolated-declarations: Report error for expando functions
(#3872 ) (Dunqing)
- 2cdb34f isolated-declarations: Support for class function overloads
(#3811 ) (Dunqing)
- 231b8f0 isolated-declarations: Support for export default function
overloads (#3809 ) (Dunqing)
- a37138f isolated-declarations: Improve the inference template literal
(#3797 ) (Dunqing)
- b0d7355 isolated-declarations: Transform const expression correctly
(#3793 ) (Dunqing)
- b38c34d isolated-declarations: Support inferring
ParenthesizedExpression (#3769 ) (Dunqing)
- 4134de8 isolated-declarations: Add ts error code to the error message
(#3755 ) (Dunqing)
- 94202de isolated-declarations: Add `export {}` when needed (#3754 )
(Dunqing)
- e95d8e3 isolated-declarations: Shrink span for arrow function that
needs an explicit return type (#3752 ) (Dunqing)
- df9971d isolated-declarations: Improve inferring the return type from
function (#3750 ) (Dunqing)
- 4aea2b1 isolated-declarations: Improve inferring the type of accessor
(#3749 ) (Dunqing)
- 9ea30c4 isolated-declarations: Treat AssignmentPattern as optional
(#3748 ) (Dunqing)
- dd540c8 minifier: Add skeleton for ReplaceGlobalDefines ast pass
(#3803 ) (Boshen)
- f3c3970 minifier: Add skeleton for RemoveDeadCode ast pass (#3802 )
(Boshen)
- 4fb90eb oxc: Export isolated-declarations (#3765 ) (Boshen)
- d5f6aeb semantic: Check for illegal symbol modifiers (#3838 ) (Don
Isaac)
- 01572f0 sourcemap: Impl `std::fmt::Display` for `Error` (#3902 )
(DonIsaac)
- 5501d5c transformer/typescript: Transform `import {} from "mod"` to
import `"mod"` (#3866 ) (Dunqing)
- 2a16ce0 traverse: Disable syntax check and disable build module record
(#3794 ) (Boshen)- d3cd3ea Oxc transform binding (#3896 ) (underfin)
### Bug Fixes
- 063cfde ast: Correct JSON serialization of `TSModuleBlock` (#3858 )
(overlookmotel)
- 66f404c ast: Fix JSON serialization of `BindingPattern` (#3856 )
(overlookmotel)
- 2766594 codegen: Print type parameters for MethodDefinition (#3922 )
(Dunqing)
- 27f0531 isolated-declarations: Private constructor reaching
unreachable (#3921 ) (Dunqing)
- 59ce38b isolated-declarations: Inferring of UnrayExpression
incorrectly (#3920 ) (Dunqing)
- 58e54f4 isolated-declarations: Report an error for parameters if they
are ObjectPattern or ArrayPattern without an explicit type (#3810 )
(Dunqing)
- cb8a272 isolated-declarations: Cannot infer nested `as const` (#3807 )
(Dunqing)
- d8ecce5 isolated-declarations: Infer BigInt number as `bigint` type
(#3806 ) (Dunqing)
- 4e241fc isolated-declarations: Missing `const` after transformed const
enum (#3805 ) (Dunqing)
- 683c7b0 isolated-declarations: Shouldn’t add declare in declaration
with export default (#3804 ) (Dunqing)
- 7d47fc3 isolated-declarations: Should stripe async and generator
keyword after transformed (#3790 ) (Dunqing)
- 8ce794d isolated-declarations: Inferring an incorrect return type when
there is an arrow function inside a function (#3768 ) (Dunqing)
- d29316a isolated-declarations: Transform incorrectly when there are
multiple functions with the same name (#3753 ) (Dunqing)
- bf1c250 isolated-declarations: False positives for non-exported
binding elements (#3751 ) (Dunqing)
- 275349a parser: Parse function type parameter name `accessor` (#3926 )
(Boshen)
- ef82c78 parser: Trailing comma is not allowed in
ParenthesizedExpression (#3885 ) (Dunqing)
- 13754cb parser: Change diagnostic to "modifier cannot be used here"
(#3853 ) (Boshen)
- 8c9fc63 semantic: Apply strict mode scope flag for strict mode TS
Modules (#3861 ) (overlookmotel)
- 99a40ce semantic: `export default foo` should have
`ExportLocalName::Default(NameSpan)` entry (#3823 ) (Boshen)
- 08fcfb3 transformer: Fix spans and scopes in TS enum transform (#3911 )
(overlookmotel)
- 17ad8f7 transformer: Create new scopes for new blocks in TS transform
(#3908 ) (overlookmotel)
- d76f34b transformer: TODO comments for missing scopes (#3837 )
(overlookmotel)
- e470731 transformer: TS transform handle when type exports first
(#3833 ) (overlookmotel)
- d774e54 transformer: TS transform generate do not copy statements
(#3832 ) (overlookmotel)
- ff1da27 transformer: Correct comment in example (#3831 )
(overlookmotel)
- 6dcc3f4 transformer: Fix TS annotation transform scopes (#3816 )
(overlookmotel)
- aea3e9a transformer: Correct spans for TS annotations transform
(#3782 ) (overlookmotel)
### Performance
- 92c21b2 diagnostics: Optimize string-buffer reallocations (#3897 )
(Luca Bruno)
- 4bf405d parser: Add a few more inline hints to cursor functions
(#3894 ) (Boshen)
- 10d1de5 semantic: Remove uneccessary allocation in builder (#3867 )
(DonIsaac)- 4f7ff7e Do not pass `&Atom` to functions (#3818 )
(overlookmotel)
### Refactor
- 6f26087 ast: Add comment about alternatives to `AstBuilder::copy`
(#3905 ) (overlookmotel)
- 442aca3 ast: Add comment not to use `AstBuilder::copy` (#3891 )
(overlookmotel)
- acf69fa ast: Refactor custom `Serialize` impls (#3859 ) (overlookmotel)
- 9e148e9 ast: Add line breaks (#3860 ) (overlookmotel)
- 363d3d5 ast: Add span field to the `BindingPattern` type. (#3855 )
(rzvxa)
- a648748 ast: Shorten code in AST builder (#3835 ) (overlookmotel)
- 1206967 ast: Reduce allocations in AST builder (#3834 ) (overlookmotel)
- 2f5d50e isolated-declarations: Remove `Modifiers` (#3847 ) (Boshen)
- 8027b1e minifier: Change prepass to ast_passes::remove_parens (#3801 )
(Boshen)
- a471e62 parser: Clean up `try_parse` (#3925 ) (Boshen)
- 3db2553 parser: Improve parsing of TypeScript type arguments (#3923 )
(Boshen)
- 4cf3c76 parser: Improve parsing of TypeScript types (#3903 ) (Boshen)
- 187f078 parser: Improve parsing of
`parse_function_or_constructor_type` (#3892 ) (Boshen)
- 97d59fc parser: Move code around for parsing `Modifiers` (#3849 )
(Boshen)
- 5ef28b7 transformer: Shorten code (#3912 ) (overlookmotel)
- d9f268d transformer: Shorten TS transform code (#3836 ) (overlookmotel)
- 21b0d01 transformer: Pass ref to function (#3781 ) (overlookmotel)
- 7c44703 transformer: Remove needless `pub` on TS enum transform
methods (#3774 ) (overlookmotel)
- 22c56d7 transformer: Move TSImportEqualsDeclaration transform code
(#3764 ) (overlookmotel)
- cd56aa9 transformer: Simplify TS export assignment transform (#3762 )
(overlookmotel)
- 512740d transformer: Move and simplify TS enum transform entry point
(#3760 ) (overlookmotel)
- 1061baa traverse: Separate `#[scope]` attr (#3901 ) (overlookmotel)
- fcd21a6 traverse: Indicate scope entry point with
`scope(enter_before)` attr (#3882 ) (overlookmotel)
- 24979c9 traverse: Use camel case props internally (#3880 )
(overlookmotel)
- 2045c92 traverse: Improve parsing attrs in traverse codegen (#3879 )
(overlookmotel)- d6437fe Clean up some usages of `with_labels` (#3854 )
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-27 20:38:31 +08:00
github-actions[bot]
06e4ce4f5d
Release oxlint v0.5.0 ( #3940 )
...
## [0.5.0] - 2024-06-27
- 6796891 ast: [**BREAKING**] Rename all instances of `BigintLiteral` to
`BigIntLiteral`. (#3898 ) (rzvxa)
- ae09a97 ast: [**BREAKING**] Remove `Modifiers` from ts nodes (#3846 )
(Boshen)
- 1af5ed3 ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`const` on `EnumDeclaration` (#3845 ) (Boshen)
- ee6ec4e ast: [**BREAKING**] Replace `Modifiers` with `declare` and
`abstract` on `Class` (#3841 ) (Boshen)
- 4456034 ast: [**BREAKING**] Add `IdentifierReference` to
`ExportSpecifier` (#3820 ) (Boshen)
- 0537d29 cfg: [**BREAKING**] Move control flow to its own crate.
(#3728 ) (rzvxa)
- 5c38a0f codegen: [**BREAKING**] New code gen API (#3740 ) (Boshen)
- 4bce59d semantic/cfg: [**BREAKING**] Re-export `petgraph` as
`control_flow::graph`. (#3722 ) (rzvxa)
### Features
- 3ae2628 linter: Change `no-import-assign` to correctness (#3928 )
(Boshen)
- a89d501 linter: Implement
@typescript-eslint/no-non-null-asserted-nulli… (#3850 ) (kaykdm)
- fc48cb4 linter: eslint-plugin-jest/prefer-jest-mocked (#3865 )
(cinchen)
- 63b98bd linter: Accept multiple fixes when fix code (#3842 )
(mysteryven)
- 328445b linter: Support `vitest/no-disabled-tests` (#3717 )
(mysteryven)
- 8c61f9c linter: Implement @typescript-eslint/no-non-null-assertion
(#3825 ) (kaykdm)
- 080ecbd linter: Add `no-fallthrough`. (#3673 ) (rzvxa)
- 9493fbe linter: Add `oxc/no-optional-chaining` rule (#3700 )
(mysteryven)
- 139adfe linter: Add `@typescript-eslint/no-import-type-side_effects`
(#3699 ) (mysteryven)
- 5f84500 linter/eslint-plugin-react: Implement prefer-es6-class (#3812 )
(Jelle van der Waa)
- fafe67c linter/import: Implement max-dependencies (#3814 ) (Jelle van
der Waa)
- d5f6aeb semantic: Check for illegal symbol modifiers (#3838 ) (Don
Isaac)
### Bug Fixes
- 4bd2c88 linter: Fix and promote `getter-return` to correctness.
(#3777 ) (rzvxa)
- 1190dee linter: False positives with setters in the `getter-return`
rule. (#3714 ) (rzvxa)
- de0690f linter: Do not run getter-return in typescript (#3693 )
(Boshen)
- cf71c23 linter: Edge case with infinite loops. (#3672 ) (rzvxa)
- 5902331 oxlint: Properly report error (#3889 ) (Luca Bruno)
- 99a40ce semantic: `export default foo` should have
`ExportLocalName::Default(NameSpan)` entry (#3823 ) (Boshen)
- abd6ac8 semantic/cfg: Discrete finalization path after `NewFunction`s.
(#3671 ) (rzvxa)
### Performance
- 4f7ff7e Do not pass `&Atom` to functions (#3818 ) (overlookmotel)
### Refactor
- 4d2b7f1 linter: `LintContext` can now only be constructed with a cfg
enabled semantic. (#3761 ) (rzvxa)
- 7302429 linter/prefer_number_properties: Remove the unused
`IdentifierName` check (#3822 ) (Boshen)
- d8ad321 semantic: Make control flow generation optional. (#3737 )
(rzvxa)
### Testing
- 887da40 linter: Enable `no-fallthrough` test with `disable-next-line`.
(#3766 ) (rzvxa)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-27 15:09:13 +08:00
underfin
bbe8336c7b
feat(napi/transform): add crate-type: "lib" ( #3876 )
2024-06-26 21:57:53 +08:00
underfin
d3cd3ea2de
feat: oxc transform binding ( #3896 )
...
closes #3877
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-06-26 21:57:19 +08:00
rzvxa
09f4d3c4d3
feat(ast_codegen): add ImplGetSpanGenerator. ( #3852 )
...
This one is ready to replace the handwritten module.
2024-06-25 14:39:39 +00:00
rzvxa
f6c4ec44ca
feat(tasks/ast_codegen): prototype for codegen AST related code ( #3815 )
...
Part of https://github.com/oxc-project/oxc/issues/3819
2024-06-25 13:54:50 +00:00
Boshen
41fbe05b58
chore: bump oxc-browserslist to v1.0.1 ( #3884 )
2024-06-24 14:51:17 +00:00
Boshen
80c17ac66e
chore: bump oxc-resolver to 1.8.2 ( #3883 )
2024-06-24 14:16:12 +00:00
Boshen
7f1266a37b
chore(deps): update rust crates ( #3873 )
2024-06-24 11:24:54 +00:00
Boshen
09bc0fba23
chore(deps): update rust crates ( #3875 )
2024-06-24 11:04:29 +00:00
Boshen
dd540c8f0f
feat(minifier): add skeleton for ReplaceGlobalDefines ast pass ( #3803 )
2024-06-21 13:53:59 +00:00
Boshen
f8fe583a0b
ci: run cargo check first
2024-06-20 23:38:21 +08:00
Boshen
4fb90eb009
feat(oxc): export isolated-declarations ( #3765 )
2024-06-19 12:54:02 +00:00
Boshen
8c02c1dac3
chore(isolated-declarations): add snapshot testing ( #3756 )
2024-06-19 09:20:17 +00:00
github-actions[bot]
1b3cd6c24d
Release crates v0.15.0 ( #3743 )
...
## [0.15.0] - 2024-06-18
- 0537d29 cfg: [**BREAKING**] Move control flow to its own crate.
(#3728 ) (rzvxa)
- 5c38a0f codegen: [**BREAKING**] New code gen API (#3740 ) (Boshen)
- 4bce59d semantic/cfg: [**BREAKING**] Re-export `petgraph` as
`control_flow::graph`. (#3722 ) (rzvxa)
- 534242a codegen: [**BREAKING**] Remove
`CodegenOptions::enable_typescript` (#3674 ) (Boshen)
- 0578ece ast: [**BREAKING**] Remove
`ExportDefaultDeclarationKind::TSEnumDeclaration` (#3666 ) (Dunqing)
### Features
- 5a99d30 codegen: Improve codegen formatting (#3735 ) (Boshen)
- bf9b38a codegen: Improve codegen formatting (#3731 ) (Boshen)
- 4a004e2 codegen: Print TSImport remaining fields (#3695 ) (Dunqing)
- a56cb1b codegen: Print accessibility for MethodDefinition (#3690 )
(Dunqing)
- 38a75e5 coverage: Improve codegen (#3729 ) (Boshen)
- 750a534 coverage: Transformer idempotency test (#3691 ) (Boshen)
- ee627c3 isolated-declarations: Create unique name for `_default`
(#3730 ) (Dunqing)
- 81e9526 isolated-declarations: Inferring set accessor parameter type
from get accessor return type (#3725 ) (Dunqing)
- 77d5533 isolated-declarations: Report errors that are consistent with
typescript. (#3720 ) (Dunqing)
- 8f5655d linter: Add eslint/no-useless-constructor (#3594 ) (Don Isaac)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238 ) (rzvxa)
- 0b8098a napi: Isolated-declaration (#3718 ) (Boshen)
- 527bfc8 npm/oxc-transform: Setup npm/oxc-transform and publish
(Boshen)
- d65c652 parser: Display jsx mismatch error, e.g. `<Foo></Bar>` (#3696 )
(Boshen)
- 9c31ed9 semantic/cfg: Propagate unreachable edges through subgraphs.
(#3648 ) (rzvxa)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567 ) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566 ) (rzvxa)
- 910193e transformer-dts: Report error for super class (#3711 )
(Dunqing)
- 413d7be transformer-dts: Transform enum support (#3710 ) (Dunqing)
- 35c382e transformer-dts: Remove type annotation from private field
(#3689 ) (Dunqing)
- 0e6d3ce transformer-dts: Report error for async function and generator
(#3688 ) (Dunqing)
- b22b59a transformer-dts: Transform namespace support (#3683 ) (Dunqing)
- 4f2db46 transformer-dts: `--isolatedDeclarations` dts transform
(#3664 ) (Dunqing)
### Bug Fixes
- 2158268 ast: Incorrect visit order in function (#3681 ) (Dunqing)
- da1e2d0 codegen: Improve typescript codegen (#3708 ) (Boshen)
- f1b793f isolated-declarations: Function overloads reaching unreachable
(#3739 ) (Dunqing)
- 0fbecdc isolated-declarations: Should be added to references, not
bindings (#3726 ) (Dunqing)
- 8f64d99 minifier: Respect `join_vars: false` option (#3724 )
(mysteryven)
- 70fc69b semantic: Add Eq to CtxFlags (#3651 ) (Yuji Sugiura)
- 7a58fec semantic/cfg: Issue in unlabeled `Ctx`s. (#3678 ) (rzvxa)
- abd6ac8 semantic/cfg: Discrete finalization path after `NewFunction`s.
(#3671 ) (rzvxa)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667 ) (Ali Rezvani)
- 59666e0 transformer: Do not rename accessible identifier references
(#3623 ) (Dunqing)
- 90743e2 traverse: Change visit order for `Function` (#3685 )
(overlookmotel)
### Performance
- 2717a1a semantic/cfg: Lower the visits in
`neighbors_filtered_by_edge_weight`. (#3676 ) (rzvxa)
### Refactor
- fa7a6ba codegen: Add `gen` method to ast nodes (#3687 ) (Boshen)
- 09b92b6 codegen: Move `gen_ts` into `gen` to make searching things
easier (#3680 ) (Boshen)
- 3c59735 isolated-declarations: Remove `TransformDtsCtx` (#3719 )
(Boshen)
- 815260e isolated-declarations: Decouple codegen (#3715 ) (Boshen)
- 7ec44f8 semantic: Rename `cfg` macro to `control_flow`. (#3742 )
(rzvxa)
- d8ad321 semantic: Make control flow generation optional. (#3737 )
(rzvxa)
- a94a72d semantic: Expose 1 checker function instead of 2 (#3694 )
(Boshen)
- bd8d115 semantic/cfg: Remove unused types. (#3677 ) (rzvxa)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650 )
(rzvxa)
- 4f16664 transformer_dts: Create a `Program` for codegen (#3679 )
(Boshen)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-19 01:15:55 +08:00
rzvxa
0537d298db
refactor(cfg)!: move control flow to its own crate. ( #3728 )
2024-06-18 15:59:29 +00:00
Boshen
5c38a0fd69
feat(codegen)!: new code gen API ( #3740 )
...
This PR introduces two type alias to avoid the confusing const generic `pub struct Codegen<'a, const MINIFY: bool>`
* CodeGenerator - Code generator without whitespace removal.
* WhitespaceRemover - Code generator with whitespace removal.
Usage is changed to a builder pattern:
```rust
CodeGenerator::new()
.enable_comment(...)
.enable_sourcemap(...)
.build(&program);
```
2024-06-18 15:50:12 +00:00
Boshen
f42c325a06
refactor(napi): change "isolated declarations" to "transform" ( #3721 )
2024-06-17 14:09:18 +00:00
Boshen
0b8098a442
feat(napi): isolated-declaration ( #3718 )
2024-06-17 13:06:00 +00:00
Boshen
87c3282deb
chore(transformer-dts): change crate to oxc_isolated_declarations ( #3713 )
2024-06-17 11:14:13 +00:00
renovate
8dc985a8fa
chore(deps): update rust crates ( #3709 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [criterion2](https://bheisler.github.io/criterion.rs/book/index.html ) ([source](https://togithub.com/Boshen/criterion2.rs )) | workspace.dependencies | minor | `0.10.0` -> `0.11.0` |
| [memchr](https://togithub.com/BurntSushi/memchr ) | workspace.dependencies | patch | `2.7.2` -> `2.7.4` |
| [oxc-browserslist](https://togithub.com/oxc-project/oxc-browserslist ) | workspace.dependencies | patch | `0.17.0` -> `0.17.1` |
| [url](https://togithub.com/servo/rust-url ) | workspace.dependencies | patch | `2.5.0` -> `2.5.1` |
---
### Release Notes
<details>
<summary>Boshen/criterion2.rs (criterion2)</summary>
### [`v0.11.0`](https://togithub.com/Boshen/criterion2.rs/blob/HEAD/CHANGELOG.md#0110---2024-06-14 )
[Compare Source](https://togithub.com/Boshen/criterion2.rs/compare/v0.10.0...v0.11.0 )
##### Added
- \[**breaking**] remove csv_output ([#​33](https://togithub.com/Boshen/criterion2.rs/pull/33 ))
- rm crate `criterion-macro`
##### Other
- *(deps)* update dependency rust to v1.79.0 ([#​35](https://togithub.com/Boshen/criterion2.rs/pull/35 ))
- *(deps)* update rust crates ([#​32](https://togithub.com/Boshen/criterion2.rs/pull/32 ))
- *(deps)* lock file maintenance rust crates ([#​31](https://togithub.com/Boshen/criterion2.rs/pull/31 ))
- check unused dependencies
</details>
<details>
<summary>BurntSushi/memchr (memchr)</summary>
### [`v2.7.4`](https://togithub.com/BurntSushi/memchr/compare/2.7.3...2.7.4 )
[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.3...2.7.4 )
### [`v2.7.3`](https://togithub.com/BurntSushi/memchr/compare/2.7.2...2.7.3 )
[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.2...2.7.3 )
</details>
<details>
<summary>oxc-project/oxc-browserslist (oxc-browserslist)</summary>
### [`v0.17.1`](https://togithub.com/oxc-project/oxc-browserslist/blob/HEAD/CHANGELOG.md#0171---2024-06-17 )
[Compare Source](https://togithub.com/oxc-project/oxc-browserslist/compare/oxc-browserslist-v0.17.0...oxc-browserslist-v0.17.1 )
##### Other
- *(deps)* update npm packages ([#​45](https://togithub.com/oxc-project/oxc-browserslist/pull/45 ))
</details>
<details>
<summary>servo/rust-url (url)</summary>
### [`v2.5.1`](https://togithub.com/servo/rust-url/releases/tag/v2.5.1 )
[Compare Source](https://togithub.com/servo/rust-url/compare/v2.5.0...v2.5.1 )
#### What's Changed
- Be more detailed in documentation of set_query by [@​philippeitis](https://togithub.com/philippeitis ) in [https://github.com/servo/rust-url/pull/737 ](https://togithub.com/servo/rust-url/pull/737 )
- perf(punycode): avoid double allocation in decode_to_string by [@​bishopcheckmate](https://togithub.com/bishopcheckmate ) in [https://github.com/servo/rust-url/pull/894 ](https://togithub.com/servo/rust-url/pull/894 )
- Use SPECIAL_PATH_SEGMENT when encoding path in from_file_path by [@​valenting](https://togithub.com/valenting ) in [https://github.com/servo/rust-url/pull/902 ](https://togithub.com/servo/rust-url/pull/902 )
- Add dependabot by [@​oriontvv](https://togithub.com/oriontvv ) in [https://github.com/servo/rust-url/pull/903 ](https://togithub.com/servo/rust-url/pull/903 )
- Bump codecov/codecov-action from 3 to 4 by [@​dependabot](https://togithub.com/dependabot ) in [https://github.com/servo/rust-url/pull/904 ](https://togithub.com/servo/rust-url/pull/904 )
- Bump actions/upload-artifact from 2 to 4 by [@​dependabot](https://togithub.com/dependabot ) in [https://github.com/servo/rust-url/pull/905 ](https://togithub.com/servo/rust-url/pull/905 )
- Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot ) in [https://github.com/servo/rust-url/pull/906 ](https://togithub.com/servo/rust-url/pull/906 )
- Fix non-base64 data URLs with % characters not followed by hex digits by [@​SmaugPool](https://togithub.com/SmaugPool ) in [https://github.com/servo/rust-url/pull/797 ](https://togithub.com/servo/rust-url/pull/797 )
- Rename `master` branch to `main` by [@​mrobinson](https://togithub.com/mrobinson ) in [https://github.com/servo/rust-url/pull/914 ](https://togithub.com/servo/rust-url/pull/914 )
- Add bench for to_ascii on an already-Punycode name by [@​hsivonen](https://togithub.com/hsivonen ) in [https://github.com/servo/rust-url/pull/915 ](https://togithub.com/servo/rust-url/pull/915 )
- Update URLs by [@​atouchet](https://togithub.com/atouchet ) in [https://github.com/servo/rust-url/pull/916 ](https://togithub.com/servo/rust-url/pull/916 )
- Fix lint by [@​valenting](https://togithub.com/valenting ) in [https://github.com/servo/rust-url/pull/920 ](https://togithub.com/servo/rust-url/pull/920 )
- Fix multiple issues on wasm32, and runs url tests in CI by [@​micolous](https://togithub.com/micolous ) in [https://github.com/servo/rust-url/pull/886 ](https://togithub.com/servo/rust-url/pull/886 )
- Non-special URLs can have their paths erased by [@​DylanOToole2](https://togithub.com/DylanOToole2 ) in [https://github.com/servo/rust-url/pull/921 ](https://togithub.com/servo/rust-url/pull/921 )
- docs: document SyntaxViolation variants, remove bare URLs by [@​aatifsyed](https://togithub.com/aatifsyed ) in [https://github.com/servo/rust-url/pull/924 ](https://togithub.com/servo/rust-url/pull/924 )
- docs: Document possible replacements of the base URL by [@​mo8it](https://togithub.com/mo8it ) in [https://github.com/servo/rust-url/pull/926 ](https://togithub.com/servo/rust-url/pull/926 )
- Reimplement idna on top of ICU4X by [@​hsivonen](https://togithub.com/hsivonen ) in [https://github.com/servo/rust-url/pull/923 ](https://togithub.com/servo/rust-url/pull/923 )
#### New Contributors
- [@​philippeitis](https://togithub.com/philippeitis ) made their first contribution in [https://github.com/servo/rust-url/pull/737 ](https://togithub.com/servo/rust-url/pull/737 )
- [@​bishopcheckmate](https://togithub.com/bishopcheckmate ) made their first contribution in [https://github.com/servo/rust-url/pull/894 ](https://togithub.com/servo/rust-url/pull/894 )
- [@​oriontvv](https://togithub.com/oriontvv ) made their first contribution in [https://github.com/servo/rust-url/pull/903 ](https://togithub.com/servo/rust-url/pull/903 )
- [@​dependabot](https://togithub.com/dependabot ) made their first contribution in [https://github.com/servo/rust-url/pull/904 ](https://togithub.com/servo/rust-url/pull/904 )
- [@​SmaugPool](https://togithub.com/SmaugPool ) made their first contribution in [https://github.com/servo/rust-url/pull/797 ](https://togithub.com/servo/rust-url/pull/797 )
- [@​hsivonen](https://togithub.com/hsivonen ) made their first contribution in [https://github.com/servo/rust-url/pull/915 ](https://togithub.com/servo/rust-url/pull/915 )
- [@​micolous](https://togithub.com/micolous ) made their first contribution in [https://github.com/servo/rust-url/pull/886 ](https://togithub.com/servo/rust-url/pull/886 )
- [@​DylanOToole2](https://togithub.com/DylanOToole2 ) made their first contribution in [https://github.com/servo/rust-url/pull/921 ](https://togithub.com/servo/rust-url/pull/921 )
- [@​aatifsyed](https://togithub.com/aatifsyed ) made their first contribution in [https://github.com/servo/rust-url/pull/924 ](https://togithub.com/servo/rust-url/pull/924 )
- [@​mo8it](https://togithub.com/mo8it ) made their first contribution in [https://github.com/servo/rust-url/pull/926 ](https://togithub.com/servo/rust-url/pull/926 )
**Full Changelog**: https://github.com/servo/rust-url/compare/v2.5.0...v2.5.1
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions ) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/oxc-project/oxc ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-06-17 09:49:03 +00:00
Boshen
eff9cff048
feat(coverage): add dts transform coverage test ( #3675 )
2024-06-14 14:29:27 +00:00
Dunqing
4f2db46ee5
feat(transformer-dts): --isolatedDeclarations dts transform ( #3664 )
...
The goal of this PR is to pass the test cases in https://github.com/microsoft/TypeScript/tree/main/tests/cases/transpile
Once this is polished, we may publish a npm package with napi bindings for people to experiment with.
2024-06-14 12:44:10 +00:00
github-actions[bot]
6168969f94
Release oxlint v0.4.4 ( #3669 )
...
## [0.4.4] - 2024-06-14
### Features
- 8f5655d linter: Add eslint/no-useless-constructor (#3594 ) (Don Isaac)
- 29c78db linter: Implement
@typescript-eslint/explicit-function-return-type (#3455 ) (kaykdm)
- 21d3425 linter: Typescript-eslint no-useless-empty-export (#3605 )
(keita hino)
- 85c3b83 linter: Eslint-plugin-jest/max-nested-describes (#3585 )
(cinchen)
- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568 ) (Wang Wenzhe)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238 ) (rzvxa)
- e32ce00 linter/jsdoc: Implement require-param-name rule (#3636 ) (Yuji
Sugiura)
- 110661c linter/jsdoc: Implement require-param-description (#3621 )
(Yuji Sugiura)
- d6370f1 linter/jsdoc: Implement require-param-type rule (#3601 ) (Yuji
Sugiura)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567 ) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566 ) (rzvxa)
### Bug Fixes
- f0b689d linter: Panic in jsdoc/require-param (#3590 ) (Don Isaac)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667 ) (Ali Rezvani)
### Refactor
- 84304b4 linter: Add a `ctx.module_record()` method (#3637 ) (Boshen)
- f98f777 linter: Add rule fixer (#3589 ) (Don Isaac)
- fa11644 linter: Pass `Rc` by value (#3587 ) (overlookmotel)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650 )
(rzvxa)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580 )
(Dunqing)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-14 15:05:26 +08:00
github-actions[bot]
95e0571c2e
Release crates v0.14.0 ( #3643 )
...
## [0.14.0] - 2024-06-12
### Breaking
* fix(codegen)!: remove the unecessary 4th argument from `Codegen::new`
(#3640 )
* feat(ast)!: make `Trivias` clonable by adding `Arc` (#3638 )
### Features
- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568 ) (Wang Wenzhe)
- 129f91e span: Port over more methods from TextRange (#3592 ) (Don
Isaac)
### Bug Fixes
- f8f6d33 ast: Correct `visited_node` attr for strict mode of arrow fns
(#3635 ) (overlookmotel)
- e6ad3fb diagnostics: Do not print ansi color codes in non-TTYs (#3624 )
(Boshen)
- d65202d span: Correct doc comments (#3608 ) (overlookmotel)
- 35e267b transformer: Arrow function transform use UIDs for `_this`
vars (#3634 ) (overlookmotel)
- 39bdebc transformer: Arrow func transform maintain scope ID (#3633 )
(overlookmotel)
- 5cb7e6a transformer: Arrow func transform use correct spans (#3630 )
(overlookmotel)
- 0c4ccb4 transformer: Arrow function transform alter `</this>` (#3627 )
(overlookmotel)
- 8d237c4 transformer: JSX source calculate correct column when Unicode
chars (#3615 ) (overlookmotel)
- 9e8f4d6 transformer: Do not add `__source` for generated nodes (#3614 )
(overlookmotel)
- 0fb4c35 transformer: Use UID for JSX source filename var (#3612 )
(overlookmotel)
### Performance
- 3a59294 transformer: React display name transform reduce Atom
allocations (#3616 ) (overlookmotel)
- f4c1389 transformer: Create `Vec` with capacity (#3613 )
(overlookmotel)
### Refactor
- 0f92521 ast: Replace recursion with loop (#3626 ) (overlookmotel)
- 08f1010 ast: Make `AstBuilder` `Copy` (#3602 ) (overlookmotel)
- 84304b4 linter: Add a `ctx.module_record()` method (#3637 ) (Boshen)
- f98f777 linter: Add rule fixer (#3589 ) (Don Isaac)
- e90e6a2 minifier: Make `Prepass` `Copy` (#3603 ) (overlookmotel)
- 7d61832 semantic: Pass `Rc` by value (#3586 ) (overlookmotel)
- 89bcbd5 transformer: Move `BoundIdentifier` into helpers (#3610 )
(overlookmotel)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580 )
(Dunqing)
- 509871f transformer: Comment for unimplemented `spec` option in arrow
fns transform (#3618 ) (overlookmotel)
- 4b2e3a7 transformer: Fix indentation (#3617 ) (overlookmotel)
- 3467e3d transformer: Remove outdated comment (#3606 ) (overlookmotel)
- a799225 transformer: Flatten file structure for React transform
(#3604 ) (overlookmotel)
- 70f31a8 transformer: Reduce branching in JSX transform (#3596 )
(overlookmotel)
- 3ae567d transformer: Remove dead code (#3588 ) (overlookmotel)
- 60cbdec traverse: `generate_uid_in_root_scope` method (#3611 )
(overlookmotel)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-12 17:52:41 +08:00