overleaf / filestore

An API for CRUD operations on binary files stored in S3
GNU Affero General Public License v3.0
26 stars 28 forks source link

Move @google-cloud/storage to a dev dependency #129

Closed gh2k closed 4 years ago

gh2k commented 4 years ago

Description

@google-cloud/storage is no longer directly used by Filestore, and is instead pulled in by object-persistor which is pulling in a different version.

It's still used by the acceptance tests, so I've upgraded this and made it a dev dependency instead.

Review

It's already been tested with a canary deploy.

No hash downgrades in package-lock! :tada:

gh2k commented 4 years ago

OK, force-pushed because I removed it instead of making it a dev dependency.

gh2k commented 4 years ago

Thanks. Added to overleaf/object-persistor#7

gh2k commented 4 years ago

Updated object-persistor, and did the same move for the aws sdk.

gh2k commented 4 years ago

What do you think about installing object-persistor via tar-ball from a specific sha?

I think it's fine as-is. The commit sha is in the lockfile and it's easier to update this way.

das7pad commented 4 years ago

Installing the object-persistor from tar-ball removes the copy of aws-sdk :shrug:

``` dev-environment$ bin/run --no-deps filestore npm i --save https://github.com/overleaf/object-persistor/archive/8b8bc4b8d1e8b8aa3ca9245691d6ddd69d663d06.tar.gz npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN filestore-sharelatex@0.1.4 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) + @overleaf/object-persistor@1.0.0 removed 2 packages, updated 1 package and audited 820 packages in 3.604s 30 packages are looking for funding run `npm fund` for details found 25 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details dev-environment$ find filestore/node_modules/ -name aws-sdk filestore/node_modules/aws-sdk ```
gh2k commented 4 years ago

I would still prefer to go for ease-of-use rather than fighting the tools to save some space on the disk, tbh. I don't think it's a huge problem, and it makes it easier to update the dependency.