Skip to content

Commit

Permalink
node20 and upgrade-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
ckuijjer committed Apr 8, 2024
1 parent a92a63e commit 077167b
Show file tree
Hide file tree
Showing 8 changed files with 1,618 additions and 1,356 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand All @@ -46,10 +46,10 @@ jobs:
needs: [deploy_to_dev]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion cloud/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import puppeteer, {
// see https://github.com/Sparticuz/chromium#running-locally--headlessheadful-mode
// for how to install a locally running chromium
const LOCAL_CHROMIUM_EXECUTABLE_PATH =
'/tmp/localChromium/chromium/mac_arm-1274971/chrome-mac/Chromium.app/Contents/MacOS/Chromium'
'/tmp/localChromium/chromium/mac_arm-1283827/chrome-mac/Chromium.app/Contents/MacOS/Chromium'

const createBrowserSingleton = () => {
let instance: Browser
Expand Down
62 changes: 31 additions & 31 deletions cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "expatcinema.com-cloud",
"version": "1.0.1",
"description": "",
"main": "index.js",
"main": "index.ts",
"scripts": {
"start": "AWS_PROFILE=casper NODE_OPTIONS='--inspect --enable-source-maps --trace-warnings' serverless offline --aws-profile casper",
"scrapers": "AWS_CLIENT_TIMEOUT=360000 serverless invoke -f scrapers --aws-profile casper",
Expand All @@ -28,48 +28,48 @@
"author": "Casper Kuijjer",
"license": "ISC",
"dependencies": {
"@apollo/client": "^3.6.9",
"@aws-lambda-powertools/logger": "^1.2.1",
"@middy/core": "^3.6.2",
"@apollo/client": "^3.9.10",
"@aws-lambda-powertools/logger": "^2.0.3",
"@middy/core": "^5.3.2",
"@sparticuz/chromium": "^117.0.0",
"axios": "^0.27.2",
"camelcase-keys": "^8.0.1",
"cross-fetch": "^3.1.5",
"axios": "^1.6.8",
"camelcase-keys": "^9.1.3",
"cross-fetch": "^4.0.0",
"diacritics": "^1.3.0",
"got": "^12.5.2",
"graphql": "^16.5.0",
"html-entities": "^2.3.3",
"jsdom": "^20.0.0",
"got": "^14.2.1",
"graphql": "^16.8.1",
"html-entities": "^2.5.2",
"jsdom": "^24.0.0",
"leven": "^4.0.0",
"luxon": "^3.0.1",
"p-map": "5.5.0",
"p-retry": "4.6.1",
"public-ip": "^6.0.1",
"luxon": "^3.4.4",
"p-map": "7.0.2",
"p-retry": "6.2.0",
"public-ip": "^6.0.2",
"puppeteer-core": "^21.3.2",
"ramda": "^0.28.0",
"ramda": "^0.29.1",
"react": "^18.2.0",
"tiny-invariant": "^1.2.0",
"tiny-invariant": "^1.3.3",
"x-ray": "^2.3.4"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@tsconfig/node16": "^1.0.3",
"@types/aws-lambda": "^8.10.101",
"@types/diacritics": "^1.3.1",
"@types/jsdom": "^16.2.14",
"@types/luxon": "^2.3.2",
"@types/ramda": "^0.29.3",
"@types/x-ray": "^2.3.3",
"aws-sdk": "^2.1181.0",
"esbuild": "^0.14.49",
"@tsconfig/node20": "^20.1.4",
"@types/aws-lambda": "^8.10.137",
"@types/diacritics": "^1.3.3",
"@types/jsdom": "^21.1.6",
"@types/luxon": "^3.4.2",
"@types/ramda": "^0.29.12",
"@types/x-ray": "^2.3.6",
"aws-sdk": "^2.1594.0",
"esbuild": "^0.20.2",
"lumigo-cli": "^0.48.4",
"prettier": "^3.2.5",
"puppeteer": "^21.3.2",
"serverless": "^3.21.0",
"serverless-esbuild": "^1.31.0",
"serverless-offline": "^11.1.3",
"serverless": "^3.38.0",
"serverless-esbuild": "^1.52.1",
"serverless-offline": "^13.3.3",
"serverless-plugin-monorepo": "^0.11.0",
"tsx": "^3.12.7",
"typescript": "^4.7.4"
"tsx": "^4.7.2",
"typescript": "^5.4.4"
}
}
2 changes: 1 addition & 1 deletion cloud/playground.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectLambdaContext } from '@aws-lambda-powertools/logger'
import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'
import middy from '@middy/core'
// import chromium from 'chrome-aws-lambda'
// const chromium = require('chrome-aws-lambda')
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectLambdaContext } from '@aws-lambda-powertools/logger'
import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'
import middy from '@middy/core'
import { APIGatewayEvent, Context } from 'aws-lambda'
import AWS from 'aws-sdk'
Expand Down
2 changes: 1 addition & 1 deletion cloud/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs16.x
runtime: nodejs20.x
region: eu-west-1
stage: ${opt:stage, 'dev'}
versionFunctions: false
Expand Down
16 changes: 10 additions & 6 deletions cloud/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
// improve debugging experience
"sourceMap": true,
// allow importing like import logger from 'src/logger'
"baseUrl": "./",
// allow importing fs from 'fs' instead of * as fs from 'fs'
"esModuleInterop": true,
"isolatedModules": true,
"resolveJsonModule": true,
"downlevelIteration": true,
"baseUrl": "."
}
"module": "ES2022",
"moduleResolution": "Bundler"
},
"exclude": ["node_modules"]
}
Loading

0 comments on commit 077167b

Please sign in to comment.