Skip to content

Commit 949542a

Browse files
authored
Merge pull request #26 from gatsby-uc/adapters
Adapters
2 parents e9db1dd + 302dd27 commit 949542a

File tree

8 files changed

+8225
-5828
lines changed

8 files changed

+8225
-5828
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ public
1111
.yarn/*
1212
!.yarn/releases
1313
!.yarn/plugins
14+
!.yarn/patches
1415
.pnp.*
1516

1617

1718
# Environment Variables
18-
.env*
19+
.env*
20+
21+
# Netlify
22+
.netlify/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/gatsby-node.js b/gatsby-node.js
2+
index 51c4f3d783327b6e8ac0d5b6fdebc234425eb91a..81161516a4127449c690f9d0063187dd49cf1f6f 100644
3+
--- a/gatsby-node.js
4+
+++ b/gatsby-node.js
5+
@@ -13,15 +13,22 @@ exports.sourceNodes = async ({ actions, createNodeId, createContentDigest }, opt
6+
.flat()
7+
.map((page) => page.body)
8+
.flat();
9+
- const logins = contributors.map(node => node.login);
10+
- const profiles = await Promise.all(logins.map(login => github.get(`/users/${login}`).then((res) => res.body)));
11+
+ const logins = contributors.filter(node => node.type !== "Bot").map(node => node.login);
12+
+ const profiles = await Promise.all(logins.map(
13+
+ login => github.get(`/users/${login}`)
14+
+ .then((res) => res.body)
15+
+ .catch((err) => {
16+
+ console.warn(`Failed to fetch profile for ${login}: ${err.message}`);
17+
+ return {};
18+
+ })
19+
+ ));
20+
const loginToProfile = Object.fromEntries(profiles.map(profile => [profile.login, profile]));
21+
contributors.forEach(node => {
22+
const profile = loginToProfile[node.login];
23+
return actions.createNode({
24+
...camelcase_keys_1.default(node),
25+
- name: profile.name,
26+
- url: profile.blog || profile.html_url,
27+
+ name: profile?.name,
28+
+ url: profile?.blog || profile?.html_url,
29+
id: createNodeId(node.id),
30+
internal: {
31+
type: "GitHubContributor",

.yarn/releases/yarn-3.6.3.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

.yarn/releases/yarn-4.4.0.cjs

Lines changed: 925 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
compressionLevel: mixed
2+
13
enableGlobalCache: true
24

35
nodeLinker: node-modules
46

5-
plugins:
6-
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
7-
spec: '@yarnpkg/plugin-interactive-tools'
8-
9-
yarnPath: .yarn/releases/yarn-3.6.3.cjs
7+
yarnPath: .yarn/releases/yarn-4.4.0.cjs

gatsby-config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
const adapter = require("gatsby-adapter-netlify").default;
3+
14
require('dotenv').config()
25

36
const {
@@ -20,6 +23,10 @@ GA_MEASUREMENT_ID &&
2023
});
2124

2225
module.exports = {
26+
adapter: adapter({
27+
excludeDatastoreFromEngineFunction: true,
28+
imageCDN: false,
29+
}),
2330
siteMetadata: {
2431
title: `Gatsby UC`,
2532
siteUrl: `https://gatsbyuc.dev`,

package.json

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,44 @@
1717
},
1818
"dependencies": {
1919
"@headlessui/react": "^1.7.17",
20-
"@supabase/supabase-js": "^2.33.1",
21-
"@tailwindcss/typography": "^0.5.9",
22-
"dotenv": "^16.3.1",
23-
"gatsby": "^5.12.1",
24-
"gatsby-plugin-google-gtag": "^5.12.0",
25-
"gatsby-plugin-image": "^3.12.0",
26-
"gatsby-plugin-manifest": "^5.12.0",
20+
"@supabase/supabase-js": "^2.45.1",
21+
"@tailwindcss/typography": "^0.5.14",
22+
"dotenv": "^16.4.5",
23+
"gatsby": "^5.13.7",
24+
"gatsby-adapter-netlify": "^1.1.7",
25+
"gatsby-plugin-google-gtag": "^5.13.1",
26+
"gatsby-plugin-image": "^3.13.1",
27+
"gatsby-plugin-manifest": "^5.13.1",
2728
"gatsby-plugin-npmsio": "workspace:^",
28-
"gatsby-plugin-postcss": "^6.12.0",
29+
"gatsby-plugin-postcss": "^6.13.1",
2930
"gatsby-plugin-react-svg": "^3.3.0",
30-
"gatsby-plugin-sharp": "^5.12.0",
31-
"gatsby-plugin-sitemap": "^6.12.0",
31+
"gatsby-plugin-sharp": "^5.13.1",
32+
"gatsby-plugin-sitemap": "^6.13.1",
3233
"gatsby-plugin-supabase": "workspace:^",
33-
"gatsby-source-filesystem": "^5.12.0",
34+
"gatsby-source-filesystem": "^5.13.1",
3435
"gatsby-source-github-contributors": "^0.1.10",
35-
"gatsby-source-npm-package-search": "^5.12.0",
36-
"gatsby-transformer-json": "^5.12.0",
37-
"gatsby-transformer-sharp": "^5.12.0",
38-
"http-status-codes": "^2.2.0",
36+
"gatsby-source-npm-package-search": "^5.13.1",
37+
"gatsby-transformer-json": "^5.13.1",
38+
"gatsby-transformer-sharp": "^5.13.1",
39+
"http-status-codes": "^2.3.0",
3940
"node-fetch": "^3.3.2",
40-
"npms.io": "^2.2.5",
41-
"rc-tooltip": "^6.0.1",
42-
"react": "^18.2.0",
41+
"npms.io": "^2.2.8",
42+
"rc-tooltip": "^6.2.0",
43+
"react": "^18.3.1",
4344
"react-circular-progressbar": "^2.1.0",
44-
"react-dom": "^18.2.0",
45-
"react-icons": "^4.10.1",
46-
"react-lite-youtube-embed": "^2.3.52",
47-
"tailwindcss": "^3.3.3"
45+
"react-dom": "^18.3.1",
46+
"react-icons": "^4.12.0",
47+
"react-lite-youtube-embed": "^2.4.0",
48+
"tailwindcss": "^3.4.10"
4849
},
49-
"packageManager": "yarn@3.6.3",
50+
"packageManager": "yarn@4.4.0",
5051
"devDependencies": {
51-
"@babel/core": "^7.22.11",
52-
"autoprefixer": "^10.4.15",
53-
"postcss": "^8.4.28",
54-
"prettier": "^3.0.2"
52+
"@babel/core": "^7.25.2",
53+
"autoprefixer": "^10.4.20",
54+
"postcss": "^8.4.41",
55+
"prettier": "^3.3.3"
56+
},
57+
"resolutions": {
58+
"gatsby-source-github-contributors@^0.1.10": "patch:gatsby-source-github-contributors@npm%3A0.1.10#./.yarn/patches/gatsby-source-github-contributors-npm-0.1.10-5cec58173b.patch"
5559
}
5660
}

0 commit comments

Comments
 (0)