Skip to content

Commit

Permalink
Install standard libraries using apk (#561)
Browse files Browse the repository at this point in the history
* Update ESLint SDK
* Lint Vitest configuration file
* Improve types

Signed-off-by: Marvin A. Ruder <[email protected]>
  • Loading branch information
marvinruder authored Oct 5, 2023
1 parent 9d5fb1e commit 862f181
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.49.0-sdk",
"version": "8.50.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
8 changes: 6 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ ENV NODE_ENV production

WORKDIR /app

# Copy Node.js binary and required C/C++ libraries
# Install standard libraries
RUN \
--mount=type=cache,target=/var/cache/apk,id=${TARGETARCH}:/var/cache/apk \
apk add libgcc libstdc++

# Copy Node.js binary and user
COPY --from=node:20.8.0-alpine /etc/passwd /etc
COPY --from=node:20.8.0-alpine /usr/lib/libstdc++* /usr/lib/libgcc* /usr/lib/
COPY --from=node:20.8.0-alpine /usr/local/bin/node /usr/local/bin

# Switch to non-root user
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile-ci
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM rust:1.72.1-alpine as wasm

ARG TARGETARCH

WORKDIR /workdir

# Install required tools and libraries
RUN \
--mount=type=cache,target=/var/cache/apk \
--mount=type=cache,target=/var/cache/apk,id=${TARGETARCH}:/var/cache/apk \
--mount=type=cache,target=/usr/local/cargo/registry \
apk add binaryen pkgconfig musl-dev openssl-dev && \
RUSTFLAGS="-Ctarget-feature=-crt-static" cargo install wasm-bindgen-cli && \
Expand Down
1 change: 1 addition & 0 deletions packages/backend/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from "vitest/config";

import "./test/env";

export default defineConfig({
Expand Down
7 changes: 1 addition & 6 deletions packages/commons/src/lib/models/watchlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,5 @@ export type WatchlistSummary = {
/**
* The list of stocks on the watchlist. Includes only the tickers of the stocks
*/
stocks: {
/**
* The ticker symbol of a stock.
*/
ticker: string;
}[];
stocks: Pick<Stock, "ticker">[];
};

0 comments on commit 862f181

Please sign in to comment.