Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to note18 #1735

Merged
merged 4 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ jobs:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run audit
run: make audit
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run e2e tests
run: |
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/generate-graphql-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: main
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: docs
path: docs
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
working-directory: main
- uses: vmware-tanzu/carvel-setup-action@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run integration tests
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mongodb-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run clean mongodb migration
run: make test-migrate
6 changes: 4 additions & 2 deletions .github/workflows/nodejs-check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
name: Nodejs Check Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run check code
run: make check-code
4 changes: 2 additions & 2 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Spell Check Repo
uses: crate-ci/typos@v1.12.8
uses: crate-ci/typos@master
with:
config: typos.toml
6 changes: 4 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
name: Unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- name: Run unit tests
run: make unit-in-ci
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS BUILD_IMAGE
FROM node:18-alpine AS BUILD_IMAGE

WORKDIR /app

Expand All @@ -14,7 +14,7 @@ RUN yarn build

RUN yarn install --frozen-lockfile --production

FROM gcr.io/distroless/nodejs:16
FROM gcr.io/distroless/nodejs:18
COPY --from=BUILD_IMAGE /app/lib /app/lib
COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS BUILD_IMAGE
FROM node:18-alpine AS BUILD_IMAGE

WORKDIR /app

Expand All @@ -13,7 +13,7 @@ COPY ./test ./test

RUN yarn build

FROM gcr.io/distroless/nodejs:16-debug
FROM gcr.io/distroless/nodejs:18-debug
COPY --from=BUILD_IMAGE /app/lib /app/lib
COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-migrate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS BUILD_IMAGE
FROM node:18-alpine AS BUILD_IMAGE

WORKDIR /app

Expand All @@ -15,7 +15,7 @@ RUN yarn build

COPY ./scripts ./scripts

FROM node:16-alpine
FROM node:18-alpine
COPY --from=BUILD_IMAGE /app/lib /app/lib
COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ integration-in-ci:
# heap allocation issue has been resolved in dependencies (fails at 2048).
execute-integration-from-within-container:
yarn install && \
NODE_OPTIONS="--max-old-space-size=3072" \
NODE_OPTIONS="--max-old-space-size=4096" \
NODE_ENV=test LOGLEVEL=error $(BIN_DIR)/jest --config ./test/jest-integration.config.js --bail --runInBand --ci --reporters=default --reporters=jest-junit

unit-in-ci:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ services:
--restlisten=0.0.0.0:8081\
--rpclisten=0.0.0.0:11010"
e2e-tests:
image: us.gcr.io/galoy-org/galoy-app-pipeline
image: us.gcr.io/galoy-org/nodejs-concourse
depends_on:
- integration-deps
command: ["make", "execute-e2e-from-within-container"]
Expand All @@ -247,7 +247,7 @@ services:
volumes:
- ./:/repo
integration-tests:
image: us.gcr.io/galoy-org/galoy-app-pipeline
image: us.gcr.io/galoy-org/nodejs-concourse
depends_on:
- integration-deps
command: ["make", "execute-integration-from-within-container"]
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"start-main": ". ./.envrc && yarn run build && node --inspect -r ./lib/services/tracing.js ./lib/servers/graphql-main-server.js"
},
"engines": {
"node": "16"
"node": "18"
},
"dependencies": {
"@google-cloud/storage": "^6.5.2",
Expand Down Expand Up @@ -136,7 +136,6 @@
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.40.0",
"axios-mock-adapter": "^1.21.2",
"cross-fetch": "^3.1.4",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
6 changes: 1 addition & 5 deletions test/helpers/apollo-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "@apollo/client/core"
import { WebSocketLink } from "@apollo/client/link/ws"
import { getMainDefinition } from "@apollo/client/utilities"
import fetch from "cross-fetch"
import { SubscriptionClient } from "subscriptions-transport-ws"
import ws from "ws"

Expand Down Expand Up @@ -52,10 +51,7 @@ export const createApolloClient = (
return forward(operation)
})

const httpLink = new HttpLink({
uri: graphqlUrl,
fetch,
})
const httpLink = new HttpLink({ uri: graphqlUrl })

const subscriptionClient = new SubscriptionClient(
graphqlSubscriptionUrl,
Expand Down
17 changes: 9 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,14 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.1.tgz#33e6759935f7a82821b72fb936e66f6b99a36173"
integrity sha512-vuYaNuEIbOYLTLUAJh50ezEbvxrD43iby+lpUA2aa148Nh5kX/AVO/9m1Ahmbux2iU5uxJTNF9g2Y+31uml7RQ==

"@types/[email protected]":
version "3.6.20"
resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.6.20.tgz#b7c5c580644f6364002b649af1c06c3c0454e1d2"
integrity sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==
dependencies:
"@types/bson" "*"
"@types/node" "*"

"@types/[email protected]":
version "17.0.33"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506"
Expand Down Expand Up @@ -4678,13 +4686,6 @@ create-require@^1.1.0:
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==

cross-fetch@^3.1.4:
version "3.1.5"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
dependencies:
node-fetch "2.6.7"

cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
Expand Down Expand Up @@ -9625,7 +9626,7 @@ node-cache@^5.1.2:
dependencies:
clone "2.x"

node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7:
node-fetch@^2.6.1, node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
Expand Down