build: use node.js builtin source maps support
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 5 Nov 2023 21:34:29 +0000 (22:34 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 5 Nov 2023 21:34:29 +0000 (22:34 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
13 files changed:
examples/typescript/http-client-pool/package.json
examples/typescript/http-server-pool/express-cluster/package.json
examples/typescript/http-server-pool/express-hybrid/package.json
examples/typescript/http-server-pool/express-worker_threads/package.json
examples/typescript/http-server-pool/fastify-cluster/package.json
examples/typescript/http-server-pool/fastify-hybrid/package.json
examples/typescript/http-server-pool/fastify-worker_threads/package.json
examples/typescript/smtp-client-pool/package.json
examples/typescript/websocket-server-pool/ws-cluster/package.json
examples/typescript/websocket-server-pool/ws-hybrid/package.json
examples/typescript/websocket-server-pool/ws-worker_threads/package.json
package.json
pnpm-lock.yaml

index f2e0dea718101c552cc0c440476fbde06bc086d3..f9086a19a8464c7e39f09b167098a9ae0ff52f3b 100644 (file)
@@ -12,8 +12,8 @@
   "scripts": {
     "build": "pnpm build:clean && tsc",
     "build:clean": "tsc --build --clean",
-    "start": "node dist/main.js",
-    "start:httpd-echo": "node httpd-echo.js",
+    "start": "node --enable-source-maps dist/main.js",
+    "start:httpd-echo": "node --enable-source-maps httpd-echo.js",
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "keywords": [],
index 7f5479f420231d66f8fb859b33b3d215b0d1cd99..9975dda5ca1f7abbafd9c30c1021f543b07a8610 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index 82f87afeb485106439c209439d8aba93f458377a..e9fd1df8240af332ae9b3c8819e7e05b50d964e3 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index d4d86077a666029015365e9085e3148dbfb486e8..7b9e4e04b76862f93f401a323d0d78becd8b344c 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "pnpm build:clean && tsc",
     "build:clean": "tsc --build --clean",
-    "start": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index 007aea485f13d33f6d7346bb363273738805b00a..8b0d3623b641b8fd1ccd4cc6502ddaee95bda8ab 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index d4e8fa44726207032bf813216cec5f406509ee8d..fa57d6c0f079a272d1e6beed853829b5514c0761 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index 037be01dbfe16816aaba980444abdd0d3e44650f..386b38f4bccff09f7fb3d98fb8ff6d89379987c9 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "pnpm build:clean && tsc",
     "build:clean": "tsc --build --clean",
-    "start": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "benchmark:echo": "autocannon -c 100 -d 30 -p 10 -m POST -H Content-Type=application/json -b '{\"key1\":\"value1\", \"key2\":\"value2\"}' http://localhost:8080/api/echo",
     "benchmark:factorial": "autocannon -c 100 -d 30 -p 10 http://localhost:8080/api/factorial/30"
index 20d1ec70d495aa794c3b859d884c28cdff4dd31b..0f2154c7a2863a51fa2ba6f51336125344e95bf9 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "pnpm build:clean && tsc",
     "build:clean": "tsc --build --clean",
-    "start": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "keywords": [],
index 537a778c616966725e3752ce78305bd9513b7430..eaebf7f0845d2811c2a9e4bc6727ae6f77cce936 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "test:requests": "node requests.js"
   },
index 6d0ec5473d0d9e54a0401217f47855c67e43260c..435c1afea89183988e3341ec3251f198c66c6760 100644 (file)
@@ -11,8 +11,8 @@
   },
   "scripts": {
     "build": "rollup --config --configPlugin typescript",
-    "start": "node dist/main.cjs",
-    "start:esm": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.cjs",
+    "start:esm": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "test:requests": "node requests.js"
   },
index 3edfc5c11531d80d90541e8273bc5629a89ff2ef..b07601cafa2c025464c35ca564924e92aaa6ae79 100644 (file)
@@ -12,7 +12,7 @@
   "scripts": {
     "build": "pnpm build:clean && tsc",
     "build:clean": "tsc --build --clean",
-    "start": "node dist/main.js",
+    "start": "node --enable-source-maps dist/main.js",
     "test": "echo \"Error: no test specified\" && exit 1",
     "test:requests": "node requests.js"
   },
index 31a0c2ef012b1a14c7572884c423e1fc58c34b14..8c7d7eaab552f03dd8689ab63d9522d4312d459b 100644 (file)
@@ -19,9 +19,9 @@
     "build:prod": "rollup --config",
     "build:typedoc": "rollup --config --environment DOCUMENTATION,BUILD:development",
     "build:analyze": "rollup --config --environment ANALYZE,BUILD:development",
-    "benchmark": "pnpm build && node --max-old-space-size=4096 -r source-map-support/register benchmarks/internal/bench.mjs",
-    "benchmark:prod": "pnpm build:prod && node --max-old-space-size=4096 benchmarks/internal/bench.mjs",
-    "benchmark:debug": "pnpm build && node --max-old-space-size=4096 -r source-map-support/register --inspect benchmarks/internal/bench.mjs",
+    "benchmark": "pnpm build && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
+    "benchmark:prod": "pnpm build:prod && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
+    "benchmark:debug": "pnpm build && node --max-old-space-size=4096 --enable-source-maps --inspect benchmarks/internal/bench.mjs",
     "test": "pnpm build --environment SOURCEMAP:false && c8 mocha 'tests/**/*.test.mjs'",
     "test:debug": "pnpm build && mocha --no-parallel --inspect 'tests/**/*.test.mjs'",
     "coverage": "c8 report --reporter=lcov",
     "rollup-plugin-delete": "^2.0.0",
     "rollup-plugin-dts": "^6.1.0",
     "sinon": "^17.0.1",
-    "source-map-support": "^0.5.21",
     "ts-standard": "^12.0.2",
     "typedoc": "^0.25.3",
     "typescript": "~5.2.2"
index 18d1040da4451e436789d440ecb6541dac846bf7..c1ab5479a281a6c9343aba07834ef19b17742b13 100644 (file)
@@ -119,9 +119,6 @@ devDependencies:
   sinon:
     specifier: ^17.0.1
     version: 17.0.1
-  source-map-support:
-    specifier: ^0.5.21
-    version: 0.5.21
   ts-standard:
     specifier: ^12.0.2
     version: 12.0.2(eslint-import-resolver-typescript@3.6.1)(typescript@5.2.2)