Merge pull request #976 from waku-org/dependabot/npm_and_yarn/p-timeout-6.0.0

This commit is contained in:
fryorcraken.eth 2022-10-28 16:04:49 +11:00 committed by GitHub
commit 2af5b3db44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 51 deletions

55
package-lock.json generated
View File

@ -77,7 +77,7 @@
"lint-staged": "^13.0.3",
"mocha": "^9.1.3",
"npm-run-all": "^4.1.5",
"p-timeout": "^4.1.0",
"p-timeout": "^6.0.0",
"portfinder": "^1.0.28",
"prettier": "^2.1.1",
"process": "^0.11.10",
@ -1481,17 +1481,6 @@
"npm": ">=7.0.0"
}
},
"node_modules/@libp2p/websockets/node_modules/p-timeout": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA==",
"engines": {
"node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@multiformats/mafmt": {
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-11.0.2.tgz",
@ -7950,17 +7939,6 @@
"node": "^14 || ^16 || >=18"
}
},
"node_modules/mortice/node_modules/p-timeout": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA==",
"engines": {
"node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -8629,12 +8607,14 @@
}
},
"node_modules/p-timeout": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==",
"dev": true,
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA==",
"engines": {
"node": ">=10"
"node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-try": {
@ -12884,13 +12864,6 @@
"p-defer": "^4.0.0",
"p-timeout": "^6.0.0",
"wherearewe": "^2.0.1"
},
"dependencies": {
"p-timeout": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA=="
}
}
},
"@multiformats/mafmt": {
@ -17804,11 +17777,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
"integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
},
"p-timeout": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA=="
}
}
},
@ -18286,10 +18254,9 @@
}
},
"p-timeout": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==",
"dev": true
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.0.0.tgz",
"integrity": "sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA=="
},
"p-try": {
"version": "2.2.0",

View File

@ -169,7 +169,7 @@
"lint-staged": "^13.0.3",
"mocha": "^9.1.3",
"npm-run-all": "^4.1.5",
"p-timeout": "^4.1.0",
"p-timeout": "^6.0.0",
"portfinder": "^1.0.28",
"prettier": "^2.1.1",
"process": "^0.11.10",

View File

@ -16,7 +16,7 @@ export default async function waitForLine(
logLine: string,
timeout: number
): Promise<void> {
await pTimeout(waitForFile(filepath), timeout);
await pTimeout(waitForFile(filepath), { milliseconds: timeout });
const options = {
fromBeginning: true,
@ -25,11 +25,10 @@ export default async function waitForLine(
const tail = new Tail(filepath, options);
await pTimeout(
find(tail, logLine),
60000,
`could not to find '${logLine}' in file '${filepath}'`
);
await pTimeout(find(tail, logLine), {
milliseconds: 60000,
message: `could not to find '${logLine}' in file '${filepath}'`,
});
tail.unwatch();
}