renovate/lib/modules/datasource/npm/__snapshots__/index.spec.ts.snap

363 lines
9.1 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`modules/datasource/npm/index should fetch package info from custom registry 1`] = `
{
"isPrivate": true,
"registryUrl": "https://npm.mycustomregistry.com",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should fetch package info from npm 1`] = `
{
"isPrivate": false,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should handle foobar 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should handle no time 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should not send an authorization header if public package 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should parse repo url (string) 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
],
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should parse repo url 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
],
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should replace any environment variable in npmrc 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.from-env.com",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should return deprecated 1`] = `
{
"deprecationMessage": "On registry \`https://registry.npmjs.org\`, the "latest" version of dependency \`foobar\` has the following deprecation notice:
\`This is deprecated\`
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.",
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"isDeprecated": true,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"isDeprecated": true,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.2",
},
}
`;
exports[`modules/datasource/npm/index should return deprecated 2`] = `
"On registry \`https://registry.npmjs.org\`, the "latest" version of dependency \`foobar\` has the following deprecation notice:
\`This is deprecated\`
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake."
`;
exports[`modules/datasource/npm/index should send an authorization header if provided 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should use default registry if missing from npmrc 1`] = `
{
"isPrivate": true,
"registryUrl": "https://registry.npmjs.org",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should use host rules by baseUrl if provided 1`] = `
{
"isPrivate": true,
"registryUrl": "https://npm.mycustomregistry.com/_packaging/mycustomregistry/npm/registry",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;
exports[`modules/datasource/npm/index should use host rules by hostName if provided 1`] = `
{
"isPrivate": true,
"registryUrl": "https://npm.mycustomregistry.com",
"releases": [
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-06T05:21:53.000Z",
"version": "0.0.1",
},
{
"dependencies": undefined,
"devDependencies": undefined,
"gitRef": undefined,
"releaseTimestamp": "2018-05-07T05:21:53.000Z",
"version": "0.0.2",
},
],
"sourceDirectory": "src/a",
"sourceUrl": "https://github.com/renovateapp/dummy",
"tags": {
"latest": "0.0.1",
},
}
`;