Skip to content

Commit

Permalink
deps: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
renzholy committed Aug 18, 2021
1 parent da8b61f commit 7e53077
Show file tree
Hide file tree
Showing 13 changed files with 339 additions and 462 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"homepage": "https://github.com/renzholy/mongood#readme",
"dependencies": {
"@babel/generator": "7.14.9",
"@babel/parser": "7.14.9",
"@babel/generator": "7.15.0",
"@babel/parser": "7.15.3",
"@babel/template": "7.14.5",
"@fluentui/react": "^8.28.2",
"@monaco-editor/react": "^4.2.2",
Expand All @@ -47,7 +47,7 @@
"swr": "^0.5.6"
},
"devDependencies": {
"@babel/types": "7.14.9",
"@babel/types": "7.15.0",
"@types/babel__generator": "7.6.3",
"@types/babel__parser": "7.1.1",
"@types/babel__template": "7.4.1",
Expand All @@ -56,7 +56,7 @@
"@types/deepmerge": "^2.2.0",
"@types/lodash": "^4.14.172",
"@types/markdown-table": "^3.0.0",
"@types/mongodb": "^3.6.20",
"@types/mongodb": "^4.0.7",
"@types/mongodb-uri": "^0.9.1",
"@types/react": "^17.0.18",
"@types/react-dom": "^17.0.9",
Expand All @@ -74,7 +74,7 @@
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.1",
"lint-staged": "^11.1.2",
"monaco-editor": "^0.26.1",
"monaco-editor": "^0.27.0",
"prettier": "^2.3.2",
"typescript": "^4.3.5"
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/indexes-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IColumn } from '@fluentui/react'
import { useState, useEffect, useCallback, useMemo } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import { keyBy } from 'lodash'
import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'
import {
useCommandCollStats,
useCommandListIndexes,
Expand All @@ -22,7 +22,7 @@ import Table from './pure/table'
import IndexCell from './pure/index-cell'
import DefaultDialog from './pure/default-dialog'

type Index = IndexSpecification & { size?: number; ops: number; since: Date }
type Index = IndexDescription & { size?: number; ops: number; since: Date }

export default function IndexesList() {
const { data } = useCommandIndexStats()
Expand Down
4 changes: 2 additions & 2 deletions src/components/pure/index-button.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DefaultButton } from '@fluentui/react'
import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'

export default function IndexButton(props: {
selected?: boolean
onSelect?(): void
value: IndexSpecification
value: IndexDescription
}) {
return (
<DefaultButton
Expand Down
4 changes: 2 additions & 2 deletions src/components/pure/index-cell.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-disable react/no-danger */

import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'
import { IColumn, getTheme } from '@fluentui/react'
import bytes from 'bytes'
import { formatNumber, formatDate } from 'utils/formatter'
import IndexFeatures from './index-features'
import IndexInfo from './index-info'

export default function IndexCell(props: {
item: IndexSpecification
item: IndexDescription
column: IColumn
size?: number
accesses?: { ops: number; since: Date }
Expand Down
4 changes: 2 additions & 2 deletions src/components/pure/index-features.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'
import { useMemo, useCallback } from 'react'
import { compact, size } from 'lodash'
import {
Expand Down Expand Up @@ -55,7 +55,7 @@ function IndexFeature(props: { value: { text: string; data?: object } }) {
)
}

export default function IndexFeatures(props: { value: IndexSpecification }) {
export default function IndexFeatures(props: { value: IndexDescription }) {
const features = useMemo<{ text: string; data: object }[]>(
() =>
compact([
Expand Down
4 changes: 2 additions & 2 deletions src/components/pure/index-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import { Text, getTheme, Icon, Stack } from '@fluentui/react'
import { map } from 'lodash'
import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'

export default function IndexInfo(props: { value: IndexSpecification }) {
export default function IndexInfo(props: { value: IndexDescription }) {
const theme = getTheme()

return (
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/use-command.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import useSWR from 'swr'
import { useSelector } from 'react-redux'
import { isEmpty } from 'lodash'
import type { CollStats, IndexSpecification } from 'mongodb'
import type { CollStats, IndexDescription } from 'mongodb'
import { runCommand } from 'utils/fetcher'
import {
MongoData,
Expand Down Expand Up @@ -123,7 +123,7 @@ export function useCommandListIndexes() {
const [{ conn, database, collection }] = useRouterQuery()
const connection = useConnection(conn)

return useSWR<{ cursor: { firstBatch: IndexSpecification[] } }, Error>(
return useSWR<{ cursor: { firstBatch: IndexDescription[] } }, Error>(
connection && database && collection
? ['listIndexes', connection, database, collection]
: null,
Expand Down
12 changes: 6 additions & 6 deletions src/stores/docs.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import type {
IndexSpecification,
FilterQuery,
Filter,
SchemaMember,
ProjectionOperators,
IndexDescription,
} from 'mongodb'
import { isEqual } from 'lodash'
import { DisplayMode } from 'types'
Expand All @@ -20,8 +20,8 @@ export default createSlice({
limit: storage.limit.get,
} as {
displayMode: DisplayMode
index?: IndexSpecification
filter: FilterQuery<unknown>
index?: IndexDescription
filter: Filter<unknown>
projection: SchemaMember<
unknown,
ProjectionOperators | number | boolean | any
Expand All @@ -40,12 +40,12 @@ export default createSlice({
},
setIndex: (
state,
{ payload }: PayloadAction<IndexSpecification | undefined>,
{ payload }: PayloadAction<IndexDescription | undefined>,
) => ({
...state,
index: payload,
}),
setFilter: (state, { payload }: PayloadAction<FilterQuery<unknown>>) =>
setFilter: (state, { payload }: PayloadAction<Filter<unknown>>) =>
isEqual(payload, state.filter)
? state
: {
Expand Down
9 changes: 3 additions & 6 deletions src/stores/indexes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import type { IndexSpecification } from 'mongodb'
import type { IndexDescription } from 'mongodb'

export default createSlice({
name: 'indexes',
Expand All @@ -11,7 +11,7 @@ export default createSlice({
isViewOpen: boolean
isDetailOpen: boolean
isDialogHidden: boolean
invokedIndex?: IndexSpecification
invokedIndex?: IndexDescription
},
reducers: {
setIsViewOpen: (state, { payload }: PayloadAction<boolean>) => ({
Expand All @@ -26,10 +26,7 @@ export default createSlice({
...state,
isDialogHidden: payload,
}),
setInvokedIndex: (
state,
{ payload }: PayloadAction<IndexSpecification>,
) => ({
setInvokedIndex: (state, { payload }: PayloadAction<IndexDescription>) => ({
...state,
invokedIndex: payload,
}),
Expand Down
6 changes: 3 additions & 3 deletions src/stores/operations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import type { FilterQuery } from 'mongodb'
import type { Filter } from 'mongodb'
import { isEqual } from 'lodash'
import { MongoData } from 'types'

Expand All @@ -13,7 +13,7 @@ export default createSlice({
isMenuHidden: true,
} as {
host?: string
filter: FilterQuery<unknown>
filter: Filter<unknown>
refreshInterval: number
isEditorOpen: boolean
isDialogHidden: boolean
Expand All @@ -25,7 +25,7 @@ export default createSlice({
...state,
host: payload,
}),
setFilter: (state, { payload }: PayloadAction<FilterQuery<unknown>>) =>
setFilter: (state, { payload }: PayloadAction<Filter<unknown>>) =>
isEqual(payload, state.filter)
? state
: {
Expand Down
6 changes: 3 additions & 3 deletions src/stores/profiling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import type { FilterQuery } from 'mongodb'
import type { Filter } from 'mongodb'
import { isEqual } from 'lodash'
import { MongoData } from 'types'
import { storage } from 'utils/storage'
Expand All @@ -14,7 +14,7 @@ export default createSlice({
isMenuHidden: true,
} as {
host?: string
filter: FilterQuery<unknown>
filter: Filter<unknown>
skip: number
limit: number
isEditorOpen: boolean
Expand All @@ -26,7 +26,7 @@ export default createSlice({
...state,
host: payload,
}),
setFilter: (state, { payload }: PayloadAction<FilterQuery<unknown>>) =>
setFilter: (state, { payload }: PayloadAction<Filter<unknown>>) =>
isEqual(payload, state.filter)
? state
: {
Expand Down
Loading

0 comments on commit 7e53077

Please sign in to comment.