Skip to content
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

Update all non-crate deps #841

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"test": "vitest run"
},
"dependencies": {
"@penumbra-zone/bech32": "workspace:*",
"@penumbra-zone/client": "workspace:*",
"@penumbra-zone/constants": "workspace:*",
"@penumbra-zone/crypto-web": "workspace:*",
"@penumbra-zone/bech32": "workspace:*",
"@penumbra-zone/perspective": "workspace:*",
"@penumbra-zone/query": "workspace:*",
"@penumbra-zone/router": "workspace:*",
Expand All @@ -27,40 +27,40 @@
"@penumbra-zone/types": "workspace:*",
"@penumbra-zone/ui": "workspace:*",
"@penumbra-zone/wasm": "workspace:*",
"@tanstack/react-query": "^5.28.2",
"@tanstack/react-query": "^5.28.9",
"buffer": "^6.0.3",
"exponential-backoff": "^3.1.1",
"framer-motion": "^11.0.13",
"framer-motion": "^11.0.22",
"immer": "^10.0.4",
"node-fetch": "^3.3.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3",
"react-use-measure": "^2.1.1",
"usehooks-ts": "^3.0.1",
"usehooks-ts": "^3.0.2",
"zustand": "^4.5.2"
},
"devDependencies": {
"@penumbra-zone/polyfills": "workspace:*",
"@radix-ui/react-icons": "^1.3.0",
"@types/firefox-webext-browser": "^120.0.3",
"@types/react": "^18.2.66",
"@types/react": "^18.2.72",
"@types/react-dom": "^18.2.22",
"autoprefixer": "^10.4.18",
"autoprefixer": "^10.4.19",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.10.0",
"dotenv": "^16.4.5",
"html-webpack-plugin": "^5.6.0",
"postcss": "^8.4.35",
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"promise.withresolvers": "^1.0.2",
"promise.withresolvers": "^1.0.3",
"style-loader": "^3.3.4",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.5.1",
"tsx": "^4.7.1",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0",
"webpack": "^5.90.3",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.10.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
PenumbraRequestFailure,
PenumbraSymbol,
} from '@penumbra-zone/client/src/global';
import { PraxMessage, isPraxFailureMessageEvent, isPraxPortMessageEvent } from './message-event';
import { isPraxFailureMessageEvent, isPraxPortMessageEvent, PraxMessage } from './message-event';

import '@penumbra-zone/polyfills/src/Promise.withResolvers';
import { PraxConnection } from '../message/prax';
Expand Down Expand Up @@ -87,7 +87,7 @@ const postRequest = () => {
window.origin,
);
request.promise
.catch(e => connection.reject(e))
.catch((e: unknown) => connection.reject(e))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New eslint rule: https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable/

Catch needs to specify that it's an unknown

.finally(() => window.removeEventListener('message', requestResponseListener));
}
return request.promise;
Expand Down
5 changes: 2 additions & 3 deletions apps/extension/src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {
import { isChromeResponderDroppedError } from '@penumbra-zone/types/src/internal-msg/chrome-error';
import { Code, ConnectError } from '@connectrpc/connect';
import { errorFromJson } from '@connectrpc/connect/protocol-connect';
import { JsonValue } from '@bufbuild/protobuf';

export const popup = async <M extends PopupMessage>(
req: PopupRequest<M>,
Expand All @@ -18,12 +17,12 @@ export const popup = async <M extends PopupMessage>(
await new Promise(resolve => setTimeout(resolve, 800));
const response = await chrome.runtime
.sendMessage<InternalRequest<M>, InternalResponse<M>>(req)
.catch(e => {
.catch((e: unknown) => {
if (isChromeResponderDroppedError(e)) return null;
else throw e;
});
if (response && 'error' in response) {
throw errorFromJson(response.error as JsonValue, undefined, ConnectError.from(response));
throw errorFromJson(response.error, undefined, ConnectError.from(response));
} else {
return response && response.data;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/utils/rethrow-impl-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const wrapUnaryImpl =
try {
const result = methodImplementation(req, ctx);
if (result instanceof Promise)
return result.catch(e => {
return result.catch((e: unknown) => {
throw ConnectError.from(e);
});
return result;
Expand Down
20 changes: 10 additions & 10 deletions apps/minifront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@penumbra-zone/types": "workspace:*",
"@penumbra-zone/ui": "workspace:*",
"@radix-ui/react-icons": "^1.3.0",
"@tanstack/react-query": "^5.26.3",
"@tanstack/react-query": "^5.28.9",
"bignumber.js": "^9.1.2",
"date-fns": "^3.4.0",
"framer-motion": "^11.0.14",
"date-fns": "^3.6.0",
"framer-motion": "^11.0.22",
"immer": "^10.0.4",
"lodash": "^4.17.21",
"react": "^18.2.0",
Expand All @@ -41,14 +41,14 @@
"devDependencies": {
"@penumbra-zone/polyfills": "workspace:*",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/react": "^14.2.2",
"@types/lodash": "^4.17.0",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@types/react": "^18.2.72",
"@types/react-dom": "^18.2.22",
"@types/react-helmet": "^6.1.11",
"autoprefixer": "^10.4.18",
"firebase-tools": "^13.4.1",
"postcss": "^8.4.35",
"promise.withresolvers": "^1.0.2"
"autoprefixer": "^10.4.19",
"firebase-tools": "^13.6.0",
"postcss": "^8.4.38",
"promise.withresolvers": "^1.0.3"
}
}
6 changes: 3 additions & 3 deletions apps/node-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"@penumbra-zone/crypto-web": "workspace:*",
"@penumbra-zone/types": "workspace:*",
"@penumbra-zone/ui": "workspace:*",
"date-fns": "^3.3.1",
"date-fns": "^3.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-loader-spinner": "^6.1.6",
"react-router-dom": "^6.22.3",
"tailwindcss": "^3.4.1"
},
"devDependencies": {
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21"
"@types/react": "^18.2.72",
"@types/react-dom": "^18.2.22"
}
}
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"all-check": "pnpm install && pnpm compile && pnpm format-check && pnpm lint && pnpm test && pnpm download-keys && pnpm build && pnpm format-check:rust && pnpm lint:rust && pnpm test:rust"
},
"dependencies": {
"@buf/cosmos_ibc.bufbuild_es": "1.7.2-20240215124455-b32ecf3ebbcb.1",
"@buf/cosmos_ibc.connectrpc_es": "1.4.0-20240215124455-b32ecf3ebbcb.1",
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.7.2-20240312215156-05b4a4f2471b.1",
"@buf/penumbra-zone_penumbra.connectrpc_es": "1.4.0-20240312215156-05b4a4f2471b.1",
"@buf/tendermint_tendermint.bufbuild_es": "1.7.2-20231117195010-33ed361a9051.1",
"@buf/cosmos_ibc.bufbuild_es": "1.8.0-20240327103030-e2006674271c.2",
"@buf/cosmos_ibc.connectrpc_es": "1.4.0-20240327103030-e2006674271c.2",
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.8.0-20240326223351-a25fff24022e.2",
"@buf/penumbra-zone_penumbra.connectrpc_es": "1.4.0-20240326223351-a25fff24022e.2",
"@buf/tendermint_tendermint.bufbuild_es": "1.8.0-20231117195010-33ed361a9051.2",
"@bufbuild/protobuf": "^1.8.0",
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-web": "^1.4.0",
Expand All @@ -35,38 +35,38 @@
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@penumbra-zone/wasm": "workspace:*",
"@storybook/react-vite": "8.0.0-beta.4",
"@turbo/gen": "^1.12.5",
"@storybook/react-vite": "8.0.4",
"@turbo/gen": "^1.13.0",
"@types/chrome": "0.0.263",
"@types/node": "^20.11.27",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitejs/plugin-basic-ssl": "^1.1.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitest/browser": "^1.3.1",
"@vitest/browser": "^1.4.0",
"eslint": "^8.57.0",
"eslint-config-custom": "workspace:*",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^1.12.5",
"eslint-config-turbo": "^1.13.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-react": "7.34.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-tailwindcss": "^3.15.1",
"eslint-plugin-turbo": "^1.12.5",
"eslint-plugin-vitest": "^0.3.26",
"eslint-plugin-turbo": "^1.13.0",
"eslint-plugin-vitest": "^0.4.0",
"jsdom": "^24.0.0",
"playwright": "^1.42.1",
"prettier": "^3.2.5",
"tsconfig": "workspace:*",
"turbo": "^1.12.5",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"turbo": "^1.13.0",
"typescript": "^5.4.3",
"vite": "^5.2.6",
"vite-plugin-dts": "^3.7.3",
"vite-plugin-externalize-deps": "^0.8.0",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0",
"vitest": "^1.3.1"
"vitest": "^1.4.0"
}
}
4 changes: 2 additions & 2 deletions packages/client/src/prax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createChannelTransport } from '@penumbra-zone/transport-dom/src/create'
import { PenumbraSymbol } from './global';
import { jsonOptions } from '@penumbra-zone/types/src/registry';

const prax_id = 'lkpmkhpnhknhmibgnmmhdhgdilepfghe' as const;
const prax_id = 'lkpmkhpnhknhmibgnmmhdhgdilepfghe';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Eslint rule that is was an unnecessary const

const prax_origin = `chrome-extension://${prax_id}`;
const prax_manifest = `chrome-extension://${prax_id}/manifest.json`;

Expand All @@ -30,7 +30,7 @@ export const requestPraxConnection = async () => {
if (window[PenumbraSymbol]?.[prax_origin]?.manifest !== prax_manifest) {
throw new PraxManifestError('Incorrect Prax manifest href');
}
return window[PenumbraSymbol][prax_origin]?.request();
return window[PenumbraSymbol][prax_origin].request();
};

export const isPraxConnected = () => Boolean(window[PenumbraSymbol]?.[prax_origin]?.isConnected());
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-custom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = {
],
},
],
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New eslint rule: https://typescript-eslint.io/rules/restrict-template-expressions/

I think this makes sense for everything except for numbers. I think we all know that putting a number into a string template stringifies it and there isn't any crazy things like [object Object] to worry about.

},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "vitest run"
},
"dependencies": {
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.8.0-20240313211643-35db357c277d.1",
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.8.0-20240326223351-a25fff24022e.2",
"@penumbra-zone/bech32": "workspace:*",
"@penumbra-zone/types": "workspace:*",
"@penumbra-zone/wasm": "workspace:*"
Expand Down
8 changes: 7 additions & 1 deletion packages/router/src/grpc/custody/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import { authorize } from './authorize';

export type Impl = ServiceImpl<typeof CustodyService>;

export const custodyImpl: Omit<Impl, 'confirmAddress' | 'exportFullViewingKey'> = {
export const custodyImpl: Omit<
Impl,
| 'confirmAddress'
| 'exportFullViewingKey'
| 'authorizeValidatorVote'
| 'authorizeValidatorDefinition'
> = {
authorize,
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IdentityKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/co
import Array from '@penumbra-zone/polyfills/src/Array.fromAsync';
import { customizeSymbol } from '@penumbra-zone/types/src/customize-symbol';
import { bech32IdentityKey } from '@penumbra-zone/bech32/src/identity-key';
import { STAKING_TOKEN_METADATA, assetPatterns } from '@penumbra-zone/constants/src/assets';
import { assetPatterns, STAKING_TOKEN_METADATA } from '@penumbra-zone/constants/src/assets';
import { Any, PartialMessage } from '@bufbuild/protobuf';
import { getValidatorInfo } from '@penumbra-zone/getters/src/validator-info-response';
import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info';
Expand Down Expand Up @@ -55,9 +55,11 @@ export const delegationsByAddressIndex: Impl['delegationsByAddressIndex'] = asyn
balances(new BalancesRequest({ accountFilter: addressIndex }), ctx),
);

for await (const validatorInfoResponse of stakingClient.validatorInfo({
showInactive: req.filter === DelegationsByAddressIndexRequest_Filter.ALL,
})) {
// Strangely not recognizing enums are the same type
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
const showInactive = req.filter === DelegationsByAddressIndexRequest_Filter.ALL;

for await (const validatorInfoResponse of stakingClient.validatorInfo({ showInactive })) {
const validatorInfo = getValidatorInfo(validatorInfoResponse);
const extendedMetadata = new Any({
typeUrl: ValidatorInfo.typeName,
Expand All @@ -81,6 +83,8 @@ export const delegationsByAddressIndex: Impl['delegationsByAddressIndex'] = asyn

yield new DelegationsByAddressIndexResponse({ valueView: withValidatorInfo });
} else {
// Strangely not recognizing enums are the same type
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (req.filter === DelegationsByAddressIndexRequest_Filter.ALL_ACTIVE_WITH_NONZERO_BALANCES) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/services/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class Services implements ServicesInterface {
// they'll all wait for the same promise rather than each starting their own initialization process.
public async getWalletServices(): Promise<WalletServices> {
if (!this.walletServicesPromise) {
this.walletServicesPromise = this.initializeWalletServices().catch(e => {
this.walletServicesPromise = this.initializeWalletServices().catch((e: unknown) => {
// If promise rejected, reset promise to `undefined` so next caller can try again
this.walletServicesPromise = undefined;
throw e;
Expand Down
2 changes: 1 addition & 1 deletion packages/transport-chrome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "vitest run"
},
"dependencies": {
"@bufbuild/protobuf": "^1.7.2",
"@bufbuild/protobuf": "^1.8.0",
"@connectrpc/connect": "^1.4.0",
"@penumbra-zone/transport-dom": "workspace:*"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/transport-chrome/session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ export class CRSessionManager {
? this.responseChannelStream(signal, { requestId, stream: response })
: { requestId, message: response },
)
.catch(error => ({ requestId, error: errorToJson(ConnectError.from(error), undefined) }));
.catch((error: unknown) => ({
requestId,
error: errorToJson(ConnectError.from(error), undefined),
}));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/transport-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"test": "vitest run"
},
"devDependencies": {
"@buf/connectrpc_eliza.bufbuild_es": "1.8.0-20230913231627-233fca715f49.1",
"@buf/connectrpc_eliza.connectrpc_es": "1.4.0-20230913231627-233fca715f49.1",
"@buf/connectrpc_eliza.bufbuild_es": "1.8.0-20230913231627-233fca715f49.2",
"@buf/connectrpc_eliza.connectrpc_es": "1.4.0-20230913231627-233fca715f49.2",
"@penumbra-zone/polyfills": "workspace:*"
}
}
Loading
Loading