mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2472 from omnivore-app/chore/upgrade-node
Upgrade node to 18.16
This commit is contained in:
commit
64c93bec0e
32 changed files with 58 additions and 68 deletions
2
.github/workflows/run-tests.yaml
vendored
2
.github/workflows/run-tests.yaml
vendored
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.18
|
||||
node-version: 18.16
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(source ~/.nvm/nvm.sh && yarn cache dir)"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
"typescript": "^4.4.3"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.18.1",
|
||||
"node": "18.16.1",
|
||||
"yarn": "1.22.19"
|
||||
},
|
||||
"dependencies": {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
|
|||
|
|
@ -145,10 +145,10 @@
|
|||
"ts-node-dev": "^1.1.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "14.18.x"
|
||||
"node": "18.16.1"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.18.1",
|
||||
"yarn": "1.22.18"
|
||||
"node": "18.16.1",
|
||||
"yarn": "1.22.19"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import chai, { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { createTestUser, deleteTestUser } from '../db'
|
||||
import sinonChai from 'sinon-chai'
|
||||
import sinon from 'sinon'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { validateUrl } from '../../src/services/create_page_save_request'
|
||||
|
||||
describe('validateUrl', () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import chai, { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import {
|
||||
createTestUser,
|
||||
createUserWithoutProfile,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import {
|
||||
createTestLabel,
|
||||
createTestLink,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { createTestUser, deleteTestUser } from '../db'
|
||||
import { SaveContext, saveEmail } from '../../src/services/save_email'
|
||||
import { createPubSubClient } from '../../src/datalayer/pubsub'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import 'mocha'
|
||||
import nock from 'nock'
|
||||
import { createPubSubClient } from '../../src/datalayer/pubsub'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { validatedDate } from '../../src/utils/helpers'
|
||||
|
||||
describe('validatedDate', () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import fs from 'fs'
|
||||
import {
|
||||
getTitleFromEmailSubject,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { InFilter, parseSearchQuery, ReadFilter } from '../../src/utils/search'
|
||||
import { PageType } from '../../src/generated/graphql'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import { contentReaderForPage } from '../../src/utils/uploads'
|
||||
import { ContentReader, PageType } from '../../src/generated/graphql'
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
"webpack-dev-server": "^4.7.4"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.18.0",
|
||||
"node": "18.16.0",
|
||||
"yarn": "1.22.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"volta": {
|
||||
"node": "14.18.0",
|
||||
"node": "18.16.1",
|
||||
"yarn": "1.22.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:14.18-alpine
|
||||
FROM node:18.16-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
"storybook-addon-next-router": "^3.1.1"
|
||||
},
|
||||
"volta": {
|
||||
"node": "14.18.0",
|
||||
"node": "18.16.1",
|
||||
"yarn": "1.22.10"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue