Skip to content

Commit

Permalink
Bump @types/node from 13.13.52 to 18.7.10 (#2119)
Browse files Browse the repository at this point in the history
* Bump @types/node from 13.13.52 to 18.7.10

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.52 to 18.7.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* use the correct cluster

* fix memory leak test

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chohmann <chelsea.hohmann@gmail.com>
  • Loading branch information
dependabot[bot] and chohmann committed Aug 23, 2022
1 parent 34cb5b0 commit 5caf992
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/jest": "^27.0.2",
"@types/json-schema": "^7.0.9",
"@types/lodash": "^4.14.175",
"@types/node": "^13.1.1",
"@types/node": "^18.7.10",
"@types/node-fetch": "2.5.10",
"@types/pino": "6.3.8",
"@types/postman-collection": "^3.5.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/util/createServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createLogger } from '@stoplight/prism-core';
import { IHttpConfig, IHttpRequest } from '@stoplight/prism-http';
import { createServer as createHttpServer } from '@stoplight/prism-http-server';
import * as chalk from 'chalk';
import * as cluster from 'cluster';
import cluster from 'node:cluster';
import * as E from 'fp-ts/Either';
import { pipe } from 'fp-ts/function';
import { LogDescriptor, Logger, LoggerOptions } from 'pino';
Expand Down Expand Up @@ -46,7 +46,7 @@ const createMultiProcessPrism: CreatePrism = async options => {

return createPrismServerWithLogger(options, logInstance).catch((e: Error) => {
logInstance.fatal(e.message);
cluster.worker.kill();
cluster.worker?.kill();
throw e;
});
}
Expand Down
6 changes: 4 additions & 2 deletions packages/http/src/__tests__/memory-leak-prevention.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ describe('Checks if memory leaks', () => {

for (let i = 0; i < 5000; i++) {
round(client);
if (i % 100 === 0) {
if (i % 100 === 0 && global.gc) {
global.gc();
}
}

global.gc();
if (global.gc) {
global.gc();
}
expect(process.memoryUsage().heapUsed).toBeLessThanOrEqual(baseMemoryUsage * 1.03);
});
});
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2246,10 +2246,10 @@
"@types/node" "*"
form-data "^3.0.0"

"@types/node@*", "@types/node@^13.1.1":
version "13.13.52"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7"
integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==
"@types/node@*", "@types/node@^18.7.10":
version "18.7.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.10.tgz#f642dc9ded1bdd8c2cd847246466e71182b0fd67"
integrity sha512-SST7B//wF7xlGoLo1IEVB0cQ4e7BgXlDk5IaPgb5s0DlYLjb4if07h8+0zbQIvahfPNXs6e7zyT0EH1MqaS+5g==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
Expand Down

0 comments on commit 5caf992

Please sign in to comment.