From 0b6e16f1ae3bb8a1c5afeb1496095b8d807ff4c7 Mon Sep 17 00:00:00 2001 From: James Sumners Date: Fri, 29 Sep 2023 12:47:35 -0400 Subject: [PATCH] Address linter gripe --- lib/internal/modules/esm/initialize_import_meta.js | 2 +- test/js-native-api/test_cannot_run_js/entry_point.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/js-native-api/test_cannot_run_js/entry_point.c diff --git a/lib/internal/modules/esm/initialize_import_meta.js b/lib/internal/modules/esm/initialize_import_meta.js index 9e7196e4495306..62f564ad96319d 100644 --- a/lib/internal/modules/esm/initialize_import_meta.js +++ b/lib/internal/modules/esm/initialize_import_meta.js @@ -2,7 +2,7 @@ const { StringPrototypeStartsWith } = primordials; const { getOptionValue } = require('internal/options'); -const { fileURLToPath } = require('url'); +const { fileURLToPath } = require('internal/url'); const { dirname } = require('path'); const experimentalImportMetaResolve = getOptionValue('--experimental-import-meta-resolve'); diff --git a/test/js-native-api/test_cannot_run_js/entry_point.c b/test/js-native-api/test_cannot_run_js/entry_point.c new file mode 100644 index 00000000000000..6b7b50a38c9535 --- /dev/null +++ b/test/js-native-api/test_cannot_run_js/entry_point.c @@ -0,0 +1,7 @@ +#include + +EXTERN_C_START +napi_value Init(napi_env env, napi_value exports); +EXTERN_C_END + +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init)