From b85a2b9475f0316d6cb7758e9ec6840bb9e0cf5f Mon Sep 17 00:00:00 2001 From: FatumaA <67555014+FatumaA@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:12:02 +0300 Subject: [PATCH 1/3] docs: add directions to run docs and benchmarks --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a910263bd1..7e0f07f25f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,25 @@ # Contributing to Undici -* [Guides](#guides) - * [Update `llhttp`](#update-llhttp) - * [Lint](#lint) - * [Test](#test) - * [Coverage](#coverage) - * [Update `WPTs`](#update-wpts) - * [Building for externally shared node builtins](#external-builds) -* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin) - * [Moderation Policy](#moderation-policy) +- [Guides](#guides) + - [Update `llhttp`](#update-llhttp) + - [Lint](#lint) + - [Test](#test) + - [Coverage](#coverage) + - [Update `WPTs`](#update-wpts) + - [Building for externally shared node builtins](#external-builds) + - [Benchmarks](#benchmarks) + - [Documentation](#documentation) +- [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin) + - [Moderation Policy](#moderation-policy) + ## Guides +This is a collection of guides on how to run and update `undici`, and how to run different parts of the project. + + ### Update `llhttp` The HTTP parser used by `undici` is a WebAssembly build of [`llhttp`](https://github.com/nodejs/llhttp). @@ -35,6 +41,7 @@ git clone git@github.com:nodejs/llhttp.git cd llhttp ``` + #### Checkout a `llhttp` release ```bash @@ -84,6 +91,7 @@ npm run build:wasm Create a commit which includes all of the updated files in lib/llhttp. + ### Update `WPTs` `undici` runs a subset of the [`web-platform-tests`](https://github.com/web-platform-tests/wpt). @@ -108,6 +116,7 @@ git sparse-checkout add /mimesniff git sparse-checkout add /storage git sparse-checkout add /service-workers ``` + #### Sparse-clone the [wpt](https://github.com/web-platform-tests/wpt) repo @@ -153,6 +162,7 @@ npm run lint ``` + ### Test ```bash @@ -160,13 +170,17 @@ npm run test ``` + ### Coverage ```bash npm run coverage ``` + + + ### Building for externally shared node builtins If you are packaging `undici` for a distro, this might help if you would like to use @@ -176,15 +190,34 @@ To enable this, pass `EXTERNAL_PATH=/path/to/global/node_modules/undici` to `bui You shall also pass this path to `--shared-builtin-undici/undici-path` in Node.js's `configure.py`. + +### Benchmarks + +```bash +cd benchmarks && npm i && npm run bench +``` + +The benchmarks will be available at `http://localhost:3042`. + + + +### Documentation + +```bash +cd docs && npm i && npm run serve +``` + +The documentation will be available at `http://localhost:3000`. + ## Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: -* (a) The contribution was created in whole or in part by me and I +- (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or -* (b) The contribution is based upon previous work that, to the best +- (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part @@ -192,20 +225,20 @@ By making a contribution to this project, I certify that: permitted to submit under a different license), as indicated in the file; or -* (c) The contribution was provided directly to me by some other +- (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. -* (d) I understand and agree that this project and the contribution +- (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. + ### Moderation Policy The [Node.js Moderation Policy] applies to this project. -[Node.js Moderation Policy]: -https://github.com/nodejs/admin/blob/main/Moderation-Policy.md +[Node.js Moderation Policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md From eccf2f8faf971aeec6029bacdbdd3be7a5069fd7 Mon Sep 17 00:00:00 2001 From: Fatuma Abdullahi <67555014+FatumaA@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:48:35 +0300 Subject: [PATCH 2/3] undo unneeded formatting --- CONTRIBUTING.md | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0adcd19373e..b4aec0ebd70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,26 +1,24 @@ # Contributing to Undici -- [Guides](#guides) - - [Update `llhttp`](#update-llhttp) - - [Lint](#lint) - - [Test](#test) - - [Coverage](#coverage) - - [Releases](#releases) - - [Update `WPTs`](#update-wpts) - - [Building for externally shared node builtins](#external-builds) - - [Benchmarks](#benchmarks) - - [Documentation](#documentation) -- [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin) - - [Moderation Policy](#moderation-policy) +* [Guides](#guides) + * [Update `llhttp`](#update-llhttp) + * [Lint](#lint) + * [Test](#test) + * [Coverage](#coverage) + * [Releases](#releases) + * [Update `WPTs`](#update-wpts) + * [Building for externally shared node builtins](#external-builds) + * [Benchmarks](#benchmarks + * [Documentation](#documentation) +* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin) + * [Moderation Policy](#moderation-policy) - ## Guides This is a collection of guides on how to run and update `undici`, and how to run different parts of the project. - ### Update `llhttp` The HTTP parser used by `undici` is a WebAssembly build of [`llhttp`](https://github.com/nodejs/llhttp). @@ -92,7 +90,6 @@ npm run build:wasm Create a commit which includes all of the updated files in lib/llhttp. - ### Update `WPTs` `undici` runs a subset of the [`web-platform-tests`](https://github.com/web-platform-tests/wpt). @@ -155,7 +152,6 @@ npm run test:wpt ``` - ### Lint ```bash @@ -163,7 +159,6 @@ npm run lint ``` - ### Test ```bash @@ -171,7 +166,6 @@ npm run test ``` - ### Coverage ```bash @@ -179,14 +173,12 @@ npm run coverage ``` - ### Issuing Releases Release is automatic on commit to main which bumps the package.json version field. Use the "Create release PR" github action to generate a release PR. - ### Building for externally shared node builtins If you are packaging `undici` for a distro, this might help if you would like to use @@ -196,7 +188,6 @@ To enable this, pass `EXTERNAL_PATH=/path/to/global/node_modules/undici` to `bui You shall also pass this path to `--shared-builtin-undici/undici-path` in Node.js's `configure.py`. - ### Benchmarks ```bash @@ -206,7 +197,6 @@ cd benchmarks && npm i && npm run bench The benchmarks will be available at `http://localhost:3042`. - ### Documentation ```bash @@ -216,7 +206,6 @@ cd docs && npm i && npm run serve The documentation will be available at `http://localhost:3000`. - ## Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: @@ -244,7 +233,6 @@ By making a contribution to this project, I certify that: this project or the open source license(s) involved. - ### Moderation Policy The [Node.js Moderation Policy] applies to this project. From 93f97096ba2ddd790d23e1034b7314ef07d61430 Mon Sep 17 00:00:00 2001 From: Fatuma Abdullahi <67555014+FatumaA@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:50:20 +0300 Subject: [PATCH 3/3] Update CONTRIBUTING.md --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4aec0ebd70..306428a453a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -210,11 +210,11 @@ The documentation will be available at `http://localhost:3000`. By making a contribution to this project, I certify that: -- (a) The contribution was created in whole or in part by me and I +* (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or -- (b) The contribution is based upon previous work that, to the best +* (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part @@ -222,11 +222,11 @@ By making a contribution to this project, I certify that: permitted to submit under a different license), as indicated in the file; or -- (c) The contribution was provided directly to me by some other +* (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. -- (d) I understand and agree that this project and the contribution +* (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with