Skip to content

Commit

Permalink
Merge branch 'main' into deps-version
Browse files Browse the repository at this point in the history
  • Loading branch information
fasenderos authored May 23, 2023
2 parents 47770e9 + 300f68e commit 7bf0db3
Show file tree
Hide file tree
Showing 746 changed files with 57,171 additions and 58,326 deletions.
42 changes: 13 additions & 29 deletions deps/ada/ada.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-05-16 13:48:47 -0400. Do not edit! */
/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */
/* begin file src/ada.cpp */
#include "ada.h"
/* begin file src/checkers.cpp */
Expand Down Expand Up @@ -10001,8 +10001,9 @@ static_assert(sizeof(is_forbidden_domain_code_point_table_or_upper) == 256);
static_assert(is_forbidden_domain_code_point_table_or_upper[uint8_t('A')] == 2);
static_assert(is_forbidden_domain_code_point_table_or_upper[uint8_t('Z')] == 2);

ada_really_inline constexpr bool contains_forbidden_domain_code_point_or_upper(
const char* input, size_t length) noexcept {
ada_really_inline constexpr uint8_t
contains_forbidden_domain_code_point_or_upper(const char* input,
size_t length) noexcept {
size_t i = 0;
uint8_t accumulator{};
for (; i + 4 <= length; i += 4) {
Expand Down Expand Up @@ -10677,7 +10678,7 @@ ada_really_inline size_t find_next_host_delimiter_special(
has_zero_byte(xor3) | has_zero_byte(xor4) |
has_zero_byte(xor5);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}
if (i < view.size()) {
Expand All @@ -10695,7 +10696,7 @@ ada_really_inline size_t find_next_host_delimiter_special(
has_zero_byte(xor3) | has_zero_byte(xor4) |
has_zero_byte(xor5);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}
return view.size();
Expand Down Expand Up @@ -10739,7 +10740,7 @@ ada_really_inline size_t find_next_host_delimiter(std::string_view view,
uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) |
has_zero_byte(xor4) | has_zero_byte(xor5);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}
if (i < view.size()) {
Expand All @@ -10757,7 +10758,7 @@ ada_really_inline size_t find_next_host_delimiter(std::string_view view,
uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) |
has_zero_byte(xor4) | has_zero_byte(xor5);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}
return view.size();
Expand Down Expand Up @@ -11064,7 +11065,7 @@ find_authority_delimiter_special(std::string_view view) noexcept {
uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) |
has_zero_byte(xor3) | has_zero_byte(xor4);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}

Expand All @@ -11079,7 +11080,7 @@ find_authority_delimiter_special(std::string_view view) noexcept {
uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) |
has_zero_byte(xor3) | has_zero_byte(xor4);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}

Expand Down Expand Up @@ -11112,7 +11113,7 @@ find_authority_delimiter(std::string_view view) noexcept {
uint64_t is_match =
has_zero_byte(xor1) | has_zero_byte(xor2) | has_zero_byte(xor3);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}

Expand All @@ -11126,7 +11127,7 @@ find_authority_delimiter(std::string_view view) noexcept {
uint64_t is_match =
has_zero_byte(xor1) | has_zero_byte(xor2) | has_zero_byte(xor3);
if (is_match) {
return i + index_of_first_set_byte(is_match);
return size_t(i + index_of_first_set_byte(is_match));
}
}

Expand Down Expand Up @@ -12088,8 +12089,7 @@ result_type parse_url(std::string_view user_input,

// We refuse to parse URL strings that exceed 4GB. Such strings are almost
// surely the result of a bug or are otherwise a security concern.
if (user_input.size() >=
std::string_view::size_type(std::numeric_limits<uint32_t>::max)) {
if (user_input.size() > std::numeric_limits<uint32_t>::max()) {
url.is_valid = false;
}
// Going forward, user_input.size() is in [0,
Expand Down Expand Up @@ -13565,22 +13565,6 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
}
ada_log("parse_host fast path ", get_hostname());
return true;
} else if (is_forbidden_or_upper == 2) {
// We have encountered at least one upper case ASCII letter, let us
// try to convert it to lower case. If there is no 'xn-' in the result,
// we can then use a secondary fast path.
std::string _buffer = std::string(input);
unicode::to_lower_ascii(_buffer.data(), _buffer.size());
if (input.find("xn-") == std::string_view::npos) {
// secondary fast path when input is not all lower case
update_base_hostname(input);
if (checkers::is_ipv4(get_hostname())) {
ada_log("parse_host fast path ipv4");
return parse_ipv4(get_hostname());
}
ada_log("parse_host fast path ", get_hostname());
return true;
}
}
// We have encountered at least one forbidden code point or the input contains
// 'xn-' (case insensitive), so we need to call 'to_ascii' to perform the full
Expand Down
11 changes: 6 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-05-16 13:48:47 -0400. Do not edit! */
/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */
/* begin file include/ada.h */
/**
* @file ada.h
Expand Down Expand Up @@ -4354,8 +4354,9 @@ ada_really_inline constexpr bool contains_forbidden_domain_code_point(
* then the second bit is set to 1.
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
*/
ada_really_inline constexpr bool contains_forbidden_domain_code_point_or_upper(
const char* input, size_t length) noexcept;
ada_really_inline constexpr uint8_t
contains_forbidden_domain_code_point_or_upper(const char* input,
size_t length) noexcept;

/**
* Checks if the input is a forbidden doamin code point.
Expand Down Expand Up @@ -6484,14 +6485,14 @@ inline std::ostream &operator<<(std::ostream &out,
#ifndef ADA_ADA_VERSION_H
#define ADA_ADA_VERSION_H

#define ADA_VERSION "2.4.1"
#define ADA_VERSION "2.4.2"

namespace ada {

enum {
ADA_VERSION_MAJOR = 2,
ADA_VERSION_MINOR = 4,
ADA_VERSION_REVISION = 1,
ADA_VERSION_REVISION = 2,
};

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

## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19)


### ⚠ BREAKING CHANGES

* remove support for Node.js 14.x

### Features

* update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc))


### Bug Fixes

* **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843))


### Miscellaneous Chores

* update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be))

## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07)


Expand Down
59 changes: 47 additions & 12 deletions deps/corepack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@

Corepack is a zero-runtime-dependency Node.js script that acts as a bridge
between Node.js projects and the package managers they are intended to be used
with during development. In practical terms, **Corepack will let you use Yarn
and pnpm without having to install them** - just like what currently happens
with npm, which is shipped by Node.js by default.

**Important:** At the moment, Corepack only covers Yarn and pnpm. Given that we
have little control on the npm project, we prefer to focus on the Yarn and pnpm
use cases. As a result, Corepack doesn't have any effect at all on the way you
use npm.
with during development. In practical terms, **Corepack lets you use Yarn, npm,
and pnpm without having to install them**.

## How to Install

### Default Installs

Corepack is distributed by default with Node.js 14.19.0 and 16.9.0, but is
opt-in for the time being. Run `corepack enable` to install the required shims.
Corepack is [distributed by default with all recent Node.js versions](https://nodejs.org/api/corepack.html).
Run `corepack enable` to install the required Yarn and pnpm binaries on your path.

### Manual Installs

<details>
<summary>Click here to see how to install Corepack using npm</summary>
<summary>Install Corepack using npm</summary>

First uninstall your global Yarn and pnpm binaries (just leave npm). In general,
you'd do this by running the following command:
Expand All @@ -45,6 +39,12 @@ is distributed along with Node.js itself.

</details>

<details><summary>Install Corepack from source</summary>

See [`CONTRIBUTING.md`](./CONTRIBUTING.md).

</details>

## Usage

### When Building Packages
Expand Down Expand Up @@ -131,12 +131,37 @@ on a project where the `packageManager` field references `pnpm`).
| --------------------- | --------------------------------------- |
| `--install-directory` | Add the shims to the specified location |

This command will detect where Node.js is installed and will create shims next
This command will detect where Corepack is installed and will create shims next
to it for each of the specified package managers (or all of them if the command
is called without parameters). Note that the npm shims will not be installed
unless explicitly requested, as npm is currently distributed with Node.js
through other means.

If the file system where the `corepack` binary is located is read-only, this
command will fail. A workaround is to add the binaries as alias in your
shell configuration file (e.g. in `~/.bash_aliases`):

```sh
alias yarn="corepack yarn"
alias yarnpkg="corepack yarnpkg"
alias pnpm="corepack pnpm"
alias pnpx="corepack pnpx"
alias npm="corepack npm"
alias npx="corepack npx"
```

On Windows PowerShell, you can add functions using the `$PROFILE` automatic
variable:

```powershell
echo "function yarn { corepack yarn `$args }" >> $PROFILE
echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE
echo "function pnpm { corepack pnpm `$args }" >> $PROFILE
echo "function pnpx { corepack pnpx `$args }" >> $PROFILE
echo "function npm { corepack npm `$args }" >> $PROFILE
echo "function npx { corepack npx `$args }" >> $PROFILE
```

### `corepack disable [... name]`

| Option | Description |
Expand Down Expand Up @@ -217,6 +242,16 @@ network interaction.
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
[`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).

## Troubleshooting

### Networking

There are a wide variety of networking issues that can occur while running `corepack` commands. Things to check:

- Make sure your network connection is active.
- Make sure the host for your request can be resolved by your DNS; try using `curl [URL]` from your shell.
- Check your proxy settings (see [Environment Variables](#environment-variables)).

## Contributing

See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
Expand Down
Loading

0 comments on commit 7bf0db3

Please sign in to comment.