Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove _third_party_main support #33971

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/internal/cli_table.js
Expand Up @@ -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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, I would like to keep this comment, because I think it’s still worth testing that this works for scripts which are passed through our js2c converter. For the embedding use case specifically, #33972 should cover this.

// Refs: https://github.com/nodejs/node/issues/10673
const tableChars = {
/* eslint-disable node-core/non-ascii-character */
Expand Down
13 changes: 0 additions & 13 deletions lib/internal/main/run_third_party_main.js

This file was deleted.

1 change: 0 additions & 1 deletion node.gyp
Expand Up @@ -161,7 +161,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',
Expand Down
7 changes: 0 additions & 7 deletions src/node.cc
Expand Up @@ -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");
}
Expand Down