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

chore: Update deps; fix STATUS_TEXT breaking change from 0.143.0 #650

Merged
merged 6 commits into from
Jun 12, 2022

Conversation

drashbot
Copy link
Contributor

@drashbot drashbot commented Jun 3, 2022

This pull request was auto-generated by GitHub Actions.

@drashbot drashbot added the Type: Chore Merging this pull request results in a patch version increment label Jun 3, 2022
@crookse
Copy link
Member

crookse commented Jun 10, 2022

@Guergeiro @ebebbington, i converted STATUS_TEXT back to a Map and exported the Map version from deps.ts. reason being denoland/deno_std#2297 changes STATUS_TEXT. open to suggestions. another option would be:

// deps.ts

export { Status, STATUS_TEXT } from "https://deno.land/std@0.143.0/http/http_status.ts";
// some_file.ts

import { Status, STATUS_TEXT } from "deps.ts";

function statusText(code: number): string {
  return STATUS_TEXT[code as unknown as Status];
}

idk which solution to go with. both are fugly imo. however, i would rather NOT change the Drash syntax (e.g., keep throw new Drash.Errors.HttpError(401) instead of Drash.Errors.HttpError(Status.Unauthorized))

@crookse crookse changed the title chore: Update deps chore: Update deps; fix STATUS_TEXT breaking change from 0.143.0 Jun 10, 2022
@crookse crookse changed the title chore: Update deps; fix STATUS_TEXT breaking change from 0.143.0 chore: Update deps; fix STATUS_TEXT breaking change from std@0.143.0 Jun 10, 2022
Copy link
Member

@Guergeiro Guergeiro left a comment

Choose a reason for hiding this comment

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

You know my feelings.

@drashbot drashbot changed the title chore: Update deps; fix STATUS_TEXT breaking change from std@0.143.0 chore: Update deps Jun 11, 2022
@crookse crookse changed the title chore: Update deps chore: Update deps; fix STATUS_TEXT breaking change from 0.143.0 Jun 12, 2022
@crookse crookse merged commit 260469a into main Jun 12, 2022
@crookse crookse deleted the update-deps branch June 12, 2022 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Chore Merging this pull request results in a patch version increment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants