feat(builder): swap angular builder based on the angular version#22
Conversation
055ef79 to
b507413
Compare
| test(`when using the version ${version} it should replace all libraries build builder with ${pre10_1LibraryBuilder}`, () => { | ||
| const actual = replaceLibrariesBuildBuilder(version, mixedAngularJson); | ||
|
|
||
| expect(actual).toEqual(pre10_1LibraryBuilderWorkspace); |
There was a problem hiding this comment.
What I mean is let the test show that the builder name is what's changed. This is not currently clear in the test body, only in the test description. Assert on the builder name of a library build architect target, not the entire workspace configuration.
I know what you are saying but the reason I like to do it this way is that it gives me confidence that I'm not changing other target builders that I should not be changing. |
BREAKING CHANGE: 🧨 - input name changed from file-path to root-path - angular builder is modify at the angular.json file depending on the version
Co-authored-by: Lars Gyrup Brink Nielsen <larsbrinknielsen@gmail.com>
cbfdf5b to
8e1669f
Compare
Co-authored-by: Lars Gyrup Brink Nielsen <larsbrinknielsen@gmail.com>
PR Checklist
Please check if your PR fulfills the following requirements:
yarn build)PR Type
What kind of change does this PR introduce?
What is the current behavior?
The action doesn't support changing the angular builder since only modifies the package.json
Fixes: #20
What is the new behavior?
The angular.json builder is modified depending on the angular version passed as input.
For version below 10.1.x it uses
"@angular-devkit/build-ng-packagr:build"For version greater or equal than 10.1.x it uses
"@angular-devkit/build-angular:ng-packagr"Does this PR introduce a breaking change?
Other information
file-pathis notroot-path, it should be a folder instead of a path, it should be the folder where the package.json and angular.json exist and it defaults to "."