Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
feat!: update to nodejs 20 (#499)
Browse files Browse the repository at this point in the history
* feat: update to nodejs 20

* fix: lint issues
  • Loading branch information
dolcalmi authored May 18, 2023
1 parent efd8850 commit 0ece7a2
Show file tree
Hide file tree
Showing 9 changed files with 1,019 additions and 1,318 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run audit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run check code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vendor/nodejs-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run audit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vendor/nodejs-check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run check code
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Install dependencies only when needed
FROM node:18-alpine AS deps
FROM node:20-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:18-alpine AS builder
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline

# Production image, copy all the files and run next
FROM node:18-alpine AS runner
FROM node:20-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion ci/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-alpine
FROM node:20-alpine

RUN apk update \
&& apk add bash make git docker curl python jq rsync openssh wget \
Expand Down
22 changes: 11 additions & 11 deletions lib/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const AccountLevel = {
Two: "TWO",
} as const

export type AccountLevel = typeof AccountLevel[keyof typeof AccountLevel]
export type AccountLevel = (typeof AccountLevel)[keyof typeof AccountLevel]
export type AccountLimit = {
/** The rolling time interval in seconds that the limits would apply for. */
readonly interval?: Maybe<Scalars["Seconds"]>
Expand Down Expand Up @@ -266,7 +266,7 @@ export const ExchangeCurrencyUnit = {
} as const

export type ExchangeCurrencyUnit =
typeof ExchangeCurrencyUnit[keyof typeof ExchangeCurrencyUnit]
(typeof ExchangeCurrencyUnit)[keyof typeof ExchangeCurrencyUnit]
/** Provides global settings for the application which might have an impact for the user. */
export type Globals = {
readonly __typename: "Globals"
Expand Down Expand Up @@ -347,7 +347,7 @@ export const InvoicePaymentStatus = {
} as const

export type InvoicePaymentStatus =
typeof InvoicePaymentStatus[keyof typeof InvoicePaymentStatus]
(typeof InvoicePaymentStatus)[keyof typeof InvoicePaymentStatus]
export type LnInvoice = {
readonly __typename: "LnInvoice"
readonly paymentHash: Scalars["PaymentHash"]
Expand Down Expand Up @@ -760,7 +760,7 @@ export const Network = {
Testnet: "testnet",
} as const

export type Network = typeof Network[keyof typeof Network]
export type Network = (typeof Network)[keyof typeof Network]
export type OnChainAddressCreateInput = {
readonly walletId: Scalars["WalletId"]
}
Expand Down Expand Up @@ -865,14 +865,14 @@ export const PaymentSendResult = {
Success: "SUCCESS",
} as const

export type PaymentSendResult = typeof PaymentSendResult[keyof typeof PaymentSendResult]
export type PaymentSendResult = (typeof PaymentSendResult)[keyof typeof PaymentSendResult]
export const PhoneCodeChannelType = {
Sms: "SMS",
Whatsapp: "WHATSAPP",
} as const

export type PhoneCodeChannelType =
typeof PhoneCodeChannelType[keyof typeof PhoneCodeChannelType]
(typeof PhoneCodeChannelType)[keyof typeof PhoneCodeChannelType]
/** Price amount expressed in base/offset. To calculate, use: `base / 10^offset` */
export type Price = {
readonly __typename: "Price"
Expand All @@ -891,7 +891,7 @@ export const PriceGraphRange = {
OneYear: "ONE_YEAR",
} as const

export type PriceGraphRange = typeof PriceGraphRange[keyof typeof PriceGraphRange]
export type PriceGraphRange = (typeof PriceGraphRange)[keyof typeof PriceGraphRange]
export type PriceInput = {
readonly amount: Scalars["SatAmount"]
readonly amountCurrencyUnit: ExchangeCurrencyUnit
Expand Down Expand Up @@ -1183,7 +1183,7 @@ export const TxDirection = {
Send: "SEND",
} as const

export type TxDirection = typeof TxDirection[keyof typeof TxDirection]
export type TxDirection = (typeof TxDirection)[keyof typeof TxDirection]
export const TxNotificationType = {
IntraLedgerPayment: "IntraLedgerPayment",
IntraLedgerReceipt: "IntraLedgerReceipt",
Expand All @@ -1194,14 +1194,14 @@ export const TxNotificationType = {
} as const

export type TxNotificationType =
typeof TxNotificationType[keyof typeof TxNotificationType]
(typeof TxNotificationType)[keyof typeof TxNotificationType]
export const TxStatus = {
Failure: "FAILURE",
Pending: "PENDING",
Success: "SUCCESS",
} as const

export type TxStatus = typeof TxStatus[keyof typeof TxStatus]
export type TxStatus = (typeof TxStatus)[keyof typeof TxStatus]
/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
export type UsdWallet = Wallet & {
readonly __typename: "UsdWallet"
Expand Down Expand Up @@ -1403,7 +1403,7 @@ export const WalletCurrency = {
Usd: "USD",
} as const

export type WalletCurrency = typeof WalletCurrency[keyof typeof WalletCurrency]
export type WalletCurrency = (typeof WalletCurrency)[keyof typeof WalletCurrency]
export type LnNoAmountInvoiceCreateOnBehalfOfRecipientMutationVariables = Exact<{
walletId: Scalars["WalletId"]
}>
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "galoy-pay",
"version": "0.1.0",
"private": true,
"engines": {
"node": "20"
},
"scripts": {
"dev": "next dev",
"start": "next start",
Expand All @@ -18,7 +21,7 @@
},
"dependencies": {
"@apollo/client": "^3.7.12",
"@galoymoney/client": "^0.1.42",
"@galoymoney/client": "0.1.43",
"bech32": "^2.0.0",
"bitcoinjs-lib": "5.0.5",
"bolt11": "1.3.4",
Expand Down Expand Up @@ -56,7 +59,7 @@
"@types/bootstrap": "^5.1.6",
"@types/eslint": "^8.2.0",
"@types/lodash.debounce": "^4.0.6",
"@types/node": "^18.15.13",
"@types/node": "^20.1.7",
"@types/prettier": "^2.7.0",
"@types/react": "^17.0.30",
"@types/react-dev-utils": "^9.0.11",
Expand Down
Loading

0 comments on commit 0ece7a2

Please sign in to comment.