mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 17:16:25 +00:00
f18b7f3504
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
533 lines
12 KiB
Text
533 lines
12 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`config/presets getPreset gets linters 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"All lint-related packages",
|
|
],
|
|
"extends": Array [
|
|
"packages:emberTemplateLint",
|
|
"packages:eslint",
|
|
"packages:stylelint",
|
|
"packages:tslint",
|
|
],
|
|
"packageNames": Array [
|
|
"remark-lint",
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets getPreset gets parameterised configs 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"Group eslint packages into same branch/PR",
|
|
],
|
|
"packageRules": Array [
|
|
Object {
|
|
"extends": Array [
|
|
"packages:eslint",
|
|
],
|
|
"groupName": "eslint",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets getPreset handles 404 packages 1`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles 404 packages 2`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles 404 packages 3`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles missing params 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"Group {{arg1}} packages into same branch/PR",
|
|
],
|
|
"packageRules": Array [
|
|
Object {
|
|
"extends": Array [
|
|
"",
|
|
],
|
|
"groupName": "{{arg1}}",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets getPreset handles no config 1`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles no config 2`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles no config 3`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles preset not found 1`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles preset not found 2`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles preset not found 3`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles throw errors 1`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles throw errors 2`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset handles throw errors 3`] = `undefined`;
|
|
|
|
exports[`config/presets getPreset ignores irrelevant params 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"Use version pinning (maintain a single version only and not semver ranges)",
|
|
],
|
|
"rangeStrategy": "pin",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses gitea 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "gitea",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses github 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "github",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses github subfiles 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "somefile",
|
|
"presetSource": "github",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses github subfiles with preset and sub-preset name 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "somefile/somepreset/somesubpreset",
|
|
"presetSource": "github",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses github subfiles with preset name 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "somefile/somepreset",
|
|
"presetSource": "github",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses gitlab 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "gitlab",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses local 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "local",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset parses no prefix as local 1`] = `
|
|
Object {
|
|
"packageName": "some/repo",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "local",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns default package name 1`] = `
|
|
Object {
|
|
"packageName": "default",
|
|
"params": undefined,
|
|
"presetName": "base",
|
|
"presetSource": "internal",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns default package name with params 1`] = `
|
|
Object {
|
|
"packageName": "default",
|
|
"params": Array [
|
|
"packages/eslint",
|
|
"eslint",
|
|
],
|
|
"presetName": "group",
|
|
"presetSource": "internal",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns non-scoped default 1`] = `
|
|
Object {
|
|
"packageName": "renovate-config-somepackage",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns non-scoped package name 1`] = `
|
|
Object {
|
|
"packageName": "renovate-config-somepackage",
|
|
"params": undefined,
|
|
"presetName": "webapp",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns non-scoped package name full 1`] = `
|
|
Object {
|
|
"packageName": "renovate-config-somepackage",
|
|
"params": undefined,
|
|
"presetName": "webapp",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns non-scoped package name with params 1`] = `
|
|
Object {
|
|
"packageName": "renovate-config-somepackage",
|
|
"params": Array [
|
|
"param1",
|
|
],
|
|
"presetName": "webapp",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with packageName and default 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/somepackagename",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with packageName and params and default 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/somepackagename",
|
|
"params": Array [
|
|
"param1",
|
|
"param2",
|
|
"param3",
|
|
],
|
|
"presetName": "default",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with packageName and presetName 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/somepackagename",
|
|
"params": undefined,
|
|
"presetName": "somePresetName",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with packageName and presetName and params 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/somepackagename",
|
|
"params": Array [
|
|
"param1",
|
|
"param2",
|
|
],
|
|
"presetName": "somePresetName",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with presetName 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/renovate-config",
|
|
"params": undefined,
|
|
"presetName": "somePresetName",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns scope with presetName and params 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/renovate-config",
|
|
"params": Array [
|
|
"param1",
|
|
],
|
|
"presetName": "somePresetName",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns simple scope 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/renovate-config",
|
|
"params": undefined,
|
|
"presetName": "default",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets parsePreset returns simple scope and params 1`] = `
|
|
Object {
|
|
"packageName": "@somescope/renovate-config",
|
|
"params": Array [
|
|
"param1",
|
|
],
|
|
"presetName": "default",
|
|
"presetSource": "npm",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets replaceArgs replaces args in strings 1`] = `"c foo ab"`;
|
|
|
|
exports[`config/presets replaceArgs replaces arrays 1`] = `
|
|
Object {
|
|
"foo": Array [
|
|
"a",
|
|
Object {
|
|
"bar": "b",
|
|
"baz": 5,
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets replaceArgs replaces objects 1`] = `
|
|
Object {
|
|
"bar": Object {
|
|
"aaa": Object {
|
|
"bbb": "woo c",
|
|
},
|
|
"baz": "b boo",
|
|
},
|
|
"foo": "ha a",
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset combines two package alls 1`] = `
|
|
Object {
|
|
"packageNames": Array [
|
|
"babel-eslint",
|
|
],
|
|
"packagePatterns": Array [
|
|
"^@typescript-eslint/",
|
|
"^eslint",
|
|
"^stylelint",
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset ignores presets 1`] = `Object {}`;
|
|
|
|
exports[`config/presets resolvePreset migrates automerge in presets 1`] = `
|
|
Object {
|
|
"automergeType": "pr",
|
|
"branchPrefix": "renovate/",
|
|
"description": Array [
|
|
"Use <code>renovate/</code> as prefix for all branch names",
|
|
"If semantic commits detected, use semantic commit type <code>fix</code> for dependencies and <code>chore</code> for all others",
|
|
"Require all status checks to pass before any automerging",
|
|
"Pin dependency versions for <code>devDependencies</code> and retain semver ranges for others",
|
|
],
|
|
"ignoreUnstable": true,
|
|
"labels": Array [
|
|
"dependencies",
|
|
],
|
|
"lockFileMaintenance": Object {
|
|
"automerge": true,
|
|
"enabled": true,
|
|
"schedule": Array [
|
|
"before 8am on Monday",
|
|
],
|
|
},
|
|
"major": Object {
|
|
"automerge": false,
|
|
},
|
|
"minor": Object {
|
|
"automerge": true,
|
|
},
|
|
"packageRules": Array [
|
|
Object {
|
|
"packagePatterns": Array [
|
|
"*",
|
|
],
|
|
"semanticCommitType": "chore",
|
|
},
|
|
Object {
|
|
"depTypeList": Array [
|
|
"dependencies",
|
|
],
|
|
"semanticCommitType": "fix",
|
|
},
|
|
Object {
|
|
"packagePatterns": Array [
|
|
"*",
|
|
],
|
|
"rangeStrategy": "replace",
|
|
},
|
|
Object {
|
|
"depTypeList": Array [
|
|
"devDependencies",
|
|
],
|
|
"rangeStrategy": "pin",
|
|
},
|
|
Object {
|
|
"depTypeList": Array [
|
|
"peerDependencies",
|
|
],
|
|
"rangeStrategy": "widen",
|
|
},
|
|
],
|
|
"prCreation": "immediate",
|
|
"rebaseWhen": "behind-base-branch",
|
|
"requiredStatusChecks": Array [],
|
|
"respectLatest": true,
|
|
"schedule": Array [
|
|
"before 8am",
|
|
],
|
|
"semanticCommits": "enabled",
|
|
"separateMajorMinor": true,
|
|
"separateMinorPatch": false,
|
|
"timezone": "Asia/Taipei",
|
|
"unpublishSafe": false,
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset resolves eslint 1`] = `
|
|
Object {
|
|
"packageNames": Array [
|
|
"babel-eslint",
|
|
],
|
|
"packagePatterns": Array [
|
|
"^@typescript-eslint/",
|
|
"^eslint",
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset resolves linters 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"All lint-related packages",
|
|
],
|
|
"packageNames": Array [
|
|
"babel-eslint",
|
|
"codelyzer",
|
|
"remark-lint",
|
|
],
|
|
"packagePatterns": Array [
|
|
"^ember-template-lint",
|
|
"^@typescript-eslint/",
|
|
"^eslint",
|
|
"^stylelint",
|
|
"\\\\btslint\\\\b",
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset resolves nested groups 1`] = `
|
|
Object {
|
|
"description": Array [
|
|
"Update lint packages automatically if tests pass",
|
|
],
|
|
"packageRules": Array [
|
|
Object {
|
|
"automerge": true,
|
|
"description": Array [
|
|
"All lint-related packages",
|
|
],
|
|
"packageNames": Array [
|
|
"babel-eslint",
|
|
"codelyzer",
|
|
"remark-lint",
|
|
],
|
|
"packagePatterns": Array [
|
|
"^ember-template-lint",
|
|
"^@typescript-eslint/",
|
|
"^eslint",
|
|
"^stylelint",
|
|
"\\\\btslint\\\\b",
|
|
],
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset resolves packageRule 1`] = `
|
|
Object {
|
|
"packageRules": Array [
|
|
Object {
|
|
"groupName": "eslint",
|
|
"packageNames": Array [
|
|
"babel-eslint",
|
|
],
|
|
"packagePatterns": Array [
|
|
"^@typescript-eslint/",
|
|
"^eslint",
|
|
],
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset returns same if no presets 1`] = `
|
|
Object {
|
|
"foo": 1,
|
|
}
|
|
`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset 1`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset 2`] = `"Preset name not found within published preset config (wrongpreset:invalid-preset)"`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset 3`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset file 1`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset file 2`] = `"Cannot find preset's package (notfound)"`;
|
|
|
|
exports[`config/presets resolvePreset throws if invalid preset file 3`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws if valid and invalid 1`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws if valid and invalid 2`] = `"Preset name not found within published preset config (wrongpreset:invalid-preset)"`;
|
|
|
|
exports[`config/presets resolvePreset throws if valid and invalid 3`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws noconfig 1`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws noconfig 2`] = `"Preset package is missing a renovate-config entry (noconfig:base)"`;
|
|
|
|
exports[`config/presets resolvePreset throws noconfig 3`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws throw 1`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws throw 2`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset throws throw 3`] = `undefined`;
|
|
|
|
exports[`config/presets resolvePreset works with valid 1`] = `
|
|
Object {
|
|
"foo": 1,
|
|
"ignoreDeps": Array [],
|
|
"rangeStrategy": "pin",
|
|
}
|
|
`;
|