Skip to content

Commit

Permalink
fix: mime-db@1.53.0 (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd committed Aug 23, 2024
1 parent d0164d1 commit 540d9f3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ This is a [Node.js](https://nodejs.org/en/) module available through the
$ npm install mime-types
```

## Note on MIME Type Data and Semver

This package considers the programmatic api as the semver compatibility. Additionally, the package which provides the MIME data
for this package (`mime-db`) *also* considers it's programmatic api as the semver contract. This means the MIME type resolution is *not* considered
in the semver bumps.

In the past the version of `mime-db` was pinned to give two decision points when adopting MIME data changes. This is no longer true. We still update the
`mime-db` package here as a `minor` release when necessary, but will use a `^` range going forward. This means that if you want to pin your `mime-db` data
you will need to do it in your application. While this expectation was not set in docs until now, it is how the pacakge operated, so we do not feel this is
a breaking change.

If you wish to pin your `mime-db` version you can do that with overrides via your package manager of choice. See their documentation for how to correctly configure that.

## Adding Types

All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"repository": "jshttp/mime-types",
"dependencies": {
"mime-db": "1.52.0"
"mime-db": "^1.53.0"
},
"devDependencies": {
"eslint": "8.33.0",
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('mimeTypes', function () {
})

it('should return mime type for ".js"', function () {
assert.strictEqual(mimeTypes.lookup('.js'), 'application/javascript')
assert.strictEqual(mimeTypes.lookup('.js'), 'text/javascript')
})

it('should return mime type for ".json"', function () {
Expand Down

0 comments on commit 540d9f3

Please sign in to comment.