mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
fix
This commit is contained in:
@@ -11,12 +11,16 @@ function changeDependencies(deps, version) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changePackageFile(packagePath, version) {
|
function changePackageFile(packagePath, version) {
|
||||||
const text = fs.readFileSync(path.join(packagePath, 'package.json'), { encoding: 'utf-8' });
|
try {
|
||||||
const json = JSON.parse(text);
|
const text = fs.readFileSync(path.join(packagePath, 'package.json'), { encoding: 'utf-8' });
|
||||||
json.version = version;
|
const json = JSON.parse(text);
|
||||||
changeDependencies(json.dependencies, version);
|
json.version = version;
|
||||||
changeDependencies(json.devDependencies, version);
|
changeDependencies(json.dependencies, version);
|
||||||
fs.writeFileSync(path.join(packagePath, 'package.json'), JSON.stringify(json, null, 2), { encoding: 'utf-8' });
|
changeDependencies(json.devDependencies, version);
|
||||||
|
fs.writeFileSync(path.join(packagePath, 'package.json'), JSON.stringify(json, null, 2), { encoding: 'utf-8' });
|
||||||
|
} catch (err) {
|
||||||
|
console.log('Error changing package file', packagePath, err.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const packageJson = fs.readFileSync('package.json', { encoding: 'utf-8' });
|
const packageJson = fs.readFileSync('package.json', { encoding: 'utf-8' });
|
||||||
|
|||||||
Reference in New Issue
Block a user