From b4bb8c93c93a41b24c8026d3db84bd475a26449e Mon Sep 17 00:00:00 2001 From: TitanKuzmich Date: Mon, 23 Dec 2024 12:24:49 +0300 Subject: [PATCH] feat(sdds-serv/cs): fix typings for emotion and styled-components --- packages/sdds-cs/emotion/package.json | 2 +- packages/sdds-cs/package.json | 14 +++++--------- packages/sdds-serv/emotion/package.json | 2 +- packages/sdds-serv/package.json | 9 +++++---- packages/sdds-serv/styled-components/package.json | 2 +- packages/sdds-serv/tsconfig.json | 1 - 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/packages/sdds-cs/emotion/package.json b/packages/sdds-cs/emotion/package.json index 0e8061e06b..df850ecf21 100644 --- a/packages/sdds-cs/emotion/package.json +++ b/packages/sdds-cs/emotion/package.json @@ -1,5 +1,5 @@ { "module": "es/index.js", "main": "cjs/index.js", - "types": "../types/index.d.ts" + "types": "../index.d.ts" } diff --git a/packages/sdds-cs/package.json b/packages/sdds-cs/package.json index f3f2abc8a2..9e34b452c9 100644 --- a/packages/sdds-cs/package.json +++ b/packages/sdds-cs/package.json @@ -30,11 +30,6 @@ "import": "./es/index.js", "types": "./index.d.ts" }, - "./styled-components": { - "require": "./styled-components/cjs/index.js", - "import": "./styled-components/es/index.js", - "types": "./index.d.ts" - }, "./emotion": { "require": "./emotion/cjs/index.js", "import": "./emotion/es/index.js", @@ -124,9 +119,10 @@ "build:styled-components": "npm run build:styled-components:esm && npm run build:styled-components:cjs", "build:styled-components:cjs": "BABEL_ENV=cjs SC_NAMESPACE=sdds-srvc babel ./src --out-dir . --extensions .ts,.tsx", "build:styled-components:esm": "BABEL_ENV=esm SC_NAMESPACE=sdds-srvc babel ./src --out-dir ./es --extensions .ts,.tsx", - "postbuild:styled-components": "npm run generate:typings", - "postbuild:emotion": "rm -rf src-emotion && npm run generate:typings", - "generate:typings": "tsc --outDir . --emitDeclarationOnly", + "postbuild:styled-components": "rm -rf src-sc", + "postbuild:emotion": "rm -rf src-emotion", + "remove:typings": "rm -rf components/**/*.d.ts && rm -f index.d.ts && rm -f mixins/index.d.ts && rm -f tokens/index.d.ts", + "generate:typings": "npm run remove:typings && tsc --outDir . --emitDeclarationOnly", "storybook": "storybook dev -p ${PORT:-7007} -c .storybook", "prestorybook:emotion": "npm run prebuild:emotion", "storybook:emotion": "USE_EMOTION_COMPONENTS=true storybook dev -p ${PORT:-7002} -c .storybook", @@ -141,7 +137,7 @@ "src/**/*stories.tsx", "src/**/*perftest.tsx" ], - "atLeast": 99.96 + "atLeast": 99.94 }, "contributors": [ "Vasiliy Loginevskiy", diff --git a/packages/sdds-serv/emotion/package.json b/packages/sdds-serv/emotion/package.json index 0e8061e06b..df850ecf21 100644 --- a/packages/sdds-serv/emotion/package.json +++ b/packages/sdds-serv/emotion/package.json @@ -1,5 +1,5 @@ { "module": "es/index.js", "main": "cjs/index.js", - "types": "../types/index.d.ts" + "types": "../index.d.ts" } diff --git a/packages/sdds-serv/package.json b/packages/sdds-serv/package.json index 2a461d1eda..6fcdfc780a 100644 --- a/packages/sdds-serv/package.json +++ b/packages/sdds-serv/package.json @@ -126,9 +126,10 @@ "build:styled-components:esm": "BABEL_ENV=esm SC_NAMESPACE=sdds-srvc babel ./src --out-dir ./styled-components/es --extensions .ts,.tsx", "build:css": "BABEL_ENV=esm SC_NAMESPACE=sdds-srvc rollup -c", "postbuild:css": "rm -rf src-css", - "postbuild:styled-components": "npm run generate:typings", - "postbuild:emotion": "rm -rf src-emotion && npm run generate:typings", - "generate:typings": "tsc --outDir . --emitDeclarationOnly", + "postbuild:styled-components": "rm -rf src-sc", + "postbuild:emotion": "rm -rf src-emotion", + "remove:typings": "rm -rf components/**/*.d.ts && rm -f index.d.ts && rm -f mixins/index.d.ts && rm -f tokens/index.d.ts", + "generate:typings": "npm run remove:typings && tsc --outDir . --emitDeclarationOnly", "storybook": "npm run storybook:sc", "prestorybook:emotion": "npm run prebuild:emotion", "storybook:emotion": "USE_EMOTION_COMPONENTS=true storybook dev -p ${PORT:-7002} -c .storybook", @@ -143,7 +144,7 @@ "src/**/*stories.tsx", "src/**/*perftest.tsx" ], - "atLeast": 99.96 + "atLeast": 99.94 }, "contributors": [ "Vasiliy Loginevskiy", diff --git a/packages/sdds-serv/styled-components/package.json b/packages/sdds-serv/styled-components/package.json index 0e8061e06b..df850ecf21 100644 --- a/packages/sdds-serv/styled-components/package.json +++ b/packages/sdds-serv/styled-components/package.json @@ -1,5 +1,5 @@ { "module": "es/index.js", "main": "cjs/index.js", - "types": "../types/index.d.ts" + "types": "../index.d.ts" } diff --git a/packages/sdds-serv/tsconfig.json b/packages/sdds-serv/tsconfig.json index fe6524ef3f..ff3d1483dc 100644 --- a/packages/sdds-serv/tsconfig.json +++ b/packages/sdds-serv/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowJs": false, "target": "ES5", "module": "CommonJS", "lib": ["dom", "dom.iterable", "esnext"],