2019-07-16 01:40:01 -05:00
|
|
|
import { Version } from "@verdaccio/types";
|
2018-07-29 03:28:28 -05:00
|
|
|
|
2018-07-29 06:57:32 -05:00
|
|
|
export function generateNewVersion(
|
|
|
|
pkgName: string,
|
|
|
|
version: string,
|
2019-09-26 11:22:14 -05:00
|
|
|
shashum = '238e7641e59508dc9c20eb4ad37a8aa57ab777b4'): Version {
|
2018-07-29 03:28:28 -05:00
|
|
|
// $FlowFixMe
|
|
|
|
return {
|
|
|
|
"name": pkgName,
|
|
|
|
"version": version,
|
|
|
|
"description": "",
|
|
|
|
"main": "index.js",
|
|
|
|
"dependencies": {
|
|
|
|
"test": "^1.4.1"
|
|
|
|
},
|
|
|
|
"author": "",
|
|
|
|
"license": "ISC",
|
|
|
|
"readme": "ERROR: No README data found!",
|
|
|
|
"_id": `${pkgName}@${version}`,
|
|
|
|
"_npmVersion": "5.5.1",
|
|
|
|
"_npmUser": {
|
2019-08-16 14:20:18 -05:00
|
|
|
"name": "Foo"
|
2018-07-29 03:28:28 -05:00
|
|
|
},
|
|
|
|
"dist": {
|
|
|
|
"integrity": "sha512-zVEqt1JUCOPsash9q4wMkJEDPD+QCx95TRhQII+JnoS31uBUKoZxhzvvUJCcLVy2CQG4QdwXARU7dYWPnrwhGg==",
|
2018-07-29 06:57:32 -05:00
|
|
|
"shasum": shashum,
|
|
|
|
"tarball": `http:\/\/localhost:4873\/${pkgName}\/-\/${pkgName}-${version}.tgz`
|
2018-07-29 03:28:28 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|