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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

29 changes: 18 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"@octokit/plugin-retry": "^7.1.1",
"@octokit/plugin-throttling": "^9.3.1",
"glob": "^11.0.0",
"mime": "^3.0.0"
"mime": "^4.0.4"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.12",
"@types/mime": "^3.0.1",
"@types/mime": "^4.0.0",
"@types/node": "^20.14.11",
"@vercel/ncc": "^0.38.1",
"jest": "^29.3.1",
Expand Down
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>;
Expand Down Expand Up @@ -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 (
Expand Down
Loading