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

chore(): move away from extend/clone #8001

Merged
merged 4 commits into from
Jun 12, 2022
Merged

chore(): move away from extend/clone #8001

merged 4 commits into from
Jun 12, 2022

Conversation

ShaMan123
Copy link
Contributor

@ShaMan123 ShaMan123 commented Jun 12, 2022

A semantic PR that replaces fabric.util.object.extend or the shallow version of fabric.util.object.clone with Object.assign to prepare for the js/ts migration.
I replaced relevant code after using the transformer (It uses extend as a search value).
The deep version of clone is used sparsely and in the future could be replaced by lodash.cloneDeep (~44KB vs. ~4KB of lang_object 😬). BTW I'm not sure it is really necessary in most cases.

@ShaMan123 ShaMan123 requested a review from melchiar June 12, 2022 04:27
@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.06 |    76.01 |    85.7 |   82.78 |                                               
 fabric.js |   83.06 |    76.01 |    85.7 |   82.78 | ...,30876,30950,30961-31026,31149,31248,31484 
-----------|---------|----------|---------|---------|-----------------------------------------------

@ShaMan123 ShaMan123 changed the title chore(): move away from extend chore(): move away from extend/clone Jun 12, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.07 |       76 |    85.7 |   82.79 |                                               
 fabric.js |   83.07 |       76 |    85.7 |   82.79 | ...,30864,30938,30949-31014,31137,31236,31472 
-----------|---------|----------|---------|---------|-----------------------------------------------

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.06 |       76 |    85.7 |   82.79 |                                               
 fabric.js |   83.06 |       76 |    85.7 |   82.79 | ...,30862,30936,30947-31012,31135,31234,31470 
-----------|---------|----------|---------|---------|-----------------------------------------------

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.05 |    75.97 |    85.7 |   82.77 |                                               
 fabric.js |   83.05 |    75.97 |    85.7 |   82.77 | ...,30861,30935,30946-31011,31134,31233,31469 
-----------|---------|----------|---------|---------|-----------------------------------------------

@ShaMan123 ShaMan123 requested a review from asturur June 12, 2022 04:53
Copy link
Contributor Author

@ShaMan123 ShaMan123 left a comment

Choose a reason for hiding this comment

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

Take a close look at src/gradient.class.js tom make sure the cloning is really redundant

@asturur
Copy link
Member

asturur commented Jun 12, 2022

this is fine. I'll merge it now.
Let's try to not open more PRs before we can migrate.

@asturur asturur merged commit d5107f5 into master Jun 12, 2022
@ShaMan123
Copy link
Contributor Author

ShaMan123 commented Jun 12, 2022 via email

@ShaMan123 ShaMan123 deleted the deprecate-extend branch September 11, 2022 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants