Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into refactor-regexp-diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
leaysgur committed Sep 6, 2024
2 parents 8e65a02 + 7414ff8 commit 26dd547
Show file tree
Hide file tree
Showing 389 changed files with 2,766 additions and 1,661 deletions.
13 changes: 7 additions & 6 deletions .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ src:
- 'crates/oxc_span/src/span/types.rs'
- 'crates/oxc_span/src/source_type/types.rs'
- 'crates/oxc_regular_expression/src/ast.rs'
- 'crates/oxc_ast/src/generated/assert_layouts.rs'
- 'crates/oxc_ast/src/generated/ast_kind.rs'
- 'crates/oxc_ast/src/generated/ast_builder.rs'
- 'crates/oxc_ast/src/generated/visit.rs'
- 'crates/oxc_ast/src/generated/visit_mut.rs'
- 'crates/oxc_ast/src/generated/derive_clone_in.rs'
- 'crates/oxc_regular_expression/src/generated/derive_clone_in.rs'
- 'crates/oxc_syntax/src/generated/derive_clone_in.rs'
Expand All @@ -27,4 +22,10 @@ src:
- 'crates/oxc_ast/src/generated/derive_content_hash.rs'
- 'crates/oxc_regular_expression/src/generated/derive_content_hash.rs'
- 'crates/oxc_syntax/src/generated/derive_content_hash.rs'
- 'tasks/ast_codegen/src/**'
- 'crates/oxc_ast/src/generated/assert_layouts.rs'
- 'crates/oxc_ast/src/generated/ast_kind.rs'
- 'crates/oxc_ast/src/generated/ast_builder.rs'
- 'crates/oxc_ast/src/generated/visit.rs'
- 'crates/oxc_ast/src/generated/visit_mut.rs'
- 'tasks/ast_codegen/src/**/*'
- '.github/.generated_ast_watch_list.yml'
6 changes: 5 additions & 1 deletion .github/workflows/release_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1

- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
package_json_file: ./wasm/parser/package.json

- name: Install Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -59,7 +64,6 @@ jobs:
working-directory: wasm/parser
run: |
rustup target add wasm32-unknown-unknown
corepack enable
pnpm install
pnpm run build
pnpm run test
Expand Down
44 changes: 23 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 29 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage = "https://oxc.rs"
keywords = ["JavaScript", "TypeScript", "linter", "minifier", "parser"]
license = "MIT"
repository = "https://github.com/oxc-project/oxc"
rust-version = "1.74"
rust-version = "1.76" # Support last 6 minor versions.

# <https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html>
[workspace.lints.rust]
Expand All @@ -25,11 +25,12 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(cov
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
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"
print_stdout = "warn" # Must be opt-in
print_stderr = "warn" # Must be opt-in
allow_attributes = "warn"
# I like the explicitness of this rule as it removes confusion around `clone`.
# This increases readability, avoids `clone` mindlessly and heap allocating by accident.
clone_on_ref_ptr = "warn"
Expand Down Expand Up @@ -63,6 +64,7 @@ too_many_lines = "allow"
must_use_candidate = "allow"
# used_underscore_binding= "allow"
doc_markdown = "allow"
ref_as_ptr = "allow" # FIXME or give a reason
# nursery
# `const` functions do not make sense for our project because this is not a `const` library.
# This rule also confuses newcomers and forces them to add `const` blindlessly without any reason.
Expand All @@ -75,27 +77,27 @@ doc_lazy_continuation = "allow" # FIXME

[workspace.dependencies]
# publish = true
oxc = { version = "0.26.0", path = "crates/oxc" }
oxc_allocator = { version = "0.26.0", path = "crates/oxc_allocator" }
oxc_ast = { version = "0.26.0", path = "crates/oxc_ast" }
oxc_codegen = { version = "0.26.0", path = "crates/oxc_codegen" }
oxc_diagnostics = { version = "0.26.0", path = "crates/oxc_diagnostics" }
oxc_index = { version = "0.26.0", path = "crates/oxc_index" }
oxc_minifier = { version = "0.26.0", path = "crates/oxc_minifier" }
oxc_mangler = { version = "0.26.0", path = "crates/oxc_mangler" }
oxc_parser = { version = "0.26.0", path = "crates/oxc_parser" }
oxc_semantic = { version = "0.26.0", path = "crates/oxc_semantic" }
oxc_span = { version = "0.26.0", path = "crates/oxc_span" }
oxc_syntax = { version = "0.26.0", path = "crates/oxc_syntax" }
oxc_transformer = { version = "0.26.0", path = "crates/oxc_transformer" }
oxc_sourcemap = { version = "0.26.0", path = "crates/oxc_sourcemap" }
oxc_ast_macros = { version = "0.26.0", path = "crates/oxc_ast_macros" }
oxc_traverse = { version = "0.26.0", path = "crates/oxc_traverse" }
oxc_module_lexer = { version = "0.26.0", path = "crates/oxc_module_lexer" }
oxc_cfg = { version = "0.26.0", path = "crates/oxc_cfg" }
oxc_isolated_declarations = { version = "0.26.0", path = "crates/oxc_isolated_declarations" }
oxc_regular_expression = { version = "0.26.0", path = "crates/oxc_regular_expression" }
oxc_transform_napi = { version = "0.26.0", path = "napi/transform" }
oxc = { version = "0.27.0", path = "crates/oxc" }
oxc_allocator = { version = "0.27.0", path = "crates/oxc_allocator" }
oxc_ast = { version = "0.27.0", path = "crates/oxc_ast" }
oxc_codegen = { version = "0.27.0", path = "crates/oxc_codegen" }
oxc_diagnostics = { version = "0.27.0", path = "crates/oxc_diagnostics" }
oxc_index = { version = "0.27.0", path = "crates/oxc_index" }
oxc_minifier = { version = "0.27.0", path = "crates/oxc_minifier" }
oxc_mangler = { version = "0.27.0", path = "crates/oxc_mangler" }
oxc_parser = { version = "0.27.0", path = "crates/oxc_parser" }
oxc_semantic = { version = "0.27.0", path = "crates/oxc_semantic" }
oxc_span = { version = "0.27.0", path = "crates/oxc_span" }
oxc_syntax = { version = "0.27.0", path = "crates/oxc_syntax" }
oxc_transformer = { version = "0.27.0", path = "crates/oxc_transformer" }
oxc_sourcemap = { version = "0.27.0", path = "crates/oxc_sourcemap" }
oxc_ast_macros = { version = "0.27.0", path = "crates/oxc_ast_macros" }
oxc_traverse = { version = "0.27.0", path = "crates/oxc_traverse" }
oxc_module_lexer = { version = "0.27.0", path = "crates/oxc_module_lexer" }
oxc_cfg = { version = "0.27.0", path = "crates/oxc_cfg" }
oxc_isolated_declarations = { version = "0.27.0", path = "crates/oxc_isolated_declarations" }
oxc_regular_expression = { version = "0.27.0", path = "crates/oxc_regular_expression" }
oxc_transform_napi = { version = "0.27.0", path = "napi/transform" }

# publish = false
oxc_macros = { path = "crates/oxc_macros" }
Expand Down
6 changes: 5 additions & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[build.env]
passthrough = ["CI"] # for crates/oxc_traverse/build.rs
passthrough = [
"CI", # for crates/oxc_traverse/build.rs
"JEMALLOC_SYS_WITH_LG_PAGE",
"OXC_VERSION",
]
6 changes: 6 additions & 0 deletions crates/oxc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project does not adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) until v1.0.0.

## [0.27.0] - 2024-09-06

### Features

- ed8ab6d oxc: Conditional expose `oxc_cfg` in `oxc` crate (#5524) (IWANABETHATGUY)

## [0.26.0] - 2024-09-03

### Features
Expand Down
4 changes: 3 additions & 1 deletion crates/oxc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc"
version = "0.26.0"
version = "0.27.0"
publish = true
authors.workspace = true
description.workspace = true
Expand Down Expand Up @@ -40,6 +40,7 @@ oxc_mangler = { workspace = true, optional = true }
oxc_codegen = { workspace = true, optional = true }
oxc_sourcemap = { workspace = true, optional = true }
oxc_isolated_declarations = { workspace = true, optional = true }
oxc_cfg = { workspace = true, optional = true }

[features]
full = ["codegen", "mangler", "minifier", "semantic", "transformer"]
Expand All @@ -49,6 +50,7 @@ transformer = ["oxc_transformer"]
minifier = ["oxc_mangler", "oxc_minifier"]
codegen = ["oxc_codegen"]
mangler = ["oxc_mangler"]
cfg = ["oxc_cfg"]

serialize = ["oxc_ast/serialize", "oxc_semantic?/serialize", "oxc_span/serialize", "oxc_syntax/serialize"]

Expand Down
5 changes: 2 additions & 3 deletions crates/oxc/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ use oxc_ast::{ast::Program, Trivias};
use oxc_codegen::{CodeGenerator, CodegenOptions, CommentOptions};
use oxc_diagnostics::OxcDiagnostic;
use oxc_mangler::{MangleOptions, Mangler};
use oxc_parser::{ParseOptions, Parser, ParserReturn};
use oxc_span::SourceType;

use oxc_minifier::{CompressOptions, Compressor};
use oxc_parser::{ParseOptions, Parser, ParserReturn};
use oxc_semantic::{ScopeTree, SemanticBuilder, SemanticBuilderReturn, SymbolTable};
use oxc_span::SourceType;
use oxc_transformer::{TransformOptions, Transformer, TransformerReturn};

#[derive(Default)]
Expand Down
6 changes: 6 additions & 0 deletions crates/oxc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,9 @@ pub mod sourcemap {
#[doc(inline)]
pub use oxc_sourcemap::*;
}

#[cfg(feature = "cfg")]
pub mod cfg {
#[doc(inline)]
pub use oxc_cfg::*;
}
Loading

0 comments on commit 26dd547

Please sign in to comment.