Bump Docker base images to node 22; mock firestore comment cleanup
Both Dockerfiles (root firebase-mode + docker/ caddy) bumped node:18-alpine to node:22-alpine. better-sqlite3 v12 (from PR #6) requires node 20+; node 18 builds fail with node-gyp/python errors. openssl-legacy-provider flag kept for react-scripts 5 compat. .dockerignore: removed .env* exclusion so .env.local COPY works in firebase image build. mock firestore applyConstraints comment: offset handled by adapter (firebase.js slices), mock never sees it — clarified dead-code reasoning.
This commit is contained in:
@@ -6,6 +6,5 @@ data
|
|||||||
*.log
|
*.log
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env*
|
|
||||||
coverage
|
coverage
|
||||||
.nyc_output
|
.nyc_output
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
# Dockerfile
|
# Dockerfile
|
||||||
|
|
||||||
# Stage 1: Build the React application
|
# Stage 1: Build the React application
|
||||||
FROM node:18-alpine AS build
|
FROM node:22-alpine AS build
|
||||||
|
|
||||||
LABEL stage="build-local-testing"
|
LABEL stage="build-local-testing"
|
||||||
|
|
||||||
@@ -48,4 +48,4 @@ COPY nginx-docker.conf /etc/nginx/conf.d/default.conf
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Start Nginx when the container launches
|
# Start Nginx when the container launches
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ Backlog of bugs + long-term items. Milestones live in REWORK_PLAN.md.
|
|||||||
not sure good way to do this
|
not sure good way to do this
|
||||||
|
|
||||||
|
|
||||||
|
### npm install warnings cleanup pass
|
||||||
|
lots of updates
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### TEST GAP: current branch changes need focused coverage
|
### TEST GAP: current branch changes need focused coverage
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# docker/Dockerfile --- single container: caddy (front) + node (back).
|
# docker/Dockerfile --- single container: caddy (front) + node (back).
|
||||||
# Build context = repo root.
|
# Build context = repo root.
|
||||||
# ---- build stage: frontend + install backend deps ----
|
# ---- build stage: frontend + install backend deps ----
|
||||||
FROM node:18-alpine AS build
|
FROM node:22-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -30,7 +30,7 @@ RUN cd server && npm rebuild better-sqlite3
|
|||||||
|
|
||||||
|
|
||||||
# ---- runtime stage: caddy + node ----
|
# ---- runtime stage: caddy + node ----
|
||||||
FROM node:18-alpine
|
FROM node:22-alpine
|
||||||
RUN apk add --no-cache caddy
|
RUN apk add --no-cache caddy
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ export function onSnapshot(refOrQuery, onSuccess, onError) {
|
|||||||
return unsub;
|
return unsub;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply Firestore-style query constraints (orderBy desc/asc, limit) to mock docs.
|
// Apply Firestore-style query constraints (orderBy desc/asc, limit, where)
|
||||||
// Mirrors real SDK semantics enough for contract tests. Only orderBy + limit
|
// to mock docs. Mirrors real SDK semantics for contract tests. Offset handled
|
||||||
// supported (App's LOG_QUERY uses exactly these).
|
// by adapter (firebase.js slices) — mock never sees it.
|
||||||
function applyConstraints(docs, constraints) {
|
function applyConstraints(docs, constraints) {
|
||||||
let out = [...docs];
|
let out = [...docs];
|
||||||
for (const c of constraints) {
|
for (const c of constraints) {
|
||||||
|
|||||||
Reference in New Issue
Block a user