underfin
96f02e6e21
feat(sourcemap): optional JSONSourceMap fileds ( #2910 )
...
Support optional JSONSourceMap fileds to support js side complex typing.
2024-04-07 23:32:12 +08:00
underfin
d87cf179a6
feat(sourcemap): add methods to mutate SourceMap ( #2909 )
2024-04-07 23:30:16 +08:00
underfin
74aca1c937
feat(sourcemap): add SourceMapBuilder file ( #2908 )
2024-04-07 23:29:25 +08:00
John Daly
6de1b77b1b
feat(linter/import): Add ignoreTypes option for the import/no-cycle rule ( #2905 )
...
Fixes: https://github.com/oxc-project/oxc/issues/2904
Adds an `ignoreTypes` option for the `import/no-cycle` rule, to ignore
imports that don't have any runtime effect.
2024-04-07 05:07:45 +00:00
Kalven Schraut
79e2c95e2d
fix(linter): handle self closing script tags in astro partial loader ( #2017 ) ( #2907 )
...
Added tests to figure out what the problem from the issue was and
realize the self closing tag was not expected. Added code to handle this
case.
I am not that familiar with astro to know how common self closing script
tags are, their docs seem to use an opening and closing one for inline
scripts
https://docs.astro.build/en/guides/client-side-scripts/#load-external-scripts
2024-04-07 13:02:09 +08:00
Kalven Schraut
1cd5e7511b
fix(linter): svelte partial loader handle generics ( #2875 ) ( #2906 )
...
While looking into this, I knew vue would have similar problems. Which
then led me to realize the generic case was handled already so I tried
abstract out the function so both the vue and svelte partial loaders
could reuse the code. Finally added some svelte test cases to prove this
resolved the issue.
I am a bit new to rust so if there was a better way to reuse the
find_script_closing_angle function open to suggestions.
2024-04-07 13:00:55 +08:00
Wang Wenzhe
65f38dc0db
fix(tasks/rulegen): read quasi in TaggedTemplateExpression ( #2903 )
2024-04-07 10:41:14 +08:00
Wang Wenzhe
b053d54b6f
feat(linter/tree-shaking): support try-catch and AwaitExpression ( #2902 )
2024-04-06 14:02:42 +08:00
Wang Wenzhe
59869d0a96
feat(linter/tree-shaking): check this in different environment ( #2901 )
2024-04-06 13:58:47 +08:00
Denis Gonchar
acb6eb2573
feat(linter): @typescript-eslint/prefer-for-of ( #2789 )
2024-04-06 13:31:31 +08:00
Don Isaac
1ea24ea0a7
fix(semantic): symbols inside functions and classes incorrectly flagged as exported ( #2896 )
...
# What This PR Does
Symbols declared inside exported functions and classes were being
incorrectly flagged with `SymbolFlags::Export`.
For example,
```ts
export function foo<T>(a: T) {
let b = String(a)
return b
}
```
`T`, `a`, and `b` were all flagged as exported.
## Further Work
It doesn't seem like exported enums and interfaces are being included in
`ModuleRecord`. Am I looking in the wrong place, or are they actually
missing?
2024-04-05 23:01:27 +08:00
Yuji Sugiura
aa63b6491f
feat(linter): Implement jsdoc/check-access ( #2642 )
...
Part of #1170 , Finally... 🗻
Some preparation PRs may be needed in advance.
- [x] settings.jsdoc #2706
- [x] new struct design #2765
- [x] handle `Span` for diagnostics #2815
Implement plugin itself.
-
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md
-
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/src/rules/checkAccess.js
I'll send a PR to make this plugin public after confirming that a few
more rules can be implemented without any problems.
2024-04-04 22:36:39 +08:00
Yuji Sugiura
6823482ad6
feat(linter): Implement jsdoc/empty-tags ( #2893 )
...
Part of #1170
-
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md
-
https://github.com/gajus/eslint-plugin-jsdoc/blob/main/src/rules/emptyTags.js
2024-04-04 10:33:33 +08:00
Boshen
fb2ebf462e
chore: fix clippy on unsafe comment
2024-04-03 19:57:21 +08:00
Boshen
feb3c90098
chore(parser): allow unsafe in examples
2024-04-03 19:40:02 +08:00
Boshen
366a7fb0d4
Release crates v0.11.2
2024-04-03 19:36:54 +08:00
Boshen
504698ab4a
chore: guard against unsafe code as much as possible.
2024-04-03 19:35:07 +08:00
underfin
ef4b898be8
chore: avoid unsafe code search original name ( #2895 )
...
close https://github.com/rolldown/rolldown/issues/716
---------
Co-authored-by: Boshen <boshenc@gmail.com>
2024-04-03 11:34:21 +00:00
Boshen
54f7cd3978
Release crates v0.11.1
2024-04-03 16:57:52 +08:00
Boshen
a5196be341
chore: Rust v1.77.1
2024-04-03 16:50:29 +08:00
Boshen
ae4f474bab
ci: run cargo check with --all-features
2024-04-03 16:43:50 +08:00
underfin
114f68ea7c
refactor(codegen): make codegen sourcemap builder clearer ( #2894 )
...
Avoid `enable_sourcemap` appear multiply times.
2024-04-03 15:07:19 +08:00
cinchen
7bc638ee7d
feat(linter): eslint-plugin-jest/prefer-mock-promise-sorthand ( #2864 )
...
part of #492
Rule Detail:
[link](https://github.com/jest-community/eslint-plugin-jest/blob/main/src/rules/prefer-mock-promise-shorthand.ts )
2024-04-03 12:17:34 +08:00
underfin
28fae2e80a
fix(sourcemap): using serde_json::to_string to quote sourcemap string ( #2889 )
2024-04-03 12:14:45 +08:00
Boshen
21a5e4433f
fix(transformer): add serde "derive" feature to fix compile error
2024-04-03 11:56:27 +08:00
underfin
64c4b825f1
chore: improve sourcemap visualizer ( #2886 )
...
The pr intend to improve `SourcemapVisualizer` log mapping.
- add the mapping for last token to final position of source
- fix token mapping
2024-04-03 10:45:00 +08:00
Wang Wenzhe
ce34829521
feat(linter/tree-shaking): support ThisExpression and NewExpression ( #2890 )
2024-04-03 10:43:09 +08:00
Don Isaac
d3eb1c3318
fix(semantic): flag function expressions with SymbolFlags::Function ( #2891 )
...
# What This PR Does
Consider the following code snippet
```js
const x = function y () {{
```
`y` will now be flagged with `SymbolFlags::Function`. This follow's
tsc's behavior.
- [Example in OXC
Playground](https://oxc-project.github.io/oxc/playground/?code=3YCAAICagICAgICAgICxG0qZRraXZOpcCHVsSRwDq2kRR0HprsTfRRT5WMw%2Ff2epoIA%3D )
- [Example in TypeScript AST
Viewer](https://ts-ast-viewer.com/#code/MYewdgzgLgBAHjAvDAZgVzMKBLcMCeAFAJQwDeAvgFBA )
2024-04-03 10:42:11 +08:00
Boshen
93897c530c
chore: bump syn to v2 ( #2888 )
2024-04-02 20:57:09 +08:00
Boshen
c767a2ede0
ci: fix ecosystem-ci build
2024-04-02 17:47:05 +08:00
Boshen
d63127d009
chore: only build the allocators in release mode because they are slow to build (60s)
2024-04-02 17:39:01 +08:00
Boshen
a0532adc65
chore: bump criterion2, which removes clap and 10s compile time
2024-04-02 16:48:40 +08:00
Boshen
4b28d46fc4
chore: fix typos by ignoring no_unknown_property.rs
2024-04-02 16:27:38 +08:00
Wang Wenzhe
15d08f6635
feat(linter/tree-shaking): support ArrowFunctionExpression ( #2883 )
2024-04-02 10:34:32 +08:00
Wang Wenzhe
4a86dcb322
feat(linter/tree-shaking): support ArrayExpression and ArrayPattern ( #2882 )
2024-04-02 10:33:07 +08:00
Boshen
23d3c4e0a4
chore: add changelogs via git cliff ( #2878 )
...
This is generated alongside https://github.com/oxc-project/release-oxc
2024-04-01 20:04:48 +08:00
renovate[bot]
e76d70ffbf
chore(deps): lock file maintenance ( #2880 )
2024-04-01 11:43:44 +08:00
Ali Rezvani
5f8f7f8d2f
fix(ast): FinallyClause won't get visited as BlockStatement anymore. ( #2881 )
...
This would fix the issue found in #2877 ,
As it is right now, the `FinallyClause` gets visited 2 times, once as
the Finally and once as a block.
This PR addresses this issue by making the `visit_finally_clause` method
visit the body statements instead of visiting the block itself. Now it
works similar to the `CatchClause`.
2024-04-01 10:25:50 +08:00
renovate[bot]
619fc61e95
chore(deps): update dependency express to v4.19.2 ( #2879 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [express](http://expressjs.com/ )
([source](https://togithub.com/expressjs/express )) | [`4.19.1` ->
`4.19.2`](https://renovatebot.com/diffs/npm/express/4.19.1/4.19.2 ) |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>expressjs/express (express)</summary>
###
[`v4.19.2`](https://togithub.com/expressjs/express/blob/HEAD/History.md#4192--2024-03-25 )
[Compare
Source](https://togithub.com/expressjs/express/compare/4.19.1...4.19.2 )
\==========
- Improved fix for open redirect allow list bypass
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 00:27:55 +08:00
Boshen
3ca6721783
ci: always run cargo shear
2024-03-31 16:06:22 +08:00
Boshen
7710d8caf1
feat(transformer): add compiler assumptions ( #2872 )
...
closes #2869
2024-03-31 02:04:21 +00:00
Boshen
7034bcc47d
feat(transformer): add proposal-decorators ( #2868 )
2024-03-30 21:07:36 +08:00
Boshen
ffadcb08d9
feat(transformer): add react plugins ( #2867 )
2024-03-30 20:56:10 +08:00
Boshen
293b9f482a
feat(transformer): add transform-typescript boilerplate ( #2866 )
2024-03-30 20:48:35 +08:00
Boshen
c1a2958a5a
chore: remove oxc_transformer for a reimplementation ( #2865 )
...
closes #2860
2024-03-30 17:19:46 +08:00
Boshen
31ed532b79
Release crates v0.11.0
2024-03-30 13:54:53 +08:00
Boshen
52a9f08a57
chore: remove release-plz
2024-03-30 13:50:41 +08:00
Boshen
e7307ed23c
Release oxlint and vscode extension v0.2.15
2024-03-30 13:34:38 +08:00
Boshen
ec0bb077ca
chore(linter): change rule category for some of the new rules
2024-03-30 13:26:33 +08:00
Boshen
348c3e9bb3
ci: rename and tweak publish crates action
2024-03-30 13:20:29 +08:00