Skip to content

Commit

Permalink
Migrate to newever version of Typescript "4.5.4" -> "4.9.3". Related to
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheiy committed Dec 7, 2022
1 parent 7647476 commit a125321
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 45 deletions.
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
"@types/amplitude-js": "^8.0.1",
"@types/history": "4.7.9",
"@types/jest": "25.2.3",
"@types/node": "14.0.5",
"@types/node": "16.18.4",
"@types/prismjs": "1.16.1",
"@types/react": "17.0.3",
"@types/react-dom": "17.0.3",
"@types/react-router": "5.1.7",
"@types/react-router-dom": "5.1.5",
"@types/webpack-env": "1.16.2",
"typescript": "4.5.4",
"typescript": "4.9.3",
"webpack-bundle-analyzer": "^4.4.2"
}
}
6 changes: 3 additions & 3 deletions app/src/data/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"devDependencies": {
"@types/react": "17.0.3",
"@types/react-dom": "17.0.3",
"@types/node": "14.0.5",
"typescript": "4.5.4",
"@types/node": "16.18.4",
"typescript": "4.9.3",
"typescript-plugin-css-modules": "1.2.1"
},
"scripts": {
Expand All @@ -50,4 +50,4 @@
"not ie <= 11",
"not op_mini all"
]
}
}
2 changes: 1 addition & 1 deletion app/src/docs/examples/tables/LazyTable.example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function CitiesTable(props: unknown) {
getRows={ view.getVisibleRows }
headerTextCase='upper'
columns={ citiesColumns }
{ ...props }
{ ...(props as object) }
/>
</Panel>
);
Expand Down
16 changes: 9 additions & 7 deletions extra/ideas/iqueryable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// query: IQueryable<TItem, TId>;
// getChildren: (item: TItem) => IQueryable<TItem, TId>;
// }
// [OK] picker
// [OK] picker
// - getSelection: ids.map(id => q.byId(id))
// - ignore parent/child, or pass this to render
// - ignore parent/child, or pass this to render
// - filter selectable only
// - can order on client

Expand All @@ -26,7 +26,7 @@

// [BAD - FETCH ALL] selection cascading:
// - are there selectable children?
// - select all/none: get list of all selectable children
// - select all/none: get list of all selectable children
// - q.query(parent => getChildren(of parent)) // need to fetch all children here
// .map(node => isSelectable(node))

Expand All @@ -44,14 +44,14 @@

// [OK] sorting
// - refetch all
// - can be done externally
// - can be done externally
// - should change versionHash
// - children can be sorted differently if needed
// - children can be sorted differently if needed

// [OK] should we indent the first level - does any node has any children?
// - there is getChildren() defined

// filter+folding
// filter+folding
// - given the node, does it has any children matching search/filter?
// - what if children passed the filter, but parent - are not?
// - lazy: up to IQuery impl
Expand All @@ -63,7 +63,7 @@
// - byId, selection
// - use [id, type]
// - add uid to the DB Entities
// -
// -


// selection option:
Expand All @@ -73,3 +73,5 @@
// - has selected children (recusively)
// - doesn't solve
// - selection cascading

export default {};
1 change: 1 addition & 0 deletions extra/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/* The file is added as it's required by build toolchain. This module is published as is, no pre-build required */
export default {};
3 changes: 2 additions & 1 deletion loveship/components/dnd/DropSpot.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DropSpot, DropSpotRenderParams } from '@epam/uui-components';

export { DropSpot, DropSpotRenderParams };
export { DropSpot };
export type { DropSpotRenderParams };
2 changes: 1 addition & 1 deletion loveship/components/pickers/PickerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class PickerList<TItem, TId> extends PickerListBase<TItem, TId, PickerLis
const renderRow = this.props.renderRow || this.renderRow;

return (
<div { ...this.props.rawProps }>
<div { ...(this.props.rawProps as object) }>
{ !rows.length && (this.props.noOptionsMessage ?
this.props.noOptionsMessage :
<Text color={ this.props.theme === 'dark' ? 'night300' : 'night500' } size={ this.props.size as TextSize }>No options available</Text>) }
Expand Down
2 changes: 1 addition & 1 deletion next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"eslint-config-next": "11.1.2",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.4.5",
"typescript": "4.4.4"
"typescript": "4.9.3"
}
}
8 changes: 4 additions & 4 deletions next-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8138,10 +8138,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@4.4.4:
version "4.4.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==
typescript@4.9.3:
version "4.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==

uc.micro@^1.0.1:
version "1.0.6"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"generate-components-api": "cd uui-build && yarn generate-components-api",
"transform-tokens": "tsc --esModuleInterop uui-build/tokens-converter/index.ts && node uui-build/tokens-converter",
"release": "lerna publish --force-publish",
"build-modules": "learn run build"
"build-modules": "lerna run build"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -63,6 +63,7 @@
"lerna": "3.22.1",
"tslib": "^2.3.1",
"cross-env": "^7.0.3",
"typedoc": "0.17.4"
"typedoc": "0.17.4",
"@types/node": "16.18.4"
}
}
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"test-utils"
]
},
"baseUrl": "."
"baseUrl": ".",
"isolatedModules": true,
"moduleResolution": "Node"
},
"exclude": [
"node_modules",
Expand All @@ -37,4 +39,4 @@
"*/**/globals.d.ts",
"./next-app"
]
}
}
4 changes: 2 additions & 2 deletions uui-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/jest": "25.2.2",
"@types/lodash.defaultsdeep": "4.6.6",
"@types/lodash.uniqueid": "4.0.6",
"@types/node": "14.0.1",
"@types/node": "16.18.4",
"babel-eslint": "10.1.0",
"babel-jest": "24.9.0",
"babel-loader": "8.1.0",
Expand Down Expand Up @@ -93,7 +93,7 @@
"workbox-webpack-plugin": "4.3.1"
},
"devDependencies": {
"typescript": "4.5.4"
"typescript": "4.9.3"
},
"publishConfig": {
"directory": "build"
Expand Down
2 changes: 1 addition & 1 deletion uui-components/src/overlays/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function Tooltip(props: TooltipProps) {
if (idx > 0 || !React.isValidElement(child)) return child;
return React.cloneElement(child, {
ref: (node: HTMLElement) => getInnerRef(node, ref),
});
} as object);
}) }
</Reference>
{ isTooltipExist() && (isOpen || props.isVisible) && <Portal target={ props.portalTarget }>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './hooks/useColumnsConfiguration';
export { ColumnsConfigurationRowProps } from './types';
export type { ColumnsConfigurationRowProps } from './types';
Empty file removed uui-components/src/types.ts
Empty file.
4 changes: 2 additions & 2 deletions uui-components/src/widgets/AvatarStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export const AvatarStack = React.forwardRef<HTMLDivElement, AvatarStackProps>((p
const { avatarSize, urlArray, direction, avatarsCount, renderItem } = props;

const firstElements = avatarsCount && (urlArray.length > avatarsCount) ? urlArray.slice(0, avatarsCount) : urlArray;

const styleObj = { ['--overlap']: `-${ +avatarSize / 4 }px` } as object;
return (
<FlexRow cx={ props.cx } ref={ ref } rawProps={ props.rawProps }>
<FlexRow
rawProps={ { role:'group', style: { ['--overlap']: `-${ +avatarSize / 4 }px` } } }
rawProps={ { role:'group', style: styleObj } }
cx={ cx('avatars', css.container, css['avatar-' + direction]) }
>
{ firstElements.map((avatar, index) => {
Expand Down
5 changes: 3 additions & 2 deletions uui-core/data/validation/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export {validate, blankValidationState, ValidationMode } from "./validate";
export {validate, blankValidationState } from "./validate";
export type {ValidationMode } from "./validate";
export {validateServerErrorState} from "./validateServerErrorState";
export {mergeValidation} from "./mergeValidation";
export {mergeValidation} from "./mergeValidation";
21 changes: 8 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3014,15 +3014,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.36.tgz#c0d5f2fe76b47b63e0e0efc3d2049a9970d68794"
integrity sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==

"@types/node@14.0.1":
version "14.0.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.1.tgz#5d93e0a099cd0acd5ef3d5bde3c086e1f49ff68c"
integrity sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==

"@types/node@14.0.5":
version "14.0.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b"
integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==
"@types/node@16.18.4":
version "16.18.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.4.tgz#712ba61b4caf091fc6490301b1888356638c17bd"
integrity sha512-9qGjJ5GyShZjUfx2ArBIGM+xExdfLvvaCyQR0t6yRXKPcWCVYF/WemtX/uIU3r7FYECXRXkIiw2Vnhn6y8d+pw==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
Expand Down Expand Up @@ -16897,10 +16892,10 @@ typedoc@0.17.4:
shelljs "^0.8.3"
typedoc-default-themes "^0.10.0"

typescript@4.5.4:
version "4.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8"
integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==
typescript@4.9.3:
version "4.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==

typescript@~3.9.7:
version "3.9.10"
Expand Down

0 comments on commit a125321

Please sign in to comment.