Skip to content

firebase packages cause many duplicate tslib copies #3031

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

Closed
AviVahl opened this issue May 6, 2020 · 2 comments · Fixed by #3203
Closed

firebase packages cause many duplicate tslib copies #3031

AviVahl opened this issue May 6, 2020 · 2 comments · Fixed by #3203

Comments

@AviVahl
Copy link

AviVahl commented May 6, 2020

[REQUIRED] Describe your environment

  • Operating System version: Fedora 32
  • Browser version: Firefox 75
  • Firebase SDK version: 7.14.2
  • Firebase Product: 12 of them (auth, database, storage, etc)

[REQUIRED] Describe the problem

@firebase/app (and 11 others) specifies tslib without a caret in its package.json.

When a patch version gets released (like just now), other requests get upgraded, and firebase packages each has a duplicate older version.

Steps to reproduce:

mkdir bug
cd bug
npm init -y
npm i firebase typescript tslib

look in node_modules/@firebase/*/node_modules/tslib <--- duplicates! many of them!

Relevant Code:

https://github.com/firebase/firebase-js-sdk/blob/master/packages/app/package.json#L36
(and all other package.json files specifying dependencies).

Suggested solution

Avoid pinning versions. It blocks downstream users from receiving bug fixes and security updates until you release a new version containing said updates. It is also a reason for many duplicates and generally known to be de-duping killer.

The risk of downstream users breaking from a 3rd party update is much lower when projects use lock files. And these pinned versions only work for the first level, so 4th party dependencies can still potentially break, rendering the pinning approach useless. imho, it causes more harm than good, and should be used with caution (I usually use it as a temporary workaround, only when breaks occur and when upstream isn't responsive).

Thank you. Your work is much appreciated.

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@AviVahl
Copy link
Author

AviVahl commented Jun 10, 2020

Thanks!

@firebase firebase locked and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants