From f97efd58f6fc45c346ce74e01e08e32d7bc131f1 Mon Sep 17 00:00:00 2001 From: ThomasB Date: Tue, 23 Apr 2024 16:10:42 +0200 Subject: [PATCH] remove TypeScript to simplify reproduction --- .github/workflows/ci.yml | 3 --- package-lock.json | 25 +------------------------ package.json | 12 +++--------- src/{server.ts => server.js} | 2 +- tsconfig.json | 20 -------------------- 5 files changed, 5 insertions(+), 57 deletions(-) rename src/{server.ts => server.js} (91%) delete mode 100644 tsconfig.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e41013f..11e277b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,5 @@ jobs: - name: Install dependencies run: npm install - - name: Build - run: npm run build - - name: Start run: npm run start diff --git a/package-lock.json b/package-lock.json index 1d96c1e..f0d8f72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,7 @@ "fastify": "^4.26.2", "newrelic": "^11.15.0" }, - "devDependencies": { - "@tsconfig/recommended": "1.0.6", - "@types/node": "^20.11.30", - "typescript": "^5.4.5" - } + "devDependencies": {} }, "node_modules/@colors/colors": { "version": "1.6.0", @@ -305,12 +301,6 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, - "node_modules/@tsconfig/recommended": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@tsconfig/recommended/-/recommended-1.0.6.tgz", - "integrity": "sha512-0IKu9GHYF1NGTJiYgfWwqnOQSlnE9V9R7YohHNNf0/fj/SyOZWzdd06JFr0fLpg1Mqw0kGbYg8w5xdkSqLKM9g==", - "dev": true - }, "node_modules/@types/concat-stream": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", @@ -3082,19 +3072,6 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, - "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/package.json b/package.json index dbfffc4..c023170 100644 --- a/package.json +++ b/package.json @@ -3,23 +3,17 @@ "version": "0.0.0", "description": "test", "private": true, - "main": "./dist/src/server.js", + "main": "./src/server.js", "type": "module", "scripts": { - "build": "tsc", - "start": "node --experimental-loader newrelic/esm-loader.mjs -r newrelic ./dist/src/server.js" + "start": "node --experimental-loader newrelic/esm-loader.mjs -r newrelic ./src/server.js" }, "files": [ - "dist", "newrelic.cjs" ], "dependencies": { "fastify": "^4.26.2", "newrelic": "^11.15.0" }, - "devDependencies": { - "@tsconfig/recommended": "1.0.6", - "@types/node": "^20.11.30", - "typescript": "^5.4.5" - } + "devDependencies": {} } diff --git a/src/server.ts b/src/server.js similarity index 91% rename from src/server.ts rename to src/server.js index 552b90e..2132798 100644 --- a/src/server.ts +++ b/src/server.js @@ -15,7 +15,7 @@ const start = async () => { }); }; -start().catch((error: Error) => { +start().catch((error) => { console.log('Server error', { error }); process.exit(1); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 80e08b4..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./node_modules/@tsconfig/recommended/tsconfig.json", - "compilerOptions": { - "declaration": true, - "emitDecoratorMetadata": true, - "esModuleInterop": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "module": "NodeNext", - "moduleResolution": "NodeNext", - "noFallthroughCasesInSwitch": true, - "outDir": "./dist", - "resolveJsonModule": true, - "rootDir": ".", - "strict": true, - "strictPropertyInitialization": false, - "target": "ESNext" - } -}