From 8a7ed17ea29a5cc3f1fbf46cc848e3dad5b72f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 23 Jul 2024 01:42:26 +0100 Subject: Revert "fix(cli): add NAPI support in standalone mode (#24642)" (#24682) This reverts commit 4e8f5875bc59ddfb84c8b0b26071a547b49823a9. Reverting because, it caused a failure during v1.45.3 publish: https://github.com/denoland/deno/actions/runs/10048730693/job/27773718095 CC @Mutefish0 --- tests/integration/compile_tests.rs | 63 -------------------------------------- 1 file changed, 63 deletions(-) (limited to 'tests/integration/compile_tests.rs') diff --git a/tests/integration/compile_tests.rs b/tests/integration/compile_tests.rs index b4f8aa814..c902adfb2 100644 --- a/tests/integration/compile_tests.rs +++ b/tests/integration/compile_tests.rs @@ -1285,66 +1285,3 @@ fn standalone_jsr_dynamic_import() { output.assert_exit_code(0); output.assert_matches_text("Hello world\n"); } - -#[test] -fn standalone_require_node_addons() { - #[cfg(not(target_os = "windows"))] - { - let context = TestContextBuilder::for_jsr().build(); - let dir = context.temp_dir(); - let libout = dir.path().join("module.node"); - - let cc = context - .new_command() - .name("cc") - .current_dir(util::testdata_path()); - - #[cfg(not(target_os = "macos"))] - let c_module = cc - .arg("./compile/napi/module.c") - .arg("-shared") - .arg("-o") - .arg(&libout); - - #[cfg(target_os = "macos")] - let c_module = { - cc.arg("./compile/napi/module.c") - .arg("-undefined") - .arg("dynamic_lookup") - .arg("-shared") - .arg("-Wl,-no_fixup_chains") - .arg("-dynamic") - .arg("-o") - .arg(&libout) - }; - let c_module_output = c_module.output().unwrap(); - - assert!(c_module_output.status.success()); - - let exe = if cfg!(windows) { - dir.path().join("main.exe") - } else { - dir.path().join("main") - }; - - context - .new_command() - .env("NPM_CONFIG_REGISTRY", "https://registry.npmjs.org/") - .args_vec([ - "compile", - "--allow-read", - "--allow-ffi", - "--output", - &exe.to_string_lossy(), - "./compile/napi/main.ts", - ]) - .run() - .skip_output_check() - .assert_exit_code(0); - - let output = context.new_command().name(&exe).arg(&libout).run(); - - output.assert_exit_code(0); - output.assert_matches_text("{}\n"); - } -} -- cgit v1.2.3