-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Open
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,917
−2,278
Open
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
1741cab
test: migrate Mocha test to Jest
tassoevan 14617f0
refactor: convert legacy markdown lib to TypeScript
tassoevan c47dbda
refactor: convert `apps/meteor/app/authentication/server/startup/inde…
tassoevan 3fc4b0f
refactor: convert `apps/meteor/app/2fa/server/MethodInvocationOverrid…
tassoevan 2ee66f7
refactor: convert `apps/meteor/app/apps/server/bridges/bridges.js` to…
tassoevan 14dcb40
refactor: convert `apps/meteor/app/apps/server/converters/departments…
tassoevan 9b4c2b9
refactor: convert `apps/meteor/app/apps/server/converters/messages.js…
tassoevan 3c8ebd2
refactor: convert `apps/meteor/app/apps/server/converters/rooms.js` t…
tassoevan 64e1d5f
refactor: convert `apps/meteor/app/apps/server/converters/settings.js…
tassoevan 22c688c
refactor: convert `apps/meteor/app/apps/server/converters/uploads.js`…
tassoevan 29960c2
refactor: convert `apps/meteor/app/apps/server/converters/users.js` t…
tassoevan 97eedd2
refactor: convert `apps/meteor/app/apps/server/converters/visitors.js…
tassoevan da6c3b9
refactor: convert `apps/meteor/app/custom-oauth/server/transform_help…
tassoevan 4d48f75
refactor: convert `apps/meteor/app/custom-oauth/server/custom_oauth_s…
tassoevan 587729a
refactor: convert `apps/meteor/app/custom-sounds/server/startup/custo…
tassoevan d3cbbf0
refactor: convert `apps/meteor/app/emoji-custom/server/startup/emoji-…
tassoevan e18747a
refactor: convert `apps/meteor/app/google-oauth/server/index.js` to T…
tassoevan 98ca8eb
refactor: convert `apps/meteor/app/importer/server/startup/setImports…
tassoevan 108c6e7
refactor: convert `apps/meteor/app/importer/server/startup/store.js` …
tassoevan b876a01
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan ef72275
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 7233354
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 4457cf1
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 7cbe4f0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan b261674
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 0edeb9f
refactor: convert `apps/meteor/app/irc/server/irc-bridge/localHandler…
tassoevan 682cd33
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan aa2f0f0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan cca2dac
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 6f90ba0
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 23ebbee
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 71ba3d9
refactor: convert `apps/meteor/app/irc/server/irc-bridge/peerHandlers…
tassoevan 5a30ef9
refactor: convert `apps/meteor/app/irc/server/irc-bridge/index.js` to…
tassoevan d18a25b
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/codes.j…
tassoevan 1ee9341
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/peerCom…
tassoevan 81c65a4
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/localCo…
tassoevan 8e0f21e
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/parseMe…
tassoevan 0075c64
refactor: convert `apps/meteor/app/irc/server/servers/RFC2813/index.j…
tassoevan 9d7b382
refactor: normalize types on `apps/meteor/app/irc/server/servers/RFC2…
tassoevan 0f0282e
refactor: convert `apps/meteor/app/lib/server/startup/rateLimiter.js`…
tassoevan f6e47eb
refactor: convert `apps/meteor/app/lib/server/startup/robots.js` to T…
tassoevan 7e72cb9
refactor: convert `apps/meteor/app/lib/server/lib/validateEmailDomain…
tassoevan dd212ef
refactor: convert `apps/meteor/app/lib/server/lib/debug.js` to TypeSc…
tassoevan e5bbf5a
refactor: convert `apps/meteor/app/lib/server/lib/interceptDirectRepl…
tassoevan 8548153
refactor: convert `apps/meteor/app/lib/server/lib/RateLimiter.js` to …
tassoevan c54b744
refactor: convert `apps/meteor/app/lib/server/functions/validateCusto…
tassoevan a46a8f6
refactor: convert `apps/meteor/app/metrics/server/lib/statsTracker.js…
tassoevan ccbdf3f
refactor: convert `apps/meteor/app/statistics/server/lib/UAParserCust…
tassoevan cc2950b
refactor: convert `apps/meteor/app/token-login/server/login_token_ser…
tassoevan a73dd41
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan d0125f7
refactor: convert `apps/meteor/app/lib/server/functions/notifications…
tassoevan bf271f3
refactor: convert `apps/meteor/app/lib/server/oauth/proxy.js` to Type…
tassoevan a46d0b7
refactor: convert `apps/meteor/app/lib/server/oauth/oauth.js` to Type…
tassoevan 03c460d
refactor: convert `apps/meteor/app/lib/server/oauth/{facebook,google,…
tassoevan 8c25a38
refactor: convert `apps/meteor/ee/app/api-enterprise/server/lib/canne…
tassoevan 9b3d36b
refactor: convert `apps/meteor/ee/server/apps/orchestrator.js` to Typ…
tassoevan 2108b9d
refactor: convert `apps/meteor/ee/lib/misc/determineFileType.js` to T…
tassoevan fb250a3
refactor: convert `apps/meteor/server/configuration/accounts_meld.js`…
tassoevan 34f4122
refactor: convert `apps/meteor/server/lib/spotlight.js` to TypeScript
tassoevan 8ebea35
refactor: migrate unit test `apps/meteor/tests/unit/app/statistics/se…
tassoevan 99da65a
refactor: convert `apps/meteor/app/statistics/server/functions/sendUs…
tassoevan de36dc8
refactor: migrate unit test `apps/meteor/tests/unit/app/custom-oauth/…
tassoevan 962e2e7
refactor: migrate unit test `apps/meteor/tests/unit/app/highlight-wor…
tassoevan 5a0957b
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/serv…
tassoevan b1e461b
refactor: migrate unit test `apps/meteor/tests/unit/app/mentions/clie…
tassoevan fb02e6e
refactor: migrate unit test `apps/meteor/tests/unit/app/utils/lib/get…
tassoevan 10669dd
refactor: migrate some mock modules to TypeScript
tassoevan b60ab8f
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/m…
tassoevan 8e702c1
refactor: migrate unit test `apps/meteor/tests/unit/app/apps/server/r…
tassoevan 2132361
refactor: delete useless unit test
tassoevan 4541f5e
refactor: migrate `apps/meteor/.storybook/mocks/meteor.js` to TypeScript
tassoevan f31c648
refactor: review over `apps/meteor/app/apps/server/converters/visitor…
tassoevan fa4d2e5
refactor: review over `apps/meteor/app/lib/server/oauth/facebook.ts`
tassoevan 7dcc50c
refactor: review over `apps/meteor/app/apps/server/converters/departm…
tassoevan 5a27e0f
refactor: review over `apps/meteor/app/lib/server/functions/validateC…
tassoevan 21fc7d1
refactor: review over `apps/meteor/app/lib/server/oauth/google.ts`
tassoevan 05e5b5a
refactor: review over `apps/meteor/app/custom-oauth/server/transform_…
tassoevan 16ed652
refactor: review over `apps/meteor/ee/lib/misc/determineFileType.ts`
tassoevan 998bcd9
refactor: review over `apps/meteor/server/configuration/accounts_meld…
tassoevan 90bade6
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.