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

feat(cli): add location data dir to deno info #10589

Merged
merged 23 commits into from
May 27, 2021

Conversation

crowlKats
Copy link
Member

closes #10585

@kt3k
Copy link
Member

kt3k commented May 13, 2021

The implementation and tests look good to me 👍

I'm a little worried about the word 'Location data'. Was that documented in our manual? What about 'Web Storage data location' as it only includes web storage data for now

@crowlKats
Copy link
Member Author

@kt3k maybe 'origin data' would be better?

@crowlKats
Copy link
Member Author

I changed it to origin data as it is a more fitting and less misleading name. Ideally the location_data dir in DENO_DIR should be renamed to origin_data as well, but since it would be breaking, i added a comment for 2.0

cli/flags.rs Outdated Show resolved Hide resolved
Co-authored-by: Nayeem Rahman <[email protected]>
Comment on lines +212 to 213
// TODO(@crowlKats): change to origin_data for 2.0
.join("location_data")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to consider this breaking? I feel like we provide cache paths in deno info so we can rename them while providing a stable handle, and this wasn't even in deno info yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

well renaming location_data would mean that users that have used local storage would lose their current data

Copy link
Member

Choose a reason for hiding this comment

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

I think we can still do this in 1.x - we add a "migration" that renames old to new. Lets do this in another PR though.

cli/flags.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

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

LGTM

cli/flags.rs Outdated Show resolved Hide resolved
Comment on lines +212 to 213
// TODO(@crowlKats): change to origin_data for 2.0
.join("location_data")
Copy link
Member

Choose a reason for hiding this comment

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

I think we can still do this in 1.x - we add a "migration" that renames old to new. Lets do this in another PR though.

cli/main.rs Outdated Show resolved Hide resolved
cli/main.rs Outdated Show resolved Hide resolved
crowlKats and others added 2 commits May 17, 2021 03:08
Co-authored-by: Luca Casonato <[email protected]>
Co-authored-by: Luca Casonato <[email protected]>
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

if location.is_some() {
println!(
"{} {:?}",
colors::bold("Local Storage:"),
Copy link
Member

Choose a reason for hiding this comment

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

nit: is this capitalization intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, as "Local Storage" is a proper noun

@kt3k kt3k added this to the 1.11.0 milestone May 19, 2021
@kt3k
Copy link
Member

kt3k commented May 27, 2021

@crowlKats Thank you for your contribution!

@kt3k kt3k merged commit b21fa78 into denoland:main May 27, 2021
@crowlKats crowlKats deleted the deno_info_location_data branch May 27, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno info should display the current path of the Local Storage file
4 participants