bare-url 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +5 -3
- package/package.json +2 -1
- package/prebuilds/android-arm/bare-url.bare +0 -0
- package/prebuilds/android-arm64/bare-url.bare +0 -0
- package/prebuilds/android-ia32/bare-url.bare +0 -0
- package/prebuilds/android-x64/bare-url.bare +0 -0
- package/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/prebuilds/linux-x64/bare-url.bare +0 -0
- package/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/prebuilds/win32-x64/bare-url.bare +0 -0
- package/vendor/liburl/src/parse.h +15 -5
package/CMakeLists.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.25)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
project(bare_url C)
|
|
6
6
|
|
|
7
7
|
if(NOT TARGET utf)
|
|
8
8
|
add_subdirectory(vendor/libutf EXCLUDE_FROM_ALL)
|
|
@@ -16,6 +16,8 @@ add_bare_module(bare_url)
|
|
|
16
16
|
|
|
17
17
|
target_sources(
|
|
18
18
|
${bare_url}
|
|
19
|
+
PUBLIC
|
|
20
|
+
$<TARGET_OBJECTS:url>
|
|
19
21
|
PRIVATE
|
|
20
22
|
binding.c
|
|
21
23
|
)
|
|
@@ -23,5 +25,5 @@ target_sources(
|
|
|
23
25
|
target_link_libraries(
|
|
24
26
|
${bare_url}
|
|
25
27
|
PUBLIC
|
|
26
|
-
|
|
28
|
+
url
|
|
27
29
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-url",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "WHATWG URL implementation for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"brittle": "^3.3.2",
|
|
38
|
+
"cmake-bare": "^1.1.6",
|
|
38
39
|
"standard": "^17.1.0"
|
|
39
40
|
}
|
|
40
41
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -828,6 +828,11 @@ url__parse (url_t *url, const utf8_string_view_t input, const url_t *base) {
|
|
|
828
828
|
url->components.port = base->components.port;
|
|
829
829
|
}
|
|
830
830
|
} else {
|
|
831
|
+
if (base->components.scheme_end + 3 /* :// */ == base->components.username_end) {
|
|
832
|
+
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
833
|
+
if (err < 0) goto err;
|
|
834
|
+
}
|
|
835
|
+
|
|
831
836
|
url->components.username_end = url->href.len;
|
|
832
837
|
url->components.host_start = url->href.len;
|
|
833
838
|
url->components.host_end = url->href.len;
|
|
@@ -881,12 +886,12 @@ url__parse (url_t *url, const utf8_string_view_t input, const url_t *base) {
|
|
|
881
886
|
} else {
|
|
882
887
|
utf8_string_view_t host = url_get_host(base);
|
|
883
888
|
|
|
884
|
-
if (url->type == url_type_opaque && base->components.scheme_end + 3 /* :// */ == base->components.host_start) {
|
|
885
|
-
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
886
|
-
if (err < 0) goto err;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
889
|
if (!utf8_string_view_empty(host)) {
|
|
890
|
+
if (url->type == url_type_opaque) {
|
|
891
|
+
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
892
|
+
if (err < 0) goto err;
|
|
893
|
+
}
|
|
894
|
+
|
|
890
895
|
utf8_string_view_t username = url_get_username(base);
|
|
891
896
|
|
|
892
897
|
if (!utf8_string_view_empty(username)) {
|
|
@@ -928,6 +933,11 @@ url__parse (url_t *url, const utf8_string_view_t input, const url_t *base) {
|
|
|
928
933
|
if (err < 0) goto err;
|
|
929
934
|
}
|
|
930
935
|
} else {
|
|
936
|
+
if (url->type == url_type_opaque && base->components.scheme_end + 3 /* :// */ == base->components.username_end) {
|
|
937
|
+
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
938
|
+
if (err < 0) goto err;
|
|
939
|
+
}
|
|
940
|
+
|
|
931
941
|
url->components.username_end = url->href.len;
|
|
932
942
|
url->components.host_start = url->href.len;
|
|
933
943
|
url->components.host_end = url->href.len;
|