mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
## [0.16.0] - 2024-06-26 -6796891ast: [**BREAKING**] Rename all instances of `BigintLiteral` to `BigIntLiteral`. (#3898) (rzvxa) -1f85f1aast: [**BREAKING**] Revert adding `span` field to the `BindingPattern` type. (#3899) (rzvxa) -ae09a97ast: [**BREAKING**] Remove `Modifiers` from ts nodes (#3846) (Boshen) -1af5ed3ast: [**BREAKING**] Replace `Modifiers` with `declare` and `const` on `EnumDeclaration` (#3845) (Boshen) -0673677ast: [**BREAKING**] Replace `Modifiers` with `declare` on `Function` (#3844) (Boshen) -ee6ec4east: [**BREAKING**] Replace `Modifiers` with `declare` and `abstract` on `Class` (#3841) (Boshen) -9b38119ast: [**BREAKING**] Replace `Modifiers` with `declare` on `VariableDeclaration` (#3839) (Boshen) -cfcef24ast: [**BREAKING**] Add `directives` field to `TSModuleBlock` (#3830) (Boshen) -4456034ast: [**BREAKING**] Add `IdentifierReference` to `ExportSpecifier` (#3820) (Boshen) ### Features -497769cast: Add some visitor functions (#3785) (Dunqing) -4b06dc7ast: Add TSType::TSIntrinsicKeyword to is_keyword (#3775) (Dunqing) -5847e16ast,parser: Add `intrinsic` keyword (#3767) (Boshen) -2e026e1ast_codegen: Generate `ast_kind.rs`. (#3888) (rzvxa) -09f4d3cast_codegen: Add `ImplGetSpanGenerator`. (#3852) (rzvxa) -3e78f98cfg: Add depth first search with hash sets. (#3771) (rzvxa) -01da2f7codegen: Print TSThisParameter for TSCallSignatureDeclaration and TSMethodSignature (#3792) (Dunqing) -2821e0ecodegen: Print readonly keyword for TSIndexSignature (#3791) (Dunqing) -97575d8codegen: Print TSClassImplements and TSThisParameter (#3786) (Dunqing) -5e2baf3isolated-declarations: Report error for expando functions (#3872) (Dunqing) -2cdb34fisolated-declarations: Support for class function overloads (#3811) (Dunqing) -231b8f0isolated-declarations: Support for export default function overloads (#3809) (Dunqing) -a37138fisolated-declarations: Improve the inference template literal (#3797) (Dunqing) -b0d7355isolated-declarations: Transform const expression correctly (#3793) (Dunqing) -b38c34disolated-declarations: Support inferring ParenthesizedExpression (#3769) (Dunqing) -4134de8isolated-declarations: Add ts error code to the error message (#3755) (Dunqing) -94202deisolated-declarations: Add `export {}` when needed (#3754) (Dunqing) -e95d8e3isolated-declarations: Shrink span for arrow function that needs an explicit return type (#3752) (Dunqing) -df9971disolated-declarations: Improve inferring the return type from function (#3750) (Dunqing) -4aea2b1isolated-declarations: Improve inferring the type of accessor (#3749) (Dunqing) -9ea30c4isolated-declarations: Treat AssignmentPattern as optional (#3748) (Dunqing) -dd540c8minifier: Add skeleton for ReplaceGlobalDefines ast pass (#3803) (Boshen) -f3c3970minifier: Add skeleton for RemoveDeadCode ast pass (#3802) (Boshen) -4fb90eboxc: Export isolated-declarations (#3765) (Boshen) -d5f6aebsemantic: Check for illegal symbol modifiers (#3838) (Don Isaac) -01572f0sourcemap: Impl `std::fmt::Display` for `Error` (#3902) (DonIsaac) -5501d5ctransformer/typescript: Transform `import {} from "mod"` to import `"mod"` (#3866) (Dunqing) -2a16ce0traverse: Disable syntax check and disable build module record (#3794) (Boshen)-d3cd3eaOxc transform binding (#3896) (underfin) ### Bug Fixes -063cfdeast: Correct JSON serialization of `TSModuleBlock` (#3858) (overlookmotel) -66f404cast: Fix JSON serialization of `BindingPattern` (#3856) (overlookmotel) -2766594codegen: Print type parameters for MethodDefinition (#3922) (Dunqing) -27f0531isolated-declarations: Private constructor reaching unreachable (#3921) (Dunqing) -59ce38bisolated-declarations: Inferring of UnrayExpression incorrectly (#3920) (Dunqing) -58e54f4isolated-declarations: Report an error for parameters if they are ObjectPattern or ArrayPattern without an explicit type (#3810) (Dunqing) -cb8a272isolated-declarations: Cannot infer nested `as const` (#3807) (Dunqing) -d8ecce5isolated-declarations: Infer BigInt number as `bigint` type (#3806) (Dunqing) -4e241fcisolated-declarations: Missing `const` after transformed const enum (#3805) (Dunqing) -683c7b0isolated-declarations: Shouldn’t add declare in declaration with export default (#3804) (Dunqing) -7d47fc3isolated-declarations: Should stripe async and generator keyword after transformed (#3790) (Dunqing) -8ce794disolated-declarations: Inferring an incorrect return type when there is an arrow function inside a function (#3768) (Dunqing) -d29316aisolated-declarations: Transform incorrectly when there are multiple functions with the same name (#3753) (Dunqing) -bf1c250isolated-declarations: False positives for non-exported binding elements (#3751) (Dunqing) -275349aparser: Parse function type parameter name `accessor` (#3926) (Boshen) -ef82c78parser: Trailing comma is not allowed in ParenthesizedExpression (#3885) (Dunqing) -13754cbparser: Change diagnostic to "modifier cannot be used here" (#3853) (Boshen) -8c9fc63semantic: Apply strict mode scope flag for strict mode TS Modules (#3861) (overlookmotel) -99a40cesemantic: `export default foo` should have `ExportLocalName::Default(NameSpan)` entry (#3823) (Boshen) -08fcfb3transformer: Fix spans and scopes in TS enum transform (#3911) (overlookmotel) -17ad8f7transformer: Create new scopes for new blocks in TS transform (#3908) (overlookmotel) -d76f34btransformer: TODO comments for missing scopes (#3837) (overlookmotel) -e470731transformer: TS transform handle when type exports first (#3833) (overlookmotel) -d774e54transformer: TS transform generate do not copy statements (#3832) (overlookmotel) -ff1da27transformer: Correct comment in example (#3831) (overlookmotel) -6dcc3f4transformer: Fix TS annotation transform scopes (#3816) (overlookmotel) -aea3e9atransformer: Correct spans for TS annotations transform (#3782) (overlookmotel) ### Performance -92c21b2diagnostics: Optimize string-buffer reallocations (#3897) (Luca Bruno) -4bf405dparser: Add a few more inline hints to cursor functions (#3894) (Boshen) -10d1de5semantic: Remove uneccessary allocation in builder (#3867) (DonIsaac)-4f7ff7eDo not pass `&Atom` to functions (#3818) (overlookmotel) ### Refactor -6f26087ast: Add comment about alternatives to `AstBuilder::copy` (#3905) (overlookmotel) -442aca3ast: Add comment not to use `AstBuilder::copy` (#3891) (overlookmotel) -acf69faast: Refactor custom `Serialize` impls (#3859) (overlookmotel) -9e148e9ast: Add line breaks (#3860) (overlookmotel) -363d3d5ast: Add span field to the `BindingPattern` type. (#3855) (rzvxa) -a648748ast: Shorten code in AST builder (#3835) (overlookmotel) -1206967ast: Reduce allocations in AST builder (#3834) (overlookmotel) -2f5d50eisolated-declarations: Remove `Modifiers` (#3847) (Boshen) -8027b1eminifier: Change prepass to ast_passes::remove_parens (#3801) (Boshen) -a471e62parser: Clean up `try_parse` (#3925) (Boshen) -3db2553parser: Improve parsing of TypeScript type arguments (#3923) (Boshen) -4cf3c76parser: Improve parsing of TypeScript types (#3903) (Boshen) -187f078parser: Improve parsing of `parse_function_or_constructor_type` (#3892) (Boshen) -97d59fcparser: Move code around for parsing `Modifiers` (#3849) (Boshen) -5ef28b7transformer: Shorten code (#3912) (overlookmotel) -d9f268dtransformer: Shorten TS transform code (#3836) (overlookmotel) -21b0d01transformer: Pass ref to function (#3781) (overlookmotel) -7c44703transformer: Remove needless `pub` on TS enum transform methods (#3774) (overlookmotel) -22c56d7transformer: Move TSImportEqualsDeclaration transform code (#3764) (overlookmotel) -cd56aa9transformer: Simplify TS export assignment transform (#3762) (overlookmotel) -512740dtransformer: Move and simplify TS enum transform entry point (#3760) (overlookmotel) -1061baatraverse: Separate `#[scope]` attr (#3901) (overlookmotel) -fcd21a6traverse: Indicate scope entry point with `scope(enter_before)` attr (#3882) (overlookmotel) -24979c9traverse: Use camel case props internally (#3880) (overlookmotel) -2045c92traverse: Improve parsing attrs in traverse codegen (#3879) (overlookmotel)-d6437feClean up some usages of `with_labels` (#3854) (Boshen) Co-authored-by: Boshen <Boshen@users.noreply.github.com>
211 lines
8.3 KiB
TOML
211 lines
8.3 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["apps/*", "crates/*", "napi/*", "tasks/*", "wasm/*"]
|
|
exclude = ["tasks/lint_rules"]
|
|
|
|
[workspace.package]
|
|
authors = ["Boshen <boshenc@gmail.com>", "Oxc contributors"]
|
|
categories = ["compilers", "development-tools", "web-programming"]
|
|
description = "A collection of JavaScript tools written in Rust."
|
|
edition = "2021"
|
|
homepage = "https://oxc.rs"
|
|
keywords = ["JavaScript", "TypeScript", "linter", "minifier", "parser"]
|
|
license = "MIT"
|
|
repository = "https://github.com/oxc-project/oxc"
|
|
rust-version = "1.74"
|
|
|
|
# <https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html>
|
|
[workspace.lints.rust]
|
|
unsafe_code = "warn"
|
|
absolute_paths_not_starting_with_crate = "warn"
|
|
non_ascii_idents = "warn"
|
|
unit-bindings = "warn"
|
|
|
|
[workspace.lints.clippy]
|
|
all = { level = "warn", priority = -1 }
|
|
empty_docs = { level = "allow", priority = 1 } # from `Tsify`
|
|
# restriction
|
|
dbg_macro = "warn"
|
|
todo = "warn"
|
|
unimplemented = "warn"
|
|
print_stdout = "warn" # must be opt-in
|
|
print_stderr = "warn" # must be opt-in
|
|
# I like the explicitness of this rule as it removes confusion around `clone`.
|
|
# This increases readability, avoids `clone` mindlessly and heap allocating on accident.
|
|
clone_on_ref_ptr = "warn"
|
|
# These two are mutually exclusive, I like `mod.rs` files for better fuzzy searches on module entries.
|
|
self_named_module_files = "warn" # "-Wclippy::mod_module_files"
|
|
empty_drop = "warn"
|
|
empty_structs_with_brackets = "warn"
|
|
exit = "warn"
|
|
filetype_is_file = "warn"
|
|
get_unwrap = "warn"
|
|
impl_trait_in_params = "warn"
|
|
rc_buffer = "warn"
|
|
rc_mutex = "warn"
|
|
rest_pat_in_fully_bound_structs = "warn"
|
|
unnecessary_safety_comment = "warn"
|
|
undocumented_unsafe_blocks = "warn"
|
|
infinite_loop = "warn"
|
|
# I want to write the best Rust code so pedantic is enabled.
|
|
# We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
|
|
pedantic = { level = "warn", priority = -1 }
|
|
# Allowed rules
|
|
# pedantic
|
|
# This rule is too pedantic, I don't want to force this because naming things are hard.
|
|
module_name_repetitions = "allow"
|
|
# All triggers are mostly ignored in our codebase, so this is ignored globally.
|
|
struct_excessive_bools = "allow"
|
|
too_many_lines = "allow"
|
|
# #[must_use] is creating too much noise for this codebase, it does not add much value except nagging
|
|
# the programmer to add a #[must_use] after clippy has been run.
|
|
# Having #[must_use] every where also hinders readability.
|
|
must_use_candidate = "allow"
|
|
# used_underscore_binding= "allow"
|
|
doc_markdown = "allow"
|
|
# nursery
|
|
# `const` functions do not make sense for our project because this is not a `const` library.
|
|
# This rule also confuses new comers and forces them to add `const` blindlessly without any reason.
|
|
missing_const_for_fn = "allow"
|
|
# cargo
|
|
cargo = { level = "warn", priority = -1 }
|
|
multiple_crate_versions = "allow"
|
|
cargo_common_metadata = "allow" # TODO: fix this
|
|
|
|
[workspace.dependencies]
|
|
# publish = true
|
|
oxc = { version = "0.16.0", path = "crates/oxc" }
|
|
oxc_allocator = { version = "0.16.0", path = "crates/oxc_allocator" }
|
|
oxc_ast = { version = "0.16.0", path = "crates/oxc_ast" }
|
|
oxc_codegen = { version = "0.16.0", path = "crates/oxc_codegen" }
|
|
oxc_diagnostics = { version = "0.16.0", path = "crates/oxc_diagnostics" }
|
|
oxc_index = { version = "0.16.0", path = "crates/oxc_index" }
|
|
oxc_minifier = { version = "0.16.0", path = "crates/oxc_minifier" }
|
|
oxc_parser = { version = "0.16.0", path = "crates/oxc_parser" }
|
|
oxc_semantic = { version = "0.16.0", path = "crates/oxc_semantic" }
|
|
oxc_span = { version = "0.16.0", path = "crates/oxc_span" }
|
|
oxc_syntax = { version = "0.16.0", path = "crates/oxc_syntax" }
|
|
oxc_transformer = { version = "0.16.0", path = "crates/oxc_transformer" }
|
|
oxc_sourcemap = { version = "0.16.0", path = "crates/oxc_sourcemap" }
|
|
oxc_ast_macros = { version = "0.16.0", path = "crates/oxc_ast_macros" }
|
|
oxc_traverse = { version = "0.16.0", path = "crates/oxc_traverse" }
|
|
oxc_module_lexer = { version = "0.16.0", path = "crates/oxc_module_lexer" }
|
|
oxc_cfg = { version = "0.16.0", path = "crates/oxc_cfg" }
|
|
oxc_isolated_declarations = { version = "0.16.0", path = "crates/oxc_isolated_declarations" }
|
|
|
|
# publish = false
|
|
oxc_macros = { path = "crates/oxc_macros" }
|
|
oxc_linter = { path = "crates/oxc_linter" }
|
|
oxc_prettier = { path = "crates/oxc_prettier" }
|
|
oxc_tasks_common = { path = "tasks/common" }
|
|
oxc_ast_codegen = { path = "tasks/oxc_ast_codegen" }
|
|
|
|
napi = "3.0.0-alpha.1"
|
|
napi-derive = "3.0.0-alpha.1"
|
|
napi-build = "2.1.3"
|
|
|
|
assert-unchecked = "0.1.2"
|
|
allocator-api2 = "0.2.18"
|
|
bpaf = "0.9.12"
|
|
bitflags = "2.5.0"
|
|
bumpalo = "3.16.0"
|
|
convert_case = "0.6.0"
|
|
dashmap = "5.5.3"
|
|
flate2 = "1.0.30"
|
|
futures = "0.3.30"
|
|
glob = "0.3.1"
|
|
ignore = "0.4.22"
|
|
itertools = "0.13.0"
|
|
jemallocator = "0.5.4"
|
|
lazy_static = "1.4.0"
|
|
memoffset = "0.9.1"
|
|
miette = { version = "7.2.0", features = ["fancy-no-syscall"] }
|
|
mimalloc = "0.1.42"
|
|
num-bigint = "0.4.5"
|
|
num-traits = "0.2.19"
|
|
phf = "0.11.2"
|
|
pico-args = "0.5.0"
|
|
proc-macro2 = "1.0.85"
|
|
project-root = "0.2.2"
|
|
quote = "1.0.36"
|
|
rayon = "1.10.0"
|
|
regex = "1.10.5"
|
|
rustc-hash = "2.*"
|
|
ryu-js = "1.0.1"
|
|
ropey = "1.6.1"
|
|
seq-macro = "0.3.5"
|
|
serde = "1.0.203"
|
|
serde_json = "1.0.117"
|
|
syn = { version = "2.0.58", default-features = false }
|
|
tempfile = "3.10.1"
|
|
tokio = "1.38.0"
|
|
tower-lsp = "0.20.0"
|
|
trybuild = "1.0.96"
|
|
unicode-id-start = "1.*" # Relaxed version so the user can decide which unicode version to use.
|
|
ureq = { version = "2.9.6", default-features = false }
|
|
url = "2.5.2"
|
|
walkdir = "2.5.0"
|
|
indexmap = "2.2.6"
|
|
static_assertions = "1.1.0"
|
|
tracing-subscriber = "0.3.18"
|
|
insta = "1.39.0"
|
|
mime_guess = "2.0.4"
|
|
language-tags = "0.3.2"
|
|
tsify = "0.4.5"
|
|
wasm-bindgen = "0.2.92"
|
|
serde-wasm-bindgen = "0.6.5"
|
|
handlebars = "5.1.2"
|
|
base64 = "0.22.1"
|
|
compact_str = "0.7.1"
|
|
console = "0.15.8"
|
|
encoding_rs = "0.8.34"
|
|
encoding_rs_io = "0.1.7"
|
|
env_logger = { version = "0.11.3", default-features = false }
|
|
globset = "0.4.14"
|
|
humansize = "2.1.3"
|
|
json-strip-comments = "1.0.2"
|
|
log = "0.4.21"
|
|
memchr = "2.7.2"
|
|
once_cell = "1.19.0"
|
|
ouroboros = "0.18.4"
|
|
owo-colors = "4.0.0"
|
|
oxc_resolver = "1.8.2"
|
|
petgraph = "0.6.5"
|
|
rust-lapper = "1.1.0"
|
|
similar = "2.5.0"
|
|
textwrap = "0.16.1"
|
|
unicode-width = "0.1.13"
|
|
saphyr = "0.0.1"
|
|
base64-simd = "0.8"
|
|
cfg-if = "1.0.0"
|
|
schemars = "0.8.21"
|
|
oxc-browserslist = "1.0.1"
|
|
prettyplease = "0.2.20"
|
|
criterion2 = { version = "0.11.0", default-features = false }
|
|
daachorse = { version = "1.0.0" }
|
|
|
|
[workspace.metadata.cargo-shear]
|
|
ignored = ["napi", "oxc_ast_codegen", "oxc_traverse", "prettyplease"]
|
|
|
|
[profile.dev]
|
|
# Disabling debug info speeds up local and CI builds,
|
|
# and we don't rely on it for debugging that much.
|
|
debug = false
|
|
|
|
[profile.release.package.oxc_wasm]
|
|
opt-level = 'z'
|
|
|
|
[profile.release]
|
|
# Configurations explicitly listed here for clarity.
|
|
# Using the best options for performance.
|
|
opt-level = 3
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
strip = "symbols" # set to `false` for debug information
|
|
debug = false # set to `true` for debug information
|
|
panic = "abort" # Let it crash and force ourselves to write safe Rust.
|
|
|
|
# Faster compile time with thin lto
|
|
[profile.release-thin]
|
|
inherits = "release"
|
|
lto = "thin"
|