Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing restapi gh actions flake #3139

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"scripts": {
"build": "tsc",
"build:go": " ",
"build:slither": " ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty 'build:slither' script may cause confusion

The build:slither script has been added with an empty command (" "). This could lead to confusion or unintended behavior if someone tries to execute it. If the script is not yet implemented, consider removing it until it's ready or providing a meaningful command.

Apply this diff to remove the empty script:

-    "build:slither": " ",
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"build:slither": " ",

"dev": "nodemon --watch src --exec ts-node src/app.ts",
"start": "node dist/app.js",
"lint:fix": "eslint src/**/*.ts --fix",
"lint:check": "eslint . --max-warnings=0",
"ci:lint": "npm run lint:check",
"test": "jest",
"test:coverage": "echo 'No tests defined.'",
"postinstall": "npm run build"
"test:coverage": "echo 'No tests defined.'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'test:coverage' script provides no functional value

The test:coverage script currently echoes 'No tests defined.', which may be misleading. Consider implementing actual test coverage reporting or removing this script to prevent confusion.

Apply this diff to remove the non-functional script:

-    "test:coverage": "echo 'No tests defined.'"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"test:coverage": "echo 'No tests defined.'"

},
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
Expand All @@ -26,7 +26,9 @@
"ethers": "5.7.2",
"express": "^4.18.2",
"express-validator": "^7.2.0",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate 'lodash' dependency

The lodash package is listed in both dependencies and devDependencies. This duplication can cause unnecessary bloat and potential version conflicts. Determine if lodash is required at runtime or only during development, and include it in the appropriate section.

If lodash is only needed during development, remove it from dependencies:

-    "lodash": "^4.17.21",

Committable suggestion was skipped due to low confidence.

"supertest": "^6.3.3",
"typescript": "^4.8.3"
Comment on lines +30 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move 'supertest' and 'typescript' back to 'devDependencies'

supertest and typescript are typically used for development and testing purposes. Including them in dependencies will install them in production environments unnecessarily, increasing the application's footprint.

Apply this diff to move them back to devDependencies:

-    "supertest": "^6.3.3",
-    "typescript": "^4.8.3"

Add them to devDependencies if they're not already present:

+    "supertest": "^6.3.3",
+    "typescript": "^4.8.3"

Committable suggestion was skipped due to low confidence.

},
"description": "A node.js project exposing a rest api for synapse sdk quotes",
"devDependencies": {
Expand All @@ -39,9 +41,7 @@
"jest": "^29.7.0",
"lodash": "^4.17.21",
"nodemon": "^3.0.1",
"supertest": "^6.3.3",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^4.8.3"
"ts-node": "^10.9.2"
}
}
Loading
Loading