-
Notifications
You must be signed in to change notification settings - Fork 653
[rush-lib] components package.json JSON format validation & version adherence to semver validation #3560
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
🥳 yes, let's finally fix this! 🙏 |
|
Your new API can also fix this issue: #996 |
|
Legal sign-off is pending.
…On Mon, Aug 1, 2022 at 16:46 Pete Gonzalez ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In libraries/rush-lib/src/api/RushConfigurationProject.ts
<#3560 (comment)>:
> @@ -106,7 +106,7 @@ export class RushConfigurationProject {
const packageJsonFilename: string = path.join(this._projectFolder, FileConstants.PackageJson);
try {
- this._packageJson = JsonFile.load(packageJsonFilename);
+ this._packageJson = JsonFile.load(packageJsonFilename, true);
We need you to sign the CLA in order to get this PR merged.
—
Reply to this email directly, view it on GitHub
<#3560 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ3OSFS45SQQU42MRWWY4ZTVXBOV7ANCNFSM546YMWDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@octogonz Legal has cleared the CLA - good to go. |
|
@1000RR if you're good with these changes, could you promote this to a non-draft PR? |
|
@octogonz Looks like it's ready to go. |
|
@octogonz may I ask for a final review and merge? |
Thanks for the reminder. And thanks for your patience -- things have been very busy lately. 😄 |
Summary
This PR seeks to solve 2 issues:
workspace:*in another project - [rush] rush update fails if workspace dependency version does not follow "X.Y.Z" pattern #2678rush updateand there are parsing errors in a component's package.json, pnpm does not provide stderr/stdio feedback - only exit code 1, which is not descriptive to the user. Therush updateerror message isERROR: Error: The command failed with exit code 1Details
package.jsonis loaded.How it was tested
building a project containing 2 components A and B, where A imports B's
workspace:*version. 2 tests cases:1.0(new error message shown, graceful exit)1.0.0(runs ok, graceful exit)building a project where a component's
package.jsonis malformed JSON - with comments or extra/missing commas.👉 STEP 7: Don't forget to run "rush change": https://rushjs.io/pages/best_practices/change_logs/