Skip to content

chore: bump eslint, node and cross dependencys #1789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cbe6e93
modernise the frontends dependencys
CommanderStorm Apr 12, 2025
10e4445
re-bump frontend dependencys
CommanderStorm Apr 12, 2025
92bdef7
test bumping to node 22
CommanderStorm Apr 12, 2025
0842984
Merge branch 'main' into frontend-bump1
CommanderStorm Apr 12, 2025
c21c5c0
add unzip to dependendcys for docker build
CommanderStorm Apr 12, 2025
4241fc8
test moving node outside cross
CommanderStorm Apr 12, 2025
5497e68
test moving node entirely outside cross
CommanderStorm Apr 13, 2025
88c6586
try debuggin why node cannot finde npm
CommanderStorm Apr 13, 2025
f850367
Merge branch 'main' into frontend-bump1
CommanderStorm Apr 13, 2025
94a34fd
test if a newer cross version does work with node
CommanderStorm Apr 13, 2025
7b67b85
Revert "test if a newer cross version does work with node"
CommanderStorm Apr 13, 2025
9504145
Revert "try debuggin why node cannot finde npm"
CommanderStorm Apr 13, 2025
82d140b
Revert "test moving node entirely outside cross"
CommanderStorm Apr 13, 2025
bc49eb0
Revert "test moving node outside cross"
CommanderStorm Apr 13, 2025
990acce
Revert "add unzip to dependendcys for docker build"
CommanderStorm Apr 13, 2025
d5be8af
test installing unzip inside of the cross isolation layer
CommanderStorm Apr 13, 2025
3e91246
refactor fnm sourcing that it exists
CommanderStorm Apr 13, 2025
ebc517d
test calling eval directly instead of sourcing it
CommanderStorm Apr 13, 2025
c541632
try alternative way of using fnm
CommanderStorm Apr 13, 2025
b6418ef
try alternative way of installing node
CommanderStorm Apr 13, 2025
6614851
Revert "try alternative way of installing node"
CommanderStorm Apr 13, 2025
f594bd7
retry slightly different approach to sourcing fnm
CommanderStorm Apr 13, 2025
bf90faa
retry with sourcing AND the most recent version of cross
CommanderStorm Apr 13, 2025
b501034
add more diagnostics to the cross installation
CommanderStorm Apr 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ jobs:
-c "exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"

steps:
- uses: taiki-e/install-action@v2
with: { tool: cross }
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Checkout sources
uses: actions/checkout@v4
with:
Expand Down
18 changes: 10 additions & 8 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
pre-build = [
# install nodejs and npm to compile static web resources
# note that architecture could be the same as the container, not $CROSS_DEB_ARCH
# Need to use a fairly old Node.js version to support the old underlying docker image
"curl -fsSL https://deb.nodesource.com/setup_17.x -o nodesource_setup.sh",
"bash nodesource_setup.sh",
"apt-get install -y nodejs",
"node -v",
# Using old NPM, so must ensure correct access
"mkdir -p /.npm",
"chown -R 1001:127 /.npm",
"apt install -qq -y --no-install-recommends unzip",
"curl https://fnm.vercel.app/install -o install.sh",
"bash install.sh",
". /root/.bashrc",
# download and install Node.js:
"fnm install 22",
"fnm default 22",
# verify installation
"node --version",
"npm --version",
Copy link
Collaborator Author

@CommanderStorm CommanderStorm Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bump node to next major as required by eslint.
Bumping node requires newer libc requiring cross update.

But npm is still not quite installed in the next step (in the build script). Unsure where this is breaking apart.

Will need to look into how cross is really working.
maybe a symlink is missing, maybe more.

]
18 changes: 0 additions & 18 deletions martin/martin-ui/.eslintrc.cjs

This file was deleted.

31 changes: 31 additions & 0 deletions martin/martin-ui/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import eslint from "@eslint/js";
import reactPlugin from "eslint-plugin-react";
import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
{
files: ["src/**/*.{ts,tsx}"],
...reactPlugin.configs.flat.recommended,
languageOptions: {
...reactPlugin.configs.flat.recommended.languageOptions,
globals: {
...globals.browser,
},
},
},
{
files: ["src/**/*.{ts,tsx}"],
...reactPlugin.configs.flat["jsx-runtime"],
languageOptions: {
...reactPlugin.configs.flat["jsx-runtime"].languageOptions,
globals: {
...globals.browser,
},
},
},
reactRefresh.configs.vite,
tseslint.configs.recommended,
);
Loading
Loading