-
Notifications
You must be signed in to change notification settings - Fork 13.4k
refactor: Convert missing JavaScript modules to TypeScript #38357
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
Draft
tassoevan
wants to merge
80
commits into
develop
Choose a base branch
from
refactor/js-to-ts
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,929
−2,286
Draft
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
40e4dd0
test: migrate Mocha test to Jest
tassoevan 946fc5b
refactor: convert legacy markdown lib to TypeScript
tassoevan 61a6a2a
refactor: convert `apps/meteor/app/authentication/server/startup/inde…
tassoevan 8e33213
refactor: convert `apps/meteor/app/2fa/server/MethodInvocationOverrid…
tassoevan ca5b211
refactor: convert `apps/meteor/app/apps/server/bridges/bridges.js` to…
tassoevan ca2ed38
refactor: convert `apps/meteor/app/apps/server/converters/departments…
tassoevan a6ab57d
refactor: convert `apps/meteor/app/apps/server/converters/messages.js…
tassoevan c4a4b34
refactor: convert `apps/meteor/app/apps/server/converters/rooms.js` t…
tassoevan 8023f1f
refactor: convert `apps/meteor/app/apps/server/converters/settings.js…
tassoevan 3462cb5
refactor: convert `apps/meteor/app/apps/server/converters/uploads.js`…
tassoevan 3a5d813
refactor: convert `apps/meteor/app/apps/server/converters/users.js` t…
tassoevan 27b523d
refactor: convert `apps/meteor/app/apps/server/converters/visitors.js…
tassoevan 5b121cc
refactor: convert `apps/meteor/app/custom-oauth/server/transform_help…
tassoevan 9d5aca1
refactor: convert `apps/meteor/app/custom-oauth/server/custom_oauth_s…
tassoevan c045692
refactor: convert `apps/meteor/app/custom-sounds/server/startup/custo…
tassoevan 0272f68
refactor: convert `apps/meteor/app/emoji-custom/server/startup/emoji-…
tassoevan e6a8bb9
refactor: convert `apps/meteor/app/google-oauth/server/index.js` to T…
tassoevan d5a327d
refactor: convert `apps/meteor/app/importer/server/startup/setImports…
tassoevan 8319885
refactor: convert `apps/meteor/app/importer/server/startup/store.js` …
tassoevan fed847c
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 6c8ea5a
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan c62baa4
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 09193b9
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan d582ee7
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan ec7cfae
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 7215e0a
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan fbfca2c
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 1fd7d9a
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 100bbcb
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan cf0071d
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 30b56c5
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan bcc2c0f
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan f199eeb
refactor: convert `apps/meteor/app/irc/server/irc-bridge/index.js` to…
tassoevan 5d16693
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/codes.j…
tassoevan fccd339
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/peerCom…
tassoevan 0437256
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/localCo…
tassoevan b9175d0
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/parseMe…
tassoevan 2615fda
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/index.j…
tassoevan a98b3c2
refactor: normalize types on `apps/meteor/app/irc/server/servers/RFC2…
tassoevan e2ff723
refactor: convert `apps/meteor/app/lib/server/startup/rateLimiter.js`…
tassoevan 4ff848d
refactor: convert `apps/meteor/app/lib/server/startup/robots.js` to T…
tassoevan f5042da
refactor: convert `apps/meteor/app/lib/server/lib/validateEmailDomain…
tassoevan 6d09657
refactor: convert `apps/meteor/app/lib/server/lib/debug.js` to TypeSc…
tassoevan 684efa8
refactor: convert `apps/meteor/app/lib/server/lib/interceptDirectRepl…
tassoevan c6163ba
refactor: convert `apps/meteor/app/lib/server/lib/RateLimiter.js` to …
tassoevan 6214cce
refactor: convert `apps/meteor/app/lib/server/functions/validateCusto…
tassoevan 7e4341c
refactor: convert `apps/meteor/app/metrics/server/lib/statsTracker.js…
tassoevan ee43968
refactor: convert `apps/meteor/app/statistics/server/lib/UAParserCust…
tassoevan e612b97
refactor: convert `apps/meteor/app/token-login/server/login_token_ser…
tassoevan 688e399
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan ca611e9
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan dbede31
refactor: convert `apps/meteor/app/lib/server/oauth/proxy.js` to Type…
tassoevan 1bf828f
refactor: convert `apps/meteor/app/lib/server/oauth/oauth.js` to Type…
tassoevan fe9dfc7
refactor: convert `apps/meteor/app/lib/server/oauth/{facebook,google,…
tassoevan f16ca1e
refactor: convert `apps/meteor/ee/app/api-enterprise/server/lib/canne…
tassoevan e18caf5
refactor: convert `apps/meteor/ee/server/apps/orchestrator.js` to Typ…
tassoevan 87b9c52
refactor: convert `apps/meteor/ee/lib/misc/determineFileType.js` to T…
tassoevan 02c2df4
refactor: convert `apps/meteor/server/configuration/accounts_meld.js`…
tassoevan cbf329f
refactor: convert `apps/meteor/server/lib/spotlight.js` to TypeScript
tassoevan 7a0edbc
refactor: migrate unit test `apps/meteor/tests/unit/app/statistics/se…
tassoevan ab35a1a
refactor: convert `apps/meteor/app/statistics/server/functions/sendUs…
tassoevan adc611e
refactor: migrate unit test `apps/meteor/tests/unit/app/custom-oauth/…
tassoevan 4084ab4
refactor: migrate unit test `apps/meteor/tests/unit/app/highlight-wor…
tassoevan caeb8d0
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/serv…
tassoevan 84e6ae1
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/clie…
tassoevan 8113673
refactor: migrate unit test `apps/meteor/tests/unit/app/utils/lib/get…
tassoevan 38fdc2d
refactor: migrate some mock modules to TypeScript
tassoevan 6c351da
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/m…
tassoevan d6021ee
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/r…
tassoevan e072b04
refactor: delete useless unit test
tassoevan f802b79
refactor: migrate `apps/meteor/.storybook/mocks/meteor.js` to TypeScript
tassoevan 036393f
refactor: review over `apps/meteor/app/apps/server/converters/visitor…
tassoevan 5e22af2
refactor: review over `apps/meteor/app/lib/server/oauth/facebook.ts`
tassoevan 801ee67
refactor: review over `apps/meteor/app/apps/server/converters/departm…
tassoevan fc79851
refactor: review over `apps/meteor/app/lib/server/functions/validateC…
tassoevan 4835d67
refactor: review over `apps/meteor/app/lib/server/oauth/google.ts`
tassoevan cfc2351
refactor: review over `apps/meteor/app/custom-oauth/server/transform_…
tassoevan 050681c
refactor: review over `apps/meteor/ee/lib/misc/determineFileType.ts`
tassoevan 0f419ee
refactor: review over `apps/meteor/server/configuration/accounts_meld…
tassoevan e246502
refactor: review over `apps/meteor/app/lib/server/oauth/google.ts`
tassoevan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| export const Meteor = { | ||
| Device: { | ||
| isDesktop: () => false, | ||
| }, | ||
| isClient: true, | ||
| isServer: false, | ||
| _localStorage: window.localStorage, | ||
| absoluteUrl: Object.assign(() => undefined, { | ||
| defaultOptions: {}, | ||
| }), | ||
| userId: () => undefined, | ||
| Streamer: () => ({ | ||
| on: () => undefined, | ||
| removeListener: () => undefined, | ||
| }), | ||
| StreamerCentral: { | ||
| on: () => undefined, | ||
| removeListener: () => undefined, | ||
| }, | ||
| startup: () => undefined, | ||
| methods: () => undefined, | ||
| call: () => undefined, | ||
| connection: { | ||
| _stream: { | ||
| on: () => undefined, | ||
| }, | ||
| }, | ||
| users: {}, | ||
| }; | ||
|
|
||
| export const Tracker = { | ||
| autorun: () => ({ | ||
| stop: () => undefined, | ||
| }), | ||
| nonreactive: (fn: () => void) => fn(), | ||
| Dependency: () => undefined, | ||
| }; | ||
|
|
||
| export const Accounts = { | ||
| onLogin: () => undefined, | ||
| onLogout: () => undefined, | ||
| }; | ||
|
|
||
| export const Mongo = { | ||
| Collection: () => ({ | ||
| find: () => ({ | ||
| observe: () => undefined, | ||
| fetch: () => [], | ||
| }), | ||
| }), | ||
| }; | ||
|
|
||
| export const ReactiveVar = <T>(val: T) => { | ||
| let currentVal = val; | ||
| return { | ||
| get: () => currentVal, | ||
| set: (val: T) => { | ||
| currentVal = val; | ||
| }, | ||
| }; | ||
| }; | ||
|
|
||
| export const ReactiveDict = () => ({ | ||
| get: () => undefined, | ||
| set: () => undefined, | ||
| all: () => undefined, | ||
| }); | ||
|
|
||
| export const Template = Object.assign( | ||
| () => ({ | ||
| onCreated: () => undefined, | ||
| onRendered: () => undefined, | ||
| onDestroyed: () => undefined, | ||
| helpers: () => undefined, | ||
| events: () => undefined, | ||
| }), | ||
| { | ||
| registerHelper: () => undefined, | ||
| __checkName: () => undefined, | ||
| }, | ||
| ); | ||
|
|
||
| export const check = () => undefined; | ||
|
|
||
| export const FlowRouter = { | ||
| route: () => undefined, | ||
| group: () => ({ | ||
| route: () => undefined, | ||
| }), | ||
| }; | ||
|
|
||
| export const Session = { | ||
| get: () => undefined, | ||
| set: () => undefined, | ||
| }; | ||
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,26 @@ | ||
| import { DDP } from 'meteor/ddp'; | ||
| import { DDPCommon } from 'meteor/ddp-common'; | ||
|
|
||
| class MethodInvocation extends DDPCommon.MethodInvocation { | ||
| twoFactorChecked?: boolean; | ||
|
|
||
| constructor(options: { | ||
| connection: { | ||
| id: string; | ||
| close: () => void; | ||
| clientAddress: string; | ||
| httpHeaders: Record<string, any>; | ||
| }; | ||
| isSimulation?: boolean; | ||
| userId?: string; | ||
| }) { | ||
| super(options); | ||
| const currentInvocation = DDP._CurrentInvocation.get(); | ||
|
|
||
| if (currentInvocation) { | ||
| this.twoFactorChecked = (currentInvocation as MethodInvocation).twoFactorChecked; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| DDPCommon.MethodInvocation = MethodInvocation; |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.