-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Conversation
Run & review this pull request in StackBlitz Codeflow. |
"peerDependenciesMeta": { | ||
"acorn": { | ||
"optional": true | ||
} |
There was a problem hiding this comment.
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.
// 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' |
There was a problem hiding this comment.
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
patches/sirv@2.0.4.patch
Outdated
export default function(dir?: string, opts?: Options): RequestHandler; No newline at end of file | ||
export default function(dir?: string, opts?: Options): RequestHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file actually didn't have any change, except this new line, which latest pnpm patch
seems to start adding.
/ecosystem-ci run |
📝 Ran ecosystem CI on
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other parts looks good to me 👍
Co-authored-by: 翠 / green <green@sapphi.red>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Description
This PR updates
sirv
andmrmime
, which updates the javascript mime type totext/javascript
(fromapplication/javascript
). I figured to update it everywhere in our codebase too for consistency.Note that the HTML spec recommends using
text/javascript
instead.application/javascript
is deprecated.Additionally mrmime v2: https://github.com/lukeed/mrmime/releases/tag/v2.0.0
Additional context
Needs to run ecosystem in case there's significant breakage to the changed mime type for js and mjs files.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).