Skip to content

Commit

Permalink
chore: Update npm dependencies to latest versions
Browse files Browse the repository at this point in the history
fix: html decode cinecitta movie title
  • Loading branch information
ckuijjer committed Jun 30, 2024
1 parent 3befdf0 commit eed78e9
Show file tree
Hide file tree
Showing 7 changed files with 3,395 additions and 3,624 deletions.
2 changes: 1 addition & 1 deletion cloud/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
18 changes: 9 additions & 9 deletions cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"dependencies": {
"@apollo/client": "^3.9.10",
"@aws-lambda-powertools/logger": "^2.0.3",
"@aws-sdk/client-dynamodb": "^3.549.0",
"@aws-sdk/client-s3": "^3.550.0",
"@aws-sdk/lib-dynamodb": "^3.549.0",
"@aws-sdk/client-dynamodb": "^3.606.0",
"@aws-sdk/client-s3": "^3.606.0",
"@aws-sdk/lib-dynamodb": "^3.606.0",
"@middy/core": "^5.3.2",
"@sparticuz/chromium": "^123.0.1",
"camelcase-keys": "^9.1.3",
Expand All @@ -44,7 +44,7 @@
"luxon": "^3.4.4",
"p-map": "7.0.2",
"p-retry": "6.2.0",
"puppeteer-core": "22.6.3",
"puppeteer-core": "22.12.1",
"react": "^18.2.0",
"x-ray": "^2.3.4",
"x-ray-crawler": "^2.0.5"
Expand All @@ -55,17 +55,17 @@
"@types/aws-lambda": "^8.10.137",
"@types/diacritics": "^1.3.3",
"@types/luxon": "^3.4.2",
"@types/ramda": "^0.29.12",
"@types/ramda": "^0.30.0",
"@types/x-ray": "^2.3.6",
"esbuild": "^0.20.2",
"esbuild": "^0.21.5",
"lumigo-cli": "^0.48.4",
"prettier": "^3.2.5",
"puppeteer": "22.6.3",
"puppeteer": "22.12.1",
"serverless": "^3.38.0",
"serverless-esbuild": "^1.52.1",
"serverless-offline": "^13.3.3",
"serverless-plugin-monorepo": "^0.11.0",
"tsx": "^4.7.2",
"typescript": "^5.4.4"
"tsx": "^4.16.0",
"typescript": "5.5.2"
}
}
5 changes: 4 additions & 1 deletion cloud/scrapers/cinecitta.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import got from 'got'
import { decode } from 'html-entities'
import { DateTime } from 'luxon'

import { logger as parentLogger } from '../powertools'
Expand Down Expand Up @@ -46,7 +47,9 @@ const hasEnglishSubtitles = (movie: WpJsonMovie) => {
}

const cleanTitle = (movie: WpJsonMovie) => {
return titleCase(movie.title.rendered.replace(ENGLISH_SUBTITLES_REGEX, ''))
return titleCase(
decode(movie.title.rendered.replace(ENGLISH_SUBTITLES_REGEX, '')),
)
}

const extractFromMainPage = async (): Promise<Screening[]> => {
Expand Down
12 changes: 11 additions & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
_addScreenings.ts_ and _sort.ts_ have been moved from _cloud/scrapers/utils_. They weren't used in _cloud/_ and moved here _as-is_ mainly for posterity. They're untested
# Analyze Screenings

../data/screenings-without-metadata.json and ../data/screenings-with-metadata.json contains information about todays screenings. The one without metadata comes from the scrapers, the one with metadata went through a step of normalization where each screening title has been mapped to a movie title from TMDB.

- `yarn downloadScreenings` - downloads both files
- `yarn analyzeScreenings` - playground like script to do one-off analysis on both files
- `yarn compareScreenings` - compare both files

# Other

- _addScreenings.ts_ and _sort.ts_ have been moved from _cloud/scrapers/utils_. They weren't used in _cloud/_ and moved here _as-is_ mainly for posterity. They're untested
11 changes: 6 additions & 5 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
"dependencies": {
"diacritics": "^1.3.0",
"luxon": "^3.4.4",
"ramda": "^0.29.1"
"ramda": "^0.30.1"
},
"devDependencies": {
"@types/luxon": "^3.4.2",
"@types/ramda": "^0.29.12",
"@types/ramda": "^0.30.0",
"prettier": "^3.2.5",
"tsx": "^4.7.2",
"typescript": "^5.4.4"
"tsx": "^4.16.0",
"typescript": "5.5.2"
},
"scripts": {
"analyzeScreenings": "tsx analyzeScreenings.ts",
"downloadScreenings": "tsx downloadScreenings.ts"
"downloadScreenings": "tsx downloadScreenings.ts",
"compareScreenings": "code -d ../data/screenings/screenings-without-metadata.json ../data/screenings/screenings-with-metadata.json"
}
}
20 changes: 10 additions & 10 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@observablehq/plot": "0.6.13",
"@observablehq/plot": "0.6.15",
"luxon": "^3.4.4",
"next": "14.1.4",
"next": "14.2.4",
"next-sitemap": "^4.2.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-virtualized": "^9.22.3",
"remove-accents": "^0.5.0"
},
Expand All @@ -25,12 +25,12 @@
"@emotion/babel-preset-css-prop": "^11.10.0",
"@svgr/webpack": "^8.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "20.12.5",
"@types/react": "18.2.74",
"@types/react-dom": "18.2.24",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.4",
"@types/node": "20.14.9",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"eslint": "^9.6.0",
"eslint-config-next": "14.2.4",
"prettier": "^3.2.5",
"typescript": "5.4.4"
"typescript": "5.5.2"
}
}
Loading

0 comments on commit eed78e9

Please sign in to comment.