scttcper / ngx-color

🎨 Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
https://ngx-color.vercel.app
MIT License
436 stars 55 forks source link

feat: Upgrade to Angular 13 #356

Closed Timebutt closed 3 years ago

Timebutt commented 3 years ago

This PR upgrades ngx-color to Angular 13. I had to make a few changes to please ng-packagr, as in version 13 both the API changed (see build.ts changes), and ng-packagr became stricter (hence the need for individual public_api.ts files per package).

fixes #357

codecov-commenter commented 3 years ago

Codecov Report

Merging #356 (c2354f8) into master (2319bcc) will increase coverage by 6.75%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #356      +/-   ##
==========================================
+ Coverage   53.53%   60.28%   +6.75%     
==========================================
  Files          45       44       -1     
  Lines         721      836     +115     
  Branches      155      156       +1     
==========================================
+ Hits          386      504     +118     
+ Misses        309      306       -3     
  Partials       26       26              
Impacted Files Coverage Δ
src/app/app.module.ts 100.00% <0.00%> (ø)
src/app/footer.component.ts 100.00% <0.00%> (ø)
src/lib/common/helpers/color.ts 61.11% <0.00%> (ø)
src/lib/common/raised.component.ts 100.00% <0.00%> (ø)
src/lib/common/helpers/checkboard.ts 75.00% <0.00%> (ø)
src/lib/common/checkboard.component.ts 100.00% <0.00%> (ø)
...c/lib/components/block/block-swatches.component.ts 100.00% <0.00%> (ø)
...ib/components/swatches/swatches-group.component.ts 100.00% <0.00%> (ø)
...components/photoshop/photoshop-button.component.ts 100.00% <0.00%> (ø)
...mponents/photoshop/photoshop-previews.component.ts 100.00% <0.00%> (ø)
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2319bcc...c2354f8. Read the comment docs.

scttcper commented 3 years ago

I assume this is a breaking change that requires v13?

Timebutt commented 3 years ago

It is breaking in that it requires the consuming app to run Ivy. The "compilationMode": "partial" setting makes sure this works with Angular applications of all versions, as long as they are running Ivy. AFAIK, very few applications are Angular 9+ and are still running View Engine (there were some numbers on a blog post somewhere, I'll see if I can dig those up).

scttcper commented 3 years ago

:tada: This PR is included in version 7.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Timebutt commented 3 years ago

Thanks for getting this merged and shipped this fast 🚀

Timebutt commented 3 years ago

Ok bad news, just tried running a build with version 7.3.0 of this package installed and it failed. Apparently the new APF (Angular Package Format) enables the use of exports field in the main package.json, which is currently incorrectly populated by ng-packagr because the current build system builds all of these packages individually. I'm working on a fix to correctly configure ng-packagr and address the problem!