-
Notifications
You must be signed in to change notification settings - Fork 196
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
migrate shared package from node to nestjs #351
Conversation
mit-27
commented
Apr 9, 2024
- Now, the nesJS shared package is compatible with both API and web apps
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis update streamlines the structure and dependencies across various services and shared resources, focusing on module import path optimization and project configuration enhancements. Key changes include the standardization of import paths, removal of specific module system configurations, and updates to project metadata and tooling configurations. This refinement enhances maintainability and sets a clear path for future development, embodying a significant stride towards a more cohesive and efficient codebase. Changes
Recent Review StatusConfiguration used: CodeRabbit UI Files ignored due to path filters (2)
Files selected for processing (44)
Files skipped from review due to trivial changes (9)
Additional comments not posted (44)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
@@ -12,7 +12,7 @@ import { | |||
ITicketingConnectionService, | |||
} from '../../types'; | |||
import { ServiceRegistry } from '../registry.service'; | |||
import { OAuth2AuthData, providerToType } from '@panora/shared/src/envConfig'; | |||
import { OAuth2AuthData, providerToType } from '@panora/shared'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider grouping imports from the same module.
- import { OAuth2AuthData, providerToType } from '@panora/shared';
- import { AuthStrategy } from '@panora/shared';
+ import { OAuth2AuthData, providerToType, AuthStrategy } from '@panora/shared';
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.
import { OAuth2AuthData, providerToType } from '@panora/shared'; | |
import { OAuth2AuthData, providerToType, AuthStrategy } from '@panora/shared'; |
@@ -50,7 +50,7 @@ import { | |||
} from '../../types'; | |||
import { ServiceRegistry } from '../registry.service'; | |||
import { AuthStrategy } from '@panora/shared'; | |||
import { OAuth2AuthData, providerToType } from '@panora/shared/src/envConfig'; | |||
import { OAuth2AuthData, providerToType } from '@panora/shared'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider abstracting repetitive code into functions.
The script contains repetitive patterns, especially in the createServiceFile
function. Consider abstracting repetitive code blocks, such as the OAuth response type definition and the axios request setup, into reusable functions or templates.
{ | ||
"defaultSeverity": "error", | ||
"extends": ["tslint:recommended"], | ||
"jsRules": { | ||
"no-unused-expression": true | ||
}, | ||
"rules": { | ||
"quotemark": [true, "single"], | ||
"member-access": [false], | ||
"ordered-imports": [false], | ||
"max-line-length": [true, 150], | ||
"member-ordering": [false], | ||
"interface-name": [false], | ||
"arrow-parens": false, | ||
"object-literal-sort-keys": false | ||
}, | ||
"rulesDirectory": [] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider migrating from TSLint to ESLint, as TSLint is deprecated and ESLint offers better support for TypeScript and NestJS projects.
|
||
//TODO - Resolve this | ||
// if (errors.length) throw new Error(errors.toString()); | ||
if (errors.length) { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement proper error handling for environment variable validation errors. Leaving a TODO without error handling could lead to silent failures.