FormidableLabs / FormidableLabs/serverless-jetpack

Feature/Bug/Research: Handle collapsed files in zip bundling.

Open
#109 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
281
Forks
14
PR merge metrics
No merged PRs in 30d

Description

If we have `../node_modules/foo` and `node_modules/foo` in files in a package, they get collapsed in the zip file as `node_modules/foo`. Multiple entries with `zipinfo` but only a single file when expanded on disk.

Task:

- [x] Research the situation to better understand what's going on.
- [x] Add option or something to flag detected collapsed files.

Remedies:

- [x] Potentially error out if detected. E.g., `custom.jetpack.collapsed.bail = true`
- [ ] Potentially (long shot) heuristically "fix" the problem.
- [ ] Option for "winners" if multiple detected. E.g.
```
custom:
jetpack:
collapsed:
resolutions:
# :
node_modules/lodash: ../node_modules/lodash
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.