Skip to content

Commit

Permalink
fix(#2192): Optimize and fix vulnerabilities in frontend and metadata…
Browse files Browse the repository at this point in the history
… services
  • Loading branch information
MSzalowski committed Dec 6, 2024
1 parent c25912d commit 238de14
Show file tree
Hide file tree
Showing 47 changed files with 5,298 additions and 33,736 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/code_check_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

- name: 🧪 Test
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: |
npm run test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/frontend_sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- name: 🧪 Test
working-directory: govtool/frontend
env:
NODE_OPTIONS: "--max_old_space_size=6144"
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}
run: |
npm ci
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: "govtool/frontend/.nvmrc"
- name: Install dependencies
run: |
npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: NODE_OPTIONS="--max-old-space-size=8046" npm run build:storybook --quiet
run: npm run build:storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ changes.

### Fixed

-
- Fix vulnerabilities in dependencies [Issue 2192](https://github.com/IntersectMBO/govtool/issues/2192)
- Optimize resources usage in frontend service build [Issue 2192](https://github.com/IntersectMBO/govtool/issues/2192)

### Changed

Expand Down
4 changes: 1 addition & 3 deletions govtool/frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const config: StorybookConfig = {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
docs: {},
};
export default config;
4 changes: 2 additions & 2 deletions govtool/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ RUN \
: "${VITE_IPFS_GATEWAY:?Build argument VITE_IPFS_GATEWAY is not set}" && \
: "${VITE_IPFS_PROJECT_ID:?Build argument VITE_IPFS_PROJECT_ID is not set}"

ENV NODE_OPTIONS=--max_old_space_size=8192

WORKDIR /src

# Set npm configuration settings using environment variables
RUN npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global
RUN npm config set //registry.npmjs.org/:_authToken ${NPMRC_TOKEN} --location=global

COPY package.json package-lock.json ./
COPY patches ./patches

RUN npm install
COPY . .
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ ARG VITE_PDF_API_URL
ARG VITE_IPFS_GATEWAY
ARG VITE_IPFS_PROJECT_ID

ENV NODE_OPTIONS=--max_old_space_size=8192

WORKDIR /src

# Set npm configuration settings using environment variables
RUN npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global
RUN npm config set //registry.npmjs.org/:_authToken ${NPMRC_TOKEN} --location=global

COPY package.json package-lock.json ./
COPY patches ./patches

RUN npm install
COPY . .
RUN npm run build
Expand Down
325 changes: 205 additions & 120 deletions govtool/frontend/junit-report.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 238de14

Please sign in to comment.