mime-types
mime-types copied to clipboard
application/javascript should be replaced with text/javascript
I note that the application/javascript was deprecated two years ago now, and should be replaced by text/javascript.
For more info, see,
- https://datatracker.ietf.org/doc/rfc9239/
- https://stackoverflow.com/questions/21098865/text-javascript-vs-application-javascript
- https://stackoverflow.com/questions/876561/when-serving-javascript-files-is-it-better-to-use-the-application-javascript-or
Happy to create a PR if this change would be accepted.
Oops, looks like this belongs in the mime-db repo first and then update this repo to pull the mime-db with fix. Please close/delete this.
Apologies
Remember to release the dependency update here as semver-major as this will break compatibility unless consumers carefully update their code. For example, when Node.js is used as a web server using this package, the mime type is exposed to middleware and outside clients and may be relied upon in all sorts security-sensitive ways.
Example: https://github.com/bitovi/testee/blob/v0.10.2/lib/host/coverage.js#L20-L32
Remember to release the dependency update here as semver-major as this will break compatibility unless consumers carefully update their code
@Krinkle mime-db content updates go out as minor-version releases.
(source)
@broofa Exactly. That's why this higher level package pins the version of that lower level library, to ensure it won't accidentally update, as that constitutes a breaking and semver-major at this level.
Yes, this pins so there are two decision points. The semver is tricky bc typically in both packages, the data is has not been considered in the semver, as the way in which data changes in fluid with standards and browsers and there can be a lot of changes. Usually only the javascript api of the module has been considered in whay type of semver bump it would be.
https://github.com/jshttp/mime-types/pull/126