Skip to content

Add sveltekit and update deps#2965

Merged
sea-snake merged 115 commits intomainfrom
sea-snake/update-deps
Mar 31, 2025
Merged

Add sveltekit and update deps#2965
sea-snake merged 115 commits intomainfrom
sea-snake/update-deps

Conversation

@sea-snake
Copy link
Copy Markdown
Contributor

@sea-snake sea-snake commented Mar 26, 2025

Changes

  • Add SvelteKit deps
  • Add SvelteKit configuration files
  • Update Vite to latest version
  • Update Vitest to latest version
  • Change Vitest configuration to make sure e2e tests always run sequentially
  • Update prettier to latest version (so it's compatible with SvelteKit)
  • Disable prettier check for now, will update all files with prettier formatting in another PR.
  • Update WebdriverIO to latest version
  • Update Chrome in e2e tests to latest stable version
  • Update e2e test to not use await in root scope (use then instead)

🟡 Some screens were changed

@sea-snake sea-snake marked this pull request as ready for review March 31, 2025 10:41
@sea-snake sea-snake requested a review from lmuntaner March 31, 2025 10:41
Copy link
Copy Markdown
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

Looking super good, thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is your IDE adding the empty spaces? Coul we revert it? I'm not sure mine is doing it. Or is it the new linter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's the prettier update, since I'm updating the formatting of all files in the next PR, I don't think it's worth reverting these files manually one by one 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, noted

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we revert the changes here?

Comment thread package.json
"build": "tsc --noEmit && vite build",
"check": "tsc --project ./tsconfig.all.json --noEmit",
"check:showcase": "astro check --root ./src/showcase --tsconfig ./tsconfig.all.json",
"check:showcase": "astro check --root ./src/showcase --tsconfig ../../tsconfig.all.json",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the relative directory correct? Why did this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's correct, no idea why this worked previously without setting the relative directory correctly.

Comment thread package.json
"format": "prettier --write src/showcase src/frontend src/vc-api src/sig-verifier-js src/vite-plugins tsconfig.json tsconfig.all.json .eslintrc.json vite.config.ts vitest.config.ts demos",
"format-check": "prettier --check src/showcase src/frontend src/vc-api src/sig-verifier-js src/vite-plugins tsconfig.json tsconfig.all.json .eslintrc.json vite.config.ts vitest.config.ts demos"
"format": "prettier --write src/showcase src/frontend src/vc-api src/sig-verifier-js src/vite-plugins tsconfig.json tsconfig.all.json eslint.config.js vite.config.ts vitest.config.ts demos",
"format-check": "exit 0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

Comment thread src/frontend/src/test-e2e/util.ts Outdated
}

const logs: string[] = [];
const logit = (value: string) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we remove this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

@@ -1,5 +1,5 @@
declare namespace globalThis {
any;
void any;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, else eslint will give an unused error.

Overall, I also find the _unusedVariable eslint rule a bit strange, it's JS not Rust, the void operator is particularly for the purpose to indicate you don't want to use a variable. But I left that rule for now since it's a bigger discussion and would be bigger change for another PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense.

"vite": "^6.0.0",
"undici": "*",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-compression2": "^1.3.3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why changing the library?

Copy link
Copy Markdown
Contributor Author

@sea-snake sea-snake Mar 31, 2025

Choose a reason for hiding this comment

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

Old library doesn't support Vite v6 and is no longer maintained, this new library does support v6.

Comment thread tsconfig.json Outdated
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, else it will default to requiring the import type X from "x" syntax for type imports. I think this syntax is an improvement, but not something we should do in this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, you will revert this in this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I remember getting an error if this wasn't set to false, checking again now.

Comment thread vitest.config.ts
sequence: {
concurrent: false,
},
fileParallelism: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add this comment in the code and mention the error we had in CI to remember in the future?

@sea-snake sea-snake requested a review from lmuntaner March 31, 2025 14:38
Copy link
Copy Markdown
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

Thanks!!

@sea-snake sea-snake added this pull request to the merge queue Mar 31, 2025
Merged via the queue into main with commit bda7fde Mar 31, 2025
69 checks passed
@sea-snake sea-snake deleted the sea-snake/update-deps branch March 31, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants