Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f3fcad2
doc: note that path.normalize deviates from POSIX
tniessen Jan 29, 2024
d4eb03f
meta: add .mailmap entry for lemire
lemire Jan 29, 2024
44476be
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Jan 30, 2024
0f461aa
doc: fix `dns.lookup` and `dnsPromises.lookup` description
duncanchiu409 Jan 30, 2024
a501315
repl: fix `NO_COLORS` env var is ignored
MoLow Jan 31, 2024
8b28366
src: support multi-line values for .env file
IlyasShabi Jan 31, 2024
4ab63db
tools: run `build-windows` workflow only on source changes
aduh95 Jan 31, 2024
ec9c785
deps: update ngtcp2 to 1.2.0
nodejs-github-bot Jan 31, 2024
ce56887
lib: define FormData and fetch etc. in the built-in snapshot
joyeecheung Jan 31, 2024
a64a866
deps: update ada to 2.7.5
nodejs-github-bot Jan 22, 2024
7a1267c
deps: update ada to 2.7.6
nodejs-github-bot Jan 30, 2024
39d3f42
deps: update corepack to 0.24.1
nodejs-github-bot Jan 31, 2024
3fbe157
esm: improve error when calling `import.meta.resolve` from `data:` URL
aduh95 Jan 31, 2024
a7eb72d
test: remove test-fs-rmdir-recursive flaky designation
lpinca Feb 1, 2024
1cd9a95
src: fix vm bug for configurable globalThis
fhinkel Feb 1, 2024
dd4767f
deps: update undici to 6.4.0
nodejs-github-bot Feb 1, 2024
ad0bcb9
vm: support using the default loader to handle dynamic import()
joyeecheung Feb 1, 2024
a3e0834
deps: V8: cherry-pick efb1133eb894
joyeecheung Feb 1, 2024
d1114c4
http2: close idle connections when allowHTTP1 is true
xsbchen Feb 1, 2024
68885d5
deps: update nghttp2 to 1.59.0
nodejs-github-bot Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@ name: Build Windows

on:
pull_request:
paths-ignore:
- README.md
- .github/**
- '!.github/workflows/build-windows.yml'
paths:
- lib/**/*.js
- Makefile
- src/**/*.cc
- src/**/*.h
- tools/gyp/**
- .github/workflows/build-windows.yml
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- README.md
- .github/**
- '!.github/workflows/build-windows.yml'
paths:
- lib/**/*.js
- Makefile
- src/**/*.cc
- src/**/*.h
- tools/gyp/**
- .github/workflows/build-windows.yml

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Daniel Chcouri <[email protected]>
Daniel Clifford <[email protected]>
Daniel Gröber <[email protected]>
Daniel Gröber <[email protected]> <[email protected]>
Daniel Lemire <[email protected]> <[email protected]>
Daniel Paulino <[email protected]>
Daniel Pihlström <[email protected]>
Daniel Wang <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ For information about the governance of the Node.js project, see
* [legendecas](https://github.com/legendecas) -
**Chengzhong Wu** <<[email protected]>> (he/him)
* [lemire](https://github.com/lemire) -
**Daniel Lemire** <<[email protected]>>
**Daniel Lemire** <<[email protected]>>
* [linkgoron](https://github.com/linkgoron) -
**Nitzan Uziely** <<[email protected]>>
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.12',
'v8_embedder_string': '-node.13',

##### V8 defaults for Node.js #####

Expand Down
56 changes: 37 additions & 19 deletions deps/ada/ada.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-11-19 13:35:02 -0500. Do not edit! */
/* auto-generated on 2024-01-29 13:13:24 -0500. Do not edit! */
/* begin file src/ada.cpp */
#include "ada.h"
/* begin file src/checkers.cpp */
Expand Down Expand Up @@ -11221,7 +11221,7 @@ ada_warn_unused std::string to_string(ada::state state) {
namespace ada {

bool url::parse_opaque_host(std::string_view input) {
ada_log("parse_opaque_host ", input, "[", input.size(), " bytes]");
ada_log("parse_opaque_host ", input, " [", input.size(), " bytes]");
if (std::any_of(input.begin(), input.end(),
ada::unicode::is_forbidden_host_code_point)) {
return is_valid = false;
Expand All @@ -11235,7 +11235,7 @@ bool url::parse_opaque_host(std::string_view input) {
}

bool url::parse_ipv4(std::string_view input) {
ada_log("parse_ipv4 ", input, "[", input.size(), " bytes]");
ada_log("parse_ipv4 ", input, " [", input.size(), " bytes]");
if (input.back() == '.') {
input.remove_suffix(1);
}
Expand Down Expand Up @@ -11277,7 +11277,7 @@ bool url::parse_ipv4(std::string_view input) {
// We have the last value.
// At this stage, ipv4 contains digit_count*8 bits.
// So we have 32-digit_count*8 bits left.
if (segment_result > (uint64_t(1) << (32 - digit_count * 8))) {
if (segment_result >= (uint64_t(1) << (32 - digit_count * 8))) {
return is_valid = false;
}
ipv4 <<= (32 - digit_count * 8);
Expand Down Expand Up @@ -11310,7 +11310,7 @@ bool url::parse_ipv4(std::string_view input) {
}

bool url::parse_ipv6(std::string_view input) {
ada_log("parse_ipv6 ", input, "[", input.size(), " bytes]");
ada_log("parse_ipv6 ", input, " [", input.size(), " bytes]");

if (input.empty()) {
return is_valid = false;
Expand Down Expand Up @@ -11634,7 +11634,7 @@ ada_really_inline bool url::parse_scheme(const std::string_view input) {
}

ada_really_inline bool url::parse_host(std::string_view input) {
ada_log("parse_host ", input, "[", input.size(), " bytes]");
ada_log("parse_host ", input, " [", input.size(), " bytes]");
if (input.empty()) {
return is_valid = false;
} // technically unnecessary.
Expand Down Expand Up @@ -11686,6 +11686,8 @@ ada_really_inline bool url::parse_host(std::string_view input) {
ada_log("parse_host to_ascii returns false");
return is_valid = false;
}
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(),
" bytes]");

if (std::any_of(host.value().begin(), host.value().end(),
ada::unicode::is_forbidden_domain_code_point)) {
Expand All @@ -11696,7 +11698,7 @@ ada_really_inline bool url::parse_host(std::string_view input) {
// If asciiDomain ends in a number, then return the result of IPv4 parsing
// asciiDomain.
if (checkers::is_ipv4(host.value())) {
ada_log("parse_host got ipv4", *host);
ada_log("parse_host got ipv4 ", *host);
return parse_ipv4(host.value());
}

Expand Down Expand Up @@ -13571,7 +13573,7 @@ void url_aggregator::set_hash(const std::string_view input) {

bool url_aggregator::set_href(const std::string_view input) {
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
ada_log("url_aggregator::set_href ", input, "[", input.size(), " bytes]");
ada_log("url_aggregator::set_href ", input, " [", input.size(), " bytes]");
ada::result<url_aggregator> out = ada::parse<url_aggregator>(input);
ada_log("url_aggregator::set_href, success :", out.has_value());

Expand All @@ -13585,7 +13587,8 @@ bool url_aggregator::set_href(const std::string_view input) {
}

ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
ada_log("url_aggregator:parse_host ", input, "[", input.size(), " bytes]");
ada_log("url_aggregator:parse_host \"", input, "\" [", input.size(),
" bytes]");
ADA_ASSERT_TRUE(validate());
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
if (input.empty()) {
Expand Down Expand Up @@ -13635,7 +13638,7 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
update_base_hostname(input);
if (checkers::is_ipv4(get_hostname())) {
ada_log("parse_host fast path ipv4");
return parse_ipv4(get_hostname());
return parse_ipv4(get_hostname(), true);
}
ada_log("parse_host fast path ", get_hostname());
return true;
Expand All @@ -13651,6 +13654,8 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
ada_log("parse_host to_ascii returns false");
return is_valid = false;
}
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(),
" bytes]");

if (std::any_of(host.value().begin(), host.value().end(),
ada::unicode::is_forbidden_domain_code_point)) {
Expand All @@ -13660,8 +13665,8 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
// If asciiDomain ends in a number, then return the result of IPv4 parsing
// asciiDomain.
if (checkers::is_ipv4(host.value())) {
ada_log("parse_host got ipv4", *host);
return parse_ipv4(host.value());
ada_log("parse_host got ipv4 ", *host);
return parse_ipv4(host.value(), false);
}

update_base_hostname(host.value());
Expand Down Expand Up @@ -13914,7 +13919,7 @@ bool url_aggregator::set_hostname(const std::string_view input) {
}

[[nodiscard]] std::string ada::url_aggregator::to_string() const {
ada_log("url_aggregator::to_string buffer:", buffer, "[", buffer.size(),
ada_log("url_aggregator::to_string buffer:", buffer, " [", buffer.size(),
" bytes]");
if (!is_valid) {
return "null";
Expand Down Expand Up @@ -14013,8 +14018,8 @@ bool url_aggregator::set_hostname(const std::string_view input) {
return checkers::verify_dns_length(get_hostname());
}

bool url_aggregator::parse_ipv4(std::string_view input) {
ada_log("parse_ipv4 ", input, "[", input.size(),
bool url_aggregator::parse_ipv4(std::string_view input, bool in_place) {
ada_log("parse_ipv4 ", input, " [", input.size(),
" bytes], overlaps with buffer: ",
helpers::overlaps(input, buffer) ? "yes" : "no");
ADA_ASSERT_TRUE(validate());
Expand All @@ -14038,27 +14043,32 @@ bool url_aggregator::parse_ipv4(std::string_view input) {
} else {
std::from_chars_result r;
if (is_hex) {
ada_log("parse_ipv4 trying to parse hex number");
r = std::from_chars(input.data() + 2, input.data() + input.size(),
segment_result, 16);
} else if ((input.length() >= 2) && input[0] == '0' &&
checkers::is_digit(input[1])) {
ada_log("parse_ipv4 trying to parse octal number");
r = std::from_chars(input.data() + 1, input.data() + input.size(),
segment_result, 8);
} else {
ada_log("parse_ipv4 trying to parse decimal number");
pure_decimal_count++;
r = std::from_chars(input.data(), input.data() + input.size(),
segment_result, 10);
}
if (r.ec != std::errc()) {
ada_log("parse_ipv4 parsing failed");
return is_valid = false;
}
ada_log("parse_ipv4 parsed ", segment_result);
input.remove_prefix(r.ptr - input.data());
}
if (input.empty()) {
// We have the last value.
// At this stage, ipv4 contains digit_count*8 bits.
// So we have 32-digit_count*8 bits left.
if (segment_result > (uint64_t(1) << (32 - digit_count * 8))) {
if (segment_result >= (uint64_t(1) << (32 - digit_count * 8))) {
return is_valid = false;
}
ipv4 <<= (32 - digit_count * 8);
Expand All @@ -14076,17 +14086,22 @@ bool url_aggregator::parse_ipv4(std::string_view input) {
}
}
if ((digit_count != 4) || (!input.empty())) {
ada_log("parse_ipv4 found invalid (more than 4 numbers or empty) ");
return is_valid = false;
}
final:
ada_log("url_aggregator::parse_ipv4 completed ", get_href(),
" host: ", get_host());

// We could also check r.ptr to see where the parsing ended.
if (pure_decimal_count == 4 && !trailing_dot) {
if (in_place && pure_decimal_count == 4 && !trailing_dot) {
ada_log(
"url_aggregator::parse_ipv4 completed and was already correct in the "
"buffer");
// The original input was already all decimal and we validated it. So we
// don't need to do anything.
} else {
ada_log("url_aggregator::parse_ipv4 completed and we need to update it");
// Optimization opportunity: Get rid of unnecessary string return in ipv4
// serializer.
// TODO: This is likely a bug because it goes back update_base_hostname, not
Expand All @@ -14100,8 +14115,11 @@ bool url_aggregator::parse_ipv4(std::string_view input) {
}

bool url_aggregator::parse_ipv6(std::string_view input) {
// TODO: Implement in_place optimization: we know that input points
// in the buffer, so we can just check whether the buffer is already
// well formatted.
// TODO: Find a way to merge parse_ipv6 with url.cpp implementation.
ada_log("parse_ipv6 ", input, "[", input.size(), " bytes]");
ada_log("parse_ipv6 ", input, " [", input.size(), " bytes]");
ADA_ASSERT_TRUE(validate());
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
if (input.empty()) {
Expand Down Expand Up @@ -14335,7 +14353,7 @@ bool url_aggregator::parse_ipv6(std::string_view input) {
}

bool url_aggregator::parse_opaque_host(std::string_view input) {
ada_log("parse_opaque_host ", input, "[", input.size(), " bytes]");
ada_log("parse_opaque_host ", input, " [", input.size(), " bytes]");
ADA_ASSERT_TRUE(validate());
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
if (std::any_of(input.begin(), input.end(),
Expand Down
12 changes: 7 additions & 5 deletions deps/ada/ada.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-11-19 13:35:02 -0500. Do not edit! */
/* auto-generated on 2024-01-29 13:13:24 -0500. Do not edit! */
/* begin file include/ada.h */
/**
* @file ada.h
Expand Down Expand Up @@ -4868,10 +4868,12 @@ struct url_aggregator : url_base {
}

/**
* Return true on success.
* Return true on success. The 'in_place' parameter indicates whether the
* the string_view input is pointing in the buffer. When in_place is false,
* we must nearly always update the buffer.
* @see https://url.spec.whatwg.org/#concept-ipv4-parser
*/
[[nodiscard]] bool parse_ipv4(std::string_view input);
[[nodiscard]] bool parse_ipv4(std::string_view input, bool in_place);

/**
* Return true on success.
Expand Down Expand Up @@ -7078,14 +7080,14 @@ url_search_params_entries_iter::next() {
#ifndef ADA_ADA_VERSION_H
#define ADA_ADA_VERSION_H

#define ADA_VERSION "2.7.4"
#define ADA_VERSION "2.7.6"

namespace ada {

enum {
ADA_VERSION_MAJOR = 2,
ADA_VERSION_MINOR = 7,
ADA_VERSION_REVISION = 4,
ADA_VERSION_REVISION = 6,
};

} // namespace ada
Expand Down
12 changes: 12 additions & 0 deletions deps/corepack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [0.24.1](https://github.com/nodejs/corepack/compare/v0.24.0...v0.24.1) (2024-01-13)


### Features

* update package manager versions ([#348](https://github.com/nodejs/corepack/issues/348)) ([cc3ada7](https://github.com/nodejs/corepack/commit/cc3ada73bccd0a5b0ff16834e518efa521c9eea4))


### Bug Fixes

* **use:** create `package.json` when calling `corepack use` on empty dir ([#350](https://github.com/nodejs/corepack/issues/350)) ([2950a8a](https://github.com/nodejs/corepack/commit/2950a8a30b64b4598abc354e45400e83d56e541b))

## [0.24.0](https://github.com/nodejs/corepack/compare/v0.23.0...v0.24.0) (2023-12-29)


Expand Down
21 changes: 13 additions & 8 deletions deps/corepack/dist/lib/corepack.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -41952,7 +41952,7 @@ function String2(descriptor, ...args) {
}

// package.json
var version = "0.24.0";
var version = "0.24.1";

// sources/Engine.ts
var import_fs3 = __toESM(require("fs"));
Expand All @@ -41964,7 +41964,7 @@ var import_semver3 = __toESM(require_semver2());
var config_default = {
definitions: {
npm: {
default: "10.2.5+sha1.ef86b9aafd9965e60814ed11a3d4fb00a4e3b006",
default: "10.3.0+sha1.554e1f13e4c09d581ad27cdc4a92f085ab74ce1a",
fetchLatestFrom: {
type: "npm",
package: "npm"
Expand Down Expand Up @@ -42001,7 +42001,7 @@ var config_default = {
}
},
pnpm: {
default: "8.13.1+sha1.90f9b2bb3ed58632bcb7b13c3902d6873ee9501c",
default: "8.14.1+sha1.d039b38e0b20ad012ed548e44267b8d4c88b447a",
fetchLatestFrom: {
type: "npm",
package: "pnpm"
Expand Down Expand Up @@ -42829,9 +42829,14 @@ async function loadSpec(initialCwd) {
if (nodeModulesRegExp.test(currCwd))
continue;
const manifestPath = import_path6.default.join(currCwd, `package.json`);
if (!import_fs6.default.existsSync(manifestPath))
continue;
const content = await import_fs6.default.promises.readFile(manifestPath, `utf8`);
let content;
try {
content = await import_fs6.default.promises.readFile(manifestPath, `utf8`);
} catch (err) {
if (err?.code === `ENOENT`)
continue;
throw err;
}
let data;
try {
data = JSON.parse(content);
Expand Down Expand Up @@ -42916,7 +42921,7 @@ var BaseCommand = class extends Command {
}
async setLocalPackageManager(info) {
const lookup = await loadSpec(this.context.cwd);
const content = lookup.target !== `NoProject` ? await import_fs7.default.promises.readFile(lookup.target, `utf8`) : ``;
const content = lookup.type !== `NoProject` ? await import_fs7.default.promises.readFile(lookup.target, `utf8`) : ``;
const { data, indent } = readPackageJson(content);
const previousPackageManager = data.packageManager ?? `unknown`;
data.packageManager = `${info.locator.name}@${info.locator.reference}+${info.hash}`;
Expand Down Expand Up @@ -43195,7 +43200,7 @@ var UseCommand = class extends BaseCommand {
`,
examples: [[
`Configure the project to use the latest Yarn release`,
`corepack use 'yarn@*'`
`corepack use yarn`
]]
});
pattern = options_exports.String();
Expand Down
Loading