src: remove _third_party_main support
Since 7dead8440c7ee, there is a more official alternative that is tested and comes with a proper API, and since a6c57cc66d0, 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: https://github.com/nodejs/node/issues/24017 Refs: https://github.com/nodejs/node/pull/30467 Refs: https://github.com/nodejs/node/pull/32858 PR-URL: https://github.com/nodejs/node/pull/33971 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
78ca61e2cf
commit
53fb2b6b41
@ -11,8 +11,7 @@ const { getStringWidth } = require('internal/util/inspect');
|
||||
// The use of Unicode characters below is the only non-comment use of non-ASCII
|
||||
// Unicode characters in Node.js built-in modules. If they are ever removed or
|
||||
// rewritten with \u escapes, then a test will need to be (re-)added to Node.js
|
||||
// core to verify that Unicode characters work in built-ins. Otherwise,
|
||||
// consumers using Unicode in _third_party_main.js will run into problems.
|
||||
// core to verify that Unicode characters work in built-ins.
|
||||
// Refs: https://github.com/nodejs/node/issues/10673
|
||||
const tableChars = {
|
||||
/* eslint-disable node-core/non-ascii-character */
|
||||
|
@ -1,13 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
prepareMainThreadExecution
|
||||
} = require('internal/bootstrap/pre_execution');
|
||||
|
||||
prepareMainThreadExecution();
|
||||
markBootstrapComplete();
|
||||
|
||||
// Legacy _third_party_main.js support
|
||||
process.nextTick(() => {
|
||||
require('_third_party_main');
|
||||
});
|
1
node.gyp
1
node.gyp
@ -162,7 +162,6 @@
|
||||
'lib/internal/main/prof_process.js',
|
||||
'lib/internal/main/repl.js',
|
||||
'lib/internal/main/run_main_module.js',
|
||||
'lib/internal/main/run_third_party_main.js',
|
||||
'lib/internal/main/worker_thread.js',
|
||||
'lib/internal/modules/run_main.js',
|
||||
'lib/internal/modules/package_json_reader.js',
|
||||
|
@ -461,13 +461,6 @@ MaybeLocal<Value> StartExecution(Environment* env, StartExecutionCallback cb) {
|
||||
return scope.EscapeMaybe(cb(info));
|
||||
}
|
||||
|
||||
// To allow people to extend Node in different ways, this hook allows
|
||||
// one to drop a file lib/_third_party_main.js into the build
|
||||
// directory which will be executed instead of Node's normal loading.
|
||||
if (NativeModuleEnv::Exists("_third_party_main")) {
|
||||
return StartExecution(env, "internal/main/run_third_party_main");
|
||||
}
|
||||
|
||||
if (env->worker_context() != nullptr) {
|
||||
return StartExecution(env, "internal/main/worker_thread");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user