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

refactor: use lazy injection token for head utility #902

Merged

Conversation

davidlj95
Copy link
Owner

@davidlj95 davidlj95 commented Oct 9, 2024

Issue or need

After #892 lazy injection tokens are ready to use. Head element upsert or remove is a good start to use it. Because of #891

Proposed changes

Use lazy injection token for head element upsert or remove util

Verified that if usages of this token disappear (i.e.: removing standard + JSON LD modules from example app), the injection token and its factory get tree shaken.

Quick reminders

  • 🤝 I will follow Code of Conduct
  • No existing pull request already does almost same changes
  • 👁️ Contributing docs are something I've taken a look at
  • 📝 Commit messages convention has been followed
  • 💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
  • 🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
  • ⚙️ API Report has been updated if API surface is altered.

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on Graphite Graphite

@davidlj95 davidlj95 marked this pull request as draft October 9, 2024 11:37
@davidlj95 davidlj95 force-pushed the stacked/refactor-use-lazy-injection-token-for-head-utility branch from 19dc4b4 to 0cc4425 Compare October 9, 2024 11:55
@davidlj95 davidlj95 marked this pull request as ready for review October 9, 2024 11:55
@davidlj95 davidlj95 force-pushed the stacked/refactor-use-lazy-injection-token-for-head-utility branch from 0cc4425 to c963bb7 Compare October 9, 2024 11:56
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.46%. Comparing base (25d1323) to head (e8b541b).
Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #902   +/-   ##
=======================================
  Coverage   99.46%   99.46%           
=======================================
  Files          79       79           
  Lines         372      373    +1     
  Branches       73       73           
=======================================
+ Hits          370      371    +1     
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidlj95 davidlj95 force-pushed the stacked/refactor-use-lazy-injection-token-for-head-utility branch from c963bb7 to 4e501a6 Compare October 9, 2024 14:50
@davidlj95 davidlj95 enabled auto-merge (squash) October 9, 2024 14:50
@davidlj95 davidlj95 force-pushed the stacked/refactor-use-lazy-injection-token-for-head-utility branch from 4e501a6 to e8b541b Compare October 9, 2024 14:57
Copy link

github-actions bot commented Oct 9, 2024

📦 Bundle size (Angular v15)

Git ref: e8b541b840651c10428988372d499f3fc036775d

Module file Size Base size Difference
ngx-meta-core.mjs 3296 bytes (3.3KiB) 3220 bytes (3.2KiB) 2.36%: 76 bytes (76B)
ngx-meta-json-ld.mjs 355 bytes (355B) 353 bytes (353B) .56%: 2 bytes (2B)
ngx-meta-open-graph.mjs 1233 bytes (1.3KiB) 1233 bytes (1.3KiB) No change
ngx-meta-routing.mjs 626 bytes (626B) 626 bytes (626B) No change
ngx-meta-standard.mjs 1074 bytes (1.1KiB) 1072 bytes (1.1KiB) .18%: 2 bytes (2B)
ngx-meta-twitter-card.mjs 630 bytes (630B) 630 bytes (630B) No change
Total 7214 bytes (7.1KiB) 7134 bytes (7.0KiB) 1.12%: 80 bytes (80B)

Copy link

github-actions bot commented Oct 9, 2024

📦 Bundle size (Angular v17)

Git ref: e8b541b840651c10428988372d499f3fc036775d

Module file Size Base size Difference
ngx-meta-core.mjs 2896 bytes (2.9KiB) 2812 bytes (2.8KiB) 2.98%: 84 bytes (84B)
ngx-meta-json-ld.mjs 226 bytes (226B) 224 bytes (224B) .89%: 2 bytes (2B)
ngx-meta-open-graph.mjs 984 bytes (984B) 984 bytes (984B) No change
ngx-meta-routing.mjs 449 bytes (449B) 449 bytes (449B) No change
ngx-meta-standard.mjs 992 bytes (992B) 990 bytes (990B) .20%: 2 bytes (2B)
ngx-meta-twitter-card.mjs 514 bytes (514B) 514 bytes (514B) No change
Total 6061 bytes (6.0KiB) 5973 bytes (5.9KiB) 1.47%: 88 bytes (88B)

Copy link

github-actions bot commented Oct 9, 2024

📦 Bundle size (Angular v16)

Git ref: e8b541b840651c10428988372d499f3fc036775d

Module file Size Base size Difference
ngx-meta-core.mjs 3331 bytes (3.3KiB) 3255 bytes (3.2KiB) 2.33%: 76 bytes (76B)
ngx-meta-json-ld.mjs 370 bytes (370B) 368 bytes (368B) .54%: 2 bytes (2B)
ngx-meta-open-graph.mjs 1263 bytes (1.3KiB) 1263 bytes (1.3KiB) No change
ngx-meta-routing.mjs 641 bytes (641B) 641 bytes (641B) No change
ngx-meta-standard.mjs 1089 bytes (1.1KiB) 1087 bytes (1.1KiB) .18%: 2 bytes (2B)
ngx-meta-twitter-card.mjs 645 bytes (645B) 645 bytes (645B) No change
Total 7339 bytes (7.2KiB) 7259 bytes (7.1KiB) 1.10%: 80 bytes (80B)

Copy link

github-actions bot commented Oct 9, 2024

📦 Bundle size (Angular v18)

Git ref: e8b541b840651c10428988372d499f3fc036775d

Module file Size Base size Difference
ngx-meta-core.mjs 2896 bytes (2.9KiB) 2812 bytes (2.8KiB) 2.98%: 84 bytes (84B)
ngx-meta-json-ld.mjs 226 bytes (226B) 224 bytes (224B) .89%: 2 bytes (2B)
ngx-meta-open-graph.mjs 984 bytes (984B) 984 bytes (984B) No change
ngx-meta-routing.mjs 449 bytes (449B) 449 bytes (449B) No change
ngx-meta-standard.mjs 992 bytes (992B) 990 bytes (990B) .20%: 2 bytes (2B)
ngx-meta-twitter-card.mjs 514 bytes (514B) 514 bytes (514B) No change
Total 6061 bytes (6.0KiB) 5973 bytes (5.9KiB) 1.47%: 88 bytes (88B)

Copy link

🎉 This PR is included in version 1.0.0-beta.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant