From ecde9cb6bd859ce7114784f207fecd61fc3574ed Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 7 Feb 2021 09:58:57 +0100 Subject: [PATCH] fix --- setCurrentVersion.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setCurrentVersion.js b/setCurrentVersion.js index 689af0b9d..55d93534b 100644 --- a/setCurrentVersion.js +++ b/setCurrentVersion.js @@ -8,13 +8,13 @@ function changeDependencies(deps, version) { } } -function changePackageFile(path, version) { - const text = fs.readFileSync(path.join(path, 'package.json'), { encoding: 'utf-8' }); +function changePackageFile(packagePath, version) { + const text = fs.readFileSync(path.join(packagePath, 'package.json'), { encoding: 'utf-8' }); const json = JSON.parse(packageJson); json.version = version; changeDependencies(json.dependencies, version); changeDependencies(json.devDependencies, version); - fs.writeFileSync(path.join(path, 'package.json'), JSON.stringify(json, null, 2), { encoding: 'utf-8' }); + fs.writeFileSync(path.join(packagePath, 'package.json'), JSON.stringify(json, null, 2), { encoding: 'utf-8' }); } const packageJson = fs.readFileSync('package.json', { encoding: 'utf-8' });