diff --git a/package.json b/package.json index 6f8a82b490..c8a8d0b041 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,27 @@ }, "./dist/": "./dist/", "./icons": "./dist/esm/src/components/Icon/Icons/icons.js", - "./tokens": "./dist/tokens/tokens.css", - "./storybookComponents": "./dist/storybook/index.js", "./interactionsTests": "./dist/esm/src/tests/interactionsTests.js", "./testIds": "./dist/esm/src/tests/testIds.js", + "./storybookComponents": "./dist/storybook/index.js", + "./tokens": "./dist/tokens/tokens.css", "./mockedClassNames": { "import": "./dist/mocked_classnames_esm/src/index.js" } }, + "typesVersions": { + "*": { + "icons": [ + "./dist/esm/components/Icon/Icons/index.d.ts" + ], + "interactionsTests": [ + "./dist/esm/tests/interactions-utils.d.ts" + ], + "testIds": [ + "./dist/esm/tests/test-ids-utils.d.ts" + ] + } + }, "scripts": { "test": "jest", "test:stories": "testing=storybook TEST_END_FILES=jest-story jest", diff --git a/scripts/build-types.js b/scripts/build-types.js index 95de1033db..eeae756541 100755 --- a/scripts/build-types.js +++ b/scripts/build-types.js @@ -3,6 +3,4 @@ const { createFoldersIfNotExist, buildComponentsTypesIndexFile } = require("./build-utils"); createFoldersIfNotExist(); -// we create new d.ts index file but still not give reference to it in our package.json file -// until we finish to migrate all the components to typescript buildComponentsTypesIndexFile(); diff --git a/scripts/build-utils.js b/scripts/build-utils.js index e2677b0d46..798316baf5 100644 --- a/scripts/build-utils.js +++ b/scripts/build-utils.js @@ -46,8 +46,8 @@ function buildComponentsTypesIndexFile() { buildComponentExport(name, `./types/${path}`) ); - const exportsWithJavasript = Object.keys(publishedJSComponents).map(name => buildExportToComponentWithoutType(name)); - convertExportsToFile(exportsWithTypescript.concat(exportsWithJavasript), "types.d.ts"); + const exportsWithJavascript = Object.keys(publishedJSComponents).map(name => buildExportToComponentWithoutType(name)); + convertExportsToFile(exportsWithTypescript.concat(exportsWithJavascript), "types.d.ts"); } function buildStorybookComponentsIndexFile() { diff --git a/webpack/published-ts-components.js b/webpack/published-ts-components.js index db4a8ebb88..7855d84fef 100644 --- a/webpack/published-ts-components.js +++ b/webpack/published-ts-components.js @@ -103,8 +103,6 @@ const publishedTSComponents = { useActiveDescendantListFocus: "hooks/useActiveDescendantListFocus", useListenFocusTriggers: "hooks/useListenFocusTriggers", useSwitch: "hooks/useSwitch", - // Don't remove next line - // plop_marker:published-hooks useClickableProps: "hooks/useClickableProps/useClickableProps", useHover: "hooks/useHover/useHover" };