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

[scripts] Fixed the comparison of package references #12122

Merged

Conversation

inlann
Copy link
Contributor

@inlann inlann commented Jan 29, 2023

What it does

If there are some dependencies in the package.json but developer forgot to add them into the references array of the tsconfig.json, the compile:references will not add these dependencies into the tsconfig.json. This can lead to build failures due to errors in the compile order of the modules at build time.

image

I think we should add a check instead of requiring developers to ensure references in tsconfig.json are written correctly. So, I added expectedReferences.some((reference, index) => currentReferences[index] !== reference) to fix the generation of the tsconfig.json

How to test

Run yarn compile:references

Review checklist

Reminder for reviewers

@inlann
Copy link
Contributor Author

inlann commented Jan 31, 2023

@paul-marechal Thanks for your review 😉 👍🏼

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

LGTM

@paul-marechal paul-marechal merged commit 6091474 into eclipse-theia:master Jan 31, 2023
@vince-fugnitto vince-fugnitto added the quality issues related to code and application quality label Feb 23, 2023
@vince-fugnitto vince-fugnitto added this to the 1.35.0 milestone Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality issues related to code and application quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants