From 868522aa377a4519adb0b9f402586ab7a41b86ba Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 21 May 2024 22:56:20 +0200 Subject: Adding debian version 5.28.2+dfsg1+~cs23.11.12.3-6. Signed-off-by: Daniel Baumann --- debian/changelog | 234 ++ debian/clean | 15 + debian/control | 59 + debian/copyright | 364 ++ debian/gbp.conf | 4 + debian/libllhttp-dev.docs | 1 + debian/libllhttp-dev.install | 7 + debian/libllhttp9.1.docs | 2 + debian/libllhttp9.1.install | 1 + debian/node-llhttp.docs | 1 + debian/node-llhttp.examples | 1 + debian/node-llhttp.install | 1 + debian/node-undici.docs | 2 + debian/node-undici.examples | 1 + debian/node-undici.install | 5 + debian/node-undici.maintscript | 2 + debian/nodejs/additional_components | 1 + debian/nodejs/build | 23 + debian/nodejs/component_links | 3 + debian/nodejs/extlinks | 3 + debian/nodejs/links | 1 + debian/nodejs/llhttp/build | 10 + debian/nodejs/llparse-builder/build | 1 + debian/nodejs/llparse-frontend/build | 1 + debian/nodejs/llparse/build | 1 + debian/nodejs/root_modules | 1 + debian/patches/declare-soname.patch | 34 + debian/patches/disable-simd.patch | 20 + debian/patches/dont-rebuild-on-install.patch | 16 + debian/patches/drop-one-error-test.patch | 42 + debian/patches/drop-simd.patch | 27 + debian/patches/drop-ssl-tests.patch | 177 + debian/patches/fix-for-proxy-2.patch | 27 + debian/patches/fix-for-test-tap.patch | 56 + debian/patches/fix-llhttp-version.patch | 16 + debian/patches/fix-typescript.patch | 79 + debian/patches/fix-wasm-build.patch | 98 + debian/patches/replace-npm-run.patch | 25 + debian/patches/series | 14 + debian/patches/simdeverywhere.patch | 37 + debian/patches/workaround-nodejs-bug.patch | 201 + debian/rules | 46 + debian/salsa-ci.yml | 4 + debian/source/format | 1 + debian/source/lintian-overrides | 32 + debian/tests/control | 29 + debian/tests/pkg-js/enable_proto | 0 debian/tests/pkg-js/test | 9 + debian/tests/test_modules/abort-controller/LICENSE | 21 + .../tests/test_modules/abort-controller/browser.js | 13 + .../test_modules/abort-controller/browser.mjs | 11 + .../abort-controller/dist/abort-controller.d.ts | 43 + .../abort-controller/dist/abort-controller.js | 127 + .../abort-controller/dist/abort-controller.mjs | 118 + .../test_modules/abort-controller/package.json | 97 + .../test_modules/abort-controller/polyfill.js | 21 + .../test_modules/abort-controller/polyfill.mjs | 19 + debian/tests/test_modules/atomic-sleep/LICENSE | 22 + debian/tests/test_modules/atomic-sleep/index.js | 38 + .../tests/test_modules/atomic-sleep/package.json | 37 + debian/tests/test_modules/chai-iterator/LICENSE | 20 + .../test_modules/chai-iterator/chai-iterator.js | 334 ++ .../tests/test_modules/chai-iterator/package.json | 70 + debian/tests/test_modules/chai-string/LICENSE | 20 + .../tests/test_modules/chai-string/chai-string.js | 317 ++ debian/tests/test_modules/chai-string/package.json | 32 + debian/tests/test_modules/delay/index.d.ts | 107 + debian/tests/test_modules/delay/index.js | 72 + debian/tests/test_modules/delay/license | 9 + debian/tests/test_modules/delay/package.json | 54 + debian/tests/test_modules/dicer/LICENSE | 19 + debian/tests/test_modules/dicer/lib/Dicer.js | 239 ++ .../tests/test_modules/dicer/lib/HeaderParser.js | 110 + debian/tests/test_modules/dicer/lib/PartStream.js | 11 + debian/tests/test_modules/dicer/package.json | 16 + .../tests/test_modules/event-target-shim/LICENSE | 22 + .../event-target-shim/dist/event-target-shim.js | 871 ++++ .../event-target-shim/dist/event-target-shim.mjs | 862 ++++ .../test_modules/event-target-shim/index.d.ts | 399 ++ .../test_modules/event-target-shim/package.json | 82 + debian/tests/test_modules/https-pem/LICENSE | 21 + debian/tests/test_modules/https-pem/README.md | 78 + debian/tests/test_modules/https-pem/cert.pem | 17 + debian/tests/test_modules/https-pem/index.js | 7 + debian/tests/test_modules/https-pem/install.js | 10 + debian/tests/test_modules/https-pem/key.pem | 27 + debian/tests/test_modules/https-pem/package.json | 44 + debian/tests/test_modules/https-pem/test.js | 23 + debian/tests/test_modules/node-forge/LICENSE | 331 ++ debian/tests/test_modules/node-forge/lib/aes.js | 1091 +++++ .../test_modules/node-forge/lib/aesCipherSuites.js | 282 ++ .../test_modules/node-forge/lib/asn1-validator.js | 91 + debian/tests/test_modules/node-forge/lib/asn1.js | 1434 +++++++ debian/tests/test_modules/node-forge/lib/baseN.js | 186 + debian/tests/test_modules/node-forge/lib/cipher.js | 230 ++ .../test_modules/node-forge/lib/cipherModes.js | 999 +++++ debian/tests/test_modules/node-forge/lib/des.js | 496 +++ .../tests/test_modules/node-forge/lib/ed25519.js | 1072 +++++ debian/tests/test_modules/node-forge/lib/forge.js | 13 + debian/tests/test_modules/node-forge/lib/form.js | 149 + debian/tests/test_modules/node-forge/lib/hmac.js | 146 + debian/tests/test_modules/node-forge/lib/http.js | 1346 ++++++ .../tests/test_modules/node-forge/lib/index.all.js | 16 + debian/tests/test_modules/node-forge/lib/index.js | 33 + debian/tests/test_modules/node-forge/lib/jsbn.js | 1264 ++++++ debian/tests/test_modules/node-forge/lib/kem.js | 168 + debian/tests/test_modules/node-forge/lib/log.js | 319 ++ debian/tests/test_modules/node-forge/lib/md.all.js | 13 + debian/tests/test_modules/node-forge/lib/md.js | 11 + debian/tests/test_modules/node-forge/lib/md5.js | 289 ++ debian/tests/test_modules/node-forge/lib/mgf.js | 12 + debian/tests/test_modules/node-forge/lib/mgf1.js | 57 + debian/tests/test_modules/node-forge/lib/oids.js | 179 + debian/tests/test_modules/node-forge/lib/pbe.js | 1023 +++++ debian/tests/test_modules/node-forge/lib/pbkdf2.js | 211 + debian/tests/test_modules/node-forge/lib/pem.js | 237 ++ debian/tests/test_modules/node-forge/lib/pkcs1.js | 276 ++ debian/tests/test_modules/node-forge/lib/pkcs12.js | 1074 +++++ debian/tests/test_modules/node-forge/lib/pkcs7.js | 1260 ++++++ .../tests/test_modules/node-forge/lib/pkcs7asn1.js | 410 ++ debian/tests/test_modules/node-forge/lib/pki.js | 102 + debian/tests/test_modules/node-forge/lib/prime.js | 297 ++ .../test_modules/node-forge/lib/prime.worker.js | 168 + debian/tests/test_modules/node-forge/lib/prng.js | 419 ++ debian/tests/test_modules/node-forge/lib/pss.js | 241 ++ debian/tests/test_modules/node-forge/lib/random.js | 191 + debian/tests/test_modules/node-forge/lib/rc2.js | 410 ++ debian/tests/test_modules/node-forge/lib/rsa.js | 1949 +++++++++ debian/tests/test_modules/node-forge/lib/sha1.js | 319 ++ debian/tests/test_modules/node-forge/lib/sha256.js | 327 ++ debian/tests/test_modules/node-forge/lib/sha512.js | 561 +++ debian/tests/test_modules/node-forge/lib/socket.js | 287 ++ debian/tests/test_modules/node-forge/lib/ssh.js | 236 ++ debian/tests/test_modules/node-forge/lib/tls.js | 4282 ++++++++++++++++++++ .../tests/test_modules/node-forge/lib/tlssocket.js | 249 ++ debian/tests/test_modules/node-forge/lib/util.js | 2652 ++++++++++++ debian/tests/test_modules/node-forge/lib/x509.js | 3242 +++++++++++++++ debian/tests/test_modules/node-forge/lib/xhr.js | 738 ++++ debian/tests/test_modules/node-forge/package.json | 123 + debian/tests/test_modules/selfsigned/LICENSE | 22 + debian/tests/test_modules/selfsigned/index.d.ts | 57 + debian/tests/test_modules/selfsigned/index.js | 205 + debian/tests/test_modules/selfsigned/package.json | 44 + debian/upstream/metadata | 8 + debian/watch | 49 + 145 files changed, 38091 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/clean create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/libllhttp-dev.docs create mode 100644 debian/libllhttp-dev.install create mode 100644 debian/libllhttp9.1.docs create mode 100644 debian/libllhttp9.1.install create mode 100644 debian/node-llhttp.docs create mode 100644 debian/node-llhttp.examples create mode 100644 debian/node-llhttp.install create mode 100644 debian/node-undici.docs create mode 100644 debian/node-undici.examples create mode 100644 debian/node-undici.install create mode 100644 debian/node-undici.maintscript create mode 100644 debian/nodejs/additional_components create mode 100644 debian/nodejs/build create mode 100644 debian/nodejs/component_links create mode 100644 debian/nodejs/extlinks create mode 100644 debian/nodejs/links create mode 100644 debian/nodejs/llhttp/build create mode 100644 debian/nodejs/llparse-builder/build create mode 100644 debian/nodejs/llparse-frontend/build create mode 100644 debian/nodejs/llparse/build create mode 100644 debian/nodejs/root_modules create mode 100644 debian/patches/declare-soname.patch create mode 100644 debian/patches/disable-simd.patch create mode 100644 debian/patches/dont-rebuild-on-install.patch create mode 100644 debian/patches/drop-one-error-test.patch create mode 100644 debian/patches/drop-simd.patch create mode 100644 debian/patches/drop-ssl-tests.patch create mode 100644 debian/patches/fix-for-proxy-2.patch create mode 100644 debian/patches/fix-for-test-tap.patch create mode 100644 debian/patches/fix-llhttp-version.patch create mode 100644 debian/patches/fix-typescript.patch create mode 100644 debian/patches/fix-wasm-build.patch create mode 100644 debian/patches/replace-npm-run.patch create mode 100644 debian/patches/series create mode 100644 debian/patches/simdeverywhere.patch create mode 100644 debian/patches/workaround-nodejs-bug.patch create mode 100755 debian/rules create mode 100644 debian/salsa-ci.yml create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 debian/tests/control create mode 100644 debian/tests/pkg-js/enable_proto create mode 100644 debian/tests/pkg-js/test create mode 100644 debian/tests/test_modules/abort-controller/LICENSE create mode 100644 debian/tests/test_modules/abort-controller/browser.js create mode 100644 debian/tests/test_modules/abort-controller/browser.mjs create mode 100644 debian/tests/test_modules/abort-controller/dist/abort-controller.d.ts create mode 100644 debian/tests/test_modules/abort-controller/dist/abort-controller.js create mode 100644 debian/tests/test_modules/abort-controller/dist/abort-controller.mjs create mode 100644 debian/tests/test_modules/abort-controller/package.json create mode 100644 debian/tests/test_modules/abort-controller/polyfill.js create mode 100644 debian/tests/test_modules/abort-controller/polyfill.mjs create mode 100644 debian/tests/test_modules/atomic-sleep/LICENSE create mode 100644 debian/tests/test_modules/atomic-sleep/index.js create mode 100644 debian/tests/test_modules/atomic-sleep/package.json create mode 100644 debian/tests/test_modules/chai-iterator/LICENSE create mode 100644 debian/tests/test_modules/chai-iterator/chai-iterator.js create mode 100644 debian/tests/test_modules/chai-iterator/package.json create mode 100644 debian/tests/test_modules/chai-string/LICENSE create mode 100644 debian/tests/test_modules/chai-string/chai-string.js create mode 100644 debian/tests/test_modules/chai-string/package.json create mode 100644 debian/tests/test_modules/delay/index.d.ts create mode 100644 debian/tests/test_modules/delay/index.js create mode 100644 debian/tests/test_modules/delay/license create mode 100644 debian/tests/test_modules/delay/package.json create mode 100644 debian/tests/test_modules/dicer/LICENSE create mode 100644 debian/tests/test_modules/dicer/lib/Dicer.js create mode 100644 debian/tests/test_modules/dicer/lib/HeaderParser.js create mode 100644 debian/tests/test_modules/dicer/lib/PartStream.js create mode 100644 debian/tests/test_modules/dicer/package.json create mode 100644 debian/tests/test_modules/event-target-shim/LICENSE create mode 100644 debian/tests/test_modules/event-target-shim/dist/event-target-shim.js create mode 100644 debian/tests/test_modules/event-target-shim/dist/event-target-shim.mjs create mode 100644 debian/tests/test_modules/event-target-shim/index.d.ts create mode 100644 debian/tests/test_modules/event-target-shim/package.json create mode 100644 debian/tests/test_modules/https-pem/LICENSE create mode 100644 debian/tests/test_modules/https-pem/README.md create mode 100644 debian/tests/test_modules/https-pem/cert.pem create mode 100644 debian/tests/test_modules/https-pem/index.js create mode 100644 debian/tests/test_modules/https-pem/install.js create mode 100644 debian/tests/test_modules/https-pem/key.pem create mode 100644 debian/tests/test_modules/https-pem/package.json create mode 100644 debian/tests/test_modules/https-pem/test.js create mode 100644 debian/tests/test_modules/node-forge/LICENSE create mode 100644 debian/tests/test_modules/node-forge/lib/aes.js create mode 100644 debian/tests/test_modules/node-forge/lib/aesCipherSuites.js create mode 100644 debian/tests/test_modules/node-forge/lib/asn1-validator.js create mode 100644 debian/tests/test_modules/node-forge/lib/asn1.js create mode 100644 debian/tests/test_modules/node-forge/lib/baseN.js create mode 100644 debian/tests/test_modules/node-forge/lib/cipher.js create mode 100644 debian/tests/test_modules/node-forge/lib/cipherModes.js create mode 100644 debian/tests/test_modules/node-forge/lib/des.js create mode 100644 debian/tests/test_modules/node-forge/lib/ed25519.js create mode 100644 debian/tests/test_modules/node-forge/lib/forge.js create mode 100644 debian/tests/test_modules/node-forge/lib/form.js create mode 100644 debian/tests/test_modules/node-forge/lib/hmac.js create mode 100644 debian/tests/test_modules/node-forge/lib/http.js create mode 100644 debian/tests/test_modules/node-forge/lib/index.all.js create mode 100644 debian/tests/test_modules/node-forge/lib/index.js create mode 100644 debian/tests/test_modules/node-forge/lib/jsbn.js create mode 100644 debian/tests/test_modules/node-forge/lib/kem.js create mode 100644 debian/tests/test_modules/node-forge/lib/log.js create mode 100644 debian/tests/test_modules/node-forge/lib/md.all.js create mode 100644 debian/tests/test_modules/node-forge/lib/md.js create mode 100644 debian/tests/test_modules/node-forge/lib/md5.js create mode 100644 debian/tests/test_modules/node-forge/lib/mgf.js create mode 100644 debian/tests/test_modules/node-forge/lib/mgf1.js create mode 100644 debian/tests/test_modules/node-forge/lib/oids.js create mode 100644 debian/tests/test_modules/node-forge/lib/pbe.js create mode 100644 debian/tests/test_modules/node-forge/lib/pbkdf2.js create mode 100644 debian/tests/test_modules/node-forge/lib/pem.js create mode 100644 debian/tests/test_modules/node-forge/lib/pkcs1.js create mode 100644 debian/tests/test_modules/node-forge/lib/pkcs12.js create mode 100644 debian/tests/test_modules/node-forge/lib/pkcs7.js create mode 100644 debian/tests/test_modules/node-forge/lib/pkcs7asn1.js create mode 100644 debian/tests/test_modules/node-forge/lib/pki.js create mode 100644 debian/tests/test_modules/node-forge/lib/prime.js create mode 100644 debian/tests/test_modules/node-forge/lib/prime.worker.js create mode 100644 debian/tests/test_modules/node-forge/lib/prng.js create mode 100644 debian/tests/test_modules/node-forge/lib/pss.js create mode 100644 debian/tests/test_modules/node-forge/lib/random.js create mode 100644 debian/tests/test_modules/node-forge/lib/rc2.js create mode 100644 debian/tests/test_modules/node-forge/lib/rsa.js create mode 100644 debian/tests/test_modules/node-forge/lib/sha1.js create mode 100644 debian/tests/test_modules/node-forge/lib/sha256.js create mode 100644 debian/tests/test_modules/node-forge/lib/sha512.js create mode 100644 debian/tests/test_modules/node-forge/lib/socket.js create mode 100644 debian/tests/test_modules/node-forge/lib/ssh.js create mode 100644 debian/tests/test_modules/node-forge/lib/tls.js create mode 100644 debian/tests/test_modules/node-forge/lib/tlssocket.js create mode 100644 debian/tests/test_modules/node-forge/lib/util.js create mode 100644 debian/tests/test_modules/node-forge/lib/x509.js create mode 100644 debian/tests/test_modules/node-forge/lib/xhr.js create mode 100644 debian/tests/test_modules/node-forge/package.json create mode 100644 debian/tests/test_modules/selfsigned/LICENSE create mode 100644 debian/tests/test_modules/selfsigned/index.d.ts create mode 100644 debian/tests/test_modules/selfsigned/index.js create mode 100644 debian/tests/test_modules/selfsigned/package.json create mode 100644 debian/upstream/metadata create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..d2e3b2a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,234 @@ +node-undici (5.28.2+dfsg1+~cs23.11.12.3-6) unstable; urgency=medium + + * Update homepages + * Drop test/connect-timeout.js from network test (unstable test in debci env) + * Clean build links + + -- Yadd Mon, 22 Jan 2024 14:45:20 +0400 + +node-undici (5.28.2+dfsg1+~cs23.11.12.3-5) unstable; urgency=medium + + * Drop dependency to node-busboy + + -- Yadd Sun, 21 Jan 2024 06:57:54 +0400 + +node-undici (5.28.2+dfsg1+~cs23.11.12.3-4) unstable; urgency=medium + + * Build libllhttp (Closes: #977716) + + add patch to export SONAME + + add libllhttp9 and libllthhp-dev + + update lintian overrides + + add build dependency to cmake + * Fix permissions + + -- Yadd Sat, 20 Jan 2024 08:50:46 +0400 + +node-undici (5.28.2+dfsg1+~cs23.11.12.3-3) unstable; urgency=medium + + * Source-only upload + + -- Yadd Sun, 03 Dec 2023 07:07:30 +0400 + +node-undici (5.28.2+dfsg1+~cs23.11.12.3-2) unstable; urgency=medium + + * Build and publish undici-types, needed by new @types/node + * Binary upload + + -- Yadd Sat, 02 Dec 2023 22:34:40 +0400 + +node-undici (5.28.2+dfsg1+~cs23.11.12.3-1) unstable; urgency=medium + + * New upstream version 5.28.2+dfsg1+~cs23.11.12.3 + * Refresh patches + + -- Yadd Sat, 02 Dec 2023 22:01:17 +0400 + +node-undici (5.28.0+dfsg1+~cs23.11.12.3-2) unstable; urgency=medium + + * Update lintian overrides + * Add patch to workaround nodejs bug + (fixes nodejs build, thanks to Jérémy Lal) + + -- Yadd Mon, 27 Nov 2023 15:45:33 +0400 + +node-undici (5.28.0+dfsg1+~cs23.11.12.3-1) unstable; urgency=medium + + * New upstream version 5.28.0+dfsg1+~cs23.11.12.3 + * Drop workaround-node-bug.patch + * Update build + * Drop some failing test + + -- Yadd Sun, 26 Nov 2023 08:07:47 +0400 + +node-undici (5.26.3+dfsg1+~cs23.10.12-3) unstable; urgency=medium + + * Add fix for node-proxy >= 2 + + -- Yadd Thu, 23 Nov 2023 11:38:43 +0400 + +node-undici (5.26.3+dfsg1+~cs23.10.12-2) unstable; urgency=medium + + * Add wokaround to nodejs bug (unable to require node:*) + + -- Yadd Sat, 14 Oct 2023 14:49:40 +0400 + +node-undici (5.26.3+dfsg1+~cs23.10.12-1) unstable; urgency=medium + + * Embed @fastify/busboy + * New upstream version (Closes: #1053879, CVE-2023-45143) + * Unfuzz patches + * Fix for clang 16 (Closes: #1052723) + * Update copyright + * Update lintian overrides + * Update test + + -- Yadd Fri, 13 Oct 2023 22:03:31 +0400 + +node-undici (5.22.1+dfsg1+~cs20.10.10.2-1) unstable; urgency=medium + + [ Michael R. Crusoe ] + * Drop unused libsimde-dev from build dependencies + + [ Yadd ] + * Update wasm exclusion + * New upstream version 5.22.1+dfsg1+~cs20.10.10.2 + * Update test + * Refresh patches + * Update lintian overrides + + -- Yadd Sun, 09 Jul 2023 15:08:57 +0400 + +node-undici (5.19.1+dfsg1+~cs20.10.9.5-2) unstable; urgency=medium + + * Disable network test on armel (Closes: #1032559) + + -- Yadd Wed, 22 Mar 2023 10:50:17 +0400 + +node-undici (5.19.1+dfsg1+~cs20.10.9.5-1) unstable; urgency=medium + + * New upstream version (Closes: #1031418, CVE-2023-23936, CVE-2023-24807) + * Refresh patches + + -- Yadd Fri, 17 Feb 2023 07:23:05 +0400 + +node-undici (5.15.0+dfsg1+~cs20.10.9.3-1) unstable; urgency=medium + + * Update standards version to 4.6.2, no changes needed. + * New upstream version 5.15.0+dfsg1+~cs20.10.9.3 + + -- Yadd Sun, 15 Jan 2023 10:04:29 +0400 + +node-undici (5.14.0+dfsg1+~cs20.10.9-1) unstable; urgency=medium + + * New upstream version 5.14.0+dfsg1+~cs20.10.9 + + -- Yadd Sun, 11 Dec 2022 15:50:58 +0100 + +node-undici (5.13.0+dfsg1+~cs20.10.9-1) unstable; urgency=medium + + * Update lintian override info format in d/source/lintian-overrides + on line 2-3. + * New upstream version 5.13.0+dfsg1+~cs20.10.9 + + -- Yadd Sat, 03 Dec 2022 18:14:54 +0100 + +node-undici (5.12.0+dfsg1+~cs20.10.9-1) unstable; urgency=medium + + * New upstream version 5.12.0+dfsg1+~cs20.10.9 + * Unfuzz patches + + -- Yadd Fri, 28 Oct 2022 22:39:53 +0200 + +node-undici (5.11.0+dfsg1+~cs20.10.9-1) unstable; urgency=medium + + * New upstream version 5.11.0+dfsg1+~cs20.10.9 + * Update llhttp build + * Unfuzz patches + * Add dependency to node-busboy + + -- Yadd Tue, 18 Oct 2022 06:25:29 +0200 + +node-undici (5.10.0+dfsg1+~cs18.9.18.10-2) unstable; urgency=medium + + * Launch tap test without timeout (may fix armel autopkgtest) + + -- Yadd Wed, 14 Sep 2022 10:25:18 +0200 + +node-undici (5.10.0+dfsg1+~cs18.9.18.10-1) unstable; urgency=medium + + * Enable __proto__ in test, needed here for pkg-js-autopkgtest 0.15 + * New upstream version 5.10.0+dfsg1+~cs18.9.18.10 + + -- Yadd Mon, 12 Sep 2022 12:01:40 +0200 + +node-undici (5.10.0+dfsg1+~cs18.9.18.7-1) unstable; urgency=medium + + * New upstream version 5.10.0+dfsg1+~cs18.9.18.7 + + -- Yadd Tue, 30 Aug 2022 06:32:25 +0200 + +node-undici (5.9.1+dfsg1+~cs18.9.18.1-1) unstable; urgency=medium + + * New upstream version 5.9.1+dfsg1+~cs18.9.18.1 + + -- Yadd Mon, 22 Aug 2022 09:34:29 +0200 + +node-undici (5.8.2+dfsg1+~cs18.9.18.1-1) unstable; urgency=medium + + * New upstream version 5.8.2+dfsg1+~cs18.9.18.1 + + -- Yadd Sat, 13 Aug 2022 07:06:18 +0200 + +node-undici (5.8.1+dfsg1+~cs18.9.18.1-1) unstable; urgency=medium + + * New upstream version 5.8.1+dfsg1+~cs18.9.18.1 + * Refresh patches + * Update test modules + + -- Yadd Mon, 08 Aug 2022 21:01:44 +0200 + +node-undici (5.8.0+dfsg1+~cs18.9.16-2) unstable; urgency=medium + + * Update typescript patch (Closes: #1016322) + + -- Yadd Sat, 30 Jul 2022 15:17:27 +0200 + +node-undici (5.8.0+dfsg1+~cs18.9.16-1) unstable; urgency=medium + + * Apply multi-arch hints (foreign) + * New upstream version 5.8.0+dfsg1+~cs18.9.16 + + -- Yadd Tue, 19 Jul 2022 15:55:13 +0200 + +node-undici (5.7.0+dfsg1+~cs18.9.16-3) unstable; urgency=medium + + * Fix bad control field + + -- Yadd Thu, 14 Jul 2022 21:59:46 +0200 + +node-undici (5.7.0+dfsg1+~cs18.9.16-2) unstable; urgency=medium + + * node-llhttp: add dependencies to node-debug and node-semver + * Use custom autopkgtest since lld is not available on s390x arch + + -- Yadd Thu, 14 Jul 2022 10:46:45 +0200 + +node-undici (5.7.0+dfsg1+~cs18.9.16-1) unstable; urgency=medium + + * New upstream version 5.7.0+dfsg1+~cs18.9.16 + + -- Yadd Thu, 14 Jul 2022 08:30:12 +0200 + +node-undici (5.6.1+dfsg1+~cs18.9.16-1) unstable; urgency=medium + + * New undici version (Closes: CVE-2022-32210) + * Add patch to drop SSL tests with too short key + + -- Yadd Sun, 10 Jul 2022 18:29:46 +0200 + +node-undici (5.2.0+dfsg1+~cs18.9.15.10-1) unstable; urgency=medium + + [ Yadd, Jérémy Lal ] + * Initial release (Closes: #1010470) + + -- Yadd Sat, 11 Jun 2022 18:54:32 +0200 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..4deccb4 --- /dev/null +++ b/debian/clean @@ -0,0 +1,15 @@ +deps/ +lib/llhttp/llhttp.wasm +lib/llhttp/llhttp-wasm* +llhttp/build/ +llhttp/lib/ +llhttp/release/ +llhttp/src/Makefile +llhttp/src/llhttp.Makefile +llhttp/src/llhttp.target.mk +llparse/lib/ +llparse-builder/lib/ +llparse-frontend/lib/ +undici-fetch.js +types/LICENSE +types/package.json diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d386a15 --- /dev/null +++ b/debian/control @@ -0,0 +1,59 @@ +Source: node-undici +Section: javascript +Priority: optional +Maintainer: Debian Javascript Maintainers +Uploaders: Yadd +Build-Depends: debhelper-compat (= 13) + , dh-sequence-nodejs (>= 0.14.22~) + , clang (>= 1:16) + , cmake + , lld (>= 1:16) + , node-debug + , node-esbuild + , node-semver + , node-typescript + , ts-node + , wasi-libc +Standards-Version: 4.6.2 +Homepage: https://undici.nodejs.org +Vcs-Git: https://salsa.debian.org/js-team/node-undici.git +Vcs-Browser: https://salsa.debian.org/js-team/node-undici +Rules-Requires-Root: no + +Package: node-undici +Architecture: all +Depends: ${misc:Depends} +Provides: ${nodeUndici:Provides} +Multi-Arch: foreign +Description: Node.js HTTP/1.1 client + undici provides the Node.js core HTTP client, using WebAssembly to achieve + performance and pluggability. It brings features like: + - redirect support + - native mocking layer using MockAgent + - Client, Pool, Agent are unified by a Dispatcher API + +Package: node-llhttp +Architecture: all +Depends: ${misc:Depends} + , node-debug + , node-semver +Provides: ${nodeLlhttp:Provides} +Multi-Arch: foreign +Description: HTTP client sources for Node.js + llhttp provides sources needed to build Node.js. May not be used directly. + +Package: libllhttp-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends} + , libllhttp9.1 (= ${libllhttp:Version}) +Description: HTTP messages parser library dev files + libllhttp development files + +Package: libllhttp9.1 +Section: libs +Architecture: any +Depends: ${misc:Depends} + , ${shlibs:Depends} +Description: HTTP messages parser library + libllhttp provides the Node.js library used to parse HTTP messages. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a2769d7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,364 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: undici +Upstream-Contact: https://github.com/nodejs/undici/issues +Source: https://undici.nodejs.org + https://github.com/nodejs/llhttp/tags + https://github.com/nodejs/llparse/tags + https://github.com/indutny/llparse-frontend/tags + https://github.com/indutny/llparse-builder/tags + https://github.com/darkskyapp/binary-search/tags + https://github.com/fastify/busboy/tags +Files-Excluded: deps + lib/llhttp/*.map + lib/llhttp/*.wasm + lib/llhttp/*wasm.js + +Files: * +Copyright: Matteo Collina and Undici contributors +License: Expat + +Files: binary-search/* +Copyright: Dark Sky Company + LLC +License: CC0-1.0 + +Files: debian/* +Copyright: 2022-2024 Yadd +License: Expat + +Files: debian/tests/test_modules/abort-controller/* + debian/tests/test_modules/event-target-shim/* +Copyright: 2015-2017 Toru Nagashima +License: Expat + +Files: debian/tests/test_modules/atomic-sleep/* +Copyright: 2020 David Mark Clements +License: Expat + +Files: debian/tests/test_modules/chai-iterator/* +Copyright: 2016-2017 Akim McMath + 2018 Harry Sarson +License: Expat + +Files: debian/tests/test_modules/chai-string/* +Copyright: 2013 Oleg Nechiporenko +License: Expat + +Files: debian/tests/test_modules/delay/* +Copyright: Sindre Sorhus +License: Expat + +Files: debian/tests/test_modules/dicer/* + fastify-busboy/* +Copyright: Brian White +License: Expat + +Files: debian/tests/test_modules/https-pem/* +Copyright: 2016-2017 Thomas Watson Steen +License: Expat + +Files: debian/tests/test_modules/node-forge/* +Copyright: 2010-2019 Digital Bazaar, Inc. +License: BSD-3-Clause-DB or GPL-2 + +Files: debian/tests/test_modules/node-forge/lib/baseN.js +Copyright: 2016 base-x contributors +License: Expat + +Files: debian/tests/test_modules/node-forge/lib/des.js +Copyright: 2012 Stefan Siegl + 2012-2014 Digital Bazaar, Inc. + 2001 Paul Tero + 2001 Michael Hayworth +License: BSD-3-Clause-DB or GPL-2 +Comment: Optimised for performance with large blocks by + Michael Hayworth under the following license: + THIS SOFTWARE IS PROVIDED "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + +Files: debian/tests/test_modules/node-forge/lib/ed25519.js +Copyright: 2017-2019 Digital Bazaar, Inc. +License: BSD-3-Clause-DB or GPL-2 +Comment: This implementation is based on the most excellent TweetNaCl which is + in the public domain. Many thanks to its contributors + https://github.com/dchest/tweetnacl-js + +Files: debian/tests/test_modules/node-forge/lib/jsbn.js +Copyright: 2005 Tom Wu +License: Expat-Jsbn + +Files: debian/tests/test_modules/node-forge/lib/kem.js +Copyright: 2014 Lautaro Cozzani + 2014 Digital Bazaar, Inc. +License: BSD-3-Clause-DB or GPL-2 + +Files: debian/tests/test_modules/node-forge/lib/mgf.js + debian/tests/test_modules/node-forge/lib/pss.js + debian/tests/test_modules/node-forge/lib/rc2.js +Copyright: 2012 Stefan Siegl +License: BSD-3-Clause-DB or GPL-2 + +Files: debian/tests/test_modules/node-forge/lib/mgf1.js + debian/tests/test_modules/node-forge/lib/pbe.js + debian/tests/test_modules/node-forge/lib/pkcs12.js + debian/tests/test_modules/node-forge/lib/pkcs7.js + debian/tests/test_modules/node-forge/lib/pkcs7asn1.js +Copyright: 2012 Stefan Siegl + 2012-2015 Digital Bazaar, Inc. +License: BSD-3-Clause-DB or GPL-2 + +Files: debian/tests/test_modules/node-forge/lib/pkcs1.js +Copyright: 2012 Kenji Urushima + 2013-2014 Digital Bazaar, Inc. +License: BSD-3-Clause-DB or GPL-2 +Comment: Modified but based on the following MIT and BSD licensed code: + https://github.com/kjur/jsjws/blob/master/rsa.js + Copyright (c) 2012 Kenji Urushima + +Files: debian/tests/test_modules/selfsigned/* +Copyright: 2013 José F. Romaniello +License: Expat + +Files: fastify-busboy/bench/dicer/parted-multipart.js +Copyright: 2011 Christopher Jeffrey +License: Expat + +Files: lib/fetch/* +Copyright: 2020 Ethan Arrowood +License: Expat + +Files: lib/websocket/receiver.js +Copyright: 2011 Einar Otto Stangvik + 2013 Arnout Kazemier and contributors + 2016 Luigi Pinca and contributors +License: Expat + +Files: llhttp/* + llparse/* + llparse-builder/* + llparse-frontend/* +Copyright: 2018-2020 Fedor Indutny +License: Expat + +Files: test/cookie/cookies.js +Copyright: 2018-2022 the Deno authors +License: Expat + +Files: test/node-fetch/* +Copyright: 2016-2020 Node Fetch Team +License: Expat + +Files: test/wpt/tests/* +Copyright: web-platform-tests contributors +License: BSD-3-Clause + +Files: test/wpt/tests/resources/chromium/contacts_manager_mock.js +Copyright: 2018 The Chromium Authors +License: BSD-3-Clause + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-3-Clause-DB + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Digital Bazaar, Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL DIGITAL BAZAAR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: CC0-1.0 + Any copyright is dedicated to the Public Domain. + . + 1. Copyright and Related Rights. + . + A Work made available under CC0 may be protected by copyright and related or + neighboring rights ("Copyright and Related Rights"). Copyright and Related + Rights include, but are not limited to, the following: + . + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + . + ii. moral rights retained by the original author(s) and/or performer(s); + . + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + . + iv. rights protecting against unfair competition in regards to a Work, subject + to the limitations in paragraph 4(a), below; + . + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + . + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + . + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations + thereof. + . + 2. Waiver. + . + To the greatest extent permitted by, but not in contravention of, applicable + law, Affirmer hereby overtly, fully, permanently, irrevocably and + unconditionally waives, abandons, and surrenders all of Affirmer's Copyright + and Related Rights and associated claims and causes of action, whether now + known or unknown (including existing as well as future claims and causes of + action), in the Work (i) in all territories worldwide, (ii) for the maximum + duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes + the Waiver for the benefit of each member of the public at large and to the + detriment of Affirmer's heirs and successors, fully intending that such Waiver + shall not be subject to revocation, rescission, cancellation, termination, or + any other legal or equitable action to disrupt the quiet enjoyment of the Work + by the public as contemplated by Affirmer's express Statement of Purpose. + . + 3. Public License Fallback. + . + Should any part of the Waiver for any reason be judged legally invalid or + ineffective under applicable law, then the Waiver shall be preserved to the + maximum extent permitted taking into account Affirmer's express Statement of + Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby + grants to each affected person a royalty-free, non transferable, non + sublicensable, non exclusive, irrevocable and unconditional license to exercise + Affirmer's Copyright and Related Rights in the Work (i) in all territories + worldwide, (ii) for the maximum duration provided by applicable law or treaty + (including future time extensions), (iii) in any current or future medium and + for any number of copies, and (iv) for any purpose whatsoever, including + without limitation commercial, advertising or promotional purposes (the + "License"). The License shall be deemed effective as of the date CC0 was + applied by Affirmer to the Work. Should any part of the License for any reason + be judged legally invalid or ineffective under applicable law, such partial + invalidity or ineffectiveness shall not invalidate the remainder of the + License, and in such case Affirmer hereby affirms that he or she will not + (i) exercise any of his or her remaining Copyright and Related Rights in the + Work or (ii) assert any associated claims and causes of action with respect to + the Work, in either case contrary to Affirmer's express Statement of Purpose. + . + 4. Limitations and Disclaimers. + . + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + . + b. Affirmer offers the Work as-is and makes no representations or warranties of + any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + . + c. Affirmer disclaims responsibility for clearing rights of other persons that + may apply to the Work or any use thereof, including without limitation any + person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + . + d. Affirmer understands and acknowledges that Creative Commons is not a party + to this document and has no duty or obligation with respect to this CC0 or + use of the Work. + +License: Expat + 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. + +License: Expat-Jsbn + 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" AND WITHOUT WARRANTY OF ANY KIND, + EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + . + IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + . + In addition, the following condition applies: + . + All redistributions must retain an intact copy of this copyright notice + and disclaimer. + +License: GPL-2 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2. + . + On Debian systems, the complete text of version 2 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2' diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..8d16e73 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,4 @@ +[DEFAULT] +pristine-tar=True +filter=[ '.gitignore', '.travis.yml', '.git*' ] +component=['llhttp', 'llparse', 'llparse-frontend', 'llparse-builder', 'binary-search', 'fastify-busboy'] diff --git a/debian/libllhttp-dev.docs b/debian/libllhttp-dev.docs new file mode 100644 index 0000000..567c628 --- /dev/null +++ b/debian/libllhttp-dev.docs @@ -0,0 +1 @@ +llhttp/README.md diff --git a/debian/libllhttp-dev.install b/debian/libllhttp-dev.install new file mode 100644 index 0000000..f246135 --- /dev/null +++ b/debian/libllhttp-dev.install @@ -0,0 +1,7 @@ +usr/include +usr/lib/*/*.a +usr/lib/*/*.so +#llhttp/release/include/* usr/share/include/llhttp/ +#llhttp/release/src/* usr/share/llhttp/ +usr/lib/*/cmake/ +usr/lib/*/pkgconfig/ diff --git a/debian/libllhttp9.1.docs b/debian/libllhttp9.1.docs new file mode 100644 index 0000000..8ed7625 --- /dev/null +++ b/debian/libllhttp9.1.docs @@ -0,0 +1,2 @@ +llhttp/CODE_OF_CONDUCT.md +llhttp/README.md diff --git a/debian/libllhttp9.1.install b/debian/libllhttp9.1.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/debian/libllhttp9.1.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/debian/node-llhttp.docs b/debian/node-llhttp.docs new file mode 100644 index 0000000..567c628 --- /dev/null +++ b/debian/node-llhttp.docs @@ -0,0 +1 @@ +llhttp/README.md diff --git a/debian/node-llhttp.examples b/debian/node-llhttp.examples new file mode 100644 index 0000000..3c5bd0f --- /dev/null +++ b/debian/node-llhttp.examples @@ -0,0 +1 @@ +llhttp/examples/* diff --git a/debian/node-llhttp.install b/debian/node-llhttp.install new file mode 100644 index 0000000..382f5ef --- /dev/null +++ b/debian/node-llhttp.install @@ -0,0 +1 @@ +usr/share/nodejs/ll* diff --git a/debian/node-undici.docs b/debian/node-undici.docs new file mode 100644 index 0000000..408e2c3 --- /dev/null +++ b/debian/node-undici.docs @@ -0,0 +1,2 @@ +*.md +docs/* diff --git a/debian/node-undici.examples b/debian/node-undici.examples new file mode 100644 index 0000000..e39721e --- /dev/null +++ b/debian/node-undici.examples @@ -0,0 +1 @@ +examples/* diff --git a/debian/node-undici.install b/debian/node-undici.install new file mode 100644 index 0000000..48e1208 --- /dev/null +++ b/debian/node-undici.install @@ -0,0 +1,5 @@ +usr/share/nodejs/binary-search +usr/share/nodejs/@fastify/busboy +usr/share/nodejs/undici +usr/share/nodejs/undici-types +undici-fetch.js usr/share/nodejs/undici/ diff --git a/debian/node-undici.maintscript b/debian/node-undici.maintscript new file mode 100644 index 0000000..673abb7 --- /dev/null +++ b/debian/node-undici.maintscript @@ -0,0 +1,2 @@ +# dir_to_symlink pathname new-target [prior-version [package]] +dir_to_symlink /usr/share/nodejs/undici/types /usr/share/nodejs/undici-types 5.28.2+dfsg1+~cs23.11.12.3-2~ node-undici diff --git a/debian/nodejs/additional_components b/debian/nodejs/additional_components new file mode 100644 index 0000000..64dba6c --- /dev/null +++ b/debian/nodejs/additional_components @@ -0,0 +1 @@ +types diff --git a/debian/nodejs/build b/debian/nodejs/build new file mode 100644 index 0000000..ddf238b --- /dev/null +++ b/debian/nodejs/build @@ -0,0 +1,23 @@ +node scripts/generate-undici-types-package-json.js +mkdir -p deps/llhttp/include deps/llhttp/src +cp llhttp/build/c/llhttp.c deps/llhttp/src/ +cp llhttp/src/native/*.c deps/llhttp/src/ +cp llhttp/build/llhttp.h deps/llhttp/include/ + +# Reproduce this build without Node.js dependency: +# - original build +#WASI_ROOT=/usr CLANG=/usr/bin/clang node build/wasm.js +# - direct clang call +clang -nodefaultlibs --sysroot=/usr -target wasm32-unknown-wasi \ + -Ofast -fno-exceptions -fvisibility=hidden \ + -mexec-model=reactor -Wl,-lc -Wl,--error-limit=0 -Wl,-O3 \ + -Wl,--lto-O3 -Wl,--strip-all -Wl,--allow-undefined \ + -Wl,--export-dynamic -Wl,--export-table -Wl,--export=malloc \ + -Wl,--export=free \ + deps/llhttp/src/*.c \ + -Ideps/llhttp/include \ + -o lib/llhttp/llhttp-wasm +echo 'module.exports = "'`perl -MMIME::Base64 -000 -ne 'print encode_base64($_,"")' lib/llhttp/llhttp-wasm`'";' > lib/llhttp/llhttp-wasm.js + +# Build bundle +esbuild index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names diff --git a/debian/nodejs/component_links b/debian/nodejs/component_links new file mode 100644 index 0000000..c83b273 --- /dev/null +++ b/debian/nodejs/component_links @@ -0,0 +1,3 @@ +llparse-builder llparse-frontend +llparse-frontend llparse +llparse llhttp diff --git a/debian/nodejs/extlinks b/debian/nodejs/extlinks new file mode 100644 index 0000000..41be869 --- /dev/null +++ b/debian/nodejs/extlinks @@ -0,0 +1,3 @@ +@types/debug +@types/node +@types/semver diff --git a/debian/nodejs/links b/debian/nodejs/links new file mode 100644 index 0000000..ef54dea --- /dev/null +++ b/debian/nodejs/links @@ -0,0 +1 @@ +undici-types undici/types diff --git a/debian/nodejs/llhttp/build b/debian/nodejs/llhttp/build new file mode 100644 index 0000000..d886f85 --- /dev/null +++ b/debian/nodejs/llhttp/build @@ -0,0 +1,10 @@ +ts-node bin/generate.ts +tsc +export RELEASE=`pkgjs-pjson . version` +WASI_ROOT=/usr ts-node bin/build_wasm.ts +export CFLAGS="$CFLAGS -gdwarf-4" +export LDFLAGS="$LDFLAGS" +make release build/libllhttp.a build/libllhttp.so +(cd ..;dh_auto_configure --buildsystem=cmake -Dllhttp/release -- -DCMAKE_BUILD_TYPE=Release) +(cd ..;dh_auto_build --buildsystem=cmake) +find . -type f diff --git a/debian/nodejs/llparse-builder/build b/debian/nodejs/llparse-builder/build new file mode 100644 index 0000000..0a87593 --- /dev/null +++ b/debian/nodejs/llparse-builder/build @@ -0,0 +1 @@ +tsc diff --git a/debian/nodejs/llparse-frontend/build b/debian/nodejs/llparse-frontend/build new file mode 100644 index 0000000..0a87593 --- /dev/null +++ b/debian/nodejs/llparse-frontend/build @@ -0,0 +1 @@ +tsc diff --git a/debian/nodejs/llparse/build b/debian/nodejs/llparse/build new file mode 100644 index 0000000..0a87593 --- /dev/null +++ b/debian/nodejs/llparse/build @@ -0,0 +1 @@ +tsc diff --git a/debian/nodejs/root_modules b/debian/nodejs/root_modules new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/debian/nodejs/root_modules @@ -0,0 +1 @@ +* diff --git a/debian/patches/declare-soname.patch b/debian/patches/declare-soname.patch new file mode 100644 index 0000000..1221d54 --- /dev/null +++ b/debian/patches/declare-soname.patch @@ -0,0 +1,34 @@ +Description: declare SONAME +Author: Yadd +Forwarded: not-needed +Last-Update: 2024-01-18 + +--- a/llhttp/Makefile ++++ b/llhttp/Makefile +@@ -1,6 +1,7 @@ + CLANG ?= clang + CFLAGS ?= + OS ?= ++SONAME ?= + + CFLAGS += -Os -g3 -Wall -Wextra -Wno-unused-parameter + ifneq ($(OS),Windows_NT) +@@ -23,7 +24,7 @@ + + build/libllhttp.so: build/c/llhttp.o build/native/api.o \ + build/native/http.o +- $(CLANG) -shared $^ -o $@ ++ $(CLANG) -shared $^ -Wl,-soname,$(SONAME) -o $@ + + build/libllhttp.a: build/c/llhttp.o build/native/api.o \ + build/native/http.o +@@ -88,6 +89,8 @@ + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) -C build/llhttp.h $(DESTDIR)$(INCLUDEDIR)/llhttp.h + $(INSTALL) -C build/libllhttp.a $(DESTDIR)$(LIBDIR)/libllhttp.a +- $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/libllhttp.so ++ $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/$(SONAME) ++ ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAMEALIAS) ++ ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/libllhttp.so + + .PHONY: all generate clean release postversion github-release diff --git a/debian/patches/disable-simd.patch b/debian/patches/disable-simd.patch new file mode 100644 index 0000000..ea90314 --- /dev/null +++ b/debian/patches/disable-simd.patch @@ -0,0 +1,20 @@ +Description: disable SIMD build +Author: Yadd +Forwarded: not-needed +Last-Update: 2022-07-09 + +--- a/build/wasm.js ++++ b/build/wasm.js +@@ -74,6 +74,7 @@ + `module.exports = '${base64Wasm}'\n` + ) + ++/* + // Build wasm simd binary + execSync(`${CLANG} \ + -nodefaultlibs \ +@@ -104,3 +105,4 @@ + join(WASM_OUT, 'llhttp_simd-wasm.js'), + `module.exports = '${base64WasmSimd}'\n` + ) ++*/ diff --git a/debian/patches/dont-rebuild-on-install.patch b/debian/patches/dont-rebuild-on-install.patch new file mode 100644 index 0000000..91e9487 --- /dev/null +++ b/debian/patches/dont-rebuild-on-install.patch @@ -0,0 +1,16 @@ +Description: don't rebuild on install +Author: Yadd +Forwarded: not-needed +Last-Update: 2024-01-18 + +--- a/llhttp/Makefile ++++ b/llhttp/Makefile +@@ -83,7 +83,7 @@ + generate: + ts-node bin/generate.ts + +-install: build/libllhttp.a build/libllhttp.so ++install: + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) -C build/llhttp.h $(DESTDIR)$(INCLUDEDIR)/llhttp.h diff --git a/debian/patches/drop-one-error-test.patch b/debian/patches/drop-one-error-test.patch new file mode 100644 index 0000000..0043c95 --- /dev/null +++ b/debian/patches/drop-one-error-test.patch @@ -0,0 +1,42 @@ +Description: drop one error test that fail under Debian env +Author: Yadd +Forwarded: not-needed +Last-Update: 2023-11-26 + +--- a/test/client-dispatch.js ++++ b/test/client-dispatch.js +@@ -782,34 +782,3 @@ + }) + }) + }) +- +-test('dispatch onBodySent throws error', (t) => { +- const server = http.createServer((req, res) => { +- res.end('ended') +- }) +- t.teardown(server.close.bind(server)) +- +- server.listen(0, () => { +- const client = new Pool(`http://localhost:${server.address().port}`) +- t.teardown(client.close.bind(client)) +- const body = 'hello' +- client.dispatch({ +- path: '/', +- method: 'POST', +- body +- }, { +- onBodySent (chunk) { +- throw new Error('fail') +- }, +- onError (err) { +- t.type(err, Error) +- t.equal(err.message, 'fail') +- t.end() +- }, +- onConnect () {}, +- onHeaders () {}, +- onData () {}, +- onComplete () {} +- }) +- }) +-}) diff --git a/debian/patches/drop-simd.patch b/debian/patches/drop-simd.patch new file mode 100644 index 0000000..cf04bb9 --- /dev/null +++ b/debian/patches/drop-simd.patch @@ -0,0 +1,27 @@ +Description: drop simd call +Author: Yadd +Forwarded: not-needed +Last-Update: 2023-07-09 + +--- a/lib/client.js ++++ b/lib/client.js +@@ -491,18 +491,7 @@ + async function lazyllhttp () { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined + +- let mod +- try { +- mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64')) +- } catch (e) { +- /* istanbul ignore next */ +- +- // We could check if the error was caused by the simd option not +- // being enabled, but the occurring of this other error +- // * https://github.com/emscripten-core/emscripten/issues/11495 +- // got me to remove that check to avoid breaking Node 12. +- mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64')) +- } ++ const mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64')) + + return await WebAssembly.instantiate(mod, { + env: { diff --git a/debian/patches/drop-ssl-tests.patch b/debian/patches/drop-ssl-tests.patch new file mode 100644 index 0000000..e09ac33 --- /dev/null +++ b/debian/patches/drop-ssl-tests.patch @@ -0,0 +1,177 @@ +Description: drop SSL tests: key too short +Author: Yadd +Forwarded: no +Last-Update: 2022-07-09 + +--- a/test/proxy-agent.js ++++ b/test/proxy-agent.js +@@ -467,169 +467,6 @@ + t.end() + }) + +-test('Proxy via HTTP to HTTPS endpoint', async (t) => { +- t.plan(4) +- +- const server = await buildSSLServer() +- const proxy = await buildProxy() +- +- const serverUrl = `https://localhost:${server.address().port}` +- const proxyUrl = `http://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- requestTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1' +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.pass('server should be connected secured') +- }) +- +- proxy.on('secureConnection', () => { +- t.fail('proxy over http should not call secureConnection') +- }) +- +- proxy.on('connect', function () { +- t.pass('proxy should be connected') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- +-test('Proxy via HTTPS to HTTPS endpoint', async (t) => { +- t.plan(5) +- const server = await buildSSLServer() +- const proxy = await buildSSLProxy() +- +- const serverUrl = `https://localhost:${server.address().port}` +- const proxyUrl = `https://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- proxyTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1', +- rejectUnauthorized: false +- }, +- requestTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1' +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.pass('server should be connected secured') +- }) +- +- proxy.on('secureConnection', () => { +- t.pass('proxy over http should call secureConnection') +- }) +- +- proxy.on('connect', function () { +- t.pass('proxy should be connected') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- +-test('Proxy via HTTPS to HTTP endpoint', async (t) => { +- t.plan(3) +- const server = await buildServer() +- const proxy = await buildSSLProxy() +- +- const serverUrl = `http://localhost:${server.address().port}` +- const proxyUrl = `https://localhost:${proxy.address().port}` +- const proxyAgent = new ProxyAgent({ +- uri: proxyUrl, +- proxyTls: { +- ca: [ +- readFileSync(join(__dirname, 'fixtures', 'ca.pem'), 'utf8') +- ], +- key: readFileSync(join(__dirname, 'fixtures', 'client-key-2048.pem'), 'utf8'), +- cert: readFileSync(join(__dirname, 'fixtures', 'client-crt-2048.pem'), 'utf8'), +- servername: 'agent1', +- rejectUnauthorized: false +- } +- }) +- +- server.on('request', function (req, res) { +- t.ok(!req.connection.encrypted) +- res.end(JSON.stringify(req.headers)) +- }) +- +- server.on('secureConnection', () => { +- t.fail('server is http') +- }) +- +- proxy.on('secureConnection', () => { +- t.pass('proxy over http should call secureConnection') +- }) +- +- proxy.on('request', function () { +- t.fail('proxy should never receive requests') +- }) +- +- const data = await request(serverUrl, { dispatcher: proxyAgent }) +- const json = await data.body.json() +- t.strictSame(json, { +- host: `localhost:${server.address().port}`, +- connection: 'keep-alive' +- }) +- +- server.close() +- proxy.close() +- proxyAgent.close() +-}) +- + test('Proxy via HTTP to HTTP endpoint', async (t) => { + t.plan(3) + const server = await buildServer() diff --git a/debian/patches/fix-for-proxy-2.patch b/debian/patches/fix-for-proxy-2.patch new file mode 100644 index 0000000..67c7687 --- /dev/null +++ b/debian/patches/fix-for-proxy-2.patch @@ -0,0 +1,27 @@ +Description: fix for node-proxy >= 2 +Author: Yadd +Forwarded: not-needed +Last-Update: 2023-11-23 + +--- a/test/proxy-agent.js ++++ b/test/proxy-agent.js +@@ -10,7 +10,7 @@ + const Pool = require('../lib/pool') + const { createServer } = require('http') + const https = require('https') +-const proxy = require('proxy') ++const proxy = require('proxy').createProxy + + test('should throw error when no uri is provided', (t) => { + t.plan(2) +--- a/test/proxy.js ++++ b/test/proxy.js +@@ -3,7 +3,7 @@ + const { test } = require('tap') + const { Client, Pool } = require('..') + const { createServer } = require('http') +-const proxy = require('proxy') ++const proxy = require('proxy').createProxy + + test('connect through proxy', async (t) => { + t.plan(3) diff --git a/debian/patches/fix-for-test-tap.patch b/debian/patches/fix-for-test-tap.patch new file mode 100644 index 0000000..7f6fce0 --- /dev/null +++ b/debian/patches/fix-for-test-tap.patch @@ -0,0 +1,56 @@ +Description: fix tap test +Author: Yadd +Forwarded: no +Last-Update: 2022-05-17 + +--- a/test/unix.js ++++ b/test/unix.js +@@ -94,48 +94,4 @@ + }) + }) + +- test('https get with tls opts', (t) => { +- t.plan(6) +- +- const server = https.createServer(pem, (req, res) => { +- t.equal('/', req.url) +- t.equal('GET', req.method) +- res.setHeader('content-type', 'text/plain') +- res.end('hello') +- }) +- t.teardown(server.close.bind(server)) +- +- try { +- fs.unlinkSync('/var/tmp/test3.sock') +- } catch (err) { +- +- } +- +- server.listen('/var/tmp/test8.sock', () => { +- const client = new Client({ +- hostname: 'localhost', +- protocol: 'https:' +- }, { +- socketPath: '/var/tmp/test8.sock', +- tls: { +- rejectUnauthorized: false +- } +- }) +- t.teardown(client.close.bind(client)) +- +- client.request({ path: '/', method: 'GET' }, (err, data) => { +- t.error(err) +- const { statusCode, headers, body } = data +- t.equal(statusCode, 200) +- t.equal(headers['content-type'], 'text/plain') +- const bufs = [] +- body.on('data', (buf) => { +- bufs.push(buf) +- }) +- body.on('end', () => { +- t.equal('hello', Buffer.concat(bufs).toString('utf8')) +- }) +- }) +- }) +- }) + } diff --git a/debian/patches/fix-llhttp-version.patch b/debian/patches/fix-llhttp-version.patch new file mode 100644 index 0000000..227647a --- /dev/null +++ b/debian/patches/fix-llhttp-version.patch @@ -0,0 +1,16 @@ +Description: fix llhttp version +Author: Yadd +Forwarded: not-needed +Last-Update: 2024-01-19 + +--- a/llhttp/CMakeLists.txt ++++ b/llhttp/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.5.1) + cmake_policy(SET CMP0069 NEW) + +-project(llhttp VERSION _RELEASE_) ++project(llhttp VERSION 9.1.3) + include(GNUInstallDirs) + + set(CMAKE_C_STANDARD 99) diff --git a/debian/patches/fix-typescript.patch b/debian/patches/fix-typescript.patch new file mode 100644 index 0000000..c7cac74 --- /dev/null +++ b/debian/patches/fix-typescript.patch @@ -0,0 +1,79 @@ +Description: fix typescript +Author: Yadd +Forwarded: no +Last-Update: 2022-07-30 + +--- a/llhttp/bin/build_wasm.ts ++++ b/llhttp/bin/build_wasm.ts +@@ -40,6 +40,7 @@ + // It will work flawessly if uid === gid === 1000 + // there will be some warnings otherwise. + if (process.platform === 'linux') { ++// @ts-ignore + cmd += ` --user ${process.getuid()}:${process.getegid()}`; + } + cmd += ` --mount type=bind,source=${WASM_SRC}/build,target=/home/node/llhttp/build llhttp_wasm_builder npm run wasm`; +--- a/llparse/src/implementation/c/code/base.ts ++++ b/llparse/src/implementation/c/code/base.ts +@@ -3,7 +3,7 @@ + import { Compilation } from '../compilation'; + + export abstract class Code { +- protected cachedDecl: string | undefined; ++ public cachedDecl: string | undefined; + + constructor(public readonly ref: T) { + } +--- a/llparse/src/implementation/c/node/base.ts ++++ b/llparse/src/implementation/c/node/base.ts +@@ -13,8 +13,8 @@ + } + + export abstract class Node { +- protected cachedDecl: string | undefined; +- protected privCompilation: Compilation | undefined; ++ public cachedDecl: string | undefined; ++ public privCompilation: Compilation | undefined; + + constructor(public readonly ref: T) { + } +@@ -39,12 +39,12 @@ + return res; + } + +- protected get compilation(): Compilation { ++ public get compilation(): Compilation { + assert(this.privCompilation !== undefined); + return this.privCompilation!; + } + +- protected prologue(out: string[]): void { ++ public prologue(out: string[]): void { + const ctx = this.compilation; + + out.push(`if (${ctx.posArg()} == ${ctx.endPosArg()}) {`); +@@ -56,11 +56,11 @@ + out.push('}'); + } + +- protected pause(out: string[]): void { ++ public pause(out: string[]): void { + out.push(`return ${this.cachedDecl};`); + } + +- protected tailTo(out: string[], edge: INodeEdge): void { ++ public tailTo(out: string[], edge: INodeEdge): void { + const ctx = this.compilation; + const target = ctx.unwrapNode(edge.node).build(ctx); + +--- a/llparse/src/implementation/c/node/error.ts ++++ b/llparse/src/implementation/c/node/error.ts +@@ -5,7 +5,7 @@ + import { Node } from './base'; + + class ErrorNode extends Node { +- protected storeError(out: string[]): void { ++ public storeError(out: string[]): void { + const ctx = this.compilation; + + let hexCode: string; diff --git a/debian/patches/fix-wasm-build.patch b/debian/patches/fix-wasm-build.patch new file mode 100644 index 0000000..d2855dc --- /dev/null +++ b/debian/patches/fix-wasm-build.patch @@ -0,0 +1,98 @@ +Description: fix wasm build +Author: Jérémy Lal +Forwarded: not-needed +Reviewed-By: Yadd +Last-Update: 2022-07-09 + +--- a/build/wasm.js ++++ b/build/wasm.js +@@ -8,6 +8,7 @@ + const WASM_SRC = resolve(__dirname, '../deps/llhttp') + const WASM_OUT = resolve(__dirname, '../lib/llhttp') + const DOCKERFILE = resolve(__dirname, './Dockerfile') ++const { CLANG } = process.env + + let platform = process.env.WASM_PLATFORM + if (!platform && process.argv[2]) { +@@ -44,13 +45,15 @@ + writeFileSync(join(WASM_OUT, 'wasm_build_env.txt'), buildInfo) + + // Build wasm binary +-execSync(`clang \ +- --sysroot=/usr/share/wasi-sysroot \ ++execSync(`${CLANG} \ ++ -nodefaultlibs \ ++ --sysroot=/usr \ + -target wasm32-unknown-wasi \ + -Ofast \ + -fno-exceptions \ + -fvisibility=hidden \ + -mexec-model=reactor \ ++ -Wl,-lc \ + -Wl,-error-limit=0 \ + -Wl,-O3 \ + -Wl,--lto-O3 \ +@@ -72,14 +75,16 @@ + ) + + // Build wasm simd binary +-execSync(`clang \ +- --sysroot=/usr/share/wasi-sysroot \ ++execSync(`${CLANG} \ ++ -nodefaultlibs \ ++ --sysroot=/usr \ + -target wasm32-unknown-wasi \ + -msimd128 \ + -Ofast \ + -fno-exceptions \ + -fvisibility=hidden \ + -mexec-model=reactor \ ++ -Wl,-lc \ + -Wl,-error-limit=0 \ + -Wl,-O3 \ + -Wl,--lto-O3 \ +--- a/llhttp/Makefile ++++ b/llhttp/Makefile +@@ -81,7 +81,7 @@ + git checkout main + + generate: +- npx ts-node bin/generate.ts ++ ts-node bin/generate.ts + + install: build/libllhttp.a build/libllhttp.so + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) +--- a/llhttp/bin/build_wasm.ts ++++ b/llhttp/bin/build_wasm.ts +@@ -25,6 +25,7 @@ + mkdirSync(join(WASM_SRC, 'build')); + process.exit(0); + } catch (error) { ++// @ts-ignore + if (error.code !== 'EEXIST') { + throw error; + } +@@ -52,6 +53,7 @@ + try { + mkdirSync(WASM_OUT); + } catch (error) { ++// @ts-ignore + if (error.code !== 'EEXIST') { + throw error; + } +@@ -63,12 +65,14 @@ + // Build wasm binary + execSync( + `clang \ +- --sysroot=/usr/share/wasi-sysroot \ ++ -nodefaultlibs \ ++ --sysroot=/usr \ + -target wasm32-unknown-wasi \ + -Ofast \ + -fno-exceptions \ + -fvisibility=hidden \ + -mexec-model=reactor \ ++ -Wl,-lc \ + -Wl,-error-limit=0 \ + -Wl,-O3 \ + -Wl,--lto-O3 \ diff --git a/debian/patches/replace-npm-run.patch b/debian/patches/replace-npm-run.patch new file mode 100644 index 0000000..819cf45 --- /dev/null +++ b/debian/patches/replace-npm-run.patch @@ -0,0 +1,25 @@ +Description: replace "npm run" by pkgjs-run +Author: Yadd +Forwarded: not-needed +Last-Update: 2023-02-17 + +--- a/llhttp/bin/build_wasm.ts ++++ b/llhttp/bin/build_wasm.ts +@@ -43,7 +43,7 @@ + // @ts-ignore + cmd += ` --user ${process.getuid()}:${process.getegid()}`; + } +- cmd += ` --mount type=bind,source=${WASM_SRC}/build,target=/home/node/llhttp/build llhttp_wasm_builder npm run wasm`; ++ cmd += ` --mount type=bind,source=${WASM_SRC}/build,target=/home/node/llhttp/build llhttp_wasm_builder pkgjs-run wasm`; + + /* tslint:disable-next-line no-console */ + console.log(`> ${cmd}\n\n`); +@@ -61,7 +61,7 @@ + } + + // Build ts +-execSync('npm run build', { cwd: WASM_SRC, stdio: 'inherit' }); ++execSync('pkgjs-run build', { cwd: WASM_SRC, stdio: 'inherit' }); + + // Build wasm binary + execSync( diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..7ab3cd4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,14 @@ +fix-wasm-build.patch +#simdeverywhere.patch +disable-simd.patch +fix-typescript.patch +fix-for-test-tap.patch +replace-npm-run.patch +drop-ssl-tests.patch +drop-simd.patch +fix-for-proxy-2.patch +drop-one-error-test.patch +workaround-nodejs-bug.patch +dont-rebuild-on-install.patch +declare-soname.patch +fix-llhttp-version.patch diff --git a/debian/patches/simdeverywhere.patch b/debian/patches/simdeverywhere.patch new file mode 100644 index 0000000..c683691 --- /dev/null +++ b/debian/patches/simdeverywhere.patch @@ -0,0 +1,37 @@ +Description: fix SIMD +Author: Jérémy Lal +Forwarded: no +Last-Update: 2022-05-16 + +--- a/deps/llhttp/src/llhttp.c ++++ b/deps/llhttp/src/llhttp.c +@@ -4,13 +4,7 @@ + #include + #include + +-#ifdef __SSE4_2__ +- #ifdef _MSC_VER +- #include +- #else /* !_MSC_VER */ +- #include +- #endif /* _MSC_VER */ +-#endif /* __SSE4_2__ */ ++#include + + #ifdef _MSC_VER + #define ALIGN(n) _declspec(align(n)) +@@ -7678,13 +7672,7 @@ + #include + #include + +-#ifdef __SSE4_2__ +- #ifdef _MSC_VER +- #include +- #else /* !_MSC_VER */ +- #include +- #endif /* _MSC_VER */ +-#endif /* __SSE4_2__ */ ++#include + + #ifdef _MSC_VER + #define ALIGN(n) _declspec(align(n)) diff --git a/debian/patches/workaround-nodejs-bug.patch b/debian/patches/workaround-nodejs-bug.patch new file mode 100644 index 0000000..924de09 --- /dev/null +++ b/debian/patches/workaround-nodejs-bug.patch @@ -0,0 +1,201 @@ +Description: workaround nodejs bug +Author: Yadd +Forwarded: not-needed +Last-Update: 2023-12-02 + +--- a/fastify-busboy/deps/dicer/lib/Dicer.js ++++ b/fastify-busboy/deps/dicer/lib/Dicer.js +@@ -1,7 +1,7 @@ + 'use strict' + +-const WritableStream = require('node:stream').Writable +-const inherits = require('node:util').inherits ++const WritableStream = require('stream').Writable ++const inherits = require('util').inherits + + const StreamSearch = require('../../streamsearch/sbmh') + +--- a/fastify-busboy/deps/dicer/lib/HeaderParser.js ++++ b/fastify-busboy/deps/dicer/lib/HeaderParser.js +@@ -1,7 +1,7 @@ + 'use strict' + +-const EventEmitter = require('node:events').EventEmitter +-const inherits = require('node:util').inherits ++const EventEmitter = require('events').EventEmitter ++const inherits = require('util').inherits + const getLimit = require('../../../lib/utils/getLimit') + + const StreamSearch = require('../../streamsearch/sbmh') +--- a/fastify-busboy/deps/dicer/lib/PartStream.js ++++ b/fastify-busboy/deps/dicer/lib/PartStream.js +@@ -1,7 +1,7 @@ + 'use strict' + +-const inherits = require('node:util').inherits +-const ReadableStream = require('node:stream').Readable ++const inherits = require('util').inherits ++const ReadableStream = require('stream').Readable + + function PartStream (opts) { + ReadableStream.call(this, opts) +--- a/fastify-busboy/deps/streamsearch/sbmh.js ++++ b/fastify-busboy/deps/streamsearch/sbmh.js +@@ -26,8 +26,8 @@ + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +-const EventEmitter = require('node:events').EventEmitter +-const inherits = require('node:util').inherits ++const EventEmitter = require('events').EventEmitter ++const inherits = require('util').inherits + + function SBMH (needle) { + if (typeof needle === 'string') { +--- a/fastify-busboy/lib/main.js ++++ b/fastify-busboy/lib/main.js +@@ -1,7 +1,7 @@ + 'use strict' + +-const WritableStream = require('node:stream').Writable +-const { inherits } = require('node:util') ++const WritableStream = require('stream').Writable ++const { inherits } = require('util') + const Dicer = require('../deps/dicer/lib/Dicer') + + const MultipartParser = require('./types/multipart') +--- a/fastify-busboy/lib/types/multipart.js ++++ b/fastify-busboy/lib/types/multipart.js +@@ -7,8 +7,8 @@ + // * support limits.fieldNameSize + // -- this will require modifications to utils.parseParams + +-const { Readable } = require('node:stream') +-const { inherits } = require('node:util') ++const { Readable } = require('stream') ++const { inherits } = require('util') + + const Dicer = require('../../deps/dicer/lib/Dicer') + +--- a/fastify-busboy/test/dicer-multipart.test.js ++++ b/fastify-busboy/test/dicer-multipart.test.js +@@ -1,10 +1,10 @@ + 'use strict' + + const Dicer = require('../deps/dicer/lib/Dicer') +-const assert = require('node:assert') +-const fs = require('node:fs') +-const path = require('node:path') +-const inspect = require('node:util').inspect ++const assert = require('assert') ++const fs = require('fs') ++const path = require('path') ++const inspect = require('util').inspect + const { test } = require('tap') + + const FIXTURES_ROOT = path.join(__dirname, 'fixtures/') +--- a/fastify-busboy/test/parse-params.test.js ++++ b/fastify-busboy/test/parse-params.test.js +@@ -1,6 +1,6 @@ + 'use strict' + +-const { inspect } = require('node:util') ++const { inspect } = require('util') + const { test } = require('tap') + const parseParams = require('../lib/utils/parseParams') + +--- a/scripts/generate-undici-types-package-json.js ++++ b/scripts/generate-undici-types-package-json.js +@@ -1,5 +1,5 @@ +-const fs = require('node:fs') +-const path = require('node:path') ++const fs = require('fs') ++const path = require('path') + + const packageJSONPath = path.join(__dirname, '..', 'package.json') + const packageJSONRaw = fs.readFileSync(packageJSONPath, 'utf-8') +--- a/test/client-node-max-header-size.js ++++ b/test/client-node-max-header-size.js +@@ -1,6 +1,6 @@ + 'use strict' + +-const { execSync } = require('node:child_process') ++const { execSync } = require('child_process') + const { test } = require('tap') + + const command = 'node -e "require(\'.\').request(\'https://httpbin.org/get\')"' +--- a/test/fetch/client-node-max-header-size.js ++++ b/test/fetch/client-node-max-header-size.js +@@ -1,6 +1,6 @@ + 'use strict' + +-const { execSync } = require('node:child_process') ++const { execSync } = require('child_process') + const { test, skip } = require('tap') + const { nodeMajor } = require('../../lib/core/util') + +--- a/test/fetch/http2.js ++++ b/test/fetch/http2.js +@@ -1,10 +1,10 @@ + 'use strict' + +-const { createSecureServer } = require('node:http2') +-const { createReadStream, readFileSync } = require('node:fs') +-const { once } = require('node:events') +-const { Blob } = require('node:buffer') +-const { Readable } = require('node:stream') ++const { createSecureServer } = require('http2') ++const { createReadStream, readFileSync } = require('fs') ++const { once } = require('events') ++const { Blob } = require('buffer') ++const { Readable } = require('stream') + + const { test, plan } = require('tap') + const pem = require('https-pem') +--- a/test/http2-alpn.js ++++ b/test/http2-alpn.js +@@ -1,10 +1,10 @@ + 'use strict' + +-const https = require('node:https') +-const { once } = require('node:events') +-const { createSecureServer } = require('node:http2') +-const { readFileSync } = require('node:fs') +-const { join } = require('node:path') ++const https = require('https') ++const { once } = require('events') ++const { createSecureServer } = require('http2') ++const { readFileSync } = require('fs') ++const { join } = require('path') + const { test } = require('tap') + + const { Client } = require('..') +--- a/test/http2.js ++++ b/test/http2.js +@@ -1,10 +1,10 @@ + 'use strict' + +-const { createSecureServer } = require('node:http2') +-const { createReadStream, readFileSync } = require('node:fs') +-const { once } = require('node:events') +-const { Blob } = require('node:buffer') +-const { Writable, pipeline, PassThrough, Readable } = require('node:stream') ++const { createSecureServer } = require('http2') ++const { createReadStream, readFileSync } = require('fs') ++const { once } = require('events') ++const { Blob } = require('buffer') ++const { Writable, pipeline, PassThrough, Readable } = require('stream') + + const { test, plan } = require('tap') + const { gte } = require('semver') +--- a/test/retry-handler.js ++++ b/test/retry-handler.js +@@ -1,6 +1,6 @@ + 'use strict' +-const { createServer } = require('node:http') +-const { once } = require('node:events') ++const { createServer } = require('http') ++const { once } = require('events') + + const tap = require('tap') + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..87c0ddd --- /dev/null +++ b/debian/rules @@ -0,0 +1,46 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +include /usr/share/dpkg/pkg-info.mk + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +LLHTTPVERSION = $(shell pkgjs-pjson llhttp version) +LLHTTPMAJORVERSION = $(shell pkgjs-pjson llhttp version|perl -pe 's/\..*//') +export SONAME = libllhttp.so.$(LLHTTPVERSION) +export SONAMEALIAS = libllhttp.so.$(LLHTTPMAJORVERSION) +LIBLLHTTPVERSION = $(LLHTTPVERSION)~$(DEB_VERSION) + +zz: + echo $(LLHTTPMAJORVERSION) + +%: + dh $@ + +override_dh_auto_test: + # autopkgtest only + +execute_after_dh_auto_install: + cd llhttp && $(MAKE) install DESTDIR=../debian/tmp PREFIX=/usr LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) + dh_auto_install --buildsystem=cmake -Dllhttp/release + +execute_after_dh_install: + rm -f debian/node-undici/usr/share/nodejs/undici/lib/fetch/LICENSE + +execute_after_dh_fixperms: + chmod -x debian/*/usr/share/nodejs/undici/lib/llhttp/llhttp-wasm + +override_dh_makeshlibs: + dh_makeshlibs -a -- -plibllhttp9.1 + +override_dh_gencontrol: + dh_gencontrol -pnode-undici -- -v$(DEB_VERSION) + dh_gencontrol -plibllhttp-dev -- -v$(LLHTTPVERSION)~$(DEB_VERSION) \ + -Vlibllhttp:Version=$(LIBLLHTTPVERSION) \ + -DHomepage=https://github.com/nodejs/llhttp + dh_gencontrol -pnode-llhttp -- -v$(LLHTTPVERSION)~$(DEB_VERSION) \ + -DHomepage=https://github.com/nodejs/llhttp + dh_gencontrol -plibllhttp9.1 -- -v$(LLHTTPVERSION)~$(DEB_VERSION) \ + -DHomepage=https://github.com/nodejs/llhttp diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml new file mode 100644 index 0000000..33c3a64 --- /dev/null +++ b/debian/salsa-ci.yml @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..5f9725c --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,32 @@ +# Fixed +weak-library-dev-dependency * Depends libllhttp9* + +# False positive: data +source-is-missing [*lib/llhttp/constants.js*] +source-is-missing [test/wpt/tests/common/third_party/reftest-analyzer.xhtml] +source-is-missing [test/wpt/tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html] +source-is-missing [test/wpt/tests/fetch/redirects/data.window.js] +source-contains-prebuilt-javascript-object [*lib/llhttp/constants.js*] +very-long-line-length-in-source-file *lib/llhttp/constants.js* +very-long-line-length-in-source-file * [test/wpt/tests/xhr/resources/over-1-meg.txt:*] +very-long-line-length-in-source-file * [test/wpt/tests/common/third_party/reftest-analyzer.xhtml:*] +very-long-line-length-in-source-file * [test/wpt/tests/.taskcluster.yml:*] +very-long-line-length-in-source-file * [test/wpt/tests/fetch/cross-origin-resource-policy/fetch-in-iframe.html:*] +very-long-line-length-in-source-file * [test/wpt/tests/fetch/redirects/data.window.js:*] + +# Test files +source-is-missing [debian/tests/test_modules/node-forge/lib/des.js] +source-is-missing [debian/tests/test_modules/node-forge/lib/prime.worker.js] +source-is-missing [fastify-busboy/bench/createMultipartBufferForEncodingBench.js] +source-is-missing [fastify-busboy/test/types-multipart.test.js] +source-contains-browserified-javascript code fragment:* [test/wpt/tests/resources/webidl2/lib/webidl2.js] +source-contains-prebuilt-javascript-object [debian/tests/test_modules/node-forge/lib/des.js] +source-contains-prebuilt-javascript-object [debian/tests/test_modules/node-forge/lib/prime.worker.js] +source-contains-prebuilt-javascript-object [fastify-busboy/bench/createMultipartBufferForEncodingBench.js] +source-contains-prebuilt-javascript-object [fastify-busboy/test/types-multipart.test.js] +source-contains-prebuilt-javascript-object [test/wpt/tests/fetch/redirects/data.window.js] +very-long-line-length-in-source-file * [fastify-busboy/test/types-multipart.test.js:*] +very-long-line-length-in-source-file * [fastify-busboy/bench/createMultipartBufferForEncodingBench.js:*] + +# Doc +very-long-line-length-in-source-file *.md* diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..645c288 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,29 @@ +Test-Command: /usr/share/pkg-js-autopkgtest/runner require +Depends: @ + , pkg-js-autopkgtest + , node-debug +Restrictions: superficial, skippable, +Features: test-name=pkg-js-autopkgtest-require + +Test-Command: /usr/share/pkg-js-autopkgtest/runner +Depends: @ + , pkg-js-autopkgtest + , jest +Restrictions: allow-stderr, skippable, needs-internet +Features: test-name=pkg-js-autopkgtest + +Test-Command: NETWORKTEST=1 /usr/share/pkg-js-autopkgtest/runner +Depends: @ + , pkg-js-autopkgtest + , chai + , mocha + , node-busboy + , node-chai-as-promised + , node-p-timeout + , node-proxy (>= 2) + , node-proxyquire + , node-sinon + , node-tap +Restrictions: allow-stderr, skippable, needs-internet +Features: test-name=pkg-js-autopkgtest-with-network +Architecture: amd64, arm64, i386, ppc64el, s390x diff --git a/debian/tests/pkg-js/enable_proto b/debian/tests/pkg-js/enable_proto new file mode 100644 index 0000000..e69de29 diff --git a/debian/tests/pkg-js/test b/debian/tests/pkg-js/test new file mode 100644 index 0000000..ec970f2 --- /dev/null +++ b/debian/tests/pkg-js/test @@ -0,0 +1,9 @@ +if test "$NETWORKTEST" != ""; then + node -e "require('https-pem/install')" + mocha test/node-fetch + rm -f test/ca-fingerprint.js test/client-errors.js test/esm-wrapper.js test/https.js test/tls-client-cert.js test/tls-session-reuse.js test/gc.js test/connect-timeout.js + rm -f test/http2-alpn.js test/proxy-agent.js test/balanced-pool.js test/tls-session-reuse.js test/autoselectfamily.js test/http2.js test/no-strict-content-length.js test/proxy.js + tap --no-timeout -R tap --no-cov `ls test/*.js test/diagnostics-channel/*.js` +else + jest --ci test/jest/mock-scope.test.js test/jest/test.js +fi diff --git a/debian/tests/test_modules/abort-controller/LICENSE b/debian/tests/test_modules/abort-controller/LICENSE new file mode 100644 index 0000000..c914149 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Toru Nagashima + +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. diff --git a/debian/tests/test_modules/abort-controller/browser.js b/debian/tests/test_modules/abort-controller/browser.js new file mode 100644 index 0000000..b0c5ec3 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/browser.js @@ -0,0 +1,13 @@ +/*globals self, window */ +"use strict" + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +module.exports = AbortController +module.exports.AbortSignal = AbortSignal +module.exports.default = AbortController diff --git a/debian/tests/test_modules/abort-controller/browser.mjs b/debian/tests/test_modules/abort-controller/browser.mjs new file mode 100644 index 0000000..a8f321a --- /dev/null +++ b/debian/tests/test_modules/abort-controller/browser.mjs @@ -0,0 +1,11 @@ +/*globals self, window */ + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +export default AbortController +export { AbortController, AbortSignal } diff --git a/debian/tests/test_modules/abort-controller/dist/abort-controller.d.ts b/debian/tests/test_modules/abort-controller/dist/abort-controller.d.ts new file mode 100644 index 0000000..75852fb --- /dev/null +++ b/debian/tests/test_modules/abort-controller/dist/abort-controller.d.ts @@ -0,0 +1,43 @@ +import { EventTarget } from "event-target-shim" + +type Events = { + abort: any +} +type EventAttributes = { + onabort: any +} +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +declare class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() + /** + * Returns `true` if this `AbortSignal`"s `AbortController` has signaled to abort, and `false` otherwise. + */ + readonly aborted: boolean +} +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +declare class AbortController { + /** + * Initialize this controller. + */ + constructor() + /** + * Returns the `AbortSignal` object associated with this object. + */ + readonly signal: AbortSignal + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort(): void +} + +export default AbortController +export { AbortController, AbortSignal } diff --git a/debian/tests/test_modules/abort-controller/dist/abort-controller.js b/debian/tests/test_modules/abort-controller/dist/abort-controller.js new file mode 100644 index 0000000..49af739 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/dist/abort-controller.js @@ -0,0 +1,127 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var eventTargetShim = require('event-target-shim'); + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends eventTargetShim.EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + eventTargetShim.EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports.default = AbortController; + +module.exports = AbortController +module.exports.AbortController = module.exports["default"] = AbortController +module.exports.AbortSignal = AbortSignal +//# sourceMappingURL=abort-controller.js.map diff --git a/debian/tests/test_modules/abort-controller/dist/abort-controller.mjs b/debian/tests/test_modules/abort-controller/dist/abort-controller.mjs new file mode 100644 index 0000000..88ba22d --- /dev/null +++ b/debian/tests/test_modules/abort-controller/dist/abort-controller.mjs @@ -0,0 +1,118 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +import { EventTarget, defineEventAttribute } from 'event-target-shim'; + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +export default AbortController; +export { AbortController, AbortSignal }; +//# sourceMappingURL=abort-controller.mjs.map diff --git a/debian/tests/test_modules/abort-controller/package.json b/debian/tests/test_modules/abort-controller/package.json new file mode 100644 index 0000000..fc705e0 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/package.json @@ -0,0 +1,97 @@ +{ + "name": "abort-controller", + "version": "3.0.0", + "description": "An implementation of WHATWG AbortController interface.", + "main": "dist/abort-controller", + "files": [ + "dist", + "polyfill.*", + "browser.*" + ], + "engines": { + "node": ">=6.5" + }, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "browser": "./browser.js", + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.3.0", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "@types/mocha": "^5.2.5", + "@types/node": "^10.12.18", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "dts-bundle-generator": "^2.0.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.1.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.2", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-typescript": "^1.0.0", + "rollup-watch": "^4.3.1", + "ts-node": "^8.0.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "scripts": { + "preversion": "npm test", + "version": "npm run -s build && git add dist/*", + "postversion": "git push && git push --tags", + "clean": "rimraf .nyc_output coverage", + "coverage": "opener coverage/lcov-report/index.html", + "lint": "eslint . --ext .ts", + "build": "run-s -s build:*", + "build:rollup": "rollup -c", + "build:dts": "dts-bundle-generator -o dist/abort-controller.d.ts src/abort-controller.ts && ts-node scripts/fix-dts", + "test": "run-s -s lint test:*", + "test:mocha": "nyc mocha test/*.ts", + "test:karma": "karma start --single-run", + "watch": "run-p -s watch:*", + "watch:mocha": "mocha test/*.ts --require ts-node/register --watch-extensions ts --watch --growl", + "watch:karma": "karma start --watch", + "codecov": "codecov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/abort-controller.git" + }, + "keywords": [ + "w3c", + "whatwg", + "event", + "events", + "abort", + "cancel", + "abortcontroller", + "abortsignal", + "controller", + "signal", + "shim" + ], + "author": "Toru Nagashima (https://github.com/mysticatea)", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/abort-controller/issues" + }, + "homepage": "https://github.com/mysticatea/abort-controller#readme" +} diff --git a/debian/tests/test_modules/abort-controller/polyfill.js b/debian/tests/test_modules/abort-controller/polyfill.js new file mode 100644 index 0000000..3ca8923 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/polyfill.js @@ -0,0 +1,21 @@ +/*globals require, self, window */ +"use strict" + +const ac = require("./dist/abort-controller") + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/debian/tests/test_modules/abort-controller/polyfill.mjs b/debian/tests/test_modules/abort-controller/polyfill.mjs new file mode 100644 index 0000000..0602a64 --- /dev/null +++ b/debian/tests/test_modules/abort-controller/polyfill.mjs @@ -0,0 +1,19 @@ +/*globals self, window */ +import * as ac from "./dist/abort-controller" + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/debian/tests/test_modules/atomic-sleep/LICENSE b/debian/tests/test_modules/atomic-sleep/LICENSE new file mode 100644 index 0000000..d1d8849 --- /dev/null +++ b/debian/tests/test_modules/atomic-sleep/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) +Copyright (c) 2020 David Mark Clements + + +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. + diff --git a/debian/tests/test_modules/atomic-sleep/index.js b/debian/tests/test_modules/atomic-sleep/index.js new file mode 100644 index 0000000..fbfc8b2 --- /dev/null +++ b/debian/tests/test_modules/atomic-sleep/index.js @@ -0,0 +1,38 @@ +'use strict' + +/* global SharedArrayBuffer, Atomics */ + +if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') { + const nil = new Int32Array(new SharedArrayBuffer(4)) + + function sleep (ms) { + // also filters out NaN, non-number types, including empty strings, but allows bigints + const valid = ms > 0 && ms < Infinity + if (valid === false) { + if (typeof ms !== 'number' && typeof ms !== 'bigint') { + throw TypeError('sleep: ms must be a number') + } + throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') + } + + Atomics.wait(nil, 0, 0, Number(ms)) + } + module.exports = sleep +} else { + + function sleep (ms) { + // also filters out NaN, non-number types, including empty strings, but allows bigints + const valid = ms > 0 && ms < Infinity + if (valid === false) { + if (typeof ms !== 'number' && typeof ms !== 'bigint') { + throw TypeError('sleep: ms must be a number') + } + throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') + } + const target = Date.now() + Number(ms) + while (target > Date.now()){} + } + + module.exports = sleep + +} diff --git a/debian/tests/test_modules/atomic-sleep/package.json b/debian/tests/test_modules/atomic-sleep/package.json new file mode 100644 index 0000000..cfdf200 --- /dev/null +++ b/debian/tests/test_modules/atomic-sleep/package.json @@ -0,0 +1,37 @@ +{ + "name": "atomic-sleep", + "version": "1.0.0", + "description": "Zero CPU overhead, zero dependency, true event-loop blocking sleep", + "main": "index.js", + "scripts": { + "test": "tap -R classic- -j1 test", + "lint": "standard", + "ci": "npm run lint && npm test" + }, + "keywords": [ + "sleep", + "pause", + "wait", + "performance", + "atomics" + ], + "engines": { + "node": ">=8.0.0" + }, + "author": "David Mark Clements (@davidmarkclem)", + "license": "MIT", + "devDependencies": { + "standard": "^14.3.1", + "tap": "^14.10.6", + "tape": "^4.13.2" + }, + "dependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/davidmarkclements/atomic-sleep.git" + }, + "bugs": { + "url": "https://github.com/davidmarkclements/atomic-sleep/issues" + }, + "homepage": "https://github.com/davidmarkclements/atomic-sleep#readme" +} diff --git a/debian/tests/test_modules/chai-iterator/LICENSE b/debian/tests/test_modules/chai-iterator/LICENSE new file mode 100644 index 0000000..34f7723 --- /dev/null +++ b/debian/tests/test_modules/chai-iterator/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2016-2017 Akim McMath +Copyright (c) 2018 Harry Sarson + +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. diff --git a/debian/tests/test_modules/chai-iterator/chai-iterator.js b/debian/tests/test_modules/chai-iterator/chai-iterator.js new file mode 100644 index 0000000..e2c9f93 --- /dev/null +++ b/debian/tests/test_modules/chai-iterator/chai-iterator.js @@ -0,0 +1,334 @@ +(function (chaiIterator) { + 'use strict'; + + /* istanbul ignore else */ + if (typeof module === 'object' && typeof exports === 'object') { + module.exports = chaiIterator; + } else if (typeof define === 'function' && define.amd) { + define(function () { + return chaiIterator; + }); + } else { + chai.use(chaiIterator); + } +})(function (chai, utils) { + 'use strict'; + + var Assertion = chai.Assertion; + var assert = chai.assert; + + var noop = function () {}; + + var ELLIPSIS = unquote('...'); + + // Expect/should assertions ============================= + + Assertion.addProperty('iterable', function () { + this.assert(isIterable(this._obj), + 'expected #{this} to be iterable', + 'expected #{this} not to be iterable' + ); + }); + + Assertion.addProperty('iterate', function () { + new Assertion(this._obj).iterable; + + utils.flag(this, 'iterate', true); + }); + + Assertion.addMethod('over', iterateMethod('to iterate over', function (exp) { + var it = this._obj[Symbol.iterator](); + var actual = slice(it, exp.length + 2); + var suffix = it.next().done ? [] : [ELLIPSIS]; + + return actual.concat(suffix); + })); + + Assertion.addMethod('from', iterateMethod('to begin iteration with', function (exp) { + return slice(this._obj[Symbol.iterator](), exp.length); + })); + + Assertion.addMethod('until', iterateMethod('to end iteration with', function (exp) { + var it = this._obj[Symbol.iterator](); + var actual = slice(it, exp.length); + var step = it.next(); + + while (!step.done) { + actual.push(step.value); + actual.shift(); + step = it.next(); + } + + return actual; + })); + + Assertion.addProperty('for', noop); + + Assertion.overwriteChainableMethod('lengthOf', function (_super) { + return function (exp) { + if (utils.flag(this, 'iterate')) { + var len = iterableLength(this._obj, exp); + + this.assert( + len === exp, + 'expected #{this} to iterate for length of #{exp}, but got #{act}', + 'expected #{this} not to iterate for length of #{exp}', + exp, + len + ); + } else { + _super.apply(this, arguments); + } + }; + }, function (_super) { + return function () { + _super.apply(this); + }; + }); + + Assertion.overwriteMethod('above', function (_super) { + return function (exp) { + if (utils.flag(this, 'iterate')) { + var len = iterableLength(this._obj, exp); + + this.assert( + len > exp, + 'expected #{this} to iterate for length above #{exp}, but got #{act}', + 'expected #{this} not to iterate for length above #{exp}', + exp, + len + ); + } else { + _super.apply(this, arguments); + } + }; + }); + + Assertion.overwriteMethod('below', function (_super) { + return function (exp) { + if (utils.flag(this, 'iterate')) { + var max = exp + 100; + var len = iterableLength(this._obj, max); + var act = len === Infinity ? unquote('more than ' + max) : len; + + this.assert( + len < exp, + 'expected #{this} to iterate for length below #{exp}, but got #{act}', + 'expected #{this} not to iterate for length below #{exp}', + exp, + act + ); + } else { + _super.apply(this, arguments); + } + }; + }); + + Assertion.overwriteMethod('least', function (_super) { + return function (exp) { + if (utils.flag(this, 'iterate')) { + var len = iterableLength(this._obj, exp); + + this.assert( + len >= exp, + 'expected #{this} to iterate for length of at least #{exp}, but got #{act}', + 'expected #{this} not to iterate for length of at least #{exp}', + exp, + len + ); + } else { + _super.apply(this, arguments); + } + }; + }); + + Assertion.overwriteMethod('most', function (_super) { + return function (exp) { + if (utils.flag(this, 'iterate')) { + var max = exp + 100; + var len = iterableLength(this._obj, max); + var act = len === Infinity ? unquote('more than ' + max) : len; + + this.assert( + len <= exp, + 'expected #{this} to iterate for length of at most #{exp}, but got #{act}', + 'expected #{this} not to iterate for length of at most #{exp}', + exp, + act + ); + } else { + _super.apply(this, arguments); + } + }; + }); + + Assertion.overwriteMethod('within', function (_super) { + return function (min, max) { + if (utils.flag(this, 'iterate')) { + var cutoff = max + 100; + var len = iterableLength(this._obj, cutoff); + var exp = unquote(min + 'and' + max); + var act = len === Infinity ? unquote('more than ' + cutoff) : len; + + this.assert( + min <= len && len <= max, + 'expected #{this} to iterate for length within #{exp}, but got #{act}', + 'expected #{this} not to iterate for length within #{exp}', + exp, + act + ); + } else { + _super.apply(this, arguments); + } + }; + }); + + // Assert methods ======================================= + + assert.isIterable = function (value, msg) { + new Assertion(value, msg).iterable; + }; + + assert.isNotIterable = function (value, msg) { + new Assertion(value, msg).not.iterable; + }; + + assert.iteratesFrom = function (value, exp, msg) { + new Assertion(value, msg).iterate.from(exp); + }; + + assert.doesNotIterateFrom = function (value, exp, msg) { + new Assertion(value, msg).not.iterate.from(exp); + }; + + assert.deepIteratesFrom = function (value, exp, msg) { + new Assertion(value, msg).deep.iterate.from(exp); + }; + + assert.doesNotDeepIterateFrom = function (value, exp, msg) { + new Assertion(value, msg).not.deep.iterate.from(exp); + }; + + assert.iteratesOver = function (value, exp, msg) { + new Assertion(value, msg).iterate.over(exp); + }; + + assert.doesNotIterateOver = function (value, exp, msg) { + new Assertion(value, msg).not.iterate.over(exp); + }; + + assert.deepIteratesOver = function (value, exp, msg) { + new Assertion(value, msg).deep.iterate.over(exp); + }; + + assert.doesNotDeepIterateOver = function (value, exp, msg) { + new Assertion(value, msg).not.deep.iterate.over(exp); + }; + + assert.iteratesUntil = function (value, exp, msg) { + new Assertion(value, msg).iterate.until(exp); + }; + + assert.doesNotIterateUntil = function (value, exp, msg) { + new Assertion(value, msg).not.iterate.until(exp); + }; + + assert.deepIteratesUntil = function (value, exp, msg) { + new Assertion(value, msg).deep.iterate.until(exp); + }; + + assert.doesNotDeepIterateUntil = function (value, exp, msg) { + new Assertion(value, msg).not.deep.iterate.until(exp); + }; + + var _lengthOf = assert.lengthOf; + + assert.lengthOf = function (value, exp, msg) { + if (isIterable(value) && typeof value.length !== 'number') { + new Assertion(value, msg).iterate.for.lengthOf(exp); + } else { + _lengthOf.apply(assert, arguments); + } + }; + + // Helpers ============================================== + + function iterateMethod(predicate, getActual) { + return function (iterable) { + assert(utils.flag(this, 'iterate'), 'the iterate flag must be set'); + new Assertion(iterable).iterable; + + var exp = slice(iterable[Symbol.iterator]()); + var act = getActual.call(this, exp); + + var deep = utils.flag(this, 'deep') ? ' deep' : ''; + + this.assert(compareArrays(exp, act, deep), + 'expected #{this} ' + predicate + deep + ' values #{exp}, but got #{act}', + 'expected #{this} not ' + predicate + deep + ' values #{exp}', + exp, + act + ); + }; + } + + // Utilities ============================================ + + function isIterable(value) { + return value !== undefined && value !== null && typeof value[Symbol.iterator] === 'function'; + } + + function iterableLength(iterable, max) { + max = max === undefined ? Infinity : max; + + var it = iterable[Symbol.iterator](); + + for (var i = 0; i <= max; i++) { + if (it.next().done) { + return i; + } + } + + return Infinity; + } + + function strictEqual(a, b) { + return a === b; + } + + function compareArrays(exp, act, deep) { + var equalFn = deep ? utils.eql : strictEqual; + + return exp.length === act.length && exp.every(function (value, i) { + return equalFn(value, act[i]); + }); + } + + function slice(it, stop) { + stop = stop === undefined ? Infinity : stop; + + var result = []; + var max = stop - 1; + var step = it.next(); + + for (var i = 0; i <= max && !step.done; i++) { + result.push(step.value); + if (i < max) { + step = it.next(); + } + } + + return result; + } + + function unquote(str) { + return { + inspect: function () { + return this.toString(); + }, + toString: function () { + return str; + } + }; + } +}); diff --git a/debian/tests/test_modules/chai-iterator/package.json b/debian/tests/test_modules/chai-iterator/package.json new file mode 100644 index 0000000..34f76c1 --- /dev/null +++ b/debian/tests/test_modules/chai-iterator/package.json @@ -0,0 +1,70 @@ +{ + "name": "chai-iterator", + "version": "3.0.2", + "description": "Chai assertions for iterable objects", + "main": "chai-iterator.js", + "scripts": { + "test:lint": "xo", + "test:mocha": "mocha test/**/*.js", + "test:cover": "nyc npm run test:mocha", + "test": "npm run test:lint && npm run test:cover", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "chai-iterator.js", + "LICENSE", + "CHANGELOG.md", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/harrysarson/chai-iterator.git" + }, + "keywords": [ + "chai", + "chai-plugin", + "browser", + "iterator", + "iterable", + "iteration", + "generator", + "yield", + "es6", + "es2015", + "typescript" + ], + "engines": { + "node": ">=6.0" + }, + "author": "Harry Sarson ", + "license": "MIT", + "bugs": { + "url": "https://github.com/harrysarson/chai-iterator/issues" + }, + "homepage": "https://github.com/harrysarson/chai-iterator", + "peerDependencies": { + "chai": "4.x" + }, + "devDependencies": { + "chai": "4.1.2", + "coveralls": "3.0.2", + "mocha": "6.0.0", + "nyc": "13.3.0", + "xo": "0.24.0" + }, + "xo": { + "esnext": false, + "globals": [ + "chai", + "define", + "module" + ], + "env": [ + "mocha" + ], + "rules": { + "no-unused-expressions": "off", + "no-use-extend-native/no-use-extend-native": "off" + } + } +} diff --git a/debian/tests/test_modules/chai-string/LICENSE b/debian/tests/test_modules/chai-string/LICENSE new file mode 100644 index 0000000..900e198 --- /dev/null +++ b/debian/tests/test_modules/chai-string/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright (c) 2013 Oleg Nechiporenko + +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. \ No newline at end of file diff --git a/debian/tests/test_modules/chai-string/chai-string.js b/debian/tests/test_modules/chai-string/chai-string.js new file mode 100644 index 0000000..669995d --- /dev/null +++ b/debian/tests/test_modules/chai-string/chai-string.js @@ -0,0 +1,317 @@ +(function (plugin) { + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { + // NodeJS + module.exports = plugin; + } + else { + if (typeof define === "function" && define.amd) { + // AMD + define(function () { + return plugin; + }); + } + else { + // Other environment (usually