From 85d95a5251a02a659f4dd2060b8bbec107f8dda0 Mon Sep 17 00:00:00 2001
From: ST-DDT <ST-DDT@gmx.de>
Date: Sun, 11 Feb 2024 18:58:41 +0100
Subject: [PATCH] feat(replacements): fakerjs to scoped (#27206)

---
 lib/config/presets/internal/replacements.ts | 41 +++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/lib/config/presets/internal/replacements.ts b/lib/config/presets/internal/replacements.ts
index d04968eec0..e88e984f53 100644
--- a/lib/config/presets/internal/replacements.ts
+++ b/lib/config/presets/internal/replacements.ts
@@ -14,6 +14,7 @@ export const presets: Record<string, Preset> = {
       'replacements:babel-eslint-to-eslint-parser',
       'replacements:containerbase',
       'replacements:cucumber-to-scoped',
+      'replacements:fakerjs-to-scoped',
       'replacements:fastify-to-scoped',
       'replacements:hapi-to-scoped',
       'replacements:jade-to-pug',
@@ -181,6 +182,46 @@ export const presets: Record<string, Preset> = {
       },
     ],
   },
+  'fakerjs-to-scoped': {
+    description: '`fakerjs` packages became scoped.',
+    packageRules: [
+      {
+        matchCurrentVersion: '>=5.0.0',
+        matchDatasources: ['npm'],
+        matchPackageNames: ['faker'],
+        replacementName: '@faker-js/faker',
+        replacementVersion: '5.5.3',
+      },
+      {
+        matchCurrentVersion: '>=4.0.0 <5.0.0',
+        matchDatasources: ['npm'],
+        matchPackageNames: ['faker'],
+        replacementName: '@faker-js/faker',
+        replacementVersion: '4.1.0',
+      },
+      {
+        matchCurrentVersion: '>=3.0.0 <4.0.0',
+        matchDatasources: ['npm'],
+        matchPackageNames: ['faker'],
+        replacementName: '@faker-js/faker',
+        replacementVersion: '3.1.0',
+      },
+      {
+        matchCurrentVersion: '>=2.0.0 <3.0.0',
+        matchDatasources: ['npm'],
+        matchPackageNames: ['faker'],
+        replacementName: '@faker-js/faker',
+        replacementVersion: '2.1.5',
+      },
+      {
+        matchCurrentVersion: '<2.0.0',
+        matchDatasources: ['npm'],
+        matchPackageNames: ['faker'],
+        replacementName: '@faker-js/faker',
+        replacementVersion: '1.1.0',
+      },
+    ],
+  },
   'fastify-to-scoped': {
     description: '`fastify` packages became scoped.',
     packageRules: [
-- 
GitLab