paste.chapril.org-privatebin/js
El RIDO b150450fac
address nodejs unit testing issue
mocha tests started failing as of node 20.10.0, likely due to this change:
https://github.com/nodejs/node/pull/49936

Error was:
node:internal/deps/undici/undici:11730
    Error.captureStackTrace(err, this);
          ^

TypeError: Failed to parse URL from js/zlib-1.2.13.wasm
    at Object.fetch (node:internal/deps/undici/undici:11730:11)
    at async initialize (/home/runner/work/PrivateBin/PrivateBin/js/zlib-1.2.13.js:31:26) {
  [cause]: TypeError: Invalid URL: js/zlib-1.2.13.wasm
      at new URLImpl (/home/runner/work/PrivateBin/PrivateBin/js/node_modules/jsdom-url/node_modules/whatwg-url/lib/URL-impl.js:21:13)
      at new URLImplCore (/home/runner/work/PrivateBin/PrivateBin/js/node_modules/jsdom-url/lib/URLImpl.js:18:9)
      at new URLCore (/home/runner/work/PrivateBin/PrivateBin/js/node_modules/jsdom-url/lib/URL.js:28:9)
      at Object.construct (/home/runner/work/PrivateBin/PrivateBin/js/node_modules/class-proxy/index.js:18:23)
      at new Request (node:internal/deps/undici/undici:5270:25)
      at fetch (node:internal/deps/undici/undici:9508:25)
      at Object.fetch (node:internal/deps/undici/undici:11728:18)
      at fetch (node:internal/process/pre_execution:314:27)
      at initialize (/home/runner/work/PrivateBin/PrivateBin/js/zlib-1.2.13.js:31:32)
      at Object.<anonymous> (/home/runner/work/PrivateBin/PrivateBin/js/zlib-1.2.13.js:145:17)
      at Object.<anonymous> (/home/runner/work/PrivateBin/PrivateBin/js/zlib-1.2.13.js:146:4)
[...]

Notice that the error occurs on line 31, meaning that fetch is not
undefined anymore. Node works on supporting fetch, which would make our
workaround using fs.readFileSync obsolete, but it (or rather the undici
library) currently doesn't support relative URLs.
2023-12-03 14:40:59 +01:00
..
test add basic RTL support, drop default language key 2023-09-19 07:29:00 +02:00
.istanbul.yml starting to work on JSVerify & Mocha based unit tests for our JS code base 2017-01-29 14:31:44 +01:00
.nycrc.yml changes required for jsdoc, adding legacy.js to code coverage 2019-09-22 21:18:19 +02:00
base-x-4.0.0.js update all libraries 2022-02-18 07:36:09 +01:00
base64-1.7.js Replace HTTP links with HTTPS 2016-07-19 13:56:52 +02:00
bootstrap-3.4.1.js update bootstrap JS library to 3.4.1 2022-02-20 16:13:54 +01:00
comment.jsonld breaking all the things (by replacing v1 with v2 formats) 2019-05-03 20:51:01 +02:00
commentmeta.jsonld reduce duplication in format 2018-12-17 21:42:49 +01:00
common.js upgrading DOMpurify to 3.0.6 2023-12-03 14:02:30 +01:00
jquery-3.7.0.js bump libraries, update changelog 2023-06-18 13:47:54 +02:00
kjua-0.9.0.js upgraded kjua 2021-04-05 17:33:07 +02:00
legacy.js changes required for jsdoc, adding legacy.js to code coverage 2019-09-22 21:18:19 +02:00
package-lock.json Bump word-wrap from 1.2.3 to 1.2.4 in /js 2023-07-19 18:58:23 +00:00
package.json increment version 2023-09-11 19:36:45 +02:00
paste.jsonld designing v2 paste & comment format 2018-12-17 19:43:16 +01:00
pastemeta.jsonld address security concerns reg. paste creation date by removing it in the API, keep comment creation date exposed, displayed in discussion - resolves #390 2018-12-23 20:10:24 +01:00
prettify.js updating prettify library to 453bd5f 2018-07-01 19:17:05 +02:00
privatebin.js fixed comments 2023-12-03 13:41:17 +01:00
purify-3.0.6.js upgrading DOMpurify to 3.0.6 2023-12-03 14:02:30 +01:00
rawinflate-0.3.js Replace HTTP links with HTTPS 2016-07-19 13:56:52 +02:00
showdown-2.1.0.js upgrade JS libraries 2022-11-13 06:37:23 +01:00
types.jsonld re-add CreationTime, still used in comment 2018-12-24 08:20:39 +01:00
zlib-1.2.13.js address nodejs unit testing issue 2023-12-03 14:40:59 +01:00
zlib-1.2.13.wasm update zlib to 1.2.13 2022-10-15 09:05:19 +02:00