From 3dd31b3f25398d5bb40e36ae522f6201264a0a07 Mon Sep 17 00:00:00 2001 From: janapc Date: Mon, 19 Feb 2024 08:39:40 -0300 Subject: [PATCH] update package file --- catalog/.eslintrc.json | 3 ++- catalog/package.json | 3 ++- catalog/src/storage/aws-s3-storage.ts | 2 +- lambda/.eslintrc.json | 1 + lambda/package.json | 3 ++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/catalog/.eslintrc.json b/catalog/.eslintrc.json index a8fec6e..4a2061d 100644 --- a/catalog/.eslintrc.json +++ b/catalog/.eslintrc.json @@ -8,9 +8,10 @@ "ecmaVersion": "latest", "sourceType": "module" }, + "ignorePatterns": ["jest.config.js"], "overrides": [ { - "files": ["tests/**/*"], + "files": ["**/*.test.ts"], "env": { "jest": true } diff --git a/catalog/package.json b/catalog/package.json index 44ddc2b..75fefa3 100644 --- a/catalog/package.json +++ b/catalog/package.json @@ -4,7 +4,8 @@ "description": "api the catalog", "main": "index.js", "scripts": { - "test": "jest --no-cache --forceExit --detectOpenHandles", + "test": "jest", + "linter": "eslint src", "local": "ts-node-dev --respawn --transpile-only -r tsconfig-paths/register src/index.ts" }, "keywords": [], diff --git a/catalog/src/storage/aws-s3-storage.ts b/catalog/src/storage/aws-s3-storage.ts index 628d111..d6a3b04 100644 --- a/catalog/src/storage/aws-s3-storage.ts +++ b/catalog/src/storage/aws-s3-storage.ts @@ -28,7 +28,7 @@ export class AwsS3Storage implements IStorage { const response = await this.client.send(command) const bodyString = await response.Body?.transformToString('utf-8') if (bodyString) { - const data: Catalog = JSON.parse(bodyString as string) + const data: Catalog = JSON.parse(bodyString) return data } throw new Error(`I didn't find this ${fileName} file on S3`) diff --git a/lambda/.eslintrc.json b/lambda/.eslintrc.json index 0e61563..eb52504 100644 --- a/lambda/.eslintrc.json +++ b/lambda/.eslintrc.json @@ -8,6 +8,7 @@ "ecmaVersion": "latest", "sourceType": "module" }, + "ignorePatterns": ["jest.config.js"], "overrides": [ { "files": ["**/*.test.ts"], diff --git a/lambda/package.json b/lambda/package.json index cfa1dd0..3105985 100644 --- a/lambda/package.json +++ b/lambda/package.json @@ -4,7 +4,8 @@ "description": "function to consume SQS messages", "main": "index.js", "scripts": { - "test": "jest --no-cache --forceExit --detectOpenHandles", + "test": "jest", + "linter": "eslint .", "prebuild": "rm -rf dist", "build": "esbuild index.ts --bundle --minify --sourcemap --platform=node --target=es2020 --outfile=dist/index.js", "posbuild":"cd dist && zip -r function.zip index.js"