0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/lib/utils-test.ts
Juan Picado @jotadeveloper 7fa23577ae
refactor: replace flow comments by ts-ignore
ts-ignore is not harmfull in specs files, since we try to force to test with values are not allowed by the types
2019-08-18 07:59:28 +02:00

30 lines
814 B
TypeScript

import { Version } from "@verdaccio/types";
export function generateNewVersion(
pkgName: string,
version: string,
shashum: string = '238e7641e59508dc9c20eb4ad37a8aa57ab777b4'): Version {
// $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": {
"name": "Foo"
},
"dist": {
"integrity": "sha512-zVEqt1JUCOPsash9q4wMkJEDPD+QCx95TRhQII+JnoS31uBUKoZxhzvvUJCcLVy2CQG4QdwXARU7dYWPnrwhGg==",
"shasum": shashum,
"tarball": `http:\/\/localhost:4873\/${pkgName}\/-\/${pkgName}-${version}.tgz`
}
}
}