-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature/centralize dependencies in root #2746
Feature/centralize dependencies in root #2746
Conversation
Add sync-packages-deps.js script ISSUES CLOSED: NationalBankBelgium#2695
BREAKING CHANGE: Due to TSLint update, it is required to adapt the usage in "tslint.json" file at the root of the project: ```txt // Before { "extends": [ // ... "@nationalbankbelgium/code-style/tslint/5.20.x", // ... ] // ... } // After { "extends": [ // ... "@nationalbankbelgium/code-style/tslint/6.1.x", // ... ] // ... }
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
A demo of Dependabot PR can be found on my fork: SuperITMan#1151 |
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.
Seems good to me,
It's probably going to solve my issue with the dep.
👍
RELATED ISSUE: NationalBankBelgium#2696 RELATED PR: NationalBankBelgium#2746
RELATED ISSUE: NationalBankBelgium#2696 RELATED PR: NationalBankBelgium#2746
RELATED ISSUE: NationalBankBelgium#2696 RELATED PR: NationalBankBelgium#2746
RELATED ISSUE: NationalBankBelgium#2696 RELATED PR: NationalBankBelgium#2746
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Dependencies are duplicated in root folder and in stark packages folders.
Moreover, some dependencies are not in sync between packages.
Due to NodeJS behavior, dependencies installed in root are available in showcase and in starter.
This can have side effects.
TSLint is not up to date in stark-build dependencies.
Issue Number: #2695
What is the new behavior?
All the dependencies are installed only in root folder. When a PR is introduced, the build checks if devDependencies versions in root "package.json" are in sync with dependencies version in stark packages.
If this is not the case, the build will fail. If the PR has been created by Dependabot, another workflow will be triggered and will update dependencies version in stark packages. After that, the workflow, thanks to the newcomer @nbb-bot 🤖, will push new commits to the Dependabot branch and will add a comment to the PR to mention that new commits have been added to the branch. This will trigger the "build" workflow that should work this time 👍
To solve the potential issue due to root dependencies available in showcase and starter, I refactored the build workflow to remove root dependencies before installing and running tests in showcase and starter.
Moreover, for Dependabot PRs, I adapted the build to remove the "package-lock.json" file in showcase to ensure it installs the right dependencies after updating stark-* dependencies.
TSLint is updated to v6.1 in stark-build dependencies.
Does this PR introduce a breaking change?
Other information