Upgrade node to 18.16

This commit is contained in:
Jackson Harper
2023-07-05 10:16:30 -07:00
parent 0a5ffb0538
commit fa1ff9ba17
20 changed files with 55 additions and 55 deletions

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine as builder
FROM node:18.16-alpine as builder
WORKDIR /app
@ -32,7 +32,7 @@ RUN rm -rf /app/packages/api/node_modules
RUN rm -rf /app/node_modules
RUN yarn install --pure-lockfile --production
FROM node:14.18-alpine as runner
FROM node:18.16-alpine as runner
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
WORKDIR /app

View File

@ -145,10 +145,10 @@
"ts-node-dev": "^1.1.8"
},
"engines": {
"node": "14.18.x"
"node": "18.16.1"
},
"volta": {
"node": "14.18.1",
"node": "18.16.1",
"yarn": "1.22.18"
}
}

View File

@ -1,4 +1,4 @@
import { ResponseError } from '@elastic/elasticsearch/lib/errors'
import { errors } from '@elastic/elasticsearch'
import { EntityType } from '../datalayer/pubsub'
import { SortBy, SortOrder, SortParams } from '../utils/search'
import { client, INDEX_ALIAS } from './index'
@ -49,7 +49,7 @@ export const addHighlightToPage = async (
return true
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('page has been deleted', id)

View File

@ -1,4 +1,4 @@
import { ResponseError } from '@elastic/elasticsearch/lib/errors'
import { errors } from '@elastic/elasticsearch'
import { EntityType } from '../datalayer/pubsub'
import { client, INDEX_ALIAS } from './index'
import { Label, PageContext } from './types'
@ -43,7 +43,7 @@ export const addLabelInPage = async (
return true
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('page has been deleted', pageId)
@ -92,7 +92,7 @@ export const updateLabelsInPage = async (
return true
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('page has been deleted', pageId)
@ -321,7 +321,7 @@ export const setLabelsForHighlight = async (
return true
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('highlight has been deleted', highlightId)

View File

@ -1,4 +1,4 @@
import { ResponseError } from '@elastic/elasticsearch/lib/errors'
import { errors } from '@elastic/elasticsearch'
import { BuiltQuery, ESBuilder, esBuilder } from 'elastic-ts'
import { EntityType } from '../datalayer/pubsub'
import { BulkActionType } from '../generated/graphql'
@ -458,7 +458,7 @@ export const updatePage = async (
return true
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('page has been deleted', id)
@ -483,7 +483,7 @@ export const deletePage = async (
return body.deleted !== 0
} catch (e) {
if (
e instanceof ResponseError &&
e instanceof errors.ResponseError &&
e.message === 'document_missing_exception'
) {
console.log('page has been deleted', id)
@ -549,7 +549,7 @@ export const getPageById = async (id: string): Promise<Page | undefined> => {
id: body._id as string,
} as Page
} catch (e) {
if (e instanceof ResponseError && e.statusCode === 404) {
if (e instanceof errors.ResponseError && e.statusCode === 404) {
console.log('page has been deleted', id)
return undefined
}
@ -683,7 +683,7 @@ export const searchPages = async (
response.body.hits.total.value,
]
} catch (e) {
if (e instanceof ResponseError) {
if (e instanceof errors.ResponseError) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
console.error('failed to search pages in elastic', e.meta.body.error)
return undefined

View File

@ -32,7 +32,7 @@
"webpack-dev-server": "^4.7.4"
},
"volta": {
"node": "14.18.0",
"node": "18.16.0",
"yarn": "1.22.10"
}
}
}

View File

@ -1,18 +1,18 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Installs latest Chromium (92) package.
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
g++ \
make \
python3
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
g++ \
make \
python3
# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \

View File

@ -1,18 +1,18 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Installs latest Chromium (92) package.
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
g++ \
make \
python3
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
g++ \
make \
python3
# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \

View File

@ -11,7 +11,7 @@
},
"devDependencies": {},
"volta": {
"node": "14.18.0",
"node": "18.16.1",
"yarn": "1.22.10"
}
}
}

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Run everything after as non-privileged user.
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Run everything after as non-privileged user.
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Run everything after as non-privileged user.
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Run everything after as non-privileged user.
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM node:14.18-alpine
FROM node:18.16-alpine
# Run everything after as non-privileged user.
WORKDIR /app

View File

@ -1,7 +1,7 @@
# Note this docker file is meant for local testing
# and not for production.
FROM node:14.18-alpine as builder
FROM node:18.16-alpine as builder
ENV NODE_OPTIONS=--max-old-space-size=8192
ARG APP_ENV
ARG BASE_URL
@ -30,7 +30,7 @@ RUN echo "module.exports = {}" > ./packages/web/next.config.js
RUN yarn workspace @omnivore/web build
FROM node:14.18-alpine as runner
FROM node:18.16-alpine as runner
ENV NODE_ENV production
ENV PORT=8080
ENV NEXT_TELEMETRY_DISABLED 1

View File

@ -105,7 +105,7 @@
"storybook-addon-next-router": "^3.1.1"
},
"volta": {
"node": "14.18.0",
"node": "18.16.1",
"yarn": "1.22.10"
}
}