mirror of https://github.com/abpframework/abp.git
4 changed files with 36 additions and 3 deletions
@ -0,0 +1,28 @@ |
|||||
|
const glob = require('glob'); |
||||
|
const fse = require('fs-extra'); |
||||
|
|
||||
|
function replace(filePath) { |
||||
|
const pkg = fse.readJsonSync(filePath); |
||||
|
|
||||
|
const { dependencies } = pkg; |
||||
|
|
||||
|
if (!dependencies) return; |
||||
|
|
||||
|
Object.keys(dependencies).forEach((key) => { |
||||
|
if (key.includes('@abp/') && key !== '@abp/utils') { |
||||
|
dependencies[key] = dependencies[key].replace('^', '~'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
fse.writeJsonSync(filePath, { ...pkg, dependencies }, { spaces: 2 }); |
||||
|
} |
||||
|
|
||||
|
glob('./packs/**/package.json', {}, (er, files) => { |
||||
|
files.forEach((path) => { |
||||
|
if (path.includes('node_modules')) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
replace(path); |
||||
|
}); |
||||
|
}); |
||||
Loading…
Reference in new issue