From e0b2a3e13561e986676a2c05b5612a8f688ca5b0 Mon Sep 17 00:00:00 2001 From: "Dan Ryan (GitHub Noreply Key)" Date: Tue, 30 Aug 2022 15:55:42 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20support=20.mjs=20files=20as=20text/?= =?UTF-8?q?javascript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d3ploy/d3ploy.py | 4 ++-- tests/files/js/sample.mjs | 3 +++ tests/test.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tests/files/js/sample.mjs diff --git a/d3ploy/d3ploy.py b/d3ploy/d3ploy.py index 21681ee..7df27b5 100755 --- a/d3ploy/d3ploy.py +++ b/d3ploy/d3ploy.py @@ -24,7 +24,7 @@ from colorama import init as colorama_init from tqdm import tqdm -VERSION = "4.1.4" +VERSION = "4.1.5" VALID_ACLS = [ "private", @@ -57,7 +57,7 @@ "image/x-icon": [".ico", ".cur"], "text/css": [".css"], "text/html": [".html", ".htm"], - "text/javascript": [".js"], + "text/javascript": [".js", ".mjs"], "text/plain": [".txt"], "video/webm": [".webm"], } diff --git a/tests/files/js/sample.mjs b/tests/files/js/sample.mjs new file mode 100644 index 0000000..fbea869 --- /dev/null +++ b/tests/files/js/sample.mjs @@ -0,0 +1,3 @@ +(function () { + console.log("Hello!"); +})(); diff --git a/tests/test.py b/tests/test.py index 905e1a8..4e21716 100644 --- a/tests/test.py +++ b/tests/test.py @@ -52,6 +52,7 @@ "tests/files/img/f617c7af7f36296a37ddb419b828099c.gif", "tests/files/img/http.svg", "tests/files/js/sample.js", + "tests/files/js/sample.mjs", "tests/files/sample.json", "tests/files/sample.xml", ] @@ -77,6 +78,7 @@ ("img/http.svg", "image/svg+xml"), ("html/index.html", "text/html"), ("js/sample.js", "text/javascript"), + ("js/sample.mjs", "text/javascript"), ("sample.json", "application/json"), ("sample.xml", "application/xml"), ]