From: Jérôme Benoit Date: Sun, 5 Nov 2023 21:34:29 +0000 (+0100) Subject: build: use node.js builtin source maps support X-Git-Tag: v3.0.6~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d7154f8ca416879819a7ef85064b748c3ee24079;p=poolifier.git build: use node.js builtin source maps support Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-client-pool/package.json b/examples/typescript/http-client-pool/package.json index f2e0dea7..f9086a19 100644 --- a/examples/typescript/http-client-pool/package.json +++ b/examples/typescript/http-client-pool/package.json @@ -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": [], diff --git a/examples/typescript/http-server-pool/express-cluster/package.json b/examples/typescript/http-server-pool/express-cluster/package.json index 7f5479f4..9975dda5 100644 --- a/examples/typescript/http-server-pool/express-cluster/package.json +++ b/examples/typescript/http-server-pool/express-cluster/package.json @@ -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" diff --git a/examples/typescript/http-server-pool/express-hybrid/package.json b/examples/typescript/http-server-pool/express-hybrid/package.json index 82f87afe..e9fd1df8 100644 --- a/examples/typescript/http-server-pool/express-hybrid/package.json +++ b/examples/typescript/http-server-pool/express-hybrid/package.json @@ -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" diff --git a/examples/typescript/http-server-pool/express-worker_threads/package.json b/examples/typescript/http-server-pool/express-worker_threads/package.json index d4d86077..7b9e4e04 100644 --- a/examples/typescript/http-server-pool/express-worker_threads/package.json +++ b/examples/typescript/http-server-pool/express-worker_threads/package.json @@ -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" diff --git a/examples/typescript/http-server-pool/fastify-cluster/package.json b/examples/typescript/http-server-pool/fastify-cluster/package.json index 007aea48..8b0d3623 100644 --- a/examples/typescript/http-server-pool/fastify-cluster/package.json +++ b/examples/typescript/http-server-pool/fastify-cluster/package.json @@ -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" diff --git a/examples/typescript/http-server-pool/fastify-hybrid/package.json b/examples/typescript/http-server-pool/fastify-hybrid/package.json index d4e8fa44..fa57d6c0 100644 --- a/examples/typescript/http-server-pool/fastify-hybrid/package.json +++ b/examples/typescript/http-server-pool/fastify-hybrid/package.json @@ -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" diff --git a/examples/typescript/http-server-pool/fastify-worker_threads/package.json b/examples/typescript/http-server-pool/fastify-worker_threads/package.json index 037be01d..386b38f4 100644 --- a/examples/typescript/http-server-pool/fastify-worker_threads/package.json +++ b/examples/typescript/http-server-pool/fastify-worker_threads/package.json @@ -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" diff --git a/examples/typescript/smtp-client-pool/package.json b/examples/typescript/smtp-client-pool/package.json index 20d1ec70..0f2154c7 100644 --- a/examples/typescript/smtp-client-pool/package.json +++ b/examples/typescript/smtp-client-pool/package.json @@ -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": [], diff --git a/examples/typescript/websocket-server-pool/ws-cluster/package.json b/examples/typescript/websocket-server-pool/ws-cluster/package.json index 537a778c..eaebf7f0 100644 --- a/examples/typescript/websocket-server-pool/ws-cluster/package.json +++ b/examples/typescript/websocket-server-pool/ws-cluster/package.json @@ -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" }, diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/package.json b/examples/typescript/websocket-server-pool/ws-hybrid/package.json index 6d0ec547..435c1afe 100644 --- a/examples/typescript/websocket-server-pool/ws-hybrid/package.json +++ b/examples/typescript/websocket-server-pool/ws-hybrid/package.json @@ -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" }, diff --git a/examples/typescript/websocket-server-pool/ws-worker_threads/package.json b/examples/typescript/websocket-server-pool/ws-worker_threads/package.json index 3edfc5c1..b07601ca 100644 --- a/examples/typescript/websocket-server-pool/ws-worker_threads/package.json +++ b/examples/typescript/websocket-server-pool/ws-worker_threads/package.json @@ -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" }, diff --git a/package.json b/package.json index 31a0c2ef..8c7d7eaa 100644 --- a/package.json +++ b/package.json @@ -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", @@ -138,7 +138,6 @@ "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" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18d1040d..c1ab5479 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -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)