From e0dd275935c49f5b5b844123d621c5dea1761983 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 25 Nov 2022 18:49:02 -0500 Subject: [PATCH] refactor: move generated_symbol_exports_list_* files to napi folder (#16822) --- cli/build.rs | 2 +- cli/{ => napi}/generated_symbol_exports_list_linux.def | 0 cli/{ => napi}/generated_symbol_exports_list_macos.def | 0 cli/{ => napi}/generated_symbol_exports_list_windows.def | 0 cli/napi/mod.rs | 2 +- tools/napi/generate_symbols_lists.js | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename cli/{ => napi}/generated_symbol_exports_list_linux.def (100%) rename cli/{ => napi}/generated_symbol_exports_list_macos.def (100%) rename cli/{ => napi}/generated_symbol_exports_list_windows.def (100%) diff --git a/cli/build.rs b/cli/build.rs index a7076145a5..15be033fd8 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -351,7 +351,7 @@ fn main() { panic!("Cross compiling with snapshot is not supported."); } - let symbols_path = std::path::Path::new( + let symbols_path = std::path::Path::new("napi").join( format!("generated_symbol_exports_list_{}.def", env::consts::OS).as_str(), ) .canonicalize() diff --git a/cli/generated_symbol_exports_list_linux.def b/cli/napi/generated_symbol_exports_list_linux.def similarity index 100% rename from cli/generated_symbol_exports_list_linux.def rename to cli/napi/generated_symbol_exports_list_linux.def diff --git a/cli/generated_symbol_exports_list_macos.def b/cli/napi/generated_symbol_exports_list_macos.def similarity index 100% rename from cli/generated_symbol_exports_list_macos.def rename to cli/napi/generated_symbol_exports_list_macos.def diff --git a/cli/generated_symbol_exports_list_windows.def b/cli/napi/generated_symbol_exports_list_windows.def similarity index 100% rename from cli/generated_symbol_exports_list_windows.def rename to cli/napi/generated_symbol_exports_list_windows.def diff --git a/cli/napi/mod.rs b/cli/napi/mod.rs index 1712632a5c..0e302a1017 100644 --- a/cli/napi/mod.rs +++ b/cli/napi/mod.rs @@ -13,7 +13,7 @@ //! To add a new napi function: //! 1. Place `#[napi_sym]` on top of your implementation. //! 2. Add the function's identifier to this JSON list. -//! 3. Finally, run `./tools/napi/generate_symbols_list.js` to update `cli/generated_symbol_exports_list_*.def`. +//! 3. Finally, run `tools/napi/generate_symbols_list.js` to update `cli/napi/generated_symbol_exports_list_*.def`. pub mod r#async; pub mod env; diff --git a/tools/napi/generate_symbols_lists.js b/tools/napi/generate_symbols_lists.js index c9a5bca3ec..fbef69edde 100755 --- a/tools/napi/generate_symbols_lists.js +++ b/tools/napi/generate_symbols_lists.js @@ -17,7 +17,7 @@ const symbolExportLists = { for await (const [os, def] of Object.entries(symbolExportLists)) { const defUrl = new URL( - `../../cli/generated_symbol_exports_list_${os}.def`, + `../../cli/napi/generated_symbol_exports_list_${os}.def`, import.meta.url, ); await Deno.writeTextFile(defUrl.pathname, def, { create: true });