diff --git a/crates/ruff/src/lib.rs b/crates/ruff/src/lib.rs index f1d884303e..2a69194fad 100644 --- a/crates/ruff/src/lib.rs +++ b/crates/ruff/src/lib.rs @@ -9,6 +9,8 @@ pub use ruff_python_ast::source_code::round_trip; pub use rule_selector::RuleSelector; pub use rules::pycodestyle::rules::IOError; +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); + mod autofix; mod checkers; mod codes; diff --git a/crates/ruff_wasm/src/lib.rs b/crates/ruff_wasm/src/lib.rs index 2a449d0864..b113491b44 100644 --- a/crates/ruff_wasm/src/lib.rs +++ b/crates/ruff_wasm/src/lib.rs @@ -21,8 +21,6 @@ use ruff::settings::{defaults, flags, Settings}; use ruff_diagnostics::Edit; use ruff_python_ast::source_code::{Indexer, Locator, SourceLocation, Stylist}; -const VERSION: &str = env!("CARGO_PKG_VERSION"); - #[wasm_bindgen(typescript_custom_section)] const TYPES: &'static str = r#" export interface Diagnostic { @@ -87,7 +85,7 @@ pub fn run() { #[wasm_bindgen] #[allow(non_snake_case)] pub fn currentVersion() -> JsValue { - JsValue::from(VERSION) + JsValue::from(ruff::VERSION) } #[wasm_bindgen]