From 558ff1b6543666127c93802b89056bcc533570bc Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Sat, 26 Mar 2022 00:03:49 +0100 Subject: [PATCH] refactor: replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- packages/create-project/test/cli_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-project/test/cli_test.js b/packages/create-project/test/cli_test.js index ec8b9a499..cd28ef671 100644 --- a/packages/create-project/test/cli_test.js +++ b/packages/create-project/test/cli_test.js @@ -50,7 +50,7 @@ const scaffold = async ({ testName, ...prompts }) => { const directory = `${join( tmpdir(), testName.replace(/[/+ @:]/g, '_'), - )}_${Math.random().toString(36).substr(2)}`; + )}_${Math.random().toString(36).slice(2)}`; await run(require.resolve(join(__dirname, '../commands/init'))) .withOptions({