Skip to content

Commit

Permalink
update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
cws committed Jan 7, 2021
1 parent c8fc100 commit 58e9fe7
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 157 deletions.
5 changes: 2 additions & 3 deletions lib/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface Dimensions {
export const imageDimensions = async (url: string | undefined | null, noCache?: boolean): Promise<Dimensions | null> => {
if (!url) return null

const cacheKey = !noCache && encodeURIComponent(url) || null
const cacheKey = (!noCache && encodeURIComponent(url)) || null
const cached = getCache<Dimensions>(cacheKey)
if (cached) return cached

Expand Down Expand Up @@ -69,7 +69,6 @@ export const imageDimensions = async (url: string | undefined | null, noCache?:
throw new Error(error)
}
//console.warn(`images.ts: Network error while probing image with url: ${url}.`)

}
} while (hasError && retry < maxRetries)
if (hasError) throw new Error(`images.ts: Bad network connection. Failed image probe after ${maxRetries} retries for url: ${url}.`)
Expand All @@ -82,7 +81,7 @@ export const imageDimensions = async (url: string | undefined | null, noCache?:
export const imageDimensionsFromFile = async (file: string, noCache?: boolean) => {
if (!file) return null

const cacheKey = !noCache && encodeURIComponent(file) || null
const cacheKey = (!noCache && encodeURIComponent(file)) || null
const cached = getCache<Dimensions>(cacheKey)
if (cached) return cached

Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"postbuild": "next-sitemap"
},
"dependencies": {
"@tryghost/content-api": "^1.4.11",
"@tryghost/content-api": "^1.4.12",
"@types/refractor": "^3.0.0",
"cheerio": "^1.0.0-rc.5",
"dayjs": "^1.10.1",
"dayjs": "^1.10.2",
"email-validator": "^2.0.4",
"fs": "^0.0.1-security",
"hast-util-to-string": "^1.0.4",
"lodash.throttle": "^4.1.1",
"next": "^10.0.4",
"next": "^10.0.5",
"nodemailer": "^6.4.17",
"nodemailer-smtp-transport": "^2.7.4",
"probe-image-size": "^6.0.0",
Expand All @@ -61,10 +61,10 @@
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
"@next/bundle-analyzer": "^10.0.4",
"@next/bundle-analyzer": "^10.0.5",
"@types/cheerio": "^0.22.23",
"@types/lodash": "^4.14.167",
"@types/node": "^14.14.19",
"@types/node": "^14.14.20",
"@types/nodemailer": "^6.4.0",
"@types/nodemailer-smtp-transport": "^2.7.4",
"@types/react": "^17.0.0",
Expand All @@ -73,15 +73,15 @@
"@types/styled-components": "^5.1.7",
"@types/testing-library__react": "^10.2.0",
"@types/tryghost__content-api": "^1.3.5",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"autoprefixer": "^10.1.0",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"autoprefixer": "^10.2.0",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"next-sitemap": "^1.3.29",
"postcss": "^8.2.2",
"next-sitemap": "^1.3.32",
"postcss": "^8.2.3",
"postcss-color-mod-function": "^3.0.3",
"postcss-easy-import": "^3.0.0",
"postcss-preset-env": "^6.7.0",
Expand Down
Loading

1 comment on commit 58e9fe7

@vercel
Copy link

@vercel vercel bot commented on 58e9fe7 Jan 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.