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

fix: update javascript mime type to text/javascript #15427

Merged
merged 3 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@types/micromatch": "^4.0.6",
"@types/node": "^20.10.4",
"@types/picomatch": "^2.3.3",
"@types/semver": "^7.5.6",
"@types/sass": "~1.43.1",
"@types/semver": "^7.5.6",
"@types/stylus": "^0.48.42",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^6.14.0",
Expand Down Expand Up @@ -118,13 +118,18 @@
"acorn-walk": {
"peerDependencies": {
"acorn": "*"
},
"peerDependenciesMeta": {
"acorn": {
"optional": true
}
Comment on lines +122 to +125
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this since Vitest v1 relies on acorn-walk and has this peer dep warning. The acorn dep in acorn-walk is only used for types.

}
}
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"sirv@2.0.3": "patches/sirv@2.0.3.patch",
"dotenv-expand@10.0.0": "patches/dotenv-expand@10.0.0.patch"
"dotenv-expand@10.0.0": "patches/dotenv-expand@10.0.0.patch",
"sirv@2.0.4": "patches/sirv@2.0.4.patch"
},
"peerDependencyRules": {
"allowedVersions": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"magic-string": "^0.30.5",
"micromatch": "^4.0.5",
"mlly": "^1.4.2",
"mrmime": "^1.0.1",
"mrmime": "^2.0.0",
"okie": "^1.0.1",
"open": "^8.4.2",
"parse5": "^7.1.2",
Expand All @@ -131,7 +131,7 @@
"resolve.exports": "^2.0.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-license": "^3.2.0",
"sirv": "^2.0.3",
"sirv": "^2.0.4",
"source-map-support": "^0.5.21",
"strip-ansi": "^7.1.0",
"strip-literal": "^1.3.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/vite/src/node/plugins/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ export function registerCustomMime(): void {
mrmime.mimes['ico'] = 'image/x-icon'
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac
mrmime.mimes['flac'] = 'audio/flac'
// mrmime and mime-db is not released yet: https://github.com/jshttp/mime-db/commit/c9242a9b7d4bb25d7a0c9244adec74aeef08d8a1
mrmime.mimes['aac'] = 'audio/aac'
// https://wiki.xiph.org/MIME_Types_and_File_Extensions#.opus_-_audio/ogg
mrmime.mimes['opus'] = 'audio/ogg'
Comment on lines -60 to -63
Copy link
Member Author

Choose a reason for hiding this comment

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

Already included in new mrmime version

// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
mrmime.mimes['eot'] = 'application/vnd.ms-fontobject'
}
Expand Down
2 changes: 1 addition & 1 deletion patches/[email protected] → patches/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ index c05040fc6ec504a1828a7badd39f669981acd0ee..e9597e8b5bf24613a09565f0e13024ae
+ shouldServe?: (absoluteFilePath: string) => void;
}

export default function(dir?: string, opts?: Options): RequestHandler;
export default function(dir?: string, opts?: Options): RequestHandler;
2 changes: 1 addition & 1 deletion playground/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"preview": "vite preview"
},
"devDependencies": {
"sirv": "^2.0.3"
"sirv": "^2.0.4"
}
}
40 changes: 24 additions & 16 deletions pnpm-lock.yaml

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

Loading