Skip to content

Commit

Permalink
fix: icons, interactionsTests, testIds types exports (#1369)
Browse files Browse the repository at this point in the history
* Remove unrelevant comments

* fix: <Text> in published-ts-components.js

* Refactoring

* Fix icons, interactionsTests, testIds types export via typesVersions
  • Loading branch information
SergeyRoyt committed Jun 28, 2023
1 parent c40b9fb commit 7078fa3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions scripts/build-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
4 changes: 2 additions & 2 deletions scripts/build-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions webpack/published-ts-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,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"
};
Expand Down

0 comments on commit 7078fa3

Please sign in to comment.