Skip to content

Commit 1aadae5

Browse files
authored
Merge pull request #10761 from ethereum/hotfixLambda
2 parents cf79bc0 + 267ed5b commit 1aadae5

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"gatsby-transformer-json": "^5.4.0",
5757
"gatsby-transformer-remark": "^6.4.0",
5858
"gatsby-transformer-sharp": "^5.4.0",
59-
"googleapis": "^118.0.0",
6059
"htmr": "^1.0.2",
6160
"i18next": "^21.9.2",
6261
"is-relative-url": "^3.0.0",
@@ -125,8 +124,10 @@
125124
"scripts": {
126125
"postinstall": "yarn theme",
127126
"build": "gatsby build",
128-
"build:lambda": "cross-env NODE_OPTIONS=--openssl-legacy-provider netlify-lambda build src/lambda --config=./webpack.lambda.js",
129-
"build:10gb": "cross-env NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
127+
"build:lambda": "NODE_OPTIONS=--openssl-legacy-provider netlify-lambda build src/lambda --config=./webpack.lambda.js",
128+
"build:10gb": "NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
129+
"build:lambda-cross-env": "cross-env NODE_OPTIONS=--openssl-legacy-provider netlify-lambda build src/lambda --config=./webpack.lambda.js",
130+
"build:10gb-cross-env": "cross-env NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
130131
"clean": "gatsby clean",
131132
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
132133
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",

src/lambda/calendarEvents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { google } from "googleapis"
1+
import { calendar as googleCalendar } from "@googleapis/calendar"
22

33
import type { HandlerResponse } from "@netlify/functions"
44

@@ -7,7 +7,7 @@ export const lambda = async (
77
calenderId: string
88
): Promise<HandlerResponse> => {
99
try {
10-
const calendar = google.calendar({ version: "v3", auth: apiKey })
10+
const calendar = await googleCalendar({ version: "v3", auth: apiKey })
1111
const futureEvents = await calendar.events.list({
1212
calendarId: calenderId,
1313
timeMin: new Date().toISOString(),

yarn.lock

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11333,7 +11333,7 @@ google-p12-pem@^4.0.0:
1133311333
dependencies:
1133411334
node-forge "^1.3.1"
1133511335

11336-
googleapis-common@^6.0.0, googleapis-common@^6.0.3:
11336+
googleapis-common@^6.0.3:
1133711337
version "6.0.4"
1133811338
resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-6.0.4.tgz#bd968bef2a478bcd3db51b27655502a11eaf8bf4"
1133911339
integrity sha512-m4ErxGE8unR1z0VajT6AYk3s6a9gIMM6EkDZfkPnES8joeOlEtFEJeF8IyZkb0tjPXkktUfYrE4b3Li1DNyOwA==
@@ -11345,14 +11345,6 @@ googleapis-common@^6.0.0, googleapis-common@^6.0.3:
1134511345
url-template "^2.0.8"
1134611346
uuid "^9.0.0"
1134711347

11348-
googleapis@^118.0.0:
11349-
version "118.0.0"
11350-
resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-118.0.0.tgz#a8b9f84d283544b85927abeb989252cb2f3ec490"
11351-
integrity sha512-Ny6zJOGn5P/YDT6GQbJU6K0lSzEu4Yuxnsn45ZgBIeSQ1RM0FolEjUToLXquZd89DU9wUfqA5XYHPEctk1TFWg==
11352-
dependencies:
11353-
google-auth-library "^8.0.2"
11354-
googleapis-common "^6.0.0"
11355-
1135611348
gopd@^1.0.1:
1135711349
version "1.0.1"
1135811350
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"

0 commit comments

Comments
 (0)