-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix(cli): init command reading package.json from two folders up #11789
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
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
commit: |
PR Code Suggestions ✨Latest suggestions up to 182e9e9
Previous suggestionsSuggestions up to commit 62e0931
|
||||||||||||||||||
Deploying typeorm with
|
| Latest commit: |
40de183
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dbef2d89.typeorm.pages.dev |
| Branch Preview URL: | https://fix-initi-command.typeorm.pages.dev |
gioboa
left a comment
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.
LGTM 👏
PR Code Suggestions ✨No code suggestions found for the PR. |
User description
Description of change
When package is built or when we run tests, the
package.jsonis one level closer toInitCommand...It's a backport of part of the fix from #11787
Pull-Request Checklist
masterbranchFixes #00000PR Type
Bug fix, Enhancement
Description
Remove hardcoded package.json import, read dynamically at runtime
Make appendPackageJson async to support file reading operations
Update TypeScript compiler targets from ES2021 to ES2022/ES2023
Fix package.json path resolution for built and test environments
Diagram Walkthrough
File Walkthrough
InitCommand.ts
Dynamic package.json loading and TypeScript target updatessrc/commands/InitCommand.ts
package.jsonimport statement from top of fileappendPackageJsonmethod to async and added dynamic filereading using
CommandUtils.readFilegetTsConfigTemplatefrom ES2021to ES2022/ES2023
appendPackageJsonto handle asyncoperation