diff --git a/package-lock.json b/package-lock.json index 1fae616f5..246eb674d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,7 +86,7 @@ "source-map-explorer": "^2.5.3", "stylelint": "^15.11.0", "ts-jest": "^29.1.5", - "typescript": "^5.4.3" + "typescript": "^5.5.3" }, "peerDependencies": { "prop-types": "^15.8.1", @@ -25415,9 +25415,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 85ddca59b..042faf554 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "lint:other": "npm run prettier -- --check", "prettier": "prettier '**/*.{json,yaml,yml,md}'", "unimported": "npx unimported --no-cache", - "package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist/src", + "package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist", "test": "react-app-rewired test", "eject": "react-scripts eject", "prepublishOnly": "npm run package", @@ -157,7 +157,7 @@ "source-map-explorer": "^2.5.3", "stylelint": "^15.11.0", "ts-jest": "^29.1.5", - "typescript": "^5.4.3" + "typescript": "^5.5.3" }, "peerDependencies": { "prop-types": "^15.8.1", diff --git a/src/containers/Tenant/Acl/Acl.tsx b/src/containers/Tenant/Acl/Acl.tsx index b61bee535..fea22afaa 100644 --- a/src/containers/Tenant/Acl/Acl.tsx +++ b/src/containers/Tenant/Acl/Acl.tsx @@ -2,13 +2,12 @@ import React from 'react'; import type {DefinitionListItem} from '@gravity-ui/components'; import {DefinitionList} from '@gravity-ui/components'; -//TODO: fix import -import type {DefinitionListSingleItem} from '@gravity-ui/components/build/esm/components/DefinitionList/types'; import {ResponseError} from '../../../components/Errors/ResponseError'; import {Loader} from '../../../components/Loader'; import {schemaAclApi} from '../../../store/reducers/schemaAcl/schemaAcl'; import type {TACE} from '../../../types/api/acl'; +import {valueIsDefined} from '../../../utils'; import {cn} from '../../../utils/cn'; import i18n from '../i18n'; @@ -109,7 +108,7 @@ function getAclListItems(acl?: TACE[]): DefinitionListItem[] { } return undefined; }) - .filter(Boolean) as DefinitionListSingleItem[], + .filter(valueIsDefined), }; }); } diff --git a/tsconfig.json b/tsconfig.json index 58aec1883..f8d811f10 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,9 @@ "extends": "@gravity-ui/tsconfig/tsconfig", "compilerOptions": { "outDir": "build/esm", - "module": "esnext", + "target": "ES2018", + "module": "ESNext", + "moduleResolution": "Bundler", "jsx": "react-jsx", "lib": ["dom", "dom.iterable", "esnext"], "allowSyntheticDefaultImports": true, diff --git a/tsconfig.package.json b/tsconfig.package.json index 8185af8cf..1858681a4 100644 --- a/tsconfig.package.json +++ b/tsconfig.package.json @@ -2,10 +2,11 @@ "extends": "./tsconfig", "compilerOptions": { "outDir": "dist", + "rootDir": "src", "declaration": true, "noEmit": false, "importHelpers": true }, - "include": ["src/**/*", "package.json"], + "include": ["src/**/*"], "exclude": ["src/setup*", "src/index.tsx", "**/__tests__", "**/tests"] }