fix: remove out-of-date dependency (#3488)

This commit is contained in:
Zoltan Kochan
2021-06-01 23:44:02 +03:00
committed by GitHub
parent 06f1275032
commit e7d9cd187a
7 changed files with 10 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/fetch": major
---
Do not use fetch does not support unix requests.

0
packages/beta/pnpm Normal file → Executable file
View File

View File

@@ -36,8 +36,7 @@
"@pnpm/fetching-types": "workspace:2.1.0",
"@pnpm/npm-registry-agent": "workspace:4.0.0",
"@zkochan/retry": "^0.2.0",
"node-fetch": "^2.6.1",
"node-fetch-unix": "2.3.0"
"node-fetch": "^2.6.1"
},
"devDependencies": {
"@pnpm/logger": "^4.0.0",

View File

@@ -1,7 +1,6 @@
import { requestRetryLogger } from '@pnpm/core-loggers'
import { operation, RetryTimeoutOptions } from '@zkochan/retry'
import { Request, RequestInit as NodeRequestInit, Response } from 'node-fetch'
import fetch from 'node-fetch-unix'
import fetch, { Request, RequestInit as NodeRequestInit, Response } from 'node-fetch'
// retry settings
const MIN_TIMEOUT = 10

View File

@@ -104,6 +104,8 @@ export function handler (
},
params: string[]
) {
// We can only support TCP at the moment because node-fetch does not support IPC
opts.protocol = 'tcp'
switch (params[0]) {
case 'start':
return start(opts)

View File

@@ -131,7 +131,7 @@ skipOnWindows('pnpm server uses TCP when port specified', async () => {
expect(await pathExists(serverJsonPath)).toBeFalsy()
})
test('pnpm server fails when trying to set --port for IPC protocol', async () => {
test.skip('pnpm server fails when trying to set --port for IPC protocol', async () => {
prepare()
expect(execPnpmSync(['server', 'start', '--protocol', 'ipc', '--port', '7856']).status).toBe(1)

7
pnpm-lock.yaml generated
View File

@@ -503,14 +503,12 @@ importers:
cpy-cli: ^3.1.1
nock: 12.0.3
node-fetch: ^2.6.1
node-fetch-unix: 2.3.0
dependencies:
'@pnpm/core-loggers': link:../core-loggers
'@pnpm/fetching-types': link:../fetching-types
'@pnpm/npm-registry-agent': link:../npm-registry-agent
'@zkochan/retry': 0.2.0
node-fetch: 2.6.1
node-fetch-unix: 2.3.0
devDependencies:
'@pnpm/fetch': 'link:'
'@pnpm/logger': 4.0.0
@@ -10922,11 +10920,6 @@ packages:
semver: 5.7.1
dev: true
/node-fetch-unix/2.3.0:
resolution: {integrity: sha512-ngVgjZl1n1dZRR8BIX/UKU3Q0cfkQ4byUVcV132xW/+zPF79sVo2td2576mzIGJibi7E0Azcx2gpy66BoV2hrg==}
engines: {node: 4.x || >=6.0.0}
dev: false
/node-fetch/2.6.1:
resolution: {integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==}
engines: {node: 4.x || >=6.0.0}