Skip to content

Commit

Permalink
refactor: remove old code related to deprecationWarningIssues (#29743)
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed Jun 24, 2024
1 parent 48e6aa4 commit b6d2c4b
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 238 deletions.
1 change: 0 additions & 1 deletion lib/config/__snapshots__/migration.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ exports[`config/migration migrateConfig(config, parentConfig) migrates config 1`
"separateMinorPatch": true,
"suppressNotifications": [
"lockFileErrors",
"deprecationWarningIssues",
],
"travis": {
"enabled": true,
Expand Down

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions lib/config/migrations/migrations-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { PackagesMigration } from './custom/packages-migration';
import { PathRulesMigration } from './custom/path-rules-migration';
import { PinVersionsMigration } from './custom/pin-versions-migration';
import { PostUpdateOptionsMigration } from './custom/post-update-options-migration';
import { RaiseDeprecationWarningsMigration } from './custom/raise-deprecation-warnings-migration';
import { RebaseConflictedPrs } from './custom/rebase-conflicted-prs-migration';
import { RebaseStalePrsMigration } from './custom/rebase-stale-prs-migration';
import { RecreateClosedMigration } from './custom/recreate-closed-migration';
Expand Down Expand Up @@ -76,6 +75,7 @@ export class MigrationsService {
'yarnMaintenanceCommitMessage',
'yarnMaintenancePrBody',
'yarnMaintenancePrTitle',
'raiseDeprecationWarnings',
]);

static readonly renamedProperties: ReadonlyMap<string, string> = new Map([
Expand Down Expand Up @@ -129,7 +129,6 @@ export class MigrationsService {
PathRulesMigration,
PinVersionsMigration,
PostUpdateOptionsMigration,
RaiseDeprecationWarningsMigration,
RebaseConflictedPrs,
RebaseStalePrsMigration,
RenovateForkMigration,
Expand Down
3 changes: 1 addition & 2 deletions lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2802,13 +2802,12 @@ const options: RenovateOptions[] = [
'Options to suppress various types of warnings and other notifications.',
type: 'array',
subType: 'string',
default: ['deprecationWarningIssues'],
default: [],
allowedValues: [
'artifactErrors',
'branchAutomergeFailure',
'configErrorIssue',
'dependencyLookupWarnings',
'deprecationWarningIssues',
'lockFileErrors',
'missingCredentialsError',
'onboardingClose',
Expand Down
2 changes: 0 additions & 2 deletions lib/workers/repository/error-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ beforeEach(() => {
// default values
config = partial<RenovateConfig>({
onboardingBranch: 'configure/renovate',
suppressNotifications: ['deprecationWarningIssues'],
configWarningReuseIssue: true,
confidential: false,
});
Expand Down Expand Up @@ -127,7 +126,6 @@ Message: some-message
const error = new Error(CONFIG_VALIDATION);
error.validationSource = 'package.json';
error.validationMessage = 'some-message';
// config.suppressNotifications = ['deprecationWarningIssues']
config.suppressNotifications = [notificationName];
platform.getBranchPr.mockResolvedValueOnce({
...mock<Pr>(),
Expand Down
80 changes: 0 additions & 80 deletions lib/workers/repository/process/deprecated.spec.ts

This file was deleted.

94 changes: 0 additions & 94 deletions lib/workers/repository/process/deprecated.ts

This file was deleted.

5 changes: 0 additions & 5 deletions lib/workers/repository/process/extract-update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ describe('workers/repository/process/extract-update', () => {
it('runs with no baseBranches', async () => {
const config = {
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'],
};
repositoryCache.getCache.mockReturnValueOnce({ scan: {} });
scm.checkoutBranch.mockResolvedValueOnce('123test' as LongCommitSha);
Expand All @@ -75,7 +74,6 @@ describe('workers/repository/process/extract-update', () => {
const config = {
baseBranches: ['master', 'dev'],
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'],
enabledManagers: ['npm'],
javascript: {
labels: ['js'],
Expand All @@ -94,7 +92,6 @@ describe('workers/repository/process/extract-update', () => {
const packageFiles: Record<string, PackageFile[]> = {};
const config = {
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'],
baseBranch: 'master',
};
repositoryCache.getCache.mockReturnValueOnce({
Expand All @@ -116,7 +113,6 @@ describe('workers/repository/process/extract-update', () => {
it('fetches vulnerabilities', async () => {
const config = {
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'],
osvVulnerabilityAlerts: true,
};
const appendVulnerabilityPackageRulesMock = jest.fn();
Expand All @@ -136,7 +132,6 @@ describe('workers/repository/process/extract-update', () => {
it('handles exception when fetching vulnerabilities', async () => {
const config = {
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'],
osvVulnerabilityAlerts: true,
};
createVulnerabilitiesMock.mockRejectedValueOnce(new Error());
Expand Down
2 changes: 0 additions & 2 deletions lib/workers/repository/process/extract-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type { BranchConfig } from '../../types';
import { extractAllDependencies } from '../extract';
import { generateFingerprintConfig } from '../extract/extract-fingerprint-config';
import { branchifyUpgrades } from '../updates/branchify';
import { raiseDeprecationWarnings } from './deprecated';
import { fetchUpdates } from './fetch';
import { sortBranches } from './sort';
import { Vulnerabilities } from './vulnerabilities';
Expand Down Expand Up @@ -191,7 +190,6 @@ export async function lookup(
): Promise<ExtractResult> {
await fetchVulnerabilities(config, packageFiles);
await fetchUpdates(config, packageFiles);
await raiseDeprecationWarnings(config, packageFiles);
const { branches, branchList } = await branchifyUpgrades(
config,
packageFiles,
Expand Down

0 comments on commit b6d2c4b

Please sign in to comment.