Skip to content
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: deprecated directory. prefix should be used instead #1370

Merged
merged 4 commits into from Jan 11, 2021

Conversation

shaffeeullah
Copy link
Contributor

Fixes #1343 🦕

@shaffeeullah shaffeeullah requested a review from a team December 23, 2020 18:20
@shaffeeullah shaffeeullah requested a review from a team as a code owner December 23, 2020 18:20
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Dec 23, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 23, 2020
@codecov
Copy link

codecov bot commented Dec 23, 2020

Codecov Report

Merging #1370 (c668f47) into master (2569510) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1370   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files          14       14           
  Lines       12108    12109    +1     
  Branches      524      524           
=======================================
+ Hits        11999    12000    +1     
  Misses        109      109           
Impacted Files Coverage Δ
src/bucket.ts 99.77% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2569510...c668f47. Read the comment docs.

src/bucket.ts Outdated
* @property {string} [directory] Filter results based on a directory name, or
* more technically, a "prefix".
* @deprecated @property {string} [directory] Filter results based on a directory name, or
* more technically, a "prefix". Deprecated. Use prefix instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note that directory uses delimiter='/' in case folks get confused.

Recommend including an example of using prefix and delimiter below to reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Frank, this example includes prefix and delimiter. Are you looking for something different?

src/bucket.ts Outdated
@@ -113,7 +113,7 @@ export interface EnableLoggingOptions {
export interface GetFilesOptions {
autoPaginate?: boolean;
delimiter?: string;
directory?: string;
directory?: string; //deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the recommended approach to declare deprecation in an interface? I don't see another example in the project that deprecates this way, and want to confirm.

@shaffeeullah shaffeeullah merged commit fae4c06 into master Jan 11, 2021
@shaffeeullah shaffeeullah deleted the shaffeeullah/deprecateDirectory branch January 11, 2021 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constant value delimiter for directory option for bucket.getFiles
2 participants