Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- name: Lint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Type-check
run: npm run type-check
- name: Run tests
run: npm run test:run
- name: Build
run: npm run build
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
.netlify
node_modules
package-lock.json
coverage
*.md
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": false,
"printWidth": 80,
"trailingComma": "all"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar"]
}
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Changelog

## [1.0.0] - 2026-08-04

Full modernization of the toolchain, dependencies, and theming.

### Added

- ESLint flat config for Vue + TypeScript, Prettier, and a `.prettierignore`.
- Vitest with `@vue/test-utils` and jsdom: unit tests for all six sort
algorithms plus an app-mount smoke test.
- GitHub Actions CI that lints, checks formatting, type-checks, tests, and
builds on every pull request and on pushes to `main`.
- `netlify.toml` pinning the production build to Node 24 (required by Vite 8).
- `lint`, `format`, `format:check`, `test`, and `test:run` npm scripts.

### Changed

- Upgraded PrimeVue 3 to 4, moving to styled-mode theming with the Aura preset.
Dark mode is now a `.dark` class toggle via `darkModeSelector` instead of the
old stylesheet-mutation hack.
- Renamed the PrimeVue `Dropdown` component to `Select` (the v4 rename).
- Migrated the design-token CSS variables to their v4 (`--p-*`) names.
- Defaulted the app to dark mode and an initial dataset of 60 bars.
- Upgraded Vue 3.2 to 3.5, Vite 4 to 8, and `@vitejs/plugin-vue`, `vue-tsc`,
`@vue/tsconfig`, `@types/node`, and `primeicons` to their latest versions.
- Replaced the unmaintained `npm-run-all` with `npm-run-all2`.
- Pinned TypeScript to the latest 5.x (5.9) rather than 7. TypeScript 7 (the
native rewrite) is not yet supported by `typescript-eslint` or `vue-tsc`.

### Removed

- `src/utils/helpers.ts` and its `manuallyUpdateTheme` stylesheet hack, made
obsolete by PrimeVue 4 theming.
- The unused `@vitejs/plugin-vue-jsx` plugin (no JSX in the codebase) and the
dead `COLORS_DARK` and `THEMES.file` constants.

### Fixed

- Selection sort used a malformed `var(--yellow-300` value (missing the closing
parenthesis), so the "smallest value" highlight never rendered; it now uses
the shared `COLORS.YELLOW` token.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,30 @@ Install dependencies:
npm install
```

Start local server
Start the local dev server:

```bash
npm run dev
```

Other useful scripts:

```bash
npm run build # type-check and build for production
npm run type-check # run vue-tsc
npm run lint # run ESLint
npm run format # format with Prettier
npm run format:check # check formatting
npm run test # run Vitest in watch mode
npm run test:run # run Vitest once
```

## Resources

- [Vue 3](https://vuejs.org/)
- [PrimeVue](https://primevue.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Vite](https://vite.dev/)
- [Vitest](https://vitest.dev/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
38 changes: 38 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from "@eslint/js";
import pluginVue from "eslint-plugin-vue";
import {
defineConfigWithVueTs,
vueTsConfigs,
} from "@vue/eslint-config-typescript";
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";

export default defineConfigWithVueTs(
{
name: "app/files-to-lint",
files: ["**/*.{ts,mts,tsx,vue}"],
},
{
name: "app/files-to-ignore",
ignores: [
"**/dist/**",
"**/dist-ssr/**",
"**/coverage/**",
"**/node_modules/**",
"**/.netlify/**",
],
},
js.configs.recommended,
pluginVue.configs["flat/recommended"],
vueTsConfigs.recommended,
{
name: "app/component-names",
rules: {
// This app registers single-word PrimeVue components (Button, Dialog,
// Slider, ...) globally and uses short single-word view names, so the
// multi-word / reserved-name conventions do not apply here.
"vue/multi-word-component-names": "off",
"vue/no-reserved-component-names": "off",
},
},
skipFormatting,
);
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
Expand Down
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build]
command = "npm run build"
publish = "dist"

[build.environment]
NODE_VERSION = "24"
Loading
Loading