mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
[js] update prepack script to use exact version (#17484)
### Description update prepack script to use exact version. the prepack script for onnxruntime-node, onnxruntime-web and onnxruntime-react-native is used to update their referencing version of dependency "onnxruntime-common". Previously "~" (tilde symbol) is used. This may cause NPM choose an older version (if the old version matches the version requirement and was previously installed already so hit the cache). see also https://semver.npmjs.com/. [This build](https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1134671&view=results) is caused by this issue.
This commit is contained in:
parent
ec94b07f0a
commit
cdf3e9dba9
3 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ function updatePackageJson() {
|
|||
const packageCommon = fs.readJSONSync(commonPackageJsonPath);
|
||||
const packageSelf = fs.readJSONSync(selfPackageJsonPath);
|
||||
const version = packageCommon.version;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `~${version}`;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `${version}`;
|
||||
fs.writeJSONSync(selfPackageJsonPath, packageSelf, {spaces: 2});
|
||||
console.log('=== finished updating package.json.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function updatePackageJson() {
|
|||
delete packageSelf.dependencies['onnxruntime-common'];
|
||||
} else {
|
||||
const version = packageCommon.version;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `~${version}`;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `${version}`;
|
||||
}
|
||||
fs.writeJSONSync(selfPackageJsonPath, packageSelf, {spaces: 2});
|
||||
console.log('=== finished updating package.json.');
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ function updatePackageJson() {
|
|||
const packageCommon = fs.readJSONSync(commonPackageJsonPath);
|
||||
const packageSelf = fs.readJSONSync(selfPackageJsonPath);
|
||||
const version = packageCommon.version;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `~${version}`;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `${version}`;
|
||||
fs.writeJSONSync(selfPackageJsonPath, packageSelf, {spaces: 2});
|
||||
console.log('=== finished updating package.json.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue