Skip to content

Commit

Permalink
Merge branch 'develop' into optimize-issue-template
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Nov 28, 2023
2 parents 4f9811a + c530736 commit e28d2ae
Show file tree
Hide file tree
Showing 51 changed files with 546 additions and 317 deletions.
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,30 @@
"update:client-versions": "node ./scripts/update-ckb-client-versions.js"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/core": "7.23.3",
"@types/jest": "27.5.2",
"@types/node": "18.16.18",
"@types/npmlog": "4.1.4",
"@types/npmlog": "4.1.6",
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"concurrently": "8.2.1",
"concurrently": "8.2.2",
"cross-env": "7.0.3",
"eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"eslint": "8.54.0",
"eslint-config-prettier": "8.10.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.3",
"lerna": "7.1.0",
"lint-staged": "13.3.0",
"ncp": "2.0.0",
"prettier": "2.8.8",
"ts-jest": "27.1.5",
"typescript": "5.0.4",
"typescript": "5.3.2",
"wait-on": "7.0.1"
},
"dependencies": {},
"resolutions": {
"@types/react": "17.0.65",
"react-i18next": ">=11.16.4",
"usb": "1.8.8"
"@types/react": "17.0.71",
"react-i18next": ">=11.16.4"
},
"volta": {
"node": "18.16.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.stories.*', 'src/setupTests.ts'],
devDependencies: ['**/*.stories.*', 'src/setupTests.ts', '**/*.test.ts'],
},
],
'import/extensions': [
Expand Down
21 changes: 11 additions & 10 deletions packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"last 2 chrome versions"
],
"dependencies": {
"@ckb-lumos/base": "0.21.0-next.1",
"@ckb-lumos/codec": "0.21.0-next.1",
"@ckb-lumos/base": "0.21.0-next.2",
"@ckb-lumos/codec": "0.21.0-next.2",
"@nervosnetwork/ckb-sdk-core": "0.109.0",
"@nervosnetwork/ckb-sdk-utils": "0.109.0",
"canvg": "2.0.0",
Expand All @@ -69,7 +69,8 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/preset-typescript": "7.23.2",
"@babel/preset-typescript": "7.23.3",
"@jest/globals": "27.5.1",
"@storybook/addon-actions": "7.0.24",
"@storybook/addon-essentials": "7.0.24",
"@storybook/addon-interactions": "7.0.24",
Expand All @@ -78,17 +79,17 @@
"@storybook/preset-create-react-app": "7.0.24",
"@storybook/react": "7.0.24",
"@storybook/react-webpack5": "7.0.24",
"@storybook/testing-library": "0.2.0",
"@types/enzyme": "3.10.13",
"@types/enzyme-adapter-react-16": "1.0.6",
"@storybook/testing-library": "0.2.2",
"@types/enzyme": "3.10.16",
"@types/enzyme-adapter-react-16": "1.0.9",
"@types/node": "18.16.18",
"@types/react": "17.0.65",
"@types/react-dom": "17.0.20",
"@types/react": "17.0.71",
"@types/react-dom": "17.0.25",
"@types/react-router-dom": "5.3.3",
"@types/styled-components": "5.1.27",
"@types/styled-components": "5.1.32",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"babel-jest": "25.5.1",
"electron": "24.8.5",
"electron": "24.8.8",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"eslint-config-airbnb": "19.0.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import calculateAPC from 'utils/calculateAPC'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import calculateClaimEpochValue from 'utils/calculateClaimEpochValue'
import fixtures from './fixtures.json'

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/calendar/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from '@jest/globals'
import {
isDayInRange,
isMonthInRange,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { CKBToShannonFormatter } from 'utils/formatters'
import { CapacityUnit } from 'utils'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { addressesToBalance } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { bytesFormatter } from 'utils/formatters'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { complexNumberToPureNumber } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { currencyFormatter } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { difficultyFormatter } from 'utils/formatters'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { outputsToTotalAmount } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from '@jest/globals'
import { padFractionDigitsIfDecimal } from 'utils/formatters'

describe('padFractionDigitsIfDecimal', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { sUDTAmountFormatter } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { shannonToCKBFormatter } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from '@jest/globals'
import { sporeFormatter, truncateMiddle } from 'utils/formatters'

describe('sporeFormatter', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { sudtAmountToValue } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { sudtValueToAmount } from 'utils/formatters'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import getCompensatedTime from 'utils/getCompensatedTime'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import getCompensationPeriod from 'utils/getCompensationPeriod'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { ConnectionStatus } from 'utils'
import getConnectionStatus from 'utils/getConnectionStatus'
import fixtures from './fixtures.json'
Expand All @@ -9,6 +10,6 @@ describe('Test getConnectionStatus', () => {

test.each(fixtureTable)(`%s`, (_title, params, expected) => {
expect.assertions(1)
expect(getConnectionStatus(...params)).toBe(expected)
expect(getConnectionStatus(params[0])).toBe(expected)
})
})
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import getDAOCellStatus, { CellStatus } from 'utils/getDAOCellStatus'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from '@jest/globals'
import { MultisigConfig } from 'services/remote'
import getMultisigSignStatus from 'utils/getMultisigSignStatus'
import { addressToScript, scriptToHash } from '@nervosnetwork/ckb-sdk-utils'
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/getPageNoList/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import getPageNoList from 'utils/getPageNoList'
import fixtures from './fixtures'

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/getSyncLeftTime/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import getSyncLeftTime from 'utils/getSyncLeftTime'
import fixtures from './fixtures.json'

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/is/isMainnet/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isMainnet } from 'utils/is'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isReadyByVersion } from 'utils/is'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isSuccessResponse } from 'utils/is'
import fixtures from './fixtures'

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/parsers/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from '@jest/globals'
import { listParams, epochParser, toUint128Le } from 'utils/parsers'

describe('listParams', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/sortAccounts/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import sortAccounts, { Account } from 'utils/sortAccounts'
import fixtures from './fixtures.json'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAddress } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAmount } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAmountRange } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAssetAccountAddress } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAssetAccountName } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateDecimal } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateNetworkName } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { validateOutputs } from 'utils/validators'
import fixtures from './fixtures'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validatePasswordComplexity } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateAssetAccountAmount } from 'utils/validators'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateSymbol } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateTokenId } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateTokenName } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateTotalAmount } from 'utils/validators'

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/tests/validators/url/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, test, expect } from '@jest/globals'
import { isErrorWithI18n } from 'exceptions'
import { validateURL } from 'utils/validators'
import fixtures from './fixtures'
Expand Down
46 changes: 23 additions & 23 deletions packages/neuron-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
]
},
"dependencies": {
"@ckb-lumos/base": "0.21.0-next.1",
"@ckb-lumos/bi": "0.21.0-next.1",
"@ckb-lumos/ckb-indexer": "0.21.0-next.1",
"@ckb-lumos/codec": "0.21.0-next.1",
"@ckb-lumos/common-scripts": "0.21.0-next.1",
"@ckb-lumos/config-manager": "0.21.0-next.1",
"@ckb-lumos/hd": "0.21.0-next.1",
"@ckb-lumos/helpers": "0.21.0-next.1",
"@ckb-lumos/rpc": "0.21.0-next.1",
"@ckb-lumos/base": "0.21.0-next.2",
"@ckb-lumos/bi": "0.21.0-next.2",
"@ckb-lumos/ckb-indexer": "0.21.0-next.2",
"@ckb-lumos/codec": "0.21.0-next.2",
"@ckb-lumos/common-scripts": "0.21.0-next.2",
"@ckb-lumos/config-manager": "0.21.0-next.2",
"@ckb-lumos/hd": "0.21.0-next.2",
"@ckb-lumos/helpers": "0.21.0-next.2",
"@ckb-lumos/rpc": "0.21.0-next.2",
"@iarna/toml": "2.2.5",
"@ledgerhq/hw-transport-node-hid": "6.27.16",
"@ledgerhq/hw-transport-node-hid": "6.27.22",
"@spore-sdk/core": "0.1.0-beta.9",
"archiver": "5.3.0",
"async": "3.2.4",
"archiver": "5.3.2",
"async": "3.2.5",
"bn.js": "4.12.0",
"chalk": "3.0.0",
"dotenv": "8.6.0",
Expand All @@ -77,27 +77,27 @@
"uuid": "8.3.2"
},
"devDependencies": {
"@electron/notarize": "2.0.0",
"@electron/notarize": "2.2.0",
"@nervosnetwork/ckb-types": "0.109.0",
"@types/archiver": "3.1.1",
"@types/async": "3.2.21",
"@types/electron-devtools-installer": "2.2.2",
"@types/elliptic": "6.4.15",
"@types/iarna__toml": "2.0.2",
"@types/async": "3.2.24",
"@types/electron-devtools-installer": "2.2.5",
"@types/elliptic": "6.4.18",
"@types/iarna__toml": "2.0.5",
"@types/jest-when": "3.5.2",
"@types/ledgerhq__hw-transport": "4.21.4",
"@types/ledgerhq__hw-transport-node-hid": "4.22.2",
"@types/leveldown": "4.0.4",
"@types/ledgerhq__hw-transport": "4.21.8",
"@types/ledgerhq__hw-transport-node-hid": "4.22.5",
"@types/leveldown": "4.0.6",
"@types/levelup": "4.3.3",
"@types/sqlite3": "3.1.8",
"@types/sqlite3": "3.1.11",
"@types/uuid": "8.3.4",
"devtron": "1.4.0",
"electron": "24.8.5",
"electron": "24.8.8",
"electron-build-env": "0.2.0",
"electron-builder": "23.6.0",
"electron-devtools-installer": "3.2.0",
"jest-when": "3.5.2",
"neuron-ui": "0.111.1",
"typescript": "5.0.4"
"typescript": "5.3.2"
}
}
Loading

1 comment on commit e28d2ae

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 7016274668

Please sign in to comment.