-
Notifications
You must be signed in to change notification settings - Fork 482
Convert the entire codebase to TypeScript #5549
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
7a111d9
Set up TypeScript support basics.
mstange 971a6a3
Update eslintrc
mstange 9a09f31
Remove .js extension from imports.
mstange c323b62
Add TypeScript types for various dependencies.
mstange 6d93997
Add handwritten types for dependencies which don't have types in @types.
mstange 806318d
Convert some files under src/types/.
mstange 8ccd2d2
Convert some files under src/utils.
mstange 2c89925
Convert more files under src/types.
mstange ce97bc1
Convert more files under src/utils.
mstange 2b88259
Convert src/types/mocks/ftl.ts.
mstange ed02f3f
Convert src/app-logic, src/profile-logic, and the rest of src/types a…
mstange 066d548
Convert src/reducers.
mstange 9b82bcd
Convert src/selectors.
mstange 24fe397
Convert src/actions.
mstange e52c410
Convert app-logic/create-store.js.
mstange b109476
Convert the rest of src/utils except for window-console.js.
mstange 900b289
Convert components/shared and components/tooltip.
mstange 782abcc
Convert more components.
mstange 9865247
Convert hooks, context, and the remaining components.
mstange cb923d8
Convert window-console.js and index.js.
mstange 3883c02
Convert src/symbolicator-cli.
mstange 5ef2034
Convert src/test/fixtures.
mstange 325c2f2
Setup for TypeScript tests.
mstange 19a9bbd
Convert test/types.
mstange 2a13ee1
Convert test/unit.
mstange 42e4810
Convert test/store.
mstange 98c6157
Convert test/components.
mstange caa1bc6
Convert test/integration.
mstange 43ddbd5
Convert test/url-handling.test.js.
mstange 227668a
Convert __mocks__.
mstange d847d69
Remove src/types/libdef.
mstange 504f153
Remove various flow remnants.
mstange fcf4ee7
Remove @flow and @noflow annotations.
mstange 6dc238e
Update readme files.
mstange 26ab457
Rename yarn typecheck to yarn ts.
mstange 25ec877
Remove unnecessary --noEmit - we already have noEmit: true inside tsc…
mstange 9914eb5
Remove "alwaysStrict": false; it makes no difference because we're us…
mstange d9ec496
Remove unnecessary "baseUrl" prop from tsconfig.
mstange 37daba7
Move global.d.ts into src/types/globals.
mstange 8840445
Run npx yarn-deduplicate.
mstange fe67997
Rename src/utils/flow.ts to types.ts.
mstange File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ flow-coverage | |
| coverage | ||
| .eslintcache | ||
| .prettiercache | ||
| .tsbuildinfo | ||
| webpack.local-config.js | ||
| *.orig | ||
| *.rej | ||
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,5 @@ | ||
| /* This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
|
||
| module.exports = jest.fn() as (arg: string) => void; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,19 @@ | ||
| // This module replaces the wasm-pack generated module 'gecko-profiler-demangle' | ||
| // in our tests. | ||
| // The reason for this replacement is the fact that wasm-pack (or rather, | ||
| // wasm-bindgen), when targeting the browser + webpack, generates an ES6 module | ||
| // that node cannot deal with. Most importantly, it uses the syntax | ||
| // "import * as wasm from './gecko_profiler_demangle_bg';" in order to load | ||
| // the wasm module, which is currently only supported by webpack. | ||
| // The long-term path to make this work correctly is to wait for node to | ||
| // support ES6 modules (and WASM as ES6 modules) natively [1]. It's possible | ||
| // that in the medium term, wasm-bindgen will get support for outputting JS | ||
| // files which work in both webpack and in node natively [2]. | ||
| // [1] https://medium.com/@giltayar/native-es-modules-in-nodejs-status-and-future-directions-part-i-ee5ea3001f71 | ||
| // [2] https://github.com/rustwasm/wasm-bindgen/issues/233 | ||
|
|
||
| // There's only one exported function. | ||
| // Do the simplest thing possible: no demangling. | ||
| export function demangle_any(s: string): string { | ||
| return s; | ||
| } |
This file contains hidden or 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 hidden or 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,4 +1,3 @@ | ||
| // @noflow | ||
| // MIT © Sindre Sorhus - sindresorhus.com | ||
| // via https://gist.github.com/sindresorhus/7996717 | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,2 +1 @@ | ||
| // @noflow | ||
| require('./check-warn-yarn-changed.js')('ORIG_HEAD', 'HEAD'); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: I see the same text in CONTRIBUTING.md.
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.
fixed