Skip to content

Commit

Permalink
Fix tsconfig (module) in identity
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed May 18, 2023
1 parent 66b112a commit ad528eb
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/identity/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "ES2022",
// "module": "ES2022",
"rootDir": "./src",
"outDir": "./lib",
"typeRoots": [
Expand Down
2 changes: 1 addition & 1 deletion packages/identity/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "./lib",
"target": "ES2020",
"module": "ES2022",
// "module": "ES2022",
"strict": true,
"typeRoots": [
"../@types",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { StoreKeys } from '../store.keys'
import { ConnectionState } from './connection.slice'

export const ConnectionTransform = createTransform(
(inboundState: ConnectionState, _key) => {
(inboundState: ConnectionState, _key: any) => {
return { ...inboundState }
},
(outboundState: ConnectionState, _key) => {
(outboundState: ConnectionState, _key: any) => {
return {
...outboundState,
torBootstrapProcess: 'Bootstrapped 0% (starting)',
Expand Down
4 changes: 2 additions & 2 deletions packages/state-manager/src/sagas/files/files.transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { isDefined } from '@quiet/common'
import { DownloadState, DownloadStatus } from '@quiet/types'

export const FilesTransform = createTransform(
(inboundState: FilesState, _key) => {
(inboundState: FilesState, _key: any) => {
return { ...inboundState }
},
(outboundState: FilesState, _key) => {
(outboundState: FilesState, _key: any) => {
const downloadStatuses = Object.values(outboundState.downloadStatus.entities).filter(isDefined)
const updatedStatuses: DownloadStatus[] = downloadStatuses.reduce((result: DownloadStatus[], status) => {
const downloadState = status.downloadState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { messageSendingStatusAdapter } from './messages.adapter.ts'
import { MessagesState } from './messages.slice'

export const MessagesTransform = createTransform(
(inboundState: MessagesState, _key) => {
(inboundState: MessagesState, _key: any) => {
return { ...inboundState }
},
(outboundState: MessagesState, _key) => {
(outboundState: MessagesState, _key: any) => {
return {
...outboundState,
publicKeyMapping: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function* createGeneralChannelSaga(): Generator {
}
log(`Creating general channel for ${identity.nickname}`)

const timestamp = yield* call(getChannelTimestamp)
const timestamp: number = yield* call(getChannelTimestamp)

const channel: PublicChannel = {
name: 'general',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createTransform } from 'redux-persist'
import { StoreKeys } from '../store.keys'
import { publicChannelsAdapter, publicChannelsStatusAdapter, publicChannelsSubscriptionsAdapter } from './publicChannels.adapter'
import { publicChannelsSubscriptionsAdapter } from './publicChannels.adapter'
import { PublicChannelsState } from './publicChannels.slice'

export const PublicChannelsTransform = createTransform(
(inboundState: PublicChannelsState, _key) => {
(inboundState: PublicChannelsState, _key: any) => {
return { ...inboundState }
},
(outboundState: PublicChannelsState, _key) => {
(outboundState: PublicChannelsState, _key: any) => {
return {
...outboundState,
currentChannelAddress: 'general',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { communitiesSelectors } from '../../communities/communities.selectors'

import { MAIN_CHANNEL } from '../../../constants'
import { MessageType, WriteMessagePayload } from '@quiet/types'
import { Certificate } from 'pkijs'

export function* sendNewUserInfoMessageSaga(
action: PayloadAction<ReturnType<typeof publicChannelsActions.sendNewUserInfoMessage>['payload']>
Expand All @@ -39,7 +40,7 @@ export function* sendNewUserInfoMessageSaga(
const uniqueCertificates = [...new Set(newCertificates)]

for (const cert of uniqueCertificates) {
const rootCa = yield* call(loadCertificate, cert)
const rootCa: Certificate = yield* call(loadCertificate, cert)
const user = yield* call(getCertFieldValue, rootCa, CertFieldsTypes.nickName)

// Do not send message about yourself
Expand Down
42 changes: 42 additions & 0 deletions packages/state-manager/tscheck.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

> @quiet/[email protected] build
> tsc -p tsconfig.build.json

src/sagas/appConnection/connection.selectors.test.ts(13,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/communities.adapter.ts(1,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/communities.selectors.test.ts(11,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/communities.slice.ts(13,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/communities.types.ts(1,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/createNetwork/createNetwork.saga.test.ts(14,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/createNetwork/createNetwork.saga.ts(10,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/launchCommunity/launchCommunity.saga.test.ts(85,9): error TS2578: Unused '@ts-expect-error' directive.
src/sagas/communities/launchCommunity/launchCommunity.saga.test.ts(148,9): error TS2578: Unused '@ts-expect-error' directive.
src/sagas/communities/responseCreateNetwork/responseCreateNetwork.saga.test.ts(13,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/communities/updateCommunity/updateCommunity.saga.test.ts(9,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/errors/errors.selectors.test.ts(9,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/errors/handleErrors/handleErrors.saga.test.ts(10,25): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/autoDownloadFiles/autoDownloadFiles.saga.test.ts(22,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/broadcastHostedFile/broadcastHostedFile.saga.test.ts(19,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/cancelDownload/cancelDownload.saga.test.ts(16,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/downloadFile/downloadFileSaga.test.ts(18,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/resetTransferSpeed/resetTransferSpeed.saga.test.ts(17,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/updateMessageMedia/updateMessageMedia.test.ts(17,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/files/uploadFile/uploadFile.saga.test.ts(25,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/checkForMessages/checkForMessages.saga.test.ts(15,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/incomingMessages/incomingMessages.saga.test.ts(22,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/manageCache/extendChannelCache.saga.test.ts(22,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/manageCache/resetChannelCache.saga.test.ts(21,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/messages.selectors.test.ts(11,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/sendDeletionMessage/sendDeletionMessage.saga.test.ts(16,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/messages/sendMessage/sendMessage.saga.test.ts(28,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/channelDeletionResponse/channelDeletionResponse.saga.test.ts(16,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/channelsReplicated/channelsReplicated.saga.test.ts(17,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/createGeneralChannel/createGeneralChannel.saga.test.ts(15,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/createGeneralChannel/sendInitialChannelMessage.saga.test.ts(17,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/deleteChannel/deleteChannel.saga.test.ts(20,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/markUnreadChannels/markUnreadChannels.saga.test.ts(3,22): error TS2724: '"../../.."' has no exported member named 'Community'. Did you mean 'CommunityId'?
src/sagas/publicChannels/publicChannels.selectors.test.ts(25,27): error TS2307: Cannot find module '@quiet/types' or its corresponding type declarations.
src/sagas/publicChannels/updateNewestMessage/updateNewestMessage.saga.test.ts(3,22): error TS2724: '"../../.."' has no exported member named 'Community'. Did you mean 'CommunityId'?
src/sagas/users/users.selectors.test.ts(7,3): error TS2459: Module '"../communities/communities.slice"' declares 'Community' locally, but it is not exported.
src/sagas/users/users.slice.test.ts(3,48): error TS2459: Module '"../communities/communities.slice"' declares 'Community' locally, but it is not exported.
src/types.ts(18,10): error TS2459: Module '"./sagas/communities/communities.slice"' declares 'Community' locally, but it is not exported.

0 comments on commit ad528eb

Please sign in to comment.