Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
650599d
Rewrite the tests of the notes' pure modules around their rules (#1716)
vmillet-dev Dec 1, 2026
30715ba
Note model: unit tests rewritten for drafts, patches and previews (#1…
vmillet-dev Dec 1, 2026
d9af8ed
Rewrite the tests of the notes view around its rules (#1718)
vmillet-dev Dec 1, 2026
690ba81
Keep a drawing picture of exactly the size limit (#1724)
vmillet-dev Dec 1, 2026
b001c2c
Give no todo item for a line holding only its marker or box (#1725)
vmillet-dev Dec 1, 2026
76fd41f
Rewrite the tests of language detection around its rules (#1730)
vmillet-dev Dec 2, 2026
ec7cc02
Calcul: unit tests rewritten through what each line gives (#1726)
vmillet-dev Dec 2, 2026
d4a8d29
Calcul: a date moved by years moves by years, not months (#1727)
vmillet-dev Dec 2, 2026
224e317
Calcul: a chain of powers such as 2 ^ 3 ^ 2 is read (#1728)
vmillet-dev Dec 2, 2026
5167021
Calcul: an inch is exactly 96 pixels, and back (#1729)
vmillet-dev Dec 2, 2026
ab09b99
Notes index: unit tests rewritten for filling, writes and reads (#1734)
vmillet-dev Dec 2, 2026
e5b14aa
Note store: unit tests rewritten for writing, sealing and fields (#1735)
vmillet-dev Dec 2, 2026
ee785eb
Note copies: unit tests rewritten for duplicates, pictures and import…
vmillet-dev Dec 2, 2026
25c68f2
Tags and bulk actions: unit tests rewritten (#1738)
vmillet-dev Dec 2, 2026
55c7b40
Note history and trash: unit tests rewritten (#1732)
vmillet-dev Dec 2, 2026
11e6e49
Notes SQL read: unit tests rewritten for what each criterion keeps (#…
vmillet-dev Dec 2, 2026
6c9dd6c
Notes services: unit tests rewritten (#1739)
vmillet-dev Dec 2, 2026
3ef0c4c
Revisions: a line kept in both texts no longer shows as removed (#1733)
vmillet-dev Dec 2, 2026
0e8408b
Spaces: unit tests rewritten (#1740)
vmillet-dev Dec 2, 2026
a172175
Folders: unit tests rewritten for the store and the tree (#1742)
vmillet-dev Dec 2, 2026
c53afe5
Folders: undoing a filing skips a folder deleted since (#1743)
vmillet-dev Dec 2, 2026
997fdf7
Folders: unit tests rewritten for the board and its geometry (#1744)
vmillet-dev Dec 2, 2026
fe18b0c
Spaces: the deletion test checks an index it filled (#1748)
vmillet-dev Dec 2, 2026
85151a4
Folders services: unit tests rewritten (#1745)
vmillet-dev Dec 2, 2026
1878fd4
Attachments: unit tests rewritten (#1746)
vmillet-dev Dec 2, 2026
38577f3
Export format: unit tests rewritten (#1747)
vmillet-dev Dec 2, 2026
64a5497
Vault: unit tests rewritten for the gate and the passphrase floor (#1…
vmillet-dev Dec 2, 2026
e34a724
Import and export: unit tests rewritten for merging and services (#1749)
vmillet-dev Dec 2, 2026
8c650a0
Libraries: unit tests rewritten for the registry and services (#1751)
vmillet-dev Dec 2, 2026
276d027
Backups: unit tests rewritten for the copies and putting one back (#1…
vmillet-dev Dec 2, 2026
15e58f4
HTTP variables: unit tests rewritten for scopes and filling (#1753)
vmillet-dev Dec 2, 2026
ccfa978
Recovery: unit tests rewritten for setting a library aside (#1755)
vmillet-dev Dec 2, 2026
ff69c27
HTTP requests: unit tests rewritten for bodies, headers and settings …
vmillet-dev Dec 2, 2026
e08f9b2
HTTP environments: unit tests rewritten for sets and globals (#1756)
vmillet-dev Dec 2, 2026
bc1e31b
HTTP answers: unit tests rewritten for reading and extracting (#1757)
vmillet-dev Dec 2, 2026
c5f4118
HTTP cookies: unit tests rewritten for the jar (#1758)
vmillet-dev Dec 2, 2026
8556a49
GraphQL: unit tests rewritten for queries, variables and answers (#1760)
vmillet-dev Dec 2, 2026
7b01c5c
Code generation: unit tests rewritten for the request and options (#1…
vmillet-dev Dec 2, 2026
5f4790c
Collection runs: unit tests rewritten for data, order and results (#1…
vmillet-dev Dec 2, 2026
ebef91b
WebSockets: unit tests rewritten for opening, messages and failures (…
vmillet-dev Dec 2, 2026
f182960
HTTP collections: unit tests rewritten for the tree and services (#1764)
vmillet-dev Dec 2, 2026
f44055e
HTTP history: unit tests rewritten for masking and the store (#1759)
vmillet-dev Dec 2, 2026
aa34aa0
Request scripts: a form's file part is sent as a file (#1767)
vmillet-dev Dec 2, 2026
ceff401
Find and replace: $1 is the group whatever follows it (#1778)
vmillet-dev Dec 2, 2026
4a24915
HTTP sending: unit tests rewritten for what leaves and comes back (#1…
vmillet-dev Dec 2, 2026
6b3b95e
Drawings: a text emptied is saved and undone like a deletion (#1793)
vmillet-dev Dec 3, 2026
51a1f17
Notes: a marker typed in its own list no longer undoes the list (#1789)
vmillet-dev Dec 3, 2026
29ff7ef
Code editor: lines moved in a CRLF text keep their endings (#1779)
vmillet-dev Dec 3, 2026
fc3e4a8
JSON explorer: a character after half a pair is shown (#1773)
vmillet-dev Dec 3, 2026
79f0400
Request scripts: unit tests rewritten for the host, sends and runs (#…
vmillet-dev Dec 3, 2026
71de851
Request scripts: a URL no script changes leaves as typed (#1768)
vmillet-dev Dec 3, 2026
510e95b
Tools: unit tests completed for generators, keys and identities (#1782)
vmillet-dev Dec 3, 2026
b4f2f56
Tools: unit tests completed for time and networks (#1781)
vmillet-dev Dec 3, 2026
c0fa7da
Notes: marks, cells and code read back as they were written (#1785)
vmillet-dev Dec 3, 2026
17111f2
Database and errors: unit tests rewritten for opening, the queue and …
vmillet-dev Dec 3, 2026
f542fba
Tools: unit tests completed for conversions, text and comparisons (#1…
vmillet-dev Dec 3, 2026
01a57e8
Notes: a page pasted keeps its words, cells and nested lists (#1791)
vmillet-dev Dec 3, 2026
5f6084a
Notes: Shift+Tab, Delete and Backspace keep the caret in place (#1787)
vmillet-dev Dec 3, 2026
7305693
Code editor: unit tests rewritten for the buffer and the search (#1795)
vmillet-dev Dec 3, 2026
179ac16
Request scripts: the global _ is lodash after a require (#1770)
vmillet-dev Dec 3, 2026
0a22875
JSON explorer: unit tests rewritten for the readers and the model (#1…
vmillet-dev Dec 3, 2026
6b250a8
Drawings: unit tests rewritten for the editor, geometry and scene (#1…
vmillet-dev Dec 3, 2026
9c94e95
Translations: unit tests rewritten for counts, dates and numbers (#1796)
vmillet-dev Dec 3, 2026
791fec7
Desktop: unit tests completed for the instance, dialogs and updates (…
vmillet-dev Dec 3, 2026
42d3d31
Notes: unit tests rewritten for the rich text and its Markdown (#1798)
vmillet-dev Dec 3, 2026
aaeed0f
Request scripts: unit tests rewritten for the engine and its API (#1799)
vmillet-dev Dec 3, 2026
267c9e8
Preferences: a shortcut reset to its default can be applied (#1801)
vmillet-dev Dec 3, 2026
a90fb4b
Tools: unit tests rewritten for what each tool answers (#1803)
vmillet-dev Dec 3, 2026
51f8e2b
Vault: a library damaged in its first page can be set aside (#1805)
vmillet-dev Dec 3, 2026
9666e0a
Interface: unit tests rewritten for the state and the services (#1802)
vmillet-dev Dec 3, 2026
509bfc5
Code editor: a double click selects the word under the pointer (#1807)
vmillet-dev Dec 3, 2026
5456eb7
Code editor: Ctrl+/ keeps the caret on its text (#1810)
vmillet-dev Dec 3, 2026
0d490af
Interface: unit tests rewritten for the gate, preferences and palette…
vmillet-dev Dec 3, 2026
11d6925
JSON explorer: Escape empties the search, the count follows the text …
vmillet-dev Dec 3, 2026
5d53940
Menus: a filter starts over when its menu opens again (#1816)
vmillet-dev Dec 3, 2026
b46adab
HTTP: rows of a long answer fill the pane, as in the JSON tree (#1814)
vmillet-dev Dec 3, 2026
2daa42d
Keyboard: arrows keep moving in the JSON explorer, edges and cards (#…
vmillet-dev Dec 3, 2026
707c73d
Notes: a link in a table cell can be followed (#1820)
vmillet-dev Dec 3, 2026
5306c1a
Notes: Ctrl moves and deletes by word, an emoji goes whole (#1824)
vmillet-dev Dec 3, 2026
80addd4
Editor: the tag field keeps the focus after Enter (#1822)
vmillet-dev Dec 3, 2026
b989c5c
Calc: an error that starts with a unit keeps its case (#1840)
vmillet-dev Dec 3, 2026
988c972
Notes: a drag selects from where it was pressed (#1826)
vmillet-dev Dec 3, 2026
5214cd4
HTTP: an inherited auth set to None says so (#1828)
vmillet-dev Dec 3, 2026
ae748a6
Interface: unit tests rewritten for the widgets (#1838)
vmillet-dev Dec 3, 2026
f348741
Tools: unit tests completed for the answers, copies and errors (#1847)
vmillet-dev Dec 3, 2026
be165b6
Notes: unit tests rewritten for the canvas, cards and overlays (#1849)
vmillet-dev Dec 3, 2026
91608dd
HTTP: unit tests rewritten for the request, answer and dialogs (#1850)
vmillet-dev Dec 3, 2026
97af2e0
Repository: code formatted at 110 columns, with editor settings (#1851)
vmillet-dev Dec 3, 2026
fcb7411
Repository: reformatting commit left out of the blame (#1852)
vmillet-dev Dec 3, 2026
5049596
Repository: no Node project at the root (#1848)
vmillet-dev Dec 3, 2026
f5d7bf9
Application: unused code removed, interface modules private (#1853)
vmillet-dev Dec 3, 2026
d4670ff
Application: the notes index is wiped from memory on exit (#1855)
vmillet-dev Dec 3, 2026
f6cc6e0
Translations: unused texts removed (#1856)
vmillet-dev Dec 3, 2026
f572e63
Interface state: rules left without a test are held (#1857)
vmillet-dev Dec 3, 2026
fb81d8b
HTTP history: the sealing test no longer fails by chance (#1859)
vmillet-dev Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .claude/skills/dependency-audit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Use to audit Rust and npm dependencies for vulnerabilities, licence
# Dependency audit

- Rust (from the root): `cargo deny check` — exactly what CI `security-cargo.yml` runs: advisories, licences (what GPL-3.0-only may ship, `deny.toml`), sources (crates.io alone) and bans (nothing refused by name, duplicates allowed). A new licence or source is a decision, not a line to add. `cargo-deny` is not part of the toolchain: if it is missing, say so rather than installing it, and read the job's result on the pull request. `cargo tree -d` for duplicates.
- npm (root): `npm audit --omit=dev --audit-level=high`, `npm outdated`.
- npm (`website/`, `crates/engine/sandbox/`): `npm audit --omit=dev --audit-level=high`, `npm outdated`. The Prettier compiled in is pinned in `scripts/prettier.mjs`.
- Adding a dependency: justify it, check maintenance, licence and size, pin like its siblings. Prefer none. An embedded font or icon set goes in `crates/ui/assets/README.md` with its licence file beside it.
- Do **not** update versions during an audit. egui and its family, the pinned Prettier and the Rust toolchain move only in deliberate, separate commits.
- Report: advisory id, crate/package, reachable or not, suggested action.
2 changes: 1 addition & 1 deletion .claude/skills/verify-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Run from the repo root; pick by what changed, and report only what actually ran.
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `crates/**` | `cargo fmt --all --check`, `cargo clippy --workspace --all-targets --all-features -- -D warnings`, `cargo test --workspace --exclude e2e` |
| `crates/i18n/translations/*.json` | the row above (the keys are generated and the plural corpora checked by `cargo test -p i18n`) |
| Markdown, JSON, YAML, `scripts/**`, `.github/**` | `npm run lint`, `npm run test:scripts` |
| `scripts/**`, `.github/**` | `node --test "scripts/*.test.mjs"` |
| `docs/content/**` | `npm run docs` from `website/`, `cargo test -p engine docs`, `cargo test -p ui docs_quotes` |
| `website/**` | from `website/`: `npm run lint`, `npm run test:scripts`, `npm test`, `npm run build`, and a look at the built page |
| A user journey, anything the assembled app does | `cargo build -p app --features e2e --target-dir target/e2e`, then `cargo test -p e2e` (or `--test NN_name` for the scenario it touches) (`desktop-e2e-testing`) |
Expand Down
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

# As `rustfmt.toml` writes it.
[*.rs]
indent_size = 4
max_line_length = 110

[*.{toml,sql,py}]
indent_size = 4

# Two spaces at the end of a line break it.
[*.md]
trim_trailing_whitespace = false

# Compared byte for byte, or kept as published.
[{golden,crates/engine/tests/corpus,crates/engine/sandbox/dist,crates/text/prettier,docs/recette}/**]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_whitespace = unset

[.claude/skills/{accessibility,core-web-vitals,frontend-design,rust-guidelines,seo,webapp-testing}/**]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Commits that only reformat, left out of a blame: `git config blame.ignoreRevsFile .git-blame-ignore-revs`.
# Code formatted at 110 columns (#1851)
97af2e0fd1f0dd5a07bf0b9b69811e6778ea6d73
11 changes: 0 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ updates:
- 'quick-xml'
- 'yaml-rust2'

# Prettier alone: Node is a build tool here.
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
groups:
npm:
update-types: [minor, patch]
patterns:
- '*'
# The request-script libraries, bundled into the binary: an update needs `dist/` rebuilt,
# which the Script libraries job checks.
- package-ecosystem: npm
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ env:

jobs:
# A pull request that touches documentation alone builds and runs nothing: a README cannot
# break the application, and a flaky scenario must not block it. Lint docs still runs, as
# Prettier checks the Markdown. The Rust side is skipped too when only `website/` changes: the
# break the application, and a flaky scenario must not block it. The Rust side is skipped too when only `website/` changes: the
# site has a job of its own. The pages of `docs/content` are compiled in and held by Rust tests:
# they run on them, without the scenarios. A push, to main or a milestone branch, checks everything.
changes:
Expand Down Expand Up @@ -93,16 +92,10 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci
node-version-file: website/.nvmrc

# Prettier over the Markdown, JSON and YAML, this workflow file included.
- run: npm run lint

# The release scripts run on Node's own test runner.
- run: npm run test:scripts
# The release scripts run on Node's own test runner: they have no dependency.
- run: node --test "scripts/*.test.mjs"

- *stop-the-run

Expand All @@ -122,7 +115,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc
cache: npm
cache-dependency-path: website/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
if: matrix.system == 'linux'
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc

- name: Release notes for the Linux packages
if: matrix.system == 'linux'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc

- name: The updater
run: cargo build -p platform --example update --release --locked
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
cache: npm
node-version-file: website/.nvmrc

- name: Read the version
id: version
Expand Down Expand Up @@ -101,18 +100,14 @@ jobs:
exit 1
fi

- run: npm ci

- run: npm run test:scripts
- run: node --test "scripts/*.test.mjs"

- name: Write the section
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.version.outputs.version }}
run: |
node scripts/release-notes.mjs generate --version "$VERSION" --write --summary "$GITHUB_STEP_SUMMARY"
npx prettier --write CHANGELOG.md
npx prettier --check CHANGELOG.md
node scripts/release-notes.mjs extract --version "$VERSION" \
--out "$RUNNER_TEMP/release-notes.md" --prompt-out "$RUNNER_TEMP/prompt-notes.md"

Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/security-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
pull_request:
branches: [main, 'dev/**']
paths:
- 'package.json'
- 'package-lock.json'
- 'crates/engine/sandbox/**'
- 'website/package.json'
- 'website/package-lock.json'
Expand All @@ -29,25 +27,20 @@ permissions:

jobs:
npm-audit:
# The root keeps its name: it may be a required check. The site's lockfile is audited alike.
name: npm advisories${{ matrix.directory == '.' && '' || ' (website)' }}
name: npm advisories
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
directory: ['.', 'website']
defaults:
run:
working-directory: ${{ matrix.directory }}
working-directory: website
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc
cache: npm
cache-dependency-path: ${{ matrix.directory }}/package-lock.json
cache-dependency-path: website/package-lock.json

- run: npm ci

Expand Down Expand Up @@ -148,7 +141,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc
cache: npm
cache-dependency-path: crates/engine/sandbox/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version-file: .nvmrc
node-version-file: website/.nvmrc
cache: npm
cache-dependency-path: website/package-lock.json

Expand Down
24 changes: 0 additions & 24 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Principles:

- Run: `cargo run -p app -- --profile <dir>` (the whole profile, logs and window geometry in `<dir>`; without it, the installed profile `com.devnotes.app`).
- Cargo workspace: `cargo check|build|test --workspace`, `cargo clippy --workspace --all-targets --all-features -- -D warnings` (⚠️ `--all-features` is what compiles the `e2e` flavour), `cargo fmt --all --check`, `cargo bench -p engine` (not in CI; `autobenches = false` is load-bearing; → "Benchmarks"). Every external dependency is declared once, in the root `[workspace.dependencies]`; a crate takes it with `dep.workspace = true` and adds only its own features (D33). Toolchain pinned in `rust-toolchain.toml`; `unsafe_code` forbidden in every crate (D7), `clippy::pedantic` denied.
- Node is only a build tool: `npm install` · `npm run lint` (Prettier over Markdown, JSON, YAML; `format` writes) · `npm run test:scripts` (⚠️ test files are named one by one in `package.json`; add new ones there) · `cargo run -p app --example icons` (writes `crates/app/icons/`; ⚠️ small `.ico` sizes come from `icons/source/`) · `npm run prettier` (copies the pinned Prettier into `crates/text/prettier/`, the formatter compiled in). The request-script libraries are bundled by `crates/engine/sandbox/build.mjs`, from that folder's own `package.json`.
- No Node project at the root: the release scripts have no dependency. `node --test "scripts/*.test.mjs"` · `cargo run -p app --example icons` (writes `crates/app/icons/`; ⚠️ small `.ico` sizes come from `icons/source/`) · `node scripts/prettier.mjs` (copies the Prettier it pins into `crates/text/prettier/`, the formatter compiled in). Markdown, JSON and YAML have no formatter. The request-script libraries are bundled by `crates/engine/sandbox/build.mjs`, from that folder's own `package.json`.
- Website (`website/`, Angular, devnotes.fr; its own `package.json`, outside the Cargo workspace): from `website/`, `npm ci` · `npm start` (port 4300) · `npm run build` (fetches the latest release, prerenders to `website/dist/`, checks every page and its download links) · `npm test` · `npm run lint` · `npm run test:scripts`. `website.yml` publishes it when `website/` or `docs/content/` changes on `main`, and after each release. → "The website".
- E2E: `cargo build -p app --features e2e --target-dir target/e2e`, then `cargo test -p e2e` (the driver is `e2e/` at the root; all scenarios, one after the other; `--test 01_first_launch` for one; `cargo test --workspace --exclude e2e` otherwise). `01`–`35` are the WebdriverIO scenarios ported, the rest are this application's own. → "The scenarios, on the assembled window".
- Release is a `workflow_dispatch` after a version bump; the version is `[workspace.package] version` in `Cargo.toml` alone (D27), so a bump touches `Cargo.toml` and `Cargo.lock` (`cargo update --workspace`); `scripts/version.mjs` refuses a release where they disagree. `release.yml` runs `prepare` (checks, changelog written, nothing pushed) → `package` (`package.yml`: a job a system, one action a format under `.github/actions/package/`, signed and checked) → `finalize` (commit, tag, atomic push, release page): ⚠️ the irreversible last, so a failed release leaves nothing to undo. `packages.yml` calls `package.yml` on pull requests, then installs and updates. ⚠️ A version branch (`dev/x.y.z`) reaches `main` by a merge commit, never a squash: the release notes read what the merge brings. → "Releasing", `docs/releasing.md`.
Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ cargo run -p app -- --profile ../devnotes-profile
`--profile` keeps the run apart from an installed DevNotes: its libraries, logs and window
geometry all go in that directory.

Node.js 24 (the version `.nvmrc` pins) is a build tool only, for Prettier over the docs and the
release scripts: `npm install` before `npm run lint`.
Node.js 24 runs the release scripts, which have no dependency; nothing is installed at the root.
The website has its own project in `website/`.

## What CI checks

Run these before pushing; they are exactly what the pipeline runs.

```bash
npm run lint && npm run test:scripts
node --test "scripts/*.test.mjs"
```

```bash
Expand All @@ -48,9 +48,8 @@ type-checks.

| Command | What it does |
| ---------------------------------- | ----------------------------------------------------------- |
| `npm run lint` | Prettier check over the Markdown, JSON and YAML |
| `npm run format` | Prettier write |
| `npm run test:scripts` | `node --test` on the release scripts |
| `node --test "scripts/*.test.mjs"` | The release scripts' tests |
| `node scripts/prettier.mjs` | Copies the Prettier compiled in into `crates/text/prettier` |
| `cargo bench -p engine` | The core's benchmarks (not in CI; see docs/architecture.md) |
| `cargo run -p app --example icons` | Redraws `crates/app/icons/` from `devnotes.svg` |

Expand Down
6 changes: 2 additions & 4 deletions crates/app/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ mod windows {
if env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
return;
}
let manifest_dir =
env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR is set by cargo");
let manifest_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR is set by cargo");
let manifest_dir = Path::new(&manifest_dir);
let name = product_name(manifest_dir);
let icon = manifest_dir.join("icons/icon.ico");
Expand All @@ -34,8 +33,7 @@ mod windows {
/// The name the packages give the application, `[package.metadata.packager] product-name`;
/// the version is the workspace's, which `winresource` reads from Cargo itself.
fn product_name(manifest_dir: &Path) -> String {
let text =
fs::read_to_string(manifest_dir.join("Cargo.toml")).expect("Cargo.toml is readable");
let text = fs::read_to_string(manifest_dir.join("Cargo.toml")).expect("Cargo.toml is readable");
let manifest: toml::Table = toml::from_str(&text).expect("Cargo.toml is valid TOML");
manifest
.get("package")
Expand Down
26 changes: 5 additions & 21 deletions crates/app/examples/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ fn main() {
let icons = Path::new(env!("CARGO_MANIFEST_DIR")).join("icons");
let master = icons.join("devnotes.svg");
for (name, size) in PNGS {
let source = if HINTED.contains(&size) {
hinted(&icons, size)
} else {
master.clone()
};
let source = if HINTED.contains(&size) { hinted(&icons, size) } else { master.clone() };
write(&icons.join(name), &render(&source, size));
}
let entries: Vec<(u32, Vec<u8>)> = HINTED
Expand All @@ -38,21 +34,13 @@ fn hinted(icons: &Path, size: u32) -> PathBuf {

/// The drawing at `size` × `size` px, as a PNG.
fn render(source: &Path, size: u32) -> Vec<u8> {
let data =
std::fs::read(source).unwrap_or_else(|error| panic!("{}: {error}", source.display()));
let data = std::fs::read(source).unwrap_or_else(|error| panic!("{}: {error}", source.display()));
let tree = usvg::Tree::from_data(&data, &usvg::Options::default())
.unwrap_or_else(|error| panic!("{}: {error}", source.display()));
let mut pixmap = tiny_skia::Pixmap::new(size, size).expect("a non-empty size");
#[allow(
clippy::cast_precision_loss,
reason = "an icon is a few hundred pixels wide"
)]
#[allow(clippy::cast_precision_loss, reason = "an icon is a few hundred pixels wide")]
let scale = size as f32 / tree.size().width().max(tree.size().height());
resvg::render(
&tree,
tiny_skia::Transform::from_scale(scale, scale),
&mut pixmap.as_mut(),
);
resvg::render(&tree, tiny_skia::Transform::from_scale(scale, scale), &mut pixmap.as_mut());
pixmap.encode_png().expect("a PNG of a pixmap")
}

Expand All @@ -70,11 +58,7 @@ fn ico(entries: &[(u32, Vec<u8>)]) -> Vec<u8> {
header.extend_from_slice(&[side, side, 0, 0]);
header.extend_from_slice(&1u16.to_le_bytes());
header.extend_from_slice(&32u16.to_le_bytes());
header.extend_from_slice(
&u32::try_from(data.len())
.expect("a small PNG")
.to_le_bytes(),
);
header.extend_from_slice(&u32::try_from(data.len()).expect("a small PNG").to_le_bytes());
header.extend_from_slice(&u32::try_from(offset).expect("a small file").to_le_bytes());
offset += data.len();
}
Expand Down
Loading
Loading