elastic / elastic/apm-agent-nodejs
drop "object.entries" transitive dep for smaller install size
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Install size is a (low prio) nit of mine. With coming lambda support, it may be more relevant, as the max size of all layers (uncompressed) is 250MB. Adding the agent should be as minimal as possible.
"object.entries" is used by:
```
% npm ls object.entries
elastic-apm-node@3.21.1
├─┬ elastic-apm-http-client@10.0.0
│ └─┬ breadth-filter@2.0.0
│ └── object.entries@1.1.4
└─┬ object-identity-map@1.0.2
└── object.entries@1.1.5
```
It has a big transitive dep `es-abstract` and we are getting two versions of that currently, which (not including deduplication) takes up 6.6M of space:
```
% cd breadth-filter
% npm install --prod
...
% cat package.json | json dependencies
{
"object.entries": "^1.0.4"
}
% du -sh node_modules
6.6M node_modules
```
`object.entries` is a shim for `Object.entries` that is no longer need as of node v7: https://node.green/#ES2017-features-Object-static-methods-Object-entries
(I'm sure there are other size savings we could find. This is just one I noticed in passing.)
I'm sure there are other
Contributor guide
Assessment
This issue has not been assessed yet.