1#![deny(clippy::disallowed_methods)]
4#![deny(clippy::disallowed_types)]
5#![deny(clippy::unnecessary_wraps)]
6#![deny(clippy::print_stderr)]
7#![deny(clippy::print_stdout)]
8
9pub const VERSION: &str = env!("CARGO_PKG_VERSION");
11
12#[cfg(feature = "cjs")]
13mod cjs_parse;
14mod comments;
15pub mod diagnostics;
16#[cfg(feature = "emit")]
17mod emit;
18#[cfg(feature = "utils")]
19mod exports;
20mod lexing;
21mod parsed_source;
22mod parsing;
23#[cfg(feature = "scopes")]
24mod scopes;
25mod source_map;
26mod text_changes;
27#[cfg(feature = "transpiling")]
28mod transpiling;
29mod types;
30
31#[cfg(feature = "view")]
32pub use dprint_swc_ext::view;
33
34pub use dprint_swc_ext::common::*;
35
36#[cfg(feature = "cjs")]
37pub use cjs_parse::*;
38pub use comments::*;
39pub use deno_media_type::*;
40#[cfg(feature = "emit")]
41pub use emit::*;
42#[cfg(feature = "utils")]
43pub use exports::*;
44pub use lexing::*;
45pub use parsed_source::*;
46pub use parsing::*;
47#[cfg(feature = "scopes")]
48pub use scopes::*;
49pub use source_map::*;
50pub use text_changes::*;
51#[cfg(feature = "transpiling")]
52pub use transpiling::*;
53pub use types::*;
54
55pub type ModuleSpecifier = url::Url;
56
57pub mod swc {
58 pub use dprint_swc_ext::swc::atoms;
59 pub use dprint_swc_ext::swc::common;
60 #[cfg(feature = "bundler")]
61 pub use swc_bundler as bundler;
62 pub use swc_ecma_ast as ast;
63 #[cfg(feature = "codegen")]
64 pub use swc_ecma_codegen as codegen;
65 pub use swc_ecma_lexer as lexer;
66 #[cfg(feature = "transforms")]
67 pub use swc_ecma_loader as loader;
68 pub use swc_ecma_parser as parser;
69 #[cfg(feature = "sourcemap")]
70 pub use swc_sourcemap as sourcemap;
71 #[cfg(feature = "transforms")]
72 pub mod transforms {
73 pub use self::fixer::fixer;
74 pub use self::hygiene::hygiene;
75 pub use swc_ecma_transforms_base::assumptions::Assumptions;
76 pub use swc_ecma_transforms_base::fixer;
77 pub use swc_ecma_transforms_base::helpers;
78 pub use swc_ecma_transforms_base::hygiene;
79 pub use swc_ecma_transforms_base::perf;
80 pub use swc_ecma_transforms_base::resolver;
81
82 #[cfg(feature = "compat")]
83 pub use swc_ecma_transforms_compat as compat;
84 #[cfg(feature = "proposal")]
85 pub use swc_ecma_transforms_proposal as proposal;
86 #[cfg(feature = "react")]
87 pub use swc_ecma_transforms_react as react;
88 #[cfg(feature = "typescript")]
89 pub use swc_ecma_transforms_typescript as typescript;
90 }
91 #[cfg(feature = "utils")]
92 pub use swc_ecma_utils as utils;
93 #[cfg(feature = "visit")]
94 pub use swc_ecma_visit as ecma_visit;
95 #[cfg(feature = "visit")]
96 pub use swc_visit as visit;
97}