Skip to content

Commit

Permalink
Deduplicate yarn packages (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanregisser authored and celo-ci-bot-user committed Nov 19, 2019
1 parent 3b15c1d commit fc08761
Show file tree
Hide file tree
Showing 10 changed files with 493 additions and 4,208 deletions.
3 changes: 1 addition & 2 deletions packages/celotool/src/lib/generate_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ec as EC } from 'elliptic'
import fs from 'fs'
import { range, repeat } from 'lodash'
import path from 'path'
import rlp from 'rlp'
import * as rlp from 'rlp'
import Web3 from 'web3'
import { envVar, fetchEnv, fetchEnvOrFallback, monorepoRoot } from './env-utils'
import {
Expand Down Expand Up @@ -166,7 +166,6 @@ const generateIstanbulExtraData = (validators: Validator[]) => {
'0x' +
repeat('0', istanbulVanity * 2) +
rlp
// @ts-ignore
.encode([
// Added validators
validators.map((validator) => Buffer.from(validator.address, 'hex')),
Expand Down
8 changes: 6 additions & 2 deletions packages/celotool/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ export function execCmd(
)

if (pipeOutput) {
execProcess.stdout.pipe(process.stdout)
execProcess.stderr.pipe(process.stderr)
if (execProcess.stdout) {
execProcess.stdout.pipe(process.stdout)
}
if (execProcess.stderr) {
execProcess.stderr.pipe(process.stderr)
}
}
})
}
Expand Down
3 changes: 3 additions & 0 deletions packages/contractkit/src/test-utils/PromiEventStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ interface PromiEventStub<T> extends PromiEvent<T> {
export function promiEventSpy<T>(): PromiEventStub<T> {
const ee = new EventEmitter()
const pe: PromiEventStub<T> = {
finally: () => {
throw new Error('not implemented')
},
catch: () => {
throw new Error('not implemented')
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/src/qrcode/QRScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class QRScanner extends React.Component<Props, State> {
Logger.debug('QRScanner', 'Bar code detected')
this.props.handleBarcodeDetected(rawData)
})
this.timeout = setTimeout(() => {
this.timeout = window.setTimeout(() => {
this.setState({ isScanningEnabled: true })
}, 1000)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/src/verify/VerificationInputScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class VerificationInputScreen extends React.Component<Props, State> {
}

componentDidMount() {
this.interval = setInterval(() => {
this.interval = window.setInterval(() => {
const timer = this.state.timer
if (timer === 1) {
clearInterval(this.interval)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class VerificationInterstitialScreen extends React.Component<WithNamespaces> {
timeout: number | undefined

componentDidMount() {
this.timeout = setTimeout(() => {
this.timeout = window.setTimeout(() => {
navigate(Screens.VerificationInputScreen)
}, SCREEN_DURATION)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/src/web3/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function* checkWeb3SyncProgress() {
Logger.debug(TAG, 'checkWeb3SyncProgress', 'Checking sync progress')

// isSyncing returns a syncProgress object when it's still syncing, false otherwise
const syncProgress = yield web3.eth.isSyncing()
const syncProgress = yield call(web3.eth.isSyncing)

if (typeof syncProgress === 'boolean' && !syncProgress) {
Logger.debug(TAG, 'checkWeb3SyncProgress', 'Sync maybe complete, checking')
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/analytics/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export default function Initializer(CeloAnalytics: CeloAnalyticsType, Logger: Re
}
}

function forwardRef(props: {}, ref?: React.Ref<React.ReactElement<any>>) {
return <ComponentWithAnalytics {...props as P} forwardedRef={ref} />
function forwardRef(props: P, ref: any) {
return <ComponentWithAnalytics {...props} forwardedRef={ref} />
}

forwardRef.displayName = `WithAnalytics(${displayName})`
Expand Down
4 changes: 2 additions & 2 deletions packages/transaction-metrics-exporter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import express from 'express'
import * as PromClient from 'prom-client'
import { metricExporterWithRestart } from './blockchain'

process.on('unhandledRejection', (error) => {
console.log('unhandledRejection', error.message)
process.on('unhandledRejection', (reason) => {
console.log('unhandledRejection', reason)
process.exit(1)
})

Expand Down
Loading

0 comments on commit fc08761

Please sign in to comment.