From 945a5a9cb5c6db3565308dab1bc89ce50ca0222e Mon Sep 17 00:00:00 2001 From: David Baynard Date: Fri, 18 Feb 2022 23:33:08 +0000 Subject: [PATCH] Set type: module in package.json Node documentation recommends package authors explicitly set `"type": "module"`. Without this, sveltekit (and possibly other tooling) incorrectly treats the ES modules as CommonJS. --- js-packages/@fortawesome/fontawesome-common-types/package.json | 1 + js-packages/@fortawesome/fontawesome-free/package.json | 1 + js-packages/@fortawesome/fontawesome-svg-core/package.json | 1 + js-packages/@fortawesome/free-brands-svg-icons/package.json | 1 + js-packages/@fortawesome/free-regular-svg-icons/package.json | 1 + js-packages/@fortawesome/free-solid-svg-icons/package.json | 1 + 6 files changed, 6 insertions(+) diff --git a/js-packages/@fortawesome/fontawesome-common-types/package.json b/js-packages/@fortawesome/fontawesome-common-types/package.json index 2020e9dc2..7d1e3fab4 100644 --- a/js-packages/@fortawesome/fontawesome-common-types/package.json +++ b/js-packages/@fortawesome/fontawesome-common-types/package.json @@ -51,6 +51,7 @@ "name": "@fortawesome/fontawesome-common-types", "license": "MIT", "types": "./index.d.ts", + "type": "module", "scripts": { "postinstall": "node attribution.js" } diff --git a/js-packages/@fortawesome/fontawesome-free/package.json b/js-packages/@fortawesome/fontawesome-free/package.json index 6c33ce2e4..fdf4feb6b 100644 --- a/js-packages/@fortawesome/fontawesome-free/package.json +++ b/js-packages/@fortawesome/fontawesome-free/package.json @@ -52,6 +52,7 @@ "main": "js/fontawesome.js", "style": "css/fontawesome.css", "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", + "type": "module", "scripts": { "postinstall": "node attribution.js" } diff --git a/js-packages/@fortawesome/fontawesome-svg-core/package.json b/js-packages/@fortawesome/fontawesome-svg-core/package.json index 2167c1efd..cb6616c94 100644 --- a/js-packages/@fortawesome/fontawesome-svg-core/package.json +++ b/js-packages/@fortawesome/fontawesome-svg-core/package.json @@ -92,6 +92,7 @@ "./index.js", "./index.es.js" ], + "type": "module", "scripts": { "postinstall": "node attribution.js" } diff --git a/js-packages/@fortawesome/free-brands-svg-icons/package.json b/js-packages/@fortawesome/free-brands-svg-icons/package.json index b43b491dd..3709ee992 100644 --- a/js-packages/@fortawesome/free-brands-svg-icons/package.json +++ b/js-packages/@fortawesome/free-brands-svg-icons/package.json @@ -75,6 +75,7 @@ }, "./*": "./*.js" }, + "type": "module", "scripts": { "postinstall": "node attribution.js" } diff --git a/js-packages/@fortawesome/free-regular-svg-icons/package.json b/js-packages/@fortawesome/free-regular-svg-icons/package.json index c93634ea3..88f7ffe4c 100644 --- a/js-packages/@fortawesome/free-regular-svg-icons/package.json +++ b/js-packages/@fortawesome/free-regular-svg-icons/package.json @@ -75,6 +75,7 @@ }, "./*": "./*.js" }, + "type": "module", "scripts": { "postinstall": "node attribution.js" } diff --git a/js-packages/@fortawesome/free-solid-svg-icons/package.json b/js-packages/@fortawesome/free-solid-svg-icons/package.json index 862a547e6..7c2ef7a31 100644 --- a/js-packages/@fortawesome/free-solid-svg-icons/package.json +++ b/js-packages/@fortawesome/free-solid-svg-icons/package.json @@ -75,6 +75,7 @@ }, "./*": "./*.js" }, + "type": "module", "scripts": { "postinstall": "node attribution.js" }