From b645b4f9650583ffb14fb0c571f2ec8b33926a24 Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Tue, 12 Mar 2024 14:12:47 -0700 Subject: [PATCH] Distribute only the types package of `undici` with `@solana/rpc-transport-http` (#2298) --- packages/rpc-transport-http/package.json | 3 ++- .../rpc-transport-http/src/http-transport.ts | 2 +- pnpm-lock.yaml | 20 ++++++++++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/rpc-transport-http/package.json b/packages/rpc-transport-http/package.json index d15396b1159c..d94a8c92dcbb 100644 --- a/packages/rpc-transport-http/package.json +++ b/packages/rpc-transport-http/package.json @@ -66,10 +66,11 @@ "dependencies": { "@solana/errors": "workspace:*", "@solana/rpc-spec": "workspace:*", - "undici": "^6.6.2" + "undici-types": "^6.7.1" }, "devDependencies": { "tinybench": "^2.6.0", + "undici": "^6.7.1", "zx": "^7.2.3" }, "bundlewatch": { diff --git a/packages/rpc-transport-http/src/http-transport.ts b/packages/rpc-transport-http/src/http-transport.ts index e7b528fc4468..68602c03fb1b 100644 --- a/packages/rpc-transport-http/src/http-transport.ts +++ b/packages/rpc-transport-http/src/http-transport.ts @@ -1,6 +1,6 @@ import { SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, SolanaError } from '@solana/errors'; import { RpcTransport } from '@solana/rpc-spec'; -import type Dispatcher from 'undici/types/dispatcher'; +import type Dispatcher from 'undici-types/dispatcher'; import { AllowedHttpRequestHeaders, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f173c75f143e..a8f46015fe73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -815,13 +815,16 @@ importers: '@solana/rpc-spec': specifier: workspace:* version: link:../rpc-spec - undici: - specifier: ^6.6.2 - version: 6.6.2 + undici-types: + specifier: ^6.7.1 + version: 6.7.1 devDependencies: tinybench: specifier: ^2.6.0 version: 2.6.0 + undici: + specifier: ^6.7.1 + version: 6.7.1 zx: specifier: ^7.2.3 version: 7.2.3 @@ -2889,6 +2892,7 @@ packages: /@fastify/busboy@2.1.0: resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} engines: {node: '>=14'} + dev: true /@graphql-tools/merge@8.3.1(graphql@15.8.0): resolution: {integrity: sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==} @@ -12641,11 +12645,21 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /undici-types@6.7.1: + resolution: {integrity: sha512-7r+rI8EcAjs3Th8JYhJUW4K6cNne8aPoQ7f44Y8zZIkLEcn7UkKvbQpFgBu/fbn2YY7k44pn1e7PnTY/vzBnVQ==} + dev: false + /undici@6.6.2: resolution: {integrity: sha512-vSqvUE5skSxQJ5sztTZ/CdeJb1Wq0Hf44hlYMciqHghvz+K88U0l7D6u1VsndoFgskDcnU+nG3gYmMzJVzd9Qg==} engines: {node: '>=18.0'} dependencies: '@fastify/busboy': 2.1.0 + dev: true + + /undici@6.7.1: + resolution: {integrity: sha512-+Wtb9bAQw6HYWzCnxrPTMVEV3Q1QjYanI0E4q02ehReMuquQdLTEFEYbfs7hcImVYKcQkWSwT6buEmSVIiDDtQ==} + engines: {node: '>=18.0'} + dev: true /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}