From 5fc594019e351795d3ed8d8533afeb480e884c05 Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:27:59 +0200 Subject: [PATCH] fix(rules): add Shopify Hydrogen --- src/rules/__snapshots__/index.test.ts.snap | 1 + src/rules/framework/index.ts | 1 + src/rules/framework/shopify.hydrogen.ts | 8 ++++++++ .../spec/nodejs/__snapshots__/component.test.ts.snap | 6 ++++++ src/types/techs.ts | 1 + 5 files changed, 17 insertions(+) create mode 100644 src/rules/framework/shopify.hydrogen.ts diff --git a/src/rules/__snapshots__/index.test.ts.snap b/src/rules/__snapshots__/index.test.ts.snap index 0a321bd4..2b2cf0f8 100644 --- a/src/rules/__snapshots__/index.test.ts.snap +++ b/src/rules/__snapshots__/index.test.ts.snap @@ -344,6 +344,7 @@ exports[`all > should match everything 1`] = ` "sequelize", "servicenow", "shopify", + "shopify.hydrogen", "sitecore", "sitecore.xmlcloud", "slack", diff --git a/src/rules/framework/index.ts b/src/rules/framework/index.ts index 8e681df8..1362c8a8 100644 --- a/src/rules/framework/index.ts +++ b/src/rules/framework/index.ts @@ -9,3 +9,4 @@ import './gridsome.js'; import './ghost.js'; import './hexojs.js'; import './hugo.js'; +import './shopify.hydrogen.js'; diff --git a/src/rules/framework/shopify.hydrogen.ts b/src/rules/framework/shopify.hydrogen.ts new file mode 100644 index 00000000..898e86ae --- /dev/null +++ b/src/rules/framework/shopify.hydrogen.ts @@ -0,0 +1,8 @@ +import { register } from '../../register.js'; + +register({ + tech: 'shopify.hydrogen', + name: 'Shopify Hydrogen', + type: 'framework', + dependencies: [{ type: 'npm', name: '@shopify/hydrogen' }], +}); diff --git a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap index e516680b..f6b18f1c 100644 --- a/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap +++ b/src/rules/spec/nodejs/__snapshots__/component.test.ts.snap @@ -206,6 +206,7 @@ exports[`npm > should match everything 1`] = ` "sentry", "sequelize", "shopify", + "shopify.hydrogen", "sitecore", "sitecore.xmlcloud", "slack", @@ -1255,6 +1256,11 @@ exports[`npm > should match everything 2`] = ` "@shopify/cli", "0.0.0", ], + [ + "npm", + "@shopify/hydrogen", + "0.0.0", + ], [ "npm", "@shopify/shopify-api", diff --git a/src/types/techs.ts b/src/types/techs.ts index 13f17708..20c96c62 100644 --- a/src/types/techs.ts +++ b/src/types/techs.ts @@ -363,6 +363,7 @@ export type AllowedKeys = | 'sentry' | 'sequelize' | 'servicenow' + | 'shopify.hydrogen' | 'shopify' | 'sitecore.xmlcloud' | 'sitecore'