-
Notifications
You must be signed in to change notification settings - Fork 632
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
deprecation(path): split off all constants into their own files and deprecate old names #4153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! However, I wonder whether it might be worth having a constants.ts
instead. That'd be 3 fewer files, and next-to-no added dependency cost. Doing so would require deprecating separator.ts
files. WDYT, @lino-levan and @kt3k?
I'm neutral on this. I'm curious to hear what @kt3k thinks. |
|
@lino-levan, are you able to reorient this PR to instead introduce |
Yup, let me do that right now. |
path/posix/separator.ts
Outdated
@@ -1,5 +1,11 @@ | |||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. | |||
// This module is browser compatible. | |||
|
|||
/** | |||
* @deprecated (will be removed in 1.0.0) Use "separator" in https://deno.land/std@$STD_VERSION/path/posix/constants.ts instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the IDE (deno lsp) can render $STD_VERSION
part as the corresponding version number, and this url notation can be confusing. How about just omitting the urls in deprecation notes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including URLs is fine if the @$STD_VERSION
portion is omitted. The documentation should be rendered fine if we also wrap the URL in a {@link <url>}
tag. E.g. the win32
export in path/mod.ts
renders correctly.
I've made some tweaks, Lino. Please tell me what you think.
The one thing remaining is moving any internal use of the deprecated constants to the new ones. Are you able to do this? |
Had no strong feelings either way. Didn't want to bikeshed on it so just picked one idea and ran with it. SGTM.
I really need to learn how those work. Thanks!
Picked 1.0.0 for same (lack of) reason as number 1. SGTM, thanks.
Busy tonight, I mentally made a note to do it, but then I forgot to. Will get to it tomorrow if you don't want to do it right now. |
No rush for now 🙂 |
…eaking change introduced by renaming delimiter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a couple of tweaks and fixes. Now, LGTM! I'll let Yoshiya do the final review.
export function common(paths: string[], sep: typeof SEP = SEP): string { | ||
export function common( | ||
paths: string[], | ||
sep: string = SEPARATOR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sidenote: I see no use case for this sep
argument. Ditto for the Windows version. Perhaps, it should be deprecated in another separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably work for another PR, but this makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice work!
Closes #4070.