Skip to content

Commit

Permalink
Update Node.js from 10 to 22
Browse files Browse the repository at this point in the history
- Enabled the `--openssl-legacy-provider` flag for the old Webpack
version.
- Replaced the deprecated `node-sass` (which relies on Python 2) with
`sass`, which doesn't require a build.
- Updated `package-lock.json` with the new version (same packages except
 for the change to `sass`).
- Fixed Webpack config to use `sass` instead of `node-sass` and
committed changes to `manifest.json`.

The only change, surprisingly, is in the archive RSS `podcast-archives
.rss` `<itunes:subtitle>` field content. You can see all the changes in
a single table at this link:
https://jsfiddle.net/y5f9jzo4/
  • Loading branch information
paskal committed Oct 13, 2024
1 parent 21c3d9a commit db8ffc3
Show file tree
Hide file tree
Showing 7 changed files with 22,081 additions and 1,104 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/ci-frontend-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "Check size limit for CSS and JS bundles"
name: "Check and Validate CSS/JS Bundle Size with Node Setup"
on:
pull_request:
paths:
- '.github/workflows/ci-frontend-check.yml'
- "hugo/**/*.jsx?"
- "hugo/**/*.tsx?"
- "hugo/**/*.scss"
Expand All @@ -11,10 +12,29 @@ jobs:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
NODE_OPTIONS: --openssl-legacy-provider
steps:
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js 22.x
uses: actions/setup-node@v4
working-directory: hugo/
with:
node-version: '22.x'
cache: 'npm'

- name: Install dependencies
run: npm install
working-directory: hugo/

- name: Build project
run: npm run build
working-directory: hugo/

- name: Check bundle size limits
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: hugo/
build_script: build
build_script: build
2 changes: 1 addition & 1 deletion .github/workflows/ci-frontend-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14]
node: [14, 16, 18, 20, 22]

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM node:10-alpine as build
FROM node:22-alpine as build

WORKDIR /app
RUN apk add --update --no-cache python make g++
COPY hugo/package.json hugo/package-lock.json ./
RUN npm ci

ENV NODE_ENV=production
# needed only for old webpack version
ENV NODE_OPTIONS=--openssl-legacy-provider

COPY ./hugo/webpack.mix.js ./hugo/tsconfig.json ./hugo/.babelrc.js /app/
COPY ./hugo/src/ /app/src/
Expand Down
16 changes: 8 additions & 8 deletions hugo/data/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"/app.js": "/app.js?id=6b37dd5cd483ca16530e",
"/app.css": "/app.css?id=cf99764843200d3ee3fb",
"/app-dark.css": "/app-dark.css?id=cc4c91108eed0ff9661b",
"/vendor.css": "/vendor.css?id=3c4b3eb09553c6c8895f",
"/vendor-dark.css": "/vendor-dark.css?id=691b94d2f12055156415",
"/manifest.js": "/manifest.js?id=227795a4cf81cedbd601",
"/vendor.js": "/vendor.js?id=ba2bce4f9ebeb3cdac38",
"/modernizr-bundle.js": "/modernizr-bundle.js?id=c5887049aefa3fccbf0b"
"/app.js": "/app.js?id=f78300e8369c1b3dbd3a",
"/app.css": "/app.css?id=bcab11d6152e4d17e80b",
"/app-dark.css": "/app-dark.css?id=aa16ba9824f05d6b6fac",
"/vendor.css": "/vendor.css?id=5baeec4545b1a95605bc",
"/vendor-dark.css": "/vendor-dark.css?id=a02f079412829987e177",
"/manifest.js": "/manifest.js?id=3c768977c2574a34506e",
"/vendor.js": "/vendor.js?id=b0a0971018ff794142b7",
"/images/icons-sprite.svg": "/images/icons-sprite.svg?id=0a38998db079325220ba"
}
Loading

0 comments on commit db8ffc3

Please sign in to comment.