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(deps): bump mime and @types/mime to v4 #475

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update mime import
Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 committed Jul 18, 2024
commit c3ffbd78af423b240490d3184dd707b277ad6405
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/github.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GitHub } from "@actions/github/lib/utils";
import { Config, isTag, releaseBody } from "./util";
import { statSync, readFileSync } from "fs";
import { getType } from "mime";
import mime from "mime";
import { basename } from "path";

type GitHub = InstanceType<typeof GitHub>;
@@ -136,7 +136,7 @@ export const asset = (path: string): ReleaseAsset => {
};

export const mimeOrDefault = (path: string): string => {
return getType(path) || "application/octet-stream";
return mime.getType(path) || "application/octet-stream";
};

export const upload = async (
Loading
Oops, something went wrong.