From 5fb454a9437a10f176d49d476608f3c5466caa34 Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:13:18 +0700 Subject: [PATCH] =?UTF-8?q?docs:=20v1.1.0=20=E2=80=94=20changelog=20and=20?= =?UTF-8?q?docs;=20bump=20to=201.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CHANGELOG: v1.1.0 (copyright email and purpose words, Hide scrollbars, installer copyright string, copyright-year check, the rust-toolchain pin) - FEATURES: the four split contact lines, purpose words, the Settings row, the profile's emails - TECH-SPEC / ARCHITECTURE: editor store v20, hideScrollbars without a settings bump, theme-init and App applying the scrollbar class, the new CI step and scripts - DEVELOPMENT (en + vi), CLAUDE.md: check:copyright / update:copyright - I18N: 1,253 UI + 574 template keys per locale - six manifests 1.0.0 -> 1.1.0 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ CLAUDE.md | 4 +++- docs/ARCHITECTURE.md | 12 ++++++------ docs/DEVELOPMENT.md | 3 +++ docs/FEATURES.md | 30 ++++++++++++++++++------------ docs/I18N.md | 12 ++++++------ docs/TECH-SPEC.md | 17 ++++++++++++----- docs/i18n/vi/DEVELOPMENT.md | 3 +++ package-lock.json | 4 ++-- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 13 files changed, 87 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42bd642..ff217b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,36 @@ All notable changes to YTDescGen ship as tagged releases on `main`. +## v1.1.0 — 2026-10-03 + +A small release: a **copyright email** and **purpose words** for the split contact block, an option to **hide scrollbars**, and copyright years that keep themselves current. Web, desktop and Android all ship as 1.1.0. + +### Added + +- **Copyright / DMCA email.** With Settings › _Split contact email by purpose_ on, the contact block gains a fourth line, `©️ Copyright / DMCA: …`, in all eight output languages. It is saved with the channel profile. +- **Purpose words before the @.** In split mode every purpose address has to say what it is for: the part before `@` must contain one of the field's words ([src/config/contact-emails.ts](src/config/contact-emails.ts)), in any case and anywhere, so Gmail's `name+dmca@gmail.com` works. + - Advertising / sponsorship: sponsor, ads, advert, business, biz, partner, collab, brand, marketing, promo + - Game keys & playtest: key, game, gaming, press, media, review, playtest, beta, curator + - Copyright / DMCA: dmca, takedown, copyright, legal, rights, claim + + A missing word is an error like a malformed address: the value is not saved, and Strict Mode blocks. The help text under each field lists its words. The general Contact address has no rule. +- **Hide scrollbars** (Settings › Appearance). No scrollbar anywhere in the app — the mouse wheel, touchpad, touch and keyboard still scroll. Off by default; it travels with backups, like the theme. + +### Changed + +- **Addresses saved before this release** in the advertising or game-keys field are left exactly as they are. If one has no purpose word, Strict Mode points at it — edit it, or use the `name+sponsor@gmail.com` form. +- The Spanish example addresses now carry a purpose word (`sponsors@`, `games@`). +- **The desktop installers carry a copyright string**, `Copyright 2026 poli0981 (SkullMute)`. The Windows `.exe` / NSIS copyright field, the macOS `Info.plist` and the Linux packages had none. + +### Under the hood + +- **Copyright years, checked.** 2026 is right everywhere — the first commit is from 2026-04-07, so there was no 2025 to correct. [src/config/brand.ts](src/config/brand.ts) now owns the start year and `copyrightYears()`. **`npm run check:copyright`** (in CI) holds NOTICE, REUSE.toml and the installers' copyright string to the year of HEAD's commit — "2026", then "2026-2027" from the first commit of 2027 — and **`npm run update:copyright`** rewrites them. The `/legal` pages' footer prints the same range. +- **CI**: `dtolnay/rust-toolchain` is pinned to a commit on its master branch. Its `stable` branch is regenerated upstream, which orphaned the old pin and turned `workflow-lint` (zizmor: impostor-commit) red on every pull request. +- Editor store v19 → v20 (`copyrightEmail`, additive), so a backup's draft made by 1.1.0 needs 1.1.0 to restore; everything else in it still restores on 1.0.0. `hideScrollbars` joins the settings without a version bump. +- New strings in all eight locales (1,253 UI + 574 template keys each). +- typecheck, typecheck:all, lint, format:check, validate:locales, knip, check:version, check:licenses, check:copyright, **968 tests** and build all pass; verified live in the browser — the purpose-word errors and Strict Mode, the copyright line in the description, and the scrollbar toggle (on, off, after a reload). +- Six manifests bumped 1.0.0 → 1.1.0. + ## v1.0.0 — 2026-09-30 **YTDescGen moves to [ytgenerator.stream](https://ytgenerator.stream)**, gets a new interface, and the data it writes is right: hardware names, YouTube's own tag count, chapters, history. Backups you can preview and undo, a quick start for the next video, and a hardened desktop app. Web, desktop and Android all ship as 1.0.0. diff --git a/CLAUDE.md b/CLAUDE.md index 41ac745..5fcd54f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -131,6 +131,7 @@ npm run knip # unused files/exports/dependencies npm run validate:locales npm run check:bundle # after build: initial load / chunk budget npm run check:licenses # licence allow-list + THIRD_PARTY_NOTICES in sync +npm run check:copyright # NOTICE, REUSE.toml, installer copyright = HEAD's year (update:copyright fixes) npm run check:version # the six version fields agree npm run check:tauri # @tauri-apps/* and tauri crates on the same major.minor npm run cf:dev # wrangler dev (copy .dev.vars.example to .dev.vars — test keys only) @@ -154,7 +155,8 @@ npm run tauri:build # desktop installers ## Important Notes for Claude Code -- Run the gates before committing: `typecheck`, `typecheck:all`, `lint`, `format:check`, `test:run`, `knip`, `validate:locales`, `build` + `check:bundle`; `cargo fmt/clippy/test` when `src-tauri/` changes. +- Run the gates before committing: `typecheck`, `typecheck:all`, `lint`, `format:check`, `test:run`, `knip`, `validate:locales`, `build` + `check:bundle`; `cargo fmt/clippy/test` when `src-tauri/` changes. In the first commit of a new year, `npm run update:copyright` (CI's `check:copyright` fails until then). +- New contact-email purpose words: `src/config/contact-emails.ts` (lower-case; a test keeps every locale's example address valid). - New language: follow `docs/I18N.md` (register it, both namespaces, tag pools, `channel-phrase.ts` patterns, browser detection). - New genre: `src/config/genres.ts` + its tag pool in `src/engine/tag-generator.ts` (a test keeps them in sync). - New video type: `src/config/video-types.ts` + every `templates.json` (titles, intros, pinned-comment greetings). diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index d50f530..e769594 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -72,11 +72,11 @@ The same source ships two ways: **Start-up.** Before first paint: -1. `public/theme-init.js` (a plain script in `index.html`) applies the saved theme and sets `` to the saved UI language, so a light-theme user sees no dark flash. +1. `public/theme-init.js` (a plain script in `index.html`) applies the saved theme and the Hide scrollbars class (`hide-scrollbars`, v1.1.0) and sets `` to the saved UI language, so a light-theme user sees no dark flash. 2. `main.tsx` rewrites old hash URLs (web), carries over a terms acceptance from the gate page's `ytg_terms` cookie (web), and registers a one-time reload for chunk files that a new deploy removed (`vite:preloadError`). -3. It loads the saved UI and output languages (capped at 2 s), applies the theme class, installs the external-link handler (Tauri: links open in the system browser through the opener plugin), then renders. +3. It loads the saved UI and output languages (capped at 2 s), applies the theme and scrollbar classes, installs the external-link handler (Tauri: links open in the system browser through the opener plugin), then renders. -After mount, `App.tsx` starts a first-run draft in the Default Output Language, runs the Tauri data chores (`startAppData()`: legacy-file recovery, then automatic backups on desktop) before loading the persisted logs, prefetches the Output page when the browser is idle, and keeps i18next in step with the `appLanguage` setting. +After mount, `App.tsx` starts a first-run draft in the Default Output Language, runs the Tauri data chores (`startAppData()`: legacy-file recovery, then automatic backups on desktop) before loading the persisted logs, prefetches the Output page when the browser is idle, keeps i18next in step with the `appLanguage` setting, and keeps the `hide-scrollbars` class in step with `hideScrollbars` (the Settings toggle, a restored backup and its undo). ## 2. Core Engine Design @@ -256,7 +256,7 @@ export const GENRE_TAG_REGISTRY: Record string[]> ``` ┌────────────────────────────────────────────────────────────────────┐ -│ EditorStore — "ytdescgen-editor-draft", v19 │ +│ EditorStore — "ytdescgen-editor-draft", v20 │ │ - the draft: every form field (EditorData) + setter actions │ │ - persists data only (editorDataOf); migrateEditorState │ ├────────────────────────────────────────────────────────────────────┤ @@ -274,7 +274,7 @@ export const GENRE_TAG_REGISTRY: Record string[]> │ - capped by the History Limit setting (10–500, default 100) │ ├────────────────────────────────────────────────────────────────────┤ │ SettingsStore — "ytdescgen-settings", v12 │ -│ - theme · appLanguage · defaultOutputLanguage · titleFormat │ +│ - theme · hideScrollbars · appLanguage · titleFormat │ │ - description toggles · strictMode · copyAllIncludesTags · … │ │ - healSettings on every load; consent and UI state never exported │ ├────────────────────────────────────────────────────────────────────┤ @@ -323,7 +323,7 @@ Two sources, unioned by `useStrictBlock`, because neither alone is sufficient: | `collectEditorIssues` (pure, over `EditorData`) | Saved values that fail validation | Bad data from imports — `ValidatedInput` refuses to commit invalid text, so imports are the main way it gets in | | `PendingInvalidStore` | Typed text that is invalid and therefore **not** saved | Otherwise a field showing a red error is invisible to every gate, because the store behind it holds the last good value | -Both are filtered through `isRelevantIssueId`, so a field that isn't currently shown (`adEmail` with split-email off, `zaloGroupLink` outside Vietnamese output) can never block on a value with no visible input to fix it. Strict Mode is opt-in; with it off, no gate blocks. +Both are filtered through `isRelevantIssueId`, so a field that isn't currently shown (`adEmail` / `gameKeyEmail` / `copyrightEmail` with split-email off, `zaloGroupLink` outside Vietnamese output) can never block on a value with no visible input to fix it. Strict Mode is opt-in; with it off, no gate blocks. The first implementation registered issues from the inputs themselves and cleared on unmount. It typechecked and had passing tests, and did nothing: the fields live on the Editor page while the gates live on Batch / Social / Output, so navigating away cleared every issue. Deriving from state removes the mount coupling entirely. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 51bd38e..8048c8d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -119,6 +119,7 @@ Full rules: [CONTRIBUTING.md](../CONTRIBUTING.md). | `npm run check:version` | Asserts all **six** version fields agree (`package.json`, both `package-lock.json` entries, `tauri.conf.json`, `Cargo.toml`, `Cargo.lock`). The only thing that notices a missed one. | | `npm run check:tauri` | The `@tauri-apps/*` npm packages and the Tauri crates must share major.minor. The Tauri CLI refuses to build otherwise, and CI never runs a Tauri build. | | `npm run check:licenses` | Every bundled package has an allowed license, and `THIRD_PARTY_NOTICES.md` matches what is installed. | +| `npm run check:copyright` | NOTICE, REUSE.toml and the installers' copyright string (`tauri.conf.json`) state the copyright years for the year of HEAD's commit — "2026", then "2026-2027" from the first commit of 2027. CI gate (v1.1.0). | | `npm run check:bundle` | Run after `npm run build`: the initial load must stay ≤ 280 KB gzip and no JS chunk over 500 KB raw. | | `npm run cf:check` | `wrangler deploy --dry-run`: validates `wrangler.jsonc` and bundles the Worker the way Workers Builds will, without deploying. | @@ -128,6 +129,7 @@ Full rules: [CONTRIBUTING.md](../CONTRIBUTING.md). | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `npm run generate:locale` | Scaffold a locale from the English source. `--lang `, plus optional `--copy-english` / `--force`. (Advertised since v0.1 but only actually written in v0.35.0.) | | `npm run generate:third-party` | Rewrite `THIRD_PARTY_NOTICES.md` from the installed packages — needed after a dependency change, or `check:licenses` fails. | +| `npm run update:copyright` | Rewrite the copyright years in NOTICE, REUSE.toml and `tauri.conf.json` — needed with the first commit of a new year, or `check:copyright` fails. | | `npm run generate:brand` | Rasterise the brand SVGs in `assets/brand/` into the web's PNG icons and link-preview card in `public/`. The PNGs are committed. The desktop and Android icons come from the same logo: `npx tauri icon assets/brand/logo.svg`. | ## Before You Open a PR @@ -141,6 +143,7 @@ npm run validate:locales npm run test:coverage npm run knip npm run check:version && npm run check:tauri && npm run check:licenses +npm run check:copyright npm run build && npm run check:bundle npm run cf:check ``` diff --git a/docs/FEATURES.md b/docs/FEATURES.md index fd5c4ca..bebd454 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -193,7 +193,8 @@ Every block is optional and skipped when empty. In order: 20. 🔗 Social links 21. 💬 Community 22. ▶️ Playlist link -23. 📧 Contact email(s) — one line, or split by purpose +23. 📧 Contact email(s) — one line, or split by purpose: contact, advertising, + game keys & playtest, copyright / DMCA (v1.1.0) 24. CTA line (Like / Subscribe / Share) 25. © Copyright line (on by default; needs a channel name) 26. 📋 Usage policy (opt-in) @@ -325,8 +326,8 @@ a pasted store link can each be undone from the toast they show. **Tidy up** rewrites a pasted list as one `M:SS label` per line. - **Pages** — Editor, Output, Batch, Social, Playlist; Profiles (profiles, game presets, templates), History; Settings, Logs, About; the Legal Center. -- Dark and light themes; animated icons follow the system's _reduce motion_; - controls grow on touch screens. +- Dark and light themes; scrollbars can be hidden (v1.1.0); animated icons + follow the system's _reduce motion_; controls grow on touch screens. ## 💾 Data Persistence @@ -334,13 +335,13 @@ Everything stays on the device: the browser's storage for `ytgenerator.stream` on the web, the app's own storage on desktop and Android. There is no account and no server-side copy. -| Item | What it holds | Where | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- | -| **Profile** — the channel | Channel name; contact emails (general, advertising, game keys); social and donate links; community links; Vietnamese bank / MoMo / ZaloPay details; rig; resolution, FPS and graphics preset; sponsors & partners text | Profiles › Profiles | -| **Game preset** — the game | Game name (+ per-language names); genres; platform; store links and their type (paid / free / demo); publisher / developer; content warnings; language patch; game version; art style; "no graphics settings"; series playlist | Profiles › Game presets | -| **Template** — the whole form | Every editor field | Profiles › Templates | -| **History** | One entry per video — game, video type, language, genres, title, description, tags. Saving the same video again updates its entry (v1.0.0) | History | -| **Draft** | The editor form, saved as you type | — | +| Item | What it holds | Where | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | +| **Profile** — the channel | Channel name; contact emails (general, advertising, game keys, copyright); social and donate links; community links; Vietnamese bank / MoMo / ZaloPay details; rig; resolution, FPS and graphics preset; sponsors & partners text | Profiles › Profiles | +| **Game preset** — the game | Game name (+ per-language names); genres; platform; store links and their type (paid / free / demo); publisher / developer; content warnings; language patch; game version; art style; "no graphics settings"; series playlist | Profiles › Game presets | +| **Template** — the whole form | Every editor field | Profiles › Templates | +| **History** | One entry per video — game, video type, language, genres, title, description, tags. Saving the same video again updates its entry (v1.0.0) | History | +| **Draft** | The editor form, saved as you type | — | The field lists live in `src/config/library-fields.ts`. Profiles, presets and templates export and import as JSON; History exports as **CSV** or JSON. @@ -385,6 +386,7 @@ In **Settings › Backup & restore**: | Setting | Type | Default | Description | | -------------------------- | ------------------------------- | ---------------- | ---------------------------------------------------------------------------------- | | Theme | dark / light | dark | App color theme | +| Hide scrollbars | boolean | false | v1.1.0. No scrollbar anywhere in the app; wheel, touch and keyboard still scroll | | App Language | SupportedLanguage | browser-detected | Language of the interface | | Default Output Language | SupportedLanguage | browser-detected | Language a new draft starts in (first run, Start over) | | Show Character Count | boolean | true | Display char counters on output. **Does not** affect copy blocking | @@ -428,8 +430,12 @@ On by default: `showCopyright` and `pinnedCommentIncludeAskNextGame`. Emails are capped at **three per field**, enforced on the increase so an over-cap legacy value stays editable, and a domain without a TLD is rejected. -Invalid input is never committed to the store, so a malformed URL cannot -reach the generated description whether Strict Mode is on or off. +With the contact email split by purpose, the advertising, game-keys and +copyright addresses also need a purpose word before `@` — `sponsors@…`, +`keys@…`, `dmca@…` or `name+dmca@gmail.com` (v1.1.0; the words are in +`src/config/contact-emails.ts`). Invalid input is never committed to the +store, so a malformed URL cannot reach the generated description whether +Strict Mode is on or off. ## 🖥 Desktop App Features (Tauri) diff --git a/docs/I18N.md b/docs/I18N.md index f2f4c86..dd6b7c7 100644 --- a/docs/I18N.md +++ b/docs/I18N.md @@ -341,15 +341,15 @@ npm run typecheck && npm run typecheck:all ## Locale Validation Script The `scripts/validate-locales.ts` script checks every locale folder against -`_schema.json`. At v1.0.0 (1,247 UI + 573 template keys per locale): +`_schema.json`. At v1.1.0 (1,253 UI + 574 template keys per locale): ``` -✓ en/ui.json — 1247/1247 keys -✓ en/templates.json — 573/573 keys -✓ es/ui.json — 1247/1247 keys -✓ es/templates.json — 573/573 keys +✓ en/ui.json — 1253/1253 keys +✓ en/templates.json — 574/574 keys +✓ es/ui.json — 1253/1253 keys +✓ es/templates.json — 574/574 keys … -✓ zh/templates.json — 573/573 keys +✓ zh/templates.json — 574/574 keys All locale files are complete! ``` diff --git a/docs/TECH-SPEC.md b/docs/TECH-SPEC.md index cb2b17b..312213c 100644 --- a/docs/TECH-SPEC.md +++ b/docs/TECH-SPEC.md @@ -43,7 +43,9 @@ Reflects **v1.0.0**. The module map and data flow are in [ARCHITECTURE.md](ARCHI "check:tauri": "tsx scripts/check-tauri-versions.ts", "check:bundle": "tsx scripts/check-bundle-size.ts", "check:licenses": "tsx scripts/third-party.ts", - "generate:third-party": "tsx scripts/third-party.ts --write" + "generate:third-party": "tsx scripts/third-party.ts --write", + "check:copyright": "tsx scripts/check-copyright.ts", + "update:copyright": "tsx scripts/check-copyright.ts --write" }, "dependencies": { "@fontsource-variable/inter": "^5.3.0", @@ -250,7 +252,7 @@ There is no `tailwind.config.ts` (removed in v0.37.0). PostCSS loads `@tailwindc } ``` -Components use the tokens (`bg-surface-1`, `text-text-muted`, `rounded-card`, …), never raw colours. `public/theme-init.js` applies the saved theme (and sets `` to the saved UI language) before the first paint; it is a separate file rather than an inline script so the Content-Security-Policy needs no exception. +Components use the tokens (`bg-surface-1`, `text-text-muted`, `rounded-card`, …), never raw colours. `public/theme-init.js` applies the saved theme and the Hide scrollbars class (and sets `` to the saved UI language) before the first paint; it is a separate file rather than an inline script so the Content-Security-Policy needs no exception. ### wrangler.jsonc @@ -324,7 +326,8 @@ export interface GeneratorInput { // skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier, // upscaleQuality, artStyle, videoStyleEra, versionInfo. // Content: timestamps, playlistLink, contactEmail, adEmail, gameKeyEmail, - // musicAttribution, sponsorName, sponsorPlatform, pubDevName, thirdPartyAdText, + // copyrightEmail, musicAttribution, sponsorName, sponsorPlatform, pubDevName, + // thirdPartyAdText, // playthroughStatus, difficulty, endings, languagePatch, gameVersion, // contentWarnings, techNotes, playtest fields, community invite links, // Vietnamese donate fields. @@ -447,7 +450,7 @@ interface EditorActions { } /** Bump together with a new step in migrateEditorState. */ -export const EDITOR_STORE_VERSION = 19; +export const EDITOR_STORE_VERSION = 20; export const useEditorStore = create()( persist( @@ -481,7 +484,7 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed | Store | localStorage key | Version | Migration (exported) | | ------------------ | ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------- | -| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 19 | `migrateEditorState` | +| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 20 | `migrateEditorState` | | `useProfileStore` | `ytdescgen-profiles` | `PROFILE_STORE_VERSION` = 3 | `migrateProfilesState` | | `usePresetStore` | `ytdescgen-presets` | `PRESET_STORE_VERSION` = 2 | `migratePresetsState` | | `useTemplateStore` | `ytdescgen-templates` | `TEMPLATE_STORE_VERSION` = 2 | `migrateTemplatesState` | @@ -490,6 +493,8 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed v1.0.0 migration steps: editor v19, profiles v3 and templates v2 move the GPU to the catalog format (`migrateRig`: `brand|series|model` → `gpu:`, or the full name as free text when the card is not in the catalog); history v3 folds the duplicates older versions piled up into one entry per video (`dedupeHistory`; a video is game name (case-insensitive) + video type + language + title), keeping the newest. +v1.1.0: editor v20 back-fills `copyrightEmail` (the fourth split contact line) with `""`. `Profile.copyrightEmail` is optional, like the v1.0.0 additions, so the profile store stays at v3. The settings gain `hideScrollbars` without a version bump: `healSettings` back-fills and coerces it on every load, and the unchanged version keeps a 1.1.0 settings backup restorable on 1.0.0. + Rules: - **localStorage is the only store**, on the web, desktop and Android. The desktop "mirror" file of earlier versions (`storage-adapter.ts`, `saveSettings`, `checkDataFileHealth`) was removed in v1.0.0; it was written next to the data folder and never read back. [PACKAGING.md](PACKAGING.md) covers how the leftover file is recovered. @@ -582,6 +587,7 @@ The `check` job, in order: - run: npm run check:tauri # @tauri-apps/* npm packages and tauri crates on the same major.minor # licensing - run: npm run check:licenses # allow-list + THIRD_PARTY_NOTICES.md matches what is installed +- run: npm run check:copyright # NOTICE, REUSE.toml, installer copyright state HEAD's year # security (advisory: a fresh transitive advisory must not redden unrelated PRs) - run: npm audit --audit-level=high continue-on-error: true @@ -593,6 +599,7 @@ The `check` job, in order: - **Bundle budget** (`scripts/check-bundle-size.ts`): the initial load is every script, modulepreload and stylesheet `dist/index.html` references, summed gzip — lazy chunks (pages, locales, legal documents) are excluded. The result is printed as a table and added to the job summary. - **Licences** (`scripts/lib/third-party.ts`): every package bundled into the app must carry an allowed licence (MIT, ISC, Apache-2.0, BSD-2/3-Clause, 0BSD, CC0-1.0, Unlicense, BlueOak-1.0.0, OFL-1.1, Zlib, MPL-2.0), and `THIRD_PARTY_NOTICES.md` is generated (`npm run generate:third-party`) and checked, not hand-written. +- **Copyright years** (`scripts/lib/copyright.ts`, v1.1.0): NOTICE, REUSE.toml and `bundle.copyright` in `tauri.conf.json` must state `copyrightYears()` from `src/config/brand.ts` — "2026", then "2026-2027" from the first commit of 2027. The commit year rather than the clock keeps old commits green; `npm run update:copyright` rewrites the three files. The `/legal` pages' footer uses the same helper at build time. - **Wrangler dry run** validates `wrangler.jsonc` and bundles the Worker exactly as Workers Builds will, without deploying. - Every workflow declares least-privilege `permissions`, checks out with `persist-credentials: false`, and pins actions by commit SHA (Dependabot keeps the SHAs and version comments current). The exceptions are the actionlint Docker image (pinned by version tag) and the maintainer's own `poli0981/.github` reusable workflows (tracked at `main`, allowed in `.github/zizmor.yml`). CI, Security, Compliance and Rust cancel superseded runs through a `concurrency` group, except on `main`, where each commit's result is a record the release process reads back. diff --git a/docs/i18n/vi/DEVELOPMENT.md b/docs/i18n/vi/DEVELOPMENT.md index b87d31f..e173e07 100644 --- a/docs/i18n/vi/DEVELOPMENT.md +++ b/docs/i18n/vi/DEVELOPMENT.md @@ -121,6 +121,7 @@ Quy định đầy đủ: [CONTRIBUTING.md](../../../CONTRIBUTING.md). | `npm run check:version` | Kiểm tra cả **sáu** trường version khớp nhau (`package.json`, hai chỗ trong `package-lock.json`, `tauri.conf.json`, `Cargo.toml`, `Cargo.lock`). Đây là thứ duy nhất phát hiện khi bỏ sót một chỗ. | | `npm run check:tauri` | Các package npm `@tauri-apps/*` và các crate Tauri phải cùng major.minor. Tauri CLI sẽ từ chối build nếu lệch, mà CI thì không chạy build Tauri. | | `npm run check:licenses` | Mọi package được bundle đều có license nằm trong danh sách cho phép, và `THIRD_PARTY_NOTICES.md` khớp với những gì đang cài. | +| `npm run check:copyright` | NOTICE, REUSE.toml và chuỗi copyright của bộ cài (`tauri.conf.json`) phải ghi đúng năm theo năm của commit HEAD — "2026", rồi "2026-2027" từ commit đầu tiên của năm 2027. Gate của CI (v1.1.0). | | `npm run check:bundle` | Chạy sau `npm run build`: lần tải đầu phải ≤ 280 KB gzip và không chunk JS nào vượt 500 KB (chưa nén). | | `npm run cf:check` | `wrangler deploy --dry-run`: kiểm tra `wrangler.jsonc` và bundle Worker y như Workers Builds sẽ làm, nhưng không deploy. | @@ -130,6 +131,7 @@ Quy định đầy đủ: [CONTRIBUTING.md](../../../CONTRIBUTING.md). | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `npm run generate:locale` | Tạo khung locale mới từ bản tiếng Anh. `--lang `, thêm tùy chọn `--copy-english` / `--force`. (Được nhắc đến từ v0.1 nhưng đến v0.35.0 mới thật sự có script.) | | `npm run generate:third-party` | Ghi lại `THIRD_PARTY_NOTICES.md` từ các package đang cài — cần chạy sau khi đổi dependency, nếu không `check:licenses` sẽ fail. | +| `npm run update:copyright` | Ghi lại năm bản quyền trong NOTICE, REUSE.toml và `tauri.conf.json` — cần chạy với commit đầu tiên của năm mới, nếu không `check:copyright` sẽ fail. | | `npm run generate:brand` | Chuyển các SVG thương hiệu trong `assets/brand/` thành icon PNG và ảnh preview khi chia sẻ link của bản web, đặt trong `public/`. Các file PNG được commit. Icon desktop và Android dùng chung logo đó: `npx tauri icon assets/brand/logo.svg`. | ## Trước khi mở PR @@ -143,6 +145,7 @@ npm run validate:locales npm run test:coverage npm run knip npm run check:version && npm run check:tauri && npm run check:licenses +npm run check:copyright npm run build && npm run check:bundle npm run cf:check ``` diff --git a/package-lock.json b/package-lock.json index 2c7fe79..b1788f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yt-desc-gen", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yt-desc-gen", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0", "dependencies": { "@fontsource-variable/inter": "^5.3.0", diff --git a/package.json b/package.json index 917ddb4..57ded61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yt-desc-gen", - "version": "1.0.0", + "version": "1.1.0", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index afb53c0..2fe3a91 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5024,7 +5024,7 @@ dependencies = [ [[package]] name = "yt-desc-gen" -version = "1.0.0" +version = "1.1.0" dependencies = [ "serde", "tauri", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d160c32..a8e857e 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yt-desc-gen" -version = "1.0.0" +version = "1.1.0" description = "YouTube Gameplay Description Generator" authors = ["poli0981"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1107c36..d53aeb7 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json", "productName": "YTDescGen", - "version": "1.0.0", + "version": "1.1.0", "identifier": "com.skullmute.ytdescgen", "build": { "beforeBuildCommand": "npm run build",