-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[full-ci] TypeScript almost everything #8289
Conversation
This renames most of the actively used .js files to .ts. Notable exceptions: acceptance tests, docs, a few legacy (config) files for design system or web-app-skeleton
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
text: undefined | ||
allowContextActions: true, | ||
text: 'bar', | ||
onClick: () => undefined | ||
}) | ||
) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this test was completely broken as breadCrumbsFromPath
was not spread into concatBreadcrumbs
which just accepts a single rest args parameter.
@@ -29,7 +29,7 @@ async function post(url, data) { | |||
} | |||
|
|||
export async function registerClient(openIdConfig) { | |||
const clientData = sessionStorage.getItem('dynamicClientData') | |||
const clientData = JSON.parse(sessionStorage.getItem('dynamicClientData')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was an actual bug, I have no idea how to test the whole feature, which is why I did not add a Changelog entry.
Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/31929/27/1 |
Results for acceptance oCIS https://drone.owncloud.com/owncloud/web/31929/62/1 |
@@ -21,28 +17,28 @@ describe('theme loading and error reporting', () => { | |||
}) | |||
|
|||
it('should load the default theme if location is not found', async () => { | |||
fetch.mockResponse(new Error(), { status: 404 }) | |||
;(fetch as FetchMock).mockResponse(new Error() as any, { status: 404 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found no method with a signature that allows me to pass an error and a status ... hence I need to cast error :-\
SonarCloud Quality Gate failed. |
Author: Dominik Schmidt <[email protected]> Date: Mon Jan 23 09:39:26 2023 +0100 [full-ci] TypeScript almost everything (#8289) * Rename .js files to .ts This renames most of the actively used .js files to .ts. Notable exceptions: acceptance tests, docs, a few legacy (config) files for design system or web-app-skeleton * Fix imports * Fix global variables usage * fixup! Fix imports * Fix exports * Fix non-isolated modules * Fix types in clientRegistration * Fix breadcrumbs unit test * Fix jest config * Fix remaining type issues * Fix textUtils.naturalSortCompare
Description
While #8235 focused on Vue components, this converts basically all other files currently still used to TypeScript - with a few exceptions: acceptance tests, docs, a few legacy (config) files for design system or web-app-skeleton
Related Issue
Motivation and Context
Get type safety to avoid bugs (and find existing ones), reduce mental load by making sure all files are written in the same language, make cut pasting easier, ....
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: