jshttp / mime-db

Media Type Database
MIT License
1.09k stars 256 forks source link

Add some (mostly) MS-related extensions and types #335

Open ipetrouchtchak-fi opened 2 weeks ago

ipetrouchtchak-fi commented 2 weeks ago

Hi, could the following extensions and types be added in custom-types.json?

Bellow is the diff:

From 72cb0ea86260410a0947e69a34fb713509bebd45 Mon Sep 17 00:00:00 2001
From: Ivan P <114432443+ipetrouchtchak-fi@users.noreply.github.com>
Date: Tue, 27 Aug 2024 10:53:38 -0700
Subject: [PATCH] add some missing MS extensions and types

---
 src/custom-types.json | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/custom-types.json b/src/custom-types.json
index f95ffdf..c2e4de5 100644
--- a/src/custom-types.json
+++ b/src/custom-types.json
@@ -652,7 +652,12 @@
     ]
   },
   "image/pjpeg": {
-    "compressible": false
+    "compressible": false,
+    "extensions": ["jfif"],
+    "sources": [
+      "https://github.com/microsoft/referencesource/blob/master/System.Web/MimeMapping.cs#L212",
+      "https://mimetype.io/image/pjpeg"
+    ]
   },
   "image/png": {
     "compressible": false
@@ -710,7 +715,10 @@
   },
   "message/rfc822": {
     "compressible": true,
+    "extensions": ["mht", "mhtml"],
     "sources": [
+      "https://mimetype.io/message/rfc822",
+      "https://github.com/microsoft/referencesource/blob/master/System.Web/MimeMapping.cs#L235-L236",
       "http://en.wikipedia.org/wiki/MIME#Multipart_subtypes"
     ]
   },
@@ -949,5 +957,24 @@
     "sources": [
       "https://developer.mozilla.org/en-US/docs/Web/WebGL/Adding_2D_content_to_a_WebGL_context"
     ]
+  },
+  "application/onenote": {
+    "extensions": ["one", "onea"],
+    "sources": [
+      "https://github.com/microsoft/referencesource/blob/master/System.Web/MimeMapping.cs#L265-L266"
+    ]
+  },
+  "application/vnd.visio": {
+    "extensions": ["vsdx"],
+    "sources": [
+      "https://mimetype.io/application/vnd.visio",
+      "https://learn.microsoft.com/en-us/office/client-developer/visio/introduction-to-the-visio-file-formatvsdx"
+    ]
+  },
+  "application/vnd.ms-visio.viewer": {
+    "extensions": ["vsdx", "vtx"],
+    "sources": [
+      "https://github.com/microsoft/referencesource/blob/master/System.Web/MimeMapping.cs#L379"
+    ]
   }
 }
-- 
2.45.2.windows.1
wesleytodd commented 2 weeks ago

Hey! Any reason not to open this as a PR? If not, could you do so?

ipetrouchtchak-fi commented 2 weeks ago

Hey! Any reason not to open this as a PR? If not, could you do so?

@wesleytodd, I don't seem to have the proper access for it.

wesleytodd commented 2 weeks ago

You would need to fork to your personal account and open a PR from there.

ipetrouchtchak-fi commented 2 weeks ago

@wesleytodd, please review the changes: https://github.com/jshttp/mime-db/pull/336