Skip to content

Commit 4343232

Browse files
committed
Upgrade mime to v4
Remove manual mime.define() calls as they're no longer needed Mime v4 handles MIME types with parameters correctly out of the box
1 parent 018e6da commit 4343232

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

package-lock.json

Lines changed: 23 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"jsdom": "^18.1.0",
8989
"json-source-map": "^0.6.1",
9090
"lodash": "^4.17.21",
91-
"mime": "^2.5.2",
91+
"mime": "^4.1.0",
9292
"mocha": "^9.1.3",
9393
"mongodb": "^6.19.0",
9494
"morgan": "^1.10.0",

src/archivist/recorder/repositories/git/dataMapper.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import mime from 'mime';
55
import Snapshot from '../../snapshot.js';
66
import Version from '../../version.js';
77

8-
mime.define({ 'text/markdown': ['md'] }, true); // ensure extension for markdown files is `.md` and not `.markdown`
9-
108
export const COMMIT_MESSAGE_PREFIXES = {
119
startTracking: 'First record of',
1210
extractOnly: 'Apply technical or declaration upgrade on',

src/archivist/recorder/repositories/git/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import Git from './git.js';
1515

1616
const fs = fsApi.promises;
1717

18-
mime.define({ 'text/markdown': ['md'] }, true); // ensure extension for markdown files is `.md` and not `.markdown`
19-
2018
export default class GitRepository extends RepositoryInterface {
2119
constructor({ path, author, publish, snapshotIdentiferTemplate }) {
2220
super();

0 commit comments

Comments
 (0)