-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix!: allow leading slashes in file name #820
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
e8eba5e
to
b9ef7c1
Compare
allow interop with other languages and current storage files with leading slash
Both of those files have existing and unchanged copyrights... |
Thank you for digging into this and offering a fix! Having another chance to look at this after a couple of years (googleapis/google-cloud-node#2269), I think we might have taken the wrong approach earlier. Since |
@stephenplusplus I can easily update the PR. I was mainly concerned with backwards compatibility. Some people upgrading versions may be unable to retrieve previous storage without changing code (or end up with storage in both forms). Note that rolling back will also fix getFiles(). Shall I remove the slash stripping completely? |
I think we should remove it, yeah. Without worrying about backward compatibility (we can bump the major), would that be the most expected behavior from our library? |
I'll fix PR today. Good idea to bump version. |
… without options. This is a breaking change.
Codecov Report
@@ Coverage Diff @@
## master #820 +/- ##
==========================================
- Coverage 95.36% 95.36% -0.01%
==========================================
Files 11 11
Lines 1231 1230 -1
Branches 307 307
==========================================
- Hits 1174 1173 -1
Misses 29 29
Partials 28 28
Continue to review full report at Codecov.
|
For me the latest PR matches the expected behavior from your library. Let me know if I can make any additional changes or help out. Good idea to bump major version due to the nature of the change. Cheers. |
This is to upgrade the vulnerable `date-and-time` dependency. The latest version has the following breaking changes which are all okay: - automatically detect contentType if not provided (googleapis/nodejs-storage#1190) - drop keepAcl parameter in file copy (googleapis/nodejs-storage#1166) - drop support for node.js 8.x - allow leading slashes in file name (googleapis/nodejs-storage#820) - upgrade engines field to >=8.10.0 (googleapis/nodejs-storage#688)
This is to upgrade the vulnerable `axios` dependency. The latest version has the following breaking changes which are all okay: - automatically detect contentType if not provided (googleapis/nodejs-storage#1190) - drop keepAcl parameter in file copy (googleapis/nodejs-storage#1166) - drop support for node.js 8.x - allow leading slashes in file name (googleapis/nodejs-storage#820) - upgrade engines field to >=8.10.0 (googleapis/nodejs-storage#688)
This is to upgrade the vulnerable `axios` dependency. The latest version has the following breaking changes which are all okay: - automatically detect contentType if not provided (googleapis/nodejs-storage#1190) - drop keepAcl parameter in file copy (googleapis/nodejs-storage#1166) - drop support for node.js 8.x - allow leading slashes in file name (googleapis/nodejs-storage#820) - upgrade engines field to >=8.10.0 (googleapis/nodejs-storage#688)
This is to upgrade the vulnerable `date-and-time` dependency. The latest version has the following breaking changes which are all okay: - automatically detect contentType if not provided (googleapis/nodejs-storage#1190) - drop keepAcl parameter in file copy (googleapis/nodejs-storage#1166) - drop support for node.js 8.x - allow leading slashes in file name (googleapis/nodejs-storage#820) - upgrade engines field to >=8.10.0 (googleapis/nodejs-storage#688)
I am integrating with Google storage and the files already have a leading
/
. It is not possible with this package to load them. I am doing something like this now to be able to load files:I went this way to make it backwards compatible, but otherwise I can update the regex to take just one
/
, although that may be a breaking change for some clients.Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)