0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 21:48:32 +00:00
renovatebot_renovate/lib/modules/manager/cargo/__snapshots__/extract.spec.ts.snap
Mathieu Kniewallner fc697a36d9
refactor(manager/cargo): use zod to parse manifest/config (#31260)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-10-29 06:19:33 +00:00

769 lines
16 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`modules/manager/cargo/extract extractPackageFile() extracts multiple dependencies advanced 1`] = `
[
{
"currentValue": "0.2.0",
"datasource": "crate",
"depName": "amethyst_animation",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.3.0",
"datasource": "crate",
"depName": "amethyst_assets",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.2.0",
"datasource": "crate",
"depName": "amethyst_audio",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.6.0",
"datasource": "crate",
"depName": "amethyst_config",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.2.0",
"datasource": "crate",
"depName": "amethyst_core",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "amethyst_controls",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "amethyst_locale",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.7",
"datasource": "crate",
"depName": "amethyst_renderer",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.3",
"datasource": "crate",
"depName": "amethyst_input",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "amethyst_ui",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "amethyst_utils",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "1.0",
"datasource": "crate",
"depName": "derivative",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.5",
"datasource": "crate",
"depName": "fern",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "0.4",
"datasource": "crate",
"depName": "log",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "1.0.1",
"datasource": "crate",
"depName": "rayon",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.1",
"datasource": "crate",
"depName": "rustc_version_runtime",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.15",
"datasource": "crate",
"depName": "winit",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.1",
"datasource": "crate",
"depName": "thread_profiler",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "amethyst_gltf",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.5.10",
"datasource": "crate",
"depName": "env_logger",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.6",
"datasource": "crate",
"depName": "genmesh",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "ron",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "1.0",
"datasource": "crate",
"depName": "serde",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "1.0",
"datasource": "crate",
"depName": "serde_derive",
"depType": "dev-dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.1",
"datasource": "crate",
"depName": "vergen",
"depType": "build-dependencies",
"managerData": {
"nestedVersion": false,
},
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() extracts multiple dependencies simple 1`] = `
[
{
"currentValue": "=0.2.43",
"datasource": "crate",
"depName": "libc",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "1.0.4",
"datasource": "crate",
"depName": "bitflags",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "=0.1",
"datasource": "crate",
"depName": "pcap-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.21.0",
"datasource": "crate",
"depName": "pnet",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "git_dep_with_version",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "git-dependency",
},
{
"currentValue": "",
"datasource": "crate",
"depName": "git_dep",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "git-dependency",
},
{
"currentValue": "0.0.0",
"datasource": "crate",
"depName": "same_version_1__",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.0.0",
"datasource": "crate",
"depName": "same_version_1_",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.0.0",
"datasource": "crate",
"depName": "same_version_1",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
{
"currentValue": "0.4.2",
"datasource": "crate",
"depName": "dep1",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "=0.3.6",
"datasource": "crate",
"depName": "winapi",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"target": "cfg(windows)",
},
{
"currentValue": "0.2.37",
"datasource": "crate",
"depName": "wasm-bindgen",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "0.3.14",
"datasource": "crate",
"depName": "js-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "",
"datasource": "crate",
"depName": "js_relative_import",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "path-dependency",
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "0.3.14",
"datasource": "crate",
"depName": "web-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"target": "cfg(target_arch = "wasm32")",
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() extracts original package name of renamed dependencies 1`] = `
[
{
"currentValue": "0.4.0",
"datasource": "crate",
"depName": "boolector-solver",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"packageName": "boolector",
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() extracts platform specific dependencies 1`] = `
[
{
"currentValue": "0.2.37",
"datasource": "crate",
"depName": "wasm-bindgen",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "0.3.14",
"datasource": "crate",
"depName": "js-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "",
"datasource": "crate",
"depName": "js_relative_import",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "path-dependency",
"target": "cfg(target_arch = "wasm32")",
},
{
"currentValue": "0.3.14",
"datasource": "crate",
"depName": "web-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"target": "cfg(target_arch = "wasm32")",
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() extracts registry urls from .cargo/config (legacy path) 1`] = `
[
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "proprietary-crate",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "private-crates",
},
"registryUrls": [
"https://dl.cloudsmith.io/basic/my-org/my-repo/cargo/index.git",
],
},
{
"currentValue": "3.0.0",
"datasource": "crate",
"depName": "mcorbin-test",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "mcorbin",
},
"registryUrls": [
"https://github.com/mcorbin/testregistry",
],
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "tokio",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() extracts registry urls from .cargo/config.toml 1`] = `
[
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "proprietary-crate",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "private-crates",
},
"registryUrls": [
"https://dl.cloudsmith.io/basic/my-org/my-repo/cargo/index.git",
],
},
{
"currentValue": "3.0.0",
"datasource": "crate",
"depName": "mcorbin-test",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "mcorbin",
},
"registryUrls": [
"https://github.com/mcorbin/testregistry",
],
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "tokio",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() fails to parse cargo config with invalid TOML 1`] = `
[
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "proprietary-crate",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "private-crates",
},
"skipReason": "unknown-registry",
},
{
"currentValue": "3.0.0",
"datasource": "crate",
"depName": "mcorbin-test",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "mcorbin",
},
"skipReason": "unknown-registry",
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "tokio",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() handles inline tables 1`] = `
[
{
"currentValue": "0.1",
"datasource": "crate",
"depName": "pcap-sys",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "0.21.0",
"datasource": "crate",
"depName": "pnet",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "1.2",
"datasource": "crate",
"depName": "dep1",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "3.4",
"datasource": "crate",
"depName": "dep2",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "~12.3.1",
"datasource": "crate",
"depName": "dep3",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "INVALID 3.3.1 VERSION",
"datasource": "crate",
"depName": "dep4",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "3.2.1",
"datasource": "crate",
"depName": "dep5",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
},
{
"currentValue": "",
"datasource": "crate",
"depName": "dep6",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "invalid-dependency-specification",
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() handles standard tables 1`] = `
[
{
"currentValue": "1.2",
"datasource": "crate",
"depName": "dep1",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "3.4",
"datasource": "crate",
"depName": "dep2",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "~12.3.1",
"datasource": "crate",
"depName": "dep3",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "INVALID 1.3.1 VERSION",
"datasource": "crate",
"depName": "dep4",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
},
"skipReason": "path-dependency",
},
{
"currentValue": "",
"datasource": "crate",
"depName": "dep5",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "path-dependency",
},
{
"currentValue": "",
"datasource": "crate",
"depName": "dep7",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
"skipReason": "invalid-dependency-specification",
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() ignore cargo config registries with missing index 1`] = `
[
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "proprietary-crate",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "private-crates",
},
"skipReason": "unknown-registry",
},
{
"currentValue": "3.0.0",
"datasource": "crate",
"depName": "mcorbin-test",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "mcorbin",
},
"skipReason": "unknown-registry",
},
{
"currentValue": "0.2",
"datasource": "crate",
"depName": "tokio",
"depType": "dependencies",
"managerData": {
"nestedVersion": false,
},
},
]
`;
exports[`modules/manager/cargo/extract extractPackageFile() skips unknown registries 1`] = `
[
{
"currentValue": "0.1.0",
"datasource": "crate",
"depName": "foobar",
"depType": "dependencies",
"managerData": {
"nestedVersion": true,
"registryName": "not-listed",
},
"skipReason": "unknown-registry",
},
]
`;