-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
74 changed files
with
148 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/design-system/src/utils/uniqueId.js → packages/design-system/src/utils/uniqueId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-draw-io/src/index.js → packages/web-app-draw-io/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-external/src/index.js → packages/web-app-external/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import Vue, { ComponentOptions } from 'vue' | ||
import { defineComponent } from 'vue' | ||
|
||
/** | ||
* we need to inject the vue files into the route builders, | ||
* this is because we also import the provided helpers from other js|ts files | ||
* like mixins, rollup seems to have a problem to import files which contain vue file imports | ||
* into js files which then again get imported by other vue files... | ||
*/ | ||
|
||
type Component = ReturnType<typeof defineComponent> | ||
|
||
export interface RouteComponents { | ||
App: ComponentOptions<typeof Vue> | ||
Favorites: ComponentOptions<typeof Vue> | ||
FilesDrop: ComponentOptions<typeof Vue> | ||
PrivateLink: ComponentOptions<typeof Vue> | ||
SearchResults: ComponentOptions<typeof Vue> | ||
PublicLink: ComponentOptions<typeof Vue> | ||
App: Component | ||
Favorites: Component | ||
FilesDrop: Component | ||
SearchResults: Component | ||
Shares: { | ||
SharedWithMe: ComponentOptions<typeof Vue> | ||
SharedWithOthers: ComponentOptions<typeof Vue> | ||
SharedViaLink: ComponentOptions<typeof Vue> | ||
SharedWithMe: Component | ||
SharedWithOthers: Component | ||
SharedViaLink: Component | ||
} | ||
Spaces: { | ||
DriveResolver: ComponentOptions<typeof Vue> | ||
Projects: ComponentOptions<typeof Vue> | ||
DriveResolver: Component | ||
Projects: Component | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/web-app-files/tests/unit/components/SideBar/Actions/FileActions.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...es/tests/unit/helpers/permissions.spec.js → ...es/tests/unit/helpers/permissions.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ests/unit/helpers/statusIndicator.spec.js → ...ests/unit/helpers/statusIndicator.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
packages/web-app-files/tests/unit/helpers/textUtils.spec.js
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
packages/web-app-files/tests/unit/helpers/textUtils.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { describe, it } from '@jest/globals' | ||
import { textUtils } from '../../../src/helpers/textUtils' | ||
|
||
describe('textUtils', () => { | ||
// textUtils compares two strings to provide a natural sort | ||
describe('naturalSortCompare', () => { | ||
it('sorts a list naturally', () => { | ||
const actual = ['Brian Murphy', 'Alice Hansen', 'grp1', 'grp11'] | ||
|
||
actual.sort(textUtils.naturalSortCompare) | ||
|
||
expect(actual.join(',')).toBe('Alice Hansen,Brian Murphy,grp1,grp11') | ||
}) | ||
|
||
/** | ||
* variations | ||
* | ||
[ | ||
{ firstString: 'b', secondString: 'a' }, | ||
{ firstString: 'bb', secondString: 'ba' }, | ||
{ firstString: '1', secondString: '0' } | ||
] | ||
*/ | ||
it.todo('should return negative integer if "b" comes before "a"') | ||
|
||
/** | ||
* variations | ||
* | ||
[ | ||
{ firstString: 'a', secondString: 'b' }, | ||
{ firstString: 'aa', secondString: 'ab' }, | ||
{ firstString: '0', secondString: '1' } | ||
] | ||
*/ | ||
it.todo('should return positive integer if "a" comes before "b"') | ||
|
||
/** | ||
* variations | ||
* | ||
[ | ||
{ firstString: '0', secondString: '0' }, | ||
{ firstString: 'a', secondString: 'a' }, | ||
{ firstString: 'aa', secondString: 'aa' }, | ||
{ firstString: 'ab', secondString: 'ab' } | ||
] | ||
*/ | ||
it.todo('should return 0 if the provided strings are identical') | ||
}) | ||
}) |
2 changes: 1 addition & 1 deletion
2
packages/web-app-files/tests/unit/mixins/actions/clearSelection.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-files/tests/unit/mixins/actions/delete.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-files/tests/unit/mixins/actions/emptyTrashBin.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-files/tests/unit/mixins/spaces/uploadImage.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/web-app-pdf-viewer/src/index.js → packages/web-app-pdf-viewer/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
packages/web-app-preview/src/index.js → packages/web-app-preview/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.