From 410d1dd451ab0e032696e5b1b7420b5d7c3f41df Mon Sep 17 00:00:00 2001 From: dnalborczyk Date: Wed, 17 Aug 2022 20:56:22 -0400 Subject: [PATCH] fix: deprecate use child processes (#1546) --- src/ServerlessOffline.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js index c1c402cdb..362185d6c 100644 --- a/src/ServerlessOffline.js +++ b/src/ServerlessOffline.js @@ -6,7 +6,7 @@ import { defaultOptions, SERVER_SHUTDOWN_TIMEOUT, } from './config/index.js' -import { gray } from './config/colors.js' +import { gray, orange } from './config/colors.js' export default class ServerlessOffline { #cliOptions = null @@ -225,6 +225,14 @@ export default class ServerlessOffline { ...this.#cliOptions, } + if (this.#options.useChildProcesses) { + log.notice() + log.warning( + orange(`'--useChildProcesses' is deprecated and will be removed in the next major version. Worker threads, the current default, should provide the same if not an even better developer experience. +If you are experiencing any issues please let us know: https://github.com/dherault/serverless-offline/issues`), + ) + } + // Parse CORS options this.#options.corsAllowHeaders = this.#options.corsAllowHeaders .replace(/\s/g, '')