Skip to content

Commit

Permalink
refactor(napi): types file in root of types package (#6929)
Browse files Browse the repository at this point in the history
Move `types.d.ts` file to root of `@oxc-project/types` package. I think this is cleaner.
  • Loading branch information
overlookmotel committed Oct 26, 2024
1 parent aa3222a commit 23157bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ src:
- 'crates/oxc_ast/src/generated/ast_builder.rs'
- 'crates/oxc_ast/src/generated/visit.rs'
- 'crates/oxc_ast/src/generated/visit_mut.rs'
- 'npm/oxc-types/src/generated/types.d.ts'
- 'npm/oxc-types/types.d.ts'
- 'tasks/ast_tools/src/**'
- '.github/.generated_ast_watch_list.yml'
6 changes: 3 additions & 3 deletions npm/oxc-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"funding": {
"url": "https://github.com/sponsors/Boshen"
},
"types": "src/generated/types.d.ts",
"types": "types.d.ts",
"files": [
"src/generated/types.d.ts"
"types.d.ts"
]
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions tasks/ast_tools/src/generators/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use itertools::Itertools;

use crate::{
codegen::LateCtx,
output::{output_path, Output},
output::Output,
schema::{
serialize::{enum_variant_name, get_type_tag},
EnumDef, GetIdent, StructDef, TypeDef, TypeName,
Expand Down Expand Up @@ -37,7 +37,7 @@ impl Generator for TypescriptGenerator {
code.push_str("\n\n");
}

Output::Javascript { path: output_path(crate::TYPESCRIPT_PACKAGE, "types.d.ts"), code }
Output::Javascript { path: format!("{}/types.d.ts", crate::TYPESCRIPT_PACKAGE), code }
}
}

Expand Down

0 comments on commit 23157bd

Please sign in to comment.