From 283f0502ecf0338ab2db3d1cb3f5e2913eb41a16 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:14:07 +0200 Subject: [PATCH] fix(rules): add Pirsch Analytics --- src/rules/__snapshots__/index.test.ts.snap | 1 + src/rules/analytics/index.ts | 1 + src/rules/analytics/pirschanalytics.ts | 13 +++++++++++++ .../spec/golang/__snapshots__/lockfile.test.ts.snap | 6 ++++++ .../nodejs/__snapshots__/component.test.ts.snap | 6 ++++++ .../spec/php/__snapshots__/component.test.ts.snap | 6 ++++++ .../spec/ruby/__snapshots__/lockfile.test.ts.snap | 6 ++++++ src/types/techs.ts | 1 + 8 files changed, 40 insertions(+) create mode 100644 src/rules/analytics/pirschanalytics.ts diff --git a/src/rules/__snapshots__/index.test.ts.snap b/src/rules/__snapshots__/index.test.ts.snap index ab64cfa5..92335b08 100644 --- a/src/rules/__snapshots__/index.test.ts.snap +++ b/src/rules/__snapshots__/index.test.ts.snap @@ -232,6 +232,7 @@ exports[`all > should match everything 1`] = ` "phpstan", "phpunit", "pingdom", + "pirschanalytics", "placekit", "planetscale", "platformsh", diff --git a/src/rules/analytics/index.ts b/src/rules/analytics/index.ts index b11fd55f..44179266 100644 --- a/src/rules/analytics/index.ts +++ b/src/rules/analytics/index.ts @@ -4,6 +4,7 @@ import './koalaanalytics.js'; import './logsnag.js'; import './matomo.js'; import './mixpanel.js'; +import './pirschanalytics.js'; import './plausible.js'; import './tinybird.js'; import './vercel.analytics.js'; diff --git a/src/rules/analytics/pirschanalytics.ts b/src/rules/analytics/pirschanalytics.ts new file mode 100644 index 00000000..37701ec8 --- /dev/null +++ b/src/rules/analytics/pirschanalytics.ts @@ -0,0 +1,13 @@ +import { register } from '../../register.js'; + +register({ + tech: 'pirschanalytics', + name: 'Pirsch Analytics', + type: 'analytics', + dependencies: [ + { type: 'npm', name: 'pirsch-sdk' }, + { type: 'ruby', name: 'pirsch_api' }, + { type: 'php', name: 'pirsch-analytics/sdk' }, + { type: 'golang', name: 'github.com/pirsch-analytics/pirsch-go-sdk/v2' }, + ], +}); diff --git a/src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap b/src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap index 1cee1503..5b740eed 100644 --- a/src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap +++ b/src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap @@ -85,6 +85,7 @@ exports[`golang (lockfile) > should match everything 1`] = ` "mailgun", "meilisearch", "paypal", + "pirschanalytics", "sendgrid", "slack", "splitio", @@ -531,6 +532,11 @@ exports[`golang (lockfile) > should match everything 2`] = ` "github.com/meilisearch/meilisearch-go", "v1.0.0", ], + [ + "golang", + "github.com/pirsch-analytics/pirsch-go-sdk/v2", + "v1.0.0", + ], [ "golang", "github.com/sendgrid/sendgrid-go", diff --git a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap index b03cefdc..72772dd5 100644 --- a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap @@ -149,6 +149,7 @@ exports[`npm > should match everything 1`] = ` "ovh", "pagerduty", "paypal", + "pirschanalytics", "placekit", "playwright", "postgresql", @@ -1579,6 +1580,11 @@ exports[`npm > should match everything 2`] = ` "php-coveralls", "0.0.0", ], + [ + "npm", + "pirsch-sdk", + "0.0.0", + ], [ "npm", "playwright", diff --git a/src/rules/spec/php/__snapshots__/component.test.ts.snap b/src/rules/spec/php/__snapshots__/component.test.ts.snap index 79e18186..36224efe 100644 --- a/src/rules/spec/php/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/php/__snapshots__/component.test.ts.snap @@ -95,6 +95,7 @@ exports[`php > should match everything 1`] = ` "phppest", "phpstan", "phpunit", + "pirschanalytics", "postgresql", "postmark", "rabbitmq", @@ -772,6 +773,11 @@ exports[`php > should match everything 2`] = ` "phpunit/phpunit", "0.0.0", ], + [ + "php", + "pirsch-analytics/sdk", + "0.0.0", + ], [ "php", "predis/predis", diff --git a/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap b/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap index ebec61e0..866ba079 100644 --- a/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap +++ b/src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap @@ -110,6 +110,7 @@ exports[`ruby (component) > should match everything 1`] = ` "oraclecloud", "pagerduty", "paypal", + "pirschanalytics", "postgresql", "postmark", "rabbitmq", @@ -767,6 +768,11 @@ exports[`ruby (component) > should match everything 2`] = ` "pg", "1.0.0", ], + [ + "ruby", + "pirsch_api", + "1.0.0", + ], [ "ruby", "platform-api", diff --git a/src/types/techs.ts b/src/types/techs.ts index 4c12a7a1..ccab14fa 100644 --- a/src/types/techs.ts +++ b/src/types/techs.ts @@ -257,6 +257,7 @@ export type AllowedKeys = | 'phpstan' | 'phpunit' | 'pingdom' + | 'pirschanalytics' | 'placekit' | 'planetscale' | 'platformsh'