From 0934d277bcb8ac819cb8feb6ed4ed1d4092b937a Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Fri, 12 Jul 2024 15:53:51 -0700 Subject: [PATCH] fix: mime-db@1.53.0 --- README.md | 13 +++++++++++++ package.json | 2 +- test/test.js | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48d2fb4..222d2b5 100644 --- a/README.md +++ b/README.md @@ -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), diff --git a/package.json b/package.json index 96f1f60..39dbf1e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "repository": "jshttp/mime-types", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.53.0" }, "devDependencies": { "eslint": "8.33.0", diff --git a/test/test.js b/test/test.js index 0423b8f..56e2940 100644 --- a/test/test.js +++ b/test/test.js @@ -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 () {