mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
deps: add ada as a dependency
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
4c08c20e57
commit
df05cf7c36
10
.github/workflows/tools.yml
vendored
10
.github/workflows/tools.yml
vendored
@ -144,6 +144,16 @@ jobs:
|
||||
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
|
||||
./tools/dep_updaters/update-simdutf.sh "$NEW_VERSION"
|
||||
fi
|
||||
- id: ada
|
||||
subsystem: deps
|
||||
label: dependencies
|
||||
run: |
|
||||
NEW_VERSION=$(gh api repos/ada-url/ada/releases/latest -q '.tag_name|ltrimstr("v")')
|
||||
CURRENT_VERSION=$(grep "#define ADA_VERSION" ./deps/ada/ada.h | sed -n "s/^.*VERSION \(.*\)/\1/p")
|
||||
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
|
||||
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
|
||||
./tools/dep_updaters/update-ada.sh "$NEW_VERSION"
|
||||
fi
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
22
LICENSE
22
LICENSE
@ -1338,6 +1338,28 @@ The externally maintained libraries used by Node.js are:
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
- ada, located at deps/ada, is licensed as follows:
|
||||
"""
|
||||
Copyright 2023 Ada authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
- npm, located at deps/npm, is licensed as follows:
|
||||
"""
|
||||
The npm application
|
||||
|
2
Makefile
2
Makefile
@ -170,7 +170,7 @@ with-code-cache test-code-cache:
|
||||
|
||||
out/Makefile: config.gypi common.gypi node.gyp \
|
||||
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
|
||||
deps/simdutf/simdutf.gyp \
|
||||
deps/simdutf/simdutf.gyp deps/ada/ada.gyp \
|
||||
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
|
||||
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
|
||||
$(PYTHON) tools/gyp_node.py -f make
|
||||
|
12
deps/ada/README.md
vendored
Normal file
12
deps/ada/README.md
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# ada
|
||||
|
||||
This project implements WHATWG URL specification in a performant way.
|
||||
|
||||
The source is pulled from: https://github.com/ada-url/ada
|
||||
|
||||
Active development occurs in the default branch (currently named `main`).
|
||||
|
||||
## Updating
|
||||
|
||||
See [tools/dep_updaters/README.md#ada](../../tools/dep_updaters/README.md#ada)
|
||||
for instructions.
|
2504
deps/ada/ada.cpp
vendored
Normal file
2504
deps/ada/ada.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
32
deps/ada/ada.gyp
vendored
Normal file
32
deps/ada/ada.gyp
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
'variables': {
|
||||
'v8_enable_i18n_support%': 1,
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'ada',
|
||||
'type': 'static_library',
|
||||
'include_dirs': ['.'],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': ['.'],
|
||||
},
|
||||
'sources': ['ada.cpp'],
|
||||
'conditions': [
|
||||
['v8_enable_i18n_support==0', {
|
||||
'defines': ['ADA_HAS_ICU=0'],
|
||||
}],
|
||||
['v8_enable_i18n_support==1', {
|
||||
'dependencies': [
|
||||
'<(icu_gyp_path):icui18n',
|
||||
'<(icu_gyp_path):icuuc',
|
||||
],
|
||||
}],
|
||||
['OS=="win" and v8_enable_i18n_support==1', {
|
||||
'dependencies': [
|
||||
'<(icu_gyp_path):icudata',
|
||||
],
|
||||
}],
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
4388
deps/ada/ada.h
vendored
Normal file
4388
deps/ada/ada.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
node.gyp
4
node.gyp
@ -457,6 +457,7 @@
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
'deps/simdutf/simdutf.gyp:simdutf',
|
||||
'deps/ada/ada.gyp:ada',
|
||||
],
|
||||
|
||||
'sources': [
|
||||
@ -976,6 +977,7 @@
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
'deps/simdutf/simdutf.gyp:simdutf',
|
||||
'deps/ada/ada.gyp:ada',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
@ -1072,6 +1074,7 @@
|
||||
'<(node_lib_target_name)',
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
'deps/ada/ada.gyp:ada',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
@ -1141,6 +1144,7 @@
|
||||
'<(node_lib_target_name)',
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
'deps/ada/ada.gyp:ada',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
|
52
tools/dep_updaters/update-ada.sh
Normal file
52
tools/dep_updaters/update-ada.sh
Normal file
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Shell script to update ada in the source tree to a specific version
|
||||
|
||||
BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
DEPS_DIR="$BASE_DIR/deps"
|
||||
ADA_VERSION=$1
|
||||
|
||||
if [ "$#" -le 0 ]; then
|
||||
echo "Error: please provide an ada version to update to"
|
||||
echo " e.g. $0 1.0.0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Making temporary workspace..."
|
||||
|
||||
WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp')
|
||||
|
||||
cleanup () {
|
||||
EXIT_CODE=$?
|
||||
[ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE"
|
||||
exit $EXIT_CODE
|
||||
}
|
||||
|
||||
trap cleanup INT TERM EXIT
|
||||
|
||||
ADA_REF="v$ADA_VERSION"
|
||||
ADA_ZIP="ada-$ADA_VERSION.zip"
|
||||
ADA_LICENSE="LICENSE-MIT"
|
||||
|
||||
cd "$WORKSPACE"
|
||||
|
||||
echo "Fetching ada source archive..."
|
||||
curl -sL -o "$ADA_ZIP" "https://github.com/ada-url/ada/releases/download/$ADA_REF/singleheader.zip"
|
||||
unzip "$ADA_ZIP"
|
||||
rm "$ADA_ZIP"
|
||||
rm ./*_demo.cpp
|
||||
|
||||
curl -sL -o "$ADA_LICENSE" "https://raw.githubusercontent.com/ada-url/ada/HEAD/LICENSE-MIT"
|
||||
|
||||
echo "Replacing existing ada (except GYP build files)"
|
||||
mv "$DEPS_DIR/ada/"*.gyp "$DEPS_DIR/ada/README.md" "$WORKSPACE/"
|
||||
rm -rf "$DEPS_DIR/ada"
|
||||
mv "$WORKSPACE" "$DEPS_DIR/ada"
|
||||
|
||||
echo "All done!"
|
||||
echo ""
|
||||
echo "Please git add ada, commit the new version:"
|
||||
echo ""
|
||||
echo "$ git add -A deps/ada"
|
||||
echo "$ git commit -m \"deps: update ada to $ADA_VERSION\""
|
||||
echo ""
|
@ -81,6 +81,8 @@ licenseText="$(sed -e '/The data format used by the zlib library/,$d' -e 's/^\/\
|
||||
addlicense "zlib" "deps/zlib" "$licenseText"
|
||||
licenseText="$(cat "${rootdir}/deps/simdutf/LICENSE-MIT")"
|
||||
addlicense "simdutf" "deps/simdutf" "$licenseText"
|
||||
licenseText="$(curl -sL https://raw.githubusercontent.com/ada-url/ada/HEAD/LICENSE-MIT)"
|
||||
addlicense "ada" "deps/ada" "$licenseText"
|
||||
|
||||
# npm
|
||||
licenseText="$(cat "${rootdir}/deps/npm/LICENSE")"
|
||||
|
Loading…
Reference in New Issue
Block a user