diff --git a/packages/article-converter/package.json b/packages/article-converter/package.json index 6b5aec0e9e..1a68263279 100644 --- a/packages/article-converter/package.json +++ b/packages/article-converter/package.json @@ -3,9 +3,10 @@ "version": "6.2.1", "description": "Transforms NDLA articles into extended html versions", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -46,7 +47,11 @@ "react-router-dom": ">= 6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "ebeb8a1d86cba369e1156719ebaecb58a6e2cdfc" } diff --git a/packages/button/package.json b/packages/button/package.json index 810fdda812..b59a6a79f1 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -3,9 +3,10 @@ "version": "12.0.38", "description": "Button component for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -39,7 +40,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/carousel/package.json b/packages/carousel/package.json index a95c2e2019..c23c757061 100644 --- a/packages/carousel/package.json +++ b/packages/carousel/package.json @@ -4,9 +4,10 @@ "description": "Carousel for NDLA", "license": "GPL-3.0", "sideEffects": false, - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -35,7 +36,11 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/core/package.json b/packages/core/package.json index 63d1f57977..35fb4c3dc0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,10 +3,11 @@ "version": "4.5.0", "description": "UI component library for NDLA.", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, - "types": "lib/index.d.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -35,7 +36,11 @@ "@emotion/react": "^11.10.4" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/dropdown-menu/package.json b/packages/dropdown-menu/package.json index 8143c590bf..2d99708597 100644 --- a/packages/dropdown-menu/package.json +++ b/packages/dropdown-menu/package.json @@ -3,9 +3,10 @@ "version": "1.0.31", "description": "Dropdown menu component for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -36,6 +37,10 @@ "react-dom": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" } } diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 7f1382bd2a..9cc12b224e 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -3,9 +3,10 @@ "version": "2.1.5", "description": "Collection of React hooks used by NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -35,6 +36,10 @@ "@ndla/util": "^4.0.4" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" } } diff --git a/packages/ndla-accordion/package.json b/packages/ndla-accordion/package.json index 9198b1de37..b31874d8f4 100644 --- a/packages/ndla-accordion/package.json +++ b/packages/ndla-accordion/package.json @@ -3,9 +3,10 @@ "version": "3.0.35", "description": "A simple accordion from NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -38,7 +39,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-audio-search/package.json b/packages/ndla-audio-search/package.json index 198daff807..d62fef4384 100644 --- a/packages/ndla-audio-search/package.json +++ b/packages/ndla-audio-search/package.json @@ -3,9 +3,10 @@ "version": "5.0.1", "description": "A simple library for searching for audio files from NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -39,7 +40,11 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-code/package.json b/packages/ndla-code/package.json index 312edc204d..777dbe82af 100644 --- a/packages/ndla-code/package.json +++ b/packages/ndla-code/package.json @@ -3,9 +3,10 @@ "version": "5.0.49", "description": "Code components for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -45,7 +46,11 @@ "@ndla/types-embed": "^4.1.1" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-editor/package.json b/packages/ndla-editor/package.json index 31b6c50013..64c1ac957f 100644 --- a/packages/ndla-editor/package.json +++ b/packages/ndla-editor/package.json @@ -3,9 +3,10 @@ "version": "5.0.50", "description": "Editor components for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "repository": { "type": "git", "url": "https://github.com/NDLANO/frontend-packages.git/ndla-editor/" @@ -39,7 +40,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-error-reporter/package.json b/packages/ndla-error-reporter/package.json index 83004dc5fa..df95c8b9e9 100644 --- a/packages/ndla-error-reporter/package.json +++ b/packages/ndla-error-reporter/package.json @@ -3,8 +3,9 @@ "version": "2.0.0", "description": "Error reporter for NDLA. Listens to window.onerror and sends client errors to Loggly.", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", + "type": "module", + "main": "src/index.js", + "module": "src/index.js", "repository": { "type": "git", "url": "https://github.com/NDLANO/frontend-packages.git/ndla-error-reporter/" @@ -29,6 +30,9 @@ "raven-js": "^3.22.3" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js" } } diff --git a/packages/ndla-forms/package.json b/packages/ndla-forms/package.json index 608c888533..6969ba266f 100644 --- a/packages/ndla-forms/package.json +++ b/packages/ndla-forms/package.json @@ -3,9 +3,10 @@ "version": "7.0.7", "description": "Forms components for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -45,7 +46,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-howto/package.json b/packages/ndla-howto/package.json index 123aebe476..57048c0609 100644 --- a/packages/ndla-howto/package.json +++ b/packages/ndla-howto/package.json @@ -3,9 +3,10 @@ "version": "4.1.89", "description": "Temporary how-to texts for production system", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -46,7 +47,11 @@ "react-router-dom": ">= 6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "ebeb8a1d86cba369e1156719ebaecb58a6e2cdfc" } diff --git a/packages/ndla-icons/action/package.json b/packages/ndla-icons/action/package.json index cd4ff4a5f8..e6f6f7227d 100644 --- a/packages/ndla-icons/action/package.json +++ b/packages/ndla-icons/action/package.json @@ -1,9 +1,13 @@ - { "name": "@ndla/icons/action", "private": true, - "main": "../lib/action/index.js", - "module": "../es/action/index.js", - "jsnext:main": "../es/action/index.js" + "main": "../src/action/index.ts", + "module": "../src/action/index.ts", + "types": "../src/action/index.ts", + "publishConfig": { + "main": "../lib/action/index.js", + "module": "../es/action/index.js", + "types": "../lib/action/index.d.ts" + } } - \ No newline at end of file + diff --git a/packages/ndla-icons/common/package.json b/packages/ndla-icons/common/package.json index 636a4c3b64..68fb616edb 100644 --- a/packages/ndla-icons/common/package.json +++ b/packages/ndla-icons/common/package.json @@ -1,9 +1,13 @@ - { "name": "@ndla/icons/common", "private": true, - "main": "../lib/common/index.js", - "module": "../es/common/index.js", - "jsnext:main": "../es/common/index.js" + "main": "../src/common/index.ts", + "module": "../src/common/index.ts", + "types": "../src/common/index.ts", + "publishConfig": { + "main": "../lib/common/index.js", + "module": "../es/common/index.js", + "types": "../lib/common/index.d.ts" + } } - \ No newline at end of file + diff --git a/packages/ndla-icons/contentType/package.json b/packages/ndla-icons/contentType/package.json index 37dbb2935a..b1f85733f5 100644 --- a/packages/ndla-icons/contentType/package.json +++ b/packages/ndla-icons/contentType/package.json @@ -1,9 +1,13 @@ - { "name": "@ndla/icons/contentType", "private": true, - "main": "../lib/contentType/index.js", - "module": "../es/contentType/index.js", - "jsnext:main": "../es/contentType/index.js" + "main": "../src/contentType/index.ts", + "module": "../src/contentType/index.ts", + "types": "../src/contentType/index.ts", + "publishConfig": { + "main": "../lib/contentType/index.js", + "module": "../es/contentType/index.js", + "types": "../lib/contentType/index.d.ts" + } } - \ No newline at end of file + diff --git a/packages/ndla-icons/editor/package.json b/packages/ndla-icons/editor/package.json index e660fd6661..1809bb26b5 100644 --- a/packages/ndla-icons/editor/package.json +++ b/packages/ndla-icons/editor/package.json @@ -1,9 +1,13 @@ - { "name": "@ndla/icons/editor", "private": true, - "main": "../lib/editor/index.js", - "module": "../es/editor/index.js", - "jsnext:main": "../es/editor/index.js" + "main": "../src/editor/index.ts", + "module": "../src/editor/index.ts", + "types": "../src/editor/index.ts", + "publishConfig": { + "main": "../lib/editor/index.js", + "module": "../es/editor/index.js", + "types": "../lib/editor/index.d.ts" + } } - \ No newline at end of file + diff --git a/packages/ndla-icons/licenses/package.json b/packages/ndla-icons/licenses/package.json index aeb2ce8993..4fc5f5804e 100644 --- a/packages/ndla-icons/licenses/package.json +++ b/packages/ndla-icons/licenses/package.json @@ -1,9 +1,13 @@ - { "name": "@ndla/icons/licenses", "private": true, - "main": "../lib/licenses/index.js", - "module": "../es/licenses/index.js", - "jsnext:main": "../es/licenses/index.js" + "main": "../src/licenses/index.ts", + "module": "../src/licenses/index.ts", + "types": "../src/licenses/index.ts", + "publishConfig": { + "main": "../lib/licenses/index.js", + "module": "../es/licenses/index.js", + "types": "../lib/licenses/index.d.ts" + } } - \ No newline at end of file + diff --git a/packages/ndla-icons/package.json b/packages/ndla-icons/package.json index 2b31899aec..4d879a0910 100644 --- a/packages/ndla-icons/package.json +++ b/packages/ndla-icons/package.json @@ -3,10 +3,11 @@ "version": "6.0.0", "description": "A package containing icons used in NDLA frontends", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, - "types": "lib/index.d.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -39,7 +40,11 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-image-search/package.json b/packages/ndla-image-search/package.json index dbe88de0e3..50777dde47 100644 --- a/packages/ndla-image-search/package.json +++ b/packages/ndla-image-search/package.json @@ -3,9 +3,10 @@ "version": "7.0.2", "description": "A simple library for searching images from NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -49,7 +50,11 @@ "react-router-dom": ">= 6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "ebeb8a1d86cba369e1156719ebaecb58a6e2cdfc" } diff --git a/packages/ndla-licenses/package.json b/packages/ndla-licenses/package.json index 27df882a72..6295c638e0 100644 --- a/packages/ndla-licenses/package.json +++ b/packages/ndla-licenses/package.json @@ -3,9 +3,10 @@ "version": "7.2.5", "description": "A simple library for retrieving license information for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -25,7 +26,11 @@ "es" ], "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-modal/package.json b/packages/ndla-modal/package.json index cf693fd935..1a115ea455 100644 --- a/packages/ndla-modal/package.json +++ b/packages/ndla-modal/package.json @@ -3,9 +3,10 @@ "version": "5.0.35", "description": "A smart Modal NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -37,7 +38,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-notion/package.json b/packages/ndla-notion/package.json index 612e4e68d1..ec13a3fe51 100644 --- a/packages/ndla-notion/package.json +++ b/packages/ndla-notion/package.json @@ -3,9 +3,10 @@ "version": "6.0.36", "description": "Notions and dictionary-notions for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "Types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -37,7 +38,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-pager/package.json b/packages/ndla-pager/package.json index 47f76d01e4..539d1dc089 100644 --- a/packages/ndla-pager/package.json +++ b/packages/ndla-pager/package.json @@ -3,9 +3,10 @@ "version": "3.0.0", "description": "Pager component for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -35,7 +36,11 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "module", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-tabs/package.json b/packages/ndla-tabs/package.json index f2ba44c2d4..92c4f41dc9 100644 --- a/packages/ndla-tabs/package.json +++ b/packages/ndla-tabs/package.json @@ -3,9 +3,10 @@ "version": "4.0.0", "description": "React Tabs component for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -36,7 +37,11 @@ "@radix-ui/react-tabs": "^1.0.4" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/ndla-tracker/package.json b/packages/ndla-tracker/package.json index 3924b18280..d765a01f78 100644 --- a/packages/ndla-tracker/package.json +++ b/packages/ndla-tracker/package.json @@ -3,9 +3,10 @@ "version": "5.0.6", "description": "A simple library for tracking NDLA applications", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -33,7 +34,11 @@ "react-router-dom": ">= 5.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "dependencies": { "@ndla/util": "^4.0.4", diff --git a/packages/ndla-ui/package.json b/packages/ndla-ui/package.json index b25fef69e1..7ad0793e38 100644 --- a/packages/ndla-ui/package.json +++ b/packages/ndla-ui/package.json @@ -3,9 +3,10 @@ "version": "50.12.1", "description": "UI component library for NDLA.", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -79,7 +80,11 @@ "webpack-cli": "^5.0.1" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "ebeb8a1d86cba369e1156719ebaecb58a6e2cdfc" } diff --git a/packages/ndla-video-search/package.json b/packages/ndla-video-search/package.json index 7d430fbc4c..ae0fd4d663 100644 --- a/packages/ndla-video-search/package.json +++ b/packages/ndla-video-search/package.json @@ -3,9 +3,10 @@ "version": "6.0.1", "description": "A simple library for searching NDLA videos", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -43,7 +44,11 @@ "@ndla/util": "^4.0.4" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/safelink/package.json b/packages/safelink/package.json index 48416a2529..df123cc504 100644 --- a/packages/safelink/package.json +++ b/packages/safelink/package.json @@ -3,8 +3,10 @@ "version": "5.0.0", "description": "SafeLink component for NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", + "type": "module", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -36,7 +38,11 @@ "react-router-dom": "^6.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/select/package.json b/packages/select/package.json index ff47b5f02d..25c36dc324 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -3,9 +3,10 @@ "version": "3.3.10", "description": "Select component library for NDLA.", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "main": "src/index.ts", + "module": "src/index.ts", + "types": "src/index.ts", + "type": "module", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -37,7 +38,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "f767a48efedffff1904be8bfb39097d6bc6eba6f" } diff --git a/packages/switch/package.json b/packages/switch/package.json index 5ec7040251..b6e1cd5e48 100644 --- a/packages/switch/package.json +++ b/packages/switch/package.json @@ -4,9 +4,10 @@ "description": "Switch button for NDLA", "license": "GPL-3.0", "sideEffects": false, - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", + "type": "module", "scripts": { "build": "node ../../scripts/build.js package", "build:types": "tsc -p tsconfig.build.json", @@ -36,7 +37,11 @@ "react-dom": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 662f452795..5ce189e82c 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -3,9 +3,10 @@ "version": "7.0.0", "description": "Tooltip component from NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "main": "src/index.ts", + "module": "src/index.ts", + "types": "src/index.ts", + "type": "module", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -37,7 +38,11 @@ "react-i18next": "^13.3.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" }, "gitHead": "c2e2628a2dddfcca03f25548474243ffcd13595e" } diff --git a/packages/types-embed/package.json b/packages/types-embed/package.json index bca18cafc8..aa95163e07 100644 --- a/packages/types-embed/package.json +++ b/packages/types-embed/package.json @@ -3,7 +3,8 @@ "version": "4.1.1", "description": "Types used for NDLA embeds", "license": "GPL-3.0", - "types": "lib/index.d.ts", + "types": "src/index.ts", + "type": "module", "scripts": { "build:types": "tsc -p tsconfig.build.json", "prepublish": "tsc -p tsconfig.build.json" @@ -27,6 +28,8 @@ "@ndla/types-taxonomy": "^1.0.22" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "types": "lib/index.d.ts" } } diff --git a/packages/typography/package.json b/packages/typography/package.json index d898f03c51..0b861b1fd0 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -3,9 +3,10 @@ "version": "0.4.14", "description": "Typography components library for NDLA.", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "types": "src/index.ts", + "main": "src/index.ts", + "module": "src/index.ts", + "type": "module", "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -34,6 +35,10 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "access": "public", + "type": "commonjs", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" } } diff --git a/packages/util/package.json b/packages/util/package.json index 31e68df287..7bf0277e17 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -3,9 +3,16 @@ "version": "4.0.4", "description": "Collection of util functions used by NDLA", "license": "GPL-3.0", - "main": "lib/index.js", - "module": "es/index.js", - "types": "lib/index.d.ts", + "types": "src/index.ts", + "main": "./src/index.ts", + "module": "./src/index.ts", + "type": "module", + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts" + } + }, "sideEffects": false, "scripts": { "build": "node ../../scripts/build.js package", @@ -22,6 +29,7 @@ ], "author": "ndla@knowit.no", "files": [ + "src", "lib", "es", "types" @@ -30,6 +38,10 @@ "react": ">= 16.8.0" }, "publishConfig": { - "access": "public" + "type": "commonjs", + "access": "public", + "main": "lib/index.js", + "module": "es/index.js", + "types": "lib/index.d.ts" } }