Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a51fe3c

Browse filesBrowse files
anonrigMylesBorins
authored andcommitted
url: replace url-parser with ada
PR-URL: #46410 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
1 parent 7d6c27e commit a51fe3c
Copy full SHA for a51fe3c
Expand file treeCollapse file tree

17 files changed

+378
-2990
lines changed
Open diff view settings
Collapse file

‎lib/internal/url.js‎

Copy file name to clipboardExpand all lines: lib/internal/url.js
+142-358Lines changed: 142 additions & 358 deletions
Large diffs are not rendered by default.
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
-33Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@
533533
'src/node_trace_events.cc',
534534
'src/node_types.cc',
535535
'src/node_url.cc',
536-
'src/node_url_tables.cc',
537536
'src/node_util.cc',
538537
'src/node_v8.cc',
539538
'src/node_wasi.cc',
@@ -895,37 +894,6 @@
895894
},
896895
],
897896
}, # node_lib_target_name
898-
{ # fuzz_url
899-
'target_name': 'fuzz_url',
900-
'type': 'executable',
901-
'dependencies': [
902-
'<(node_lib_target_name)',
903-
],
904-
'includes': [
905-
'node.gypi'
906-
],
907-
'include_dirs': [
908-
'src',
909-
],
910-
'defines': [
911-
'NODE_ARCH="<(target_arch)"',
912-
'NODE_PLATFORM="<(OS)"',
913-
'NODE_WANT_INTERNALS=1',
914-
],
915-
'sources': [
916-
'src/node_snapshot_stub.cc',
917-
'test/fuzzers/fuzz_url.cc',
918-
],
919-
'conditions': [
920-
['OS=="linux"', {
921-
'ldflags': [ '-fsanitize=fuzzer' ]
922-
}],
923-
# Ensure that ossfuzz flag has been set and that we are on Linux
924-
[ 'OS!="linux" or ossfuzz!="true"', {
925-
'type': 'none',
926-
}],
927-
],
928-
}, # fuzz_url
929897
{ # fuzz_env
930898
'target_name': 'fuzz_env',
931899
'type': 'executable',
@@ -1018,7 +986,6 @@
1018986
'test/cctest/test_sockaddr.cc',
1019987
'test/cctest/test_traced_value.cc',
1020988
'test/cctest/test_util.cc',
1021-
'test/cctest/test_url.cc',
1022989
],
1023990

1024991
'conditions': [
Collapse file

‎src/crypto/crypto_common.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_common.cc
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
#include "crypto/crypto_common.h"
12
#include "base_object-inl.h"
23
#include "env-inl.h"
4+
#include "memory_tracker-inl.h"
5+
#include "node.h"
36
#include "node_buffer.h"
47
#include "node_crypto.h"
5-
#include "crypto/crypto_common.h"
6-
#include "node.h"
78
#include "node_internals.h"
8-
#include "node_url.h"
99
#include "string_bytes.h"
10-
#include "memory_tracker-inl.h"
1110
#include "v8.h"
1211

1312
#include <openssl/ec.h>
Collapse file

‎src/inspector_agent.cc‎

Copy file name to clipboardExpand all lines: src/inspector_agent.cc
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,9 @@ class NodeInspectorClient : public V8InspectorClient {
650650
protocol::StringUtil::StringViewToUtf8(resource_name_view);
651651
if (!IsFilePath(resource_name))
652652
return nullptr;
653-
node::url::URL url = node::url::URL::FromFilePath(resource_name);
654-
return Utf8ToStringView(url.href());
653+
654+
std::string url = node::url::FromFilePath(resource_name);
655+
return Utf8ToStringView(url);
655656
}
656657

657658
node::Environment* env_;
Collapse file

‎src/module_wrap.cc‎

Copy file name to clipboardExpand all lines: src/module_wrap.cc
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "node_external_reference.h"
88
#include "node_internals.h"
99
#include "node_process-inl.h"
10-
#include "node_url.h"
1110
#include "node_watchdog.h"
1211
#include "util-inl.h"
1312

@@ -21,8 +20,6 @@ namespace loader {
2120
using errors::TryCatchScope;
2221

2322
using node::contextify::ContextifyContext;
24-
using node::url::URL;
25-
using node::url::URL_FLAGS_FAILED;
2623
using v8::Array;
2724
using v8::ArrayBufferView;
2825
using v8::Context;
Collapse file

‎src/node_api.cc‎

Copy file name to clipboardExpand all lines: src/node_api.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void napi_module_register_by_symbol(v8::Local<v8::Object> exports,
657657
// a file system path.
658658
// TODO(gabrielschulhof): Pass the `filename` through unchanged if/when we
659659
// receive it as a URL already.
660-
module_filename = node::url::URL::FromFilePath(filename.ToString()).href();
660+
module_filename = node::url::FromFilePath(filename.ToString());
661661
}
662662

663663
// Create a new napi_env for this specific module.
Collapse file

‎src/node_metadata.cc‎

Copy file name to clipboardExpand all lines: src/node_metadata.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "node_metadata.h"
22
#include "acorn_version.h"
3+
#include "ada.h"
34
#include "ares.h"
45
#include "brotli/encode.h"
56
#include "llhttp.h"
@@ -115,6 +116,7 @@ Metadata::Versions::Versions() {
115116
#endif
116117

117118
simdutf = SIMDUTF_VERSION;
119+
ada = ADA_VERSION;
118120
}
119121

120122
Metadata::Release::Release() : name(NODE_RELEASE) {
Collapse file

‎src/node_metadata.h‎

Copy file name to clipboardExpand all lines: src/node_metadata.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace node {
4747
V(uvwasi) \
4848
V(acorn) \
4949
V(simdutf) \
50+
V(ada) \
5051
NODE_VERSIONS_KEY_UNDICI(V)
5152

5253
#if HAVE_OPENSSL

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.