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

BREAKING(path/unstable): move unstable overload of basename to unstable-basename #5957

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Sep 12, 2024

part of #5920

This PR moves the unstable overload of basename to unstable-basename

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.32%. Comparing base (d1f5a36) to head (1cf02dd).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
path/posix/unstable_basename.ts 90.00% 1 Missing ⚠️
path/windows/unstable_basename.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5957   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files         484      486    +2     
  Lines       39403    39425   +22     
  Branches     5837     5836    -1     
=======================================
+ Hits        37953    37976   +23     
+ Misses       1408     1407    -1     
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

path/basename.ts Outdated
*
* @param path Path to extract the name from.
* @param suffix Suffix to remove from extracted name.
*
* @returns The basename of the path.
*/
export function basename(path: string | URL, suffix?: string): string;
export function basename(path: string | URL, suffix = ""): string {
export function basename(path: string, suffix?: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export function basename(path: string, suffix?: string): string {
export function basename(path: string, suffix = ""): string {

Comment on lines 33 to 34
export function basename(path: string, suffix?: string): string {
assertArgs(path, suffix ?? "");
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto for the other functions

Suggested change
export function basename(path: string, suffix?: string): string {
assertArgs(path, suffix ?? "");
export function basename(path: string, suffix = ""): string {
assertArgs(path, suffix);

@kt3k kt3k merged commit ecd8a2e into denoland:main Sep 12, 2024
16 checks passed
@kt3k kt3k deleted the breaking-path-move-unstable-basename branch September 12, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants