Skip to content

Commit

Permalink
fix(rules): add Gatsby
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Oct 12, 2023
1 parent a303075 commit 95e0c13
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ exports[`all > should match everything 1`] = `
"firebase",
"firebase.firestore",
"flyio",
"gatsby",
"gcp",
"gcp.aiplatform",
"gcp.appengine",
Expand Down
7 changes: 6 additions & 1 deletion src/rules/cloud/netlify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ register({
dependencies: [
{ type: 'npm', name: 'netlify' },
{ type: 'npm', name: 'netlify-cli' },
{ type: 'npm', name: /^@netlify\//, example: '@netlify/plugin-emails' },
{ type: 'npm', name: '@netlify/build' },
{ type: 'npm', name: '@netlify/plugin-emails' },
{ type: 'npm', name: '@netlify/config' },
{ type: 'npm', name: '@netlify/functions-utils' },
{ type: 'npm', name: '@netlify/cache-utils' },
{ type: 'npm', name: '@netlify/run-utils' },
{ type: 'githubAction', name: 'nwtgck/actions-netlify' },
],
});
19 changes: 19 additions & 0 deletions src/rules/js/gastby.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { register } from '../../register.js';

register({
tech: 'gatsby',
name: 'Gatsby',
type: 'tool',
dependencies: [
{ type: 'npm', name: 'gatsby' },
{ type: 'npm', name: 'gatsby-cli' },
{ type: 'npm', name: 'gatsby-core-utils' },
{ type: 'npm', name: '@gatsbyjs/reach-router' },
{ type: 'npm', name: '@netlify/plugin-gatsby' },
{ type: 'npm', name: '@vercel/gatsby-plugin-vercel-builder' },
{ type: 'npm', name: '@vercel/gatsby-plugin-vercel-analytics' },
{ type: 'githubAction', name: 'enriikke/gatsby-gh-pages-action' },
{ type: 'githubAction', name: 'jzweifel/gatsby-cli-github-action' },
{ type: 'githubAction', name: 'jonelantha/gatsby-s3-action' },
],
});
1 change: 1 addition & 0 deletions src/rules/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './esbuild.js';
import './eslint.js';
import './express.js';
import './fastify.js';
import './gastby.js';
import './koa.js';
import './meteorjs.js';
import './mithriljs.js';
Expand Down
15 changes: 15 additions & 0 deletions src/rules/spec/githubActions/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ exports[`docker > should match all dependencies 2`] = `
"elastic/elastic-github-actions/elasticsearch",
"1",
],
[
"githubAction",
"enriikke/gatsby-gh-pages-action",
"1",
],
[
"githubAction",
"errata-ai/vale-action",
Expand Down Expand Up @@ -447,6 +452,16 @@ exports[`docker > should match all dependencies 2`] = `
"jakejarvis/s3-sync-action",
"1",
],
[
"githubAction",
"jonelantha/gatsby-s3-action",
"1",
],
[
"githubAction",
"jzweifel/gatsby-cli-github-action",
"1",
],
[
"githubAction",
"launchdarkly/find-code-references",
Expand Down
61 changes: 61 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ exports[`npm > should match everything 1`] = `
"fastly",
"figma",
"firebase",
"gatsby",
"gcp",
"gcp.aiplatform",
"gcp.appengine",
Expand Down Expand Up @@ -747,6 +748,11 @@ exports[`npm > should match everything 2`] = `
"@firebase/auth",
"0.0.0",
],
[
"npm",
"@gatsbyjs/reach-router",
"0.0.0",
],
[
"npm",
"@getbrevo/brevo",
Expand Down Expand Up @@ -972,11 +978,41 @@ exports[`npm > should match everything 2`] = `
"@miniflare/cache",
"0.0.0",
],
[
"npm",
"@netlify/build",
"0.0.0",
],
[
"npm",
"@netlify/cache-utils",
"0.0.0",
],
[
"npm",
"@netlify/config",
"0.0.0",
],
[
"npm",
"@netlify/functions-utils",
"0.0.0",
],
[
"npm",
"@netlify/plugin-emails",
"0.0.0",
],
[
"npm",
"@netlify/plugin-gatsby",
"0.0.0",
],
[
"npm",
"@netlify/run-utils",
"0.0.0",
],
[
"npm",
"@nuxtjs/algolia",
Expand Down Expand Up @@ -1232,6 +1268,16 @@ exports[`npm > should match everything 2`] = `
"@vercel/edge-functions-ui",
"0.0.0",
],
[
"npm",
"@vercel/gatsby-plugin-vercel-analytics",
"0.0.0",
],
[
"npm",
"@vercel/gatsby-plugin-vercel-builder",
"0.0.0",
],
[
"npm",
"@vercel/kv",
Expand Down Expand Up @@ -1442,6 +1488,21 @@ exports[`npm > should match everything 2`] = `
"firebase",
"0.0.0",
],
[
"npm",
"gatsby",
"0.0.0",
],
[
"npm",
"gatsby-cli",
"0.0.0",
],
[
"npm",
"gatsby-core-utils",
"0.0.0",
],
[
"npm",
"gatsby-plugin-algolia",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export type AllowedKeys =
| 'firebase.firestore'
| 'firebase'
| 'flyio'
| 'gatsby'
| 'gcp.aiplatform'
| 'gcp.appengine'
| 'gcp.artifactregistry'
Expand Down

0 comments on commit 95e0c13

Please sign in to comment.