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

Simplify lodash dependencies #1091

Merged
merged 23 commits into from
Oct 12, 2023
Merged

Simplify lodash dependencies #1091

merged 23 commits into from
Oct 12, 2023

Conversation

mansona
Copy link
Contributor

@mansona mansona commented Oct 10, 2023

The need for using the dedicated lodash.assign style dependencies has long since passed, so I have updated all uses to import from the one module and use the path import like this import assign from 'lodash/assign'

I have compared the output of the dist folder before and after this change and there are no differences for esm and cjs but umd has shaved off .5 MB from its size 😱

Master:

➜  miragejs git:(master) ls -l dist 
total 4776
-rw-r--r--  1 mansona  staff   223153 Oct 10 12:10 mirage-cjs.js
-rw-r--r--  1 mansona  staff   404879 Oct 10 12:10 mirage-cjs.js.map
-rw-r--r--  1 mansona  staff   269963 Oct 10 12:10 mirage-esm.js
-rw-r--r--  1 mansona  staff   403613 Oct 10 12:10 mirage-esm.js.map
-rw-r--r--  1 mansona  staff  1136772 Oct 10 12:10 mirage-umd.js
➜  miragejs git:(master) ls -lh dist
total 4776
-rw-r--r--  1 mansona  staff   218K Oct 10 12:10 mirage-cjs.js
-rw-r--r--  1 mansona  staff   395K Oct 10 12:10 mirage-cjs.js.map
-rw-r--r--  1 mansona  staff   264K Oct 10 12:10 mirage-esm.js
-rw-r--r--  1 mansona  staff   394K Oct 10 12:10 mirage-esm.js.map
-rw-r--r--  1 mansona  staff   1.1M Oct 10 12:10 mirage-umd.js

This branch:

➜  miragejs git:(lodash) ls -l dist
total 3904
-rw-r--r--  1 mansona  staff  223153 Oct 10 12:11 mirage-cjs.js
-rw-r--r--  1 mansona  staff  404879 Oct 10 12:11 mirage-cjs.js.map
-rw-r--r--  1 mansona  staff  269963 Oct 10 12:11 mirage-esm.js
-rw-r--r--  1 mansona  staff  403613 Oct 10 12:11 mirage-esm.js.map
-rw-r--r--  1 mansona  staff  690701 Oct 10 12:11 mirage-umd.js
➜  miragejs git:(lodash) ls -lh dist
total 3904
-rw-r--r--  1 mansona  staff   218K Oct 10 12:11 mirage-cjs.js
-rw-r--r--  1 mansona  staff   395K Oct 10 12:11 mirage-cjs.js.map
-rw-r--r--  1 mansona  staff   264K Oct 10 12:11 mirage-esm.js
-rw-r--r--  1 mansona  staff   394K Oct 10 12:11 mirage-esm.js.map
-rw-r--r--  1 mansona  staff   675K Oct 10 12:11 mirage-umd.js

Copy link
Collaborator

@IanVS IanVS left a comment

Choose a reason for hiding this comment

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

Thanks for this, and for double-checking the built size of the results!

@IanVS IanVS merged commit 27cdfb5 into miragejs:master Oct 12, 2023
6 checks passed
smeijer pushed a commit to magicbell-io/magicbell-js that referenced this pull request Nov 21, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [miragejs](https://togithub.com/miragejs/miragejs) | [`^0.1.47` ->
`^0.1.48`](https://renovatebot.com/diffs/npm/miragejs/0.1.47/0.1.48) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/miragejs/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/miragejs/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/miragejs/0.1.47/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/miragejs/0.1.47/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>miragejs/miragejs (miragejs)</summary>

###
[`v0.1.48`](https://togithub.com/miragejs/miragejs/releases/tag/v0.1.48)

[Compare
Source](https://togithub.com/miragejs/miragejs/compare/v0.1.47...v0.1.48)

#### What's Changed

πŸš€ **Enhancements**

- Add Middleware support via `server.middleware = [/*...*/]` by
[@&#8203;osi-jehrlich](https://togithub.com/osi-jehrlich) in
[miragejs/miragejs#1089
- Allow for keyForId and valueForId on the serializer by
[@&#8203;cah-brian-gantzler](https://togithub.com/cah-brian-gantzler) in
[miragejs/miragejs#1086

πŸ› **Bugfixes**

- Don't require testConfig for timing to respect environment. by
[@&#8203;rmjohnson-olo](https://togithub.com/rmjohnson-olo) in
[miragejs/miragejs#1080
- Update typing for `Request.queryParams` by
[@&#8203;jasikpark](https://togithub.com/jasikpark) in
[miragejs/miragejs#1027

🏠 **Internal**

- Simplify lodash dependencies by
[@&#8203;mansona](https://togithub.com/mansona) in
[miragejs/miragejs#1091

#### New Contributors

- [@&#8203;jasikpark](https://togithub.com/jasikpark) made their first
contribution in
[miragejs/miragejs#1027
- [@&#8203;rmjohnson-olo](https://togithub.com/rmjohnson-olo) made their
first contribution in
[miragejs/miragejs#1080
- [@&#8203;osi-jehrlich](https://togithub.com/osi-jehrlich) made their
first contribution in
[miragejs/miragejs#1089

**Full Changelog**:
miragejs/miragejs@v0.1.47...v0.1.48

</details>

---

### Configuration

πŸ“… **Schedule**: Branch creation - "before 5am every weekday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

πŸ”• **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/magicbell-io/magicbell-js).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@mansona mansona deleted the lodash branch November 23, 2023 10:06
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.

None yet

2 participants