Commit f22c114
committed
minor #1303 Replace
This PR was squashed before being merged into the main branch.
Discussion
----------
Replace `pkg-up` by an inlined solution
[`pkg-up`](https://www.npmjs.com/package/pkg-up) is deprecated, and has been replaced by [`package-up`](https://www.npmjs.com/package/package-up). This one is more lightweight, but is only available as ESM format, which is not compatible with Encore.
So, I've dropped `pkg-up` and inlined `package-up` and its single dependency [`find-up-simple`](https://www.npmjs.com/package/find-up-simple), with some tests.
Removing `pkg-up` remove a lot of sub-dependencies aswell, which is better in term of security, but also in term of bandwidth and size on disk.
Here, you can see the impact without `pkg-up` and with `package-up`, we reduce the bandwidth consumption by ~500 GB (but note that our inlined solution is smaller than `package-up`):
```
Package size report
===================
Package info for "`@symfony`/[email protected]": 61 MB
Released: 2024-01-25 17:18:00.95 +0000 UTC (30w1d ago)
Downloads last week: 48,107 (32.02%)
Estimated traffic last week: 2.9 TB
Subdependencies: 634
Removed dependencies:
- [email protected]: 36 kB (0.05%)
Downloads last week: 6,317,196 (N/A% from 3.1.0)
Downloads last week from "`@symfony`/[email protected]": 48,107 (N/A%)
Traffic last week: N/A
Traffic from "`@symfony`/[email protected]": 2.9 TB (N/A%)
Subdependencies: 6 (0.94%)
Added dependencies:
+ [email protected]: 13 kB (0.02%)
Downloads last week: 31,071 (N/A% from 5.0.0)
Estimated traffic last week: N/A
Subdependencies: 1 (0.15%)
Estimated new statistics:
Package size: 61 MB → 51 MB (83.07%)
Subdependencies: 634 → 486 (-148)
Traffic with last week's downloads:
For current version: 2.9 TB → 2.4 TB (498 GB saved)
For all versions: 9.2 TB → 7.6 TB (1.6 TB saved)
```
Commits
-------
d9cfde3 Replace `pkg-up` by an inlined solutionpkg-up by an inlined solution (Kocal)File tree
6 files changed
+104
-38
lines changed- lib
- config
- utils
- test/utils
6 files changed
+104
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3786 | 3786 | | |
3787 | 3787 | | |
3788 | 3788 | | |
3789 | | - | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
3794 | | - | |
3795 | | - | |
3796 | 3789 | | |
3797 | 3790 | | |
3798 | 3791 | | |
| |||
4925 | 4918 | | |
4926 | 4919 | | |
4927 | 4920 | | |
4928 | | - | |
4929 | | - | |
4930 | | - | |
4931 | | - | |
4932 | | - | |
4933 | | - | |
4934 | | - | |
4935 | | - | |
4936 | 4921 | | |
4937 | 4922 | | |
4938 | 4923 | | |
| |||
5444 | 5429 | | |
5445 | 5430 | | |
5446 | 5431 | | |
5447 | | - | |
| 5432 | + | |
5448 | 5433 | | |
5449 | 5434 | | |
5450 | 5435 | | |
| |||
5465 | 5450 | | |
5466 | 5451 | | |
5467 | 5452 | | |
5468 | | - | |
5469 | | - | |
5470 | | - | |
5471 | | - | |
5472 | | - | |
5473 | | - | |
5474 | | - | |
5475 | 5453 | | |
5476 | 5454 | | |
5477 | 5455 | | |
| |||
5543 | 5521 | | |
5544 | 5522 | | |
5545 | 5523 | | |
5546 | | - | |
5547 | | - | |
5548 | | - | |
5549 | | - | |
5550 | | - | |
5551 | 5524 | | |
5552 | 5525 | | |
5553 | 5526 | | |
| |||
5663 | 5636 | | |
5664 | 5637 | | |
5665 | 5638 | | |
5666 | | - | |
5667 | | - | |
5668 | | - | |
5669 | | - | |
5670 | | - | |
5671 | | - | |
5672 | | - | |
5673 | 5639 | | |
5674 | 5640 | | |
5675 | 5641 | | |
| |||
0 commit comments