Skip to content

Commit 53fb2b6

Browse files
addaleaxjasnell
authored andcommitted
src: remove _third_party_main support
Since 7dead84, there is a more official alternative that is tested and comes with a proper API, and since a6c57cc, the `LoadEnvironment(env)` overload is deprecated, which is the closest thing we can achieve to deprecating `_third_party_main` support. Thus, we can now consider us able to remove `_third_party_main` support. Fixes: #24017 Refs: #30467 Refs: #32858 PR-URL: #33971 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 78ca61e commit 53fb2b6

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

lib/internal/cli_table.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ const { getStringWidth } = require('internal/util/inspect');
1111
// The use of Unicode characters below is the only non-comment use of non-ASCII
1212
// Unicode characters in Node.js built-in modules. If they are ever removed or
1313
// rewritten with \u escapes, then a test will need to be (re-)added to Node.js
14-
// core to verify that Unicode characters work in built-ins. Otherwise,
15-
// consumers using Unicode in _third_party_main.js will run into problems.
14+
// core to verify that Unicode characters work in built-ins.
1615
// Refs: https://github.com/nodejs/node/issues/10673
1716
const tableChars = {
1817
/* eslint-disable node-core/non-ascii-character */

lib/internal/main/run_third_party_main.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

node.gyp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@
162162
'lib/internal/main/prof_process.js',
163163
'lib/internal/main/repl.js',
164164
'lib/internal/main/run_main_module.js',
165-
'lib/internal/main/run_third_party_main.js',
166165
'lib/internal/main/worker_thread.js',
167166
'lib/internal/modules/run_main.js',
168167
'lib/internal/modules/package_json_reader.js',

src/node.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,6 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
461461
return scope.EscapeMaybe(cb(info));
462462
}
463463

464-
// To allow people to extend Node in different ways, this hook allows
465-
// one to drop a file lib/_third_party_main.js into the build
466-
// directory which will be executed instead of Node's normal loading.
467-
if (NativeModuleEnv::Exists("_third_party_main")) {
468-
return StartExecution(env, "internal/main/run_third_party_main");
469-
}
470-
471464
if (env->worker_context() != nullptr) {
472465
return StartExecution(env, "internal/main/worker_thread");
473466
}

0 commit comments

Comments
 (0)