Skip to content

Modernize Mod Uploader 1.8.0 - #5

Open
lemon07r wants to merge 3 commits into
Lyeeedar:mainfrom
lemon07r:agent/modernize-uploader-1.8.0
Open

Modernize Mod Uploader 1.8.0#5
lemon07r wants to merge 3 commits into
Lyeeedar:mainfrom
lemon07r:agent/modernize-uploader-1.8.0

Conversation

@lemon07r

Copy link
Copy Markdown
Contributor

What changed

  • Rebases the uploader modernization onto current upstream v1.7.1 and keeps
    the improved tagging UI introduced there.
  • Upgrades Electron 43, Vite 8/Rolldown, TypeScript 7, React 19.2,
    Steamworks 0.12.2, electron-builder 26.15, and electron-updater 6.8.
  • Standardizes installs and release version stamping on Bun, removes the npm
    lock, and validates before packaging.
  • Uses vite-plugin-electron 1.x notBundle() so native Steamworks binaries
    remain external and are packaged correctly.
  • Extracts testable CLI, metadata, image, error, and upload-detail modules.
  • Rejects invalid Workshop IDs and missing previews, preserves update
    visibility, defaults new items public, and adds --version.
  • Keeps updater metadata pointed at Lyeeedar/ModUploader.

Validation

  • bun install --frozen-lockfile
  • bun run release:validate
  • 11 Bun tests / 20 assertions
  • Vite renderer, main-process, and preload production builds
  • CLI help/version/JSON-failure smoke tests
  • Linux AppImage and Windows installer/portable packaging
  • inspected native Steamworks payloads and packaged updater metadata

@lemon07r
lemon07r marked this pull request as ready for review July 27, 2026 13:46
Copilot AI review requested due to automatic review settings July 27, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Modernizes Mod Uploader to v1.8.0 by rebasing onto upstream, upgrading the Electron/Vite/TypeScript/React toolchain, and standardizing the project around Bun with added validation and testable modules for workshop uploads and metadata parsing.

Changes:

  • Upgrades core toolchain and adjusts Vite/Electron bundling to keep native Steamworks/runtime dependencies external.
  • Introduces Bun-based typecheck/test/release validation, plus CLI smoke coverage and new release notes/docs updates.
  • Extracts workshop upload validation/error handling and ZIP metadata parsing into focused, testable modules.

Reviewed changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vite.config.ts Migrates build config to Vite 8/Rolldown and uses notBundle() to externalize native/runtime deps.
tsconfig.json Updates TS compiler settings for bundler-style resolution and Bun typing; expands includes/excludes.
scripts/cli-smoke.js Adds a CLI smoke test script for help/version/JSON failure behavior.
RELEASE_NOTES_1.8.0.md Adds release notes for 1.8.0.
README.md Updates prerequisites/build instructions and documents new CLI validation behavior + release validation steps.
package.json Bumps version to 1.8.0, pins Bun via packageManager, adds typecheck/test/validate scripts and new deps.
electron/main/workshop-service.ts Refactors workshop upload logic to use extracted validation/details/error helpers.
electron/main/workshop-errors.ts Extracts Steam auth detection + error normalization.
electron/main/upload-details.ts Adds upload-data validation, workshop ID parsing, and update payload construction.
electron/main/upload-details.test.ts Adds Bun tests for workshop ID validation, visibility behavior, and error normalization.
electron/main/mod-parser.ts Refactors ZIP metadata extraction to delegate parsing to extracted module(s).
electron/main/metadata-content.ts Adds reusable metadata parsing helpers for package/bundled mod metadata.
electron/main/metadata-content.test.ts Adds Bun tests for metadata parsing helpers.
electron/main/image-utils.ts Moves getImageSizeInfo into a dedicated module and re-exports it.
electron/main/image-utils.test.ts Adds Bun test coverage for missing preview behavior via new helpers.
electron/main/image-files.ts Adds shared image file helpers (getImageSizeInfo, validatePreviewInput).
electron/main/cli.ts Refactors CLI entry to use extracted option parsing/validation and adds --version.
electron/main/cli-options.ts Adds isolated CLI arg parsing/building/validation helpers.
electron/main/cli-options.test.ts Adds Bun tests for CLI parsing and pre-Steam validation failures.
bun.lock Updates lockfile for upgraded dependencies and new Bun/TS/Vite/Electron versions.
.github/workflows/release.yml Moves version stamping and validation to Bun; adds release:validate step.
Comments suppressed due to low confidence (1)

electron/main/mod-parser.ts:12

  • formatModName is now duplicated here and in metadata-content.ts. Duplicating the same formatting logic makes it easy for behavior to diverge over time. Prefer re-exporting the shared helper from metadata-content.ts instead of maintaining a second copy.
export function formatModName(name: string): string {
  if (!name) return name;

  return name
    .replace(/[-_]/g, ' ')

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +36
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

Comment thread package.json Outdated
Comment on lines +12 to +13
"cli:smoke": "node scripts/cli-smoke.js",
"release:validate": "bun run typecheck && bun run test && bun run build && bun run cli:smoke",
Comment on lines +1 to +21
import * as fs from 'node:fs';

export function getImageSizeInfo(imagePath: string): {
size: number;
exceedsLimit: boolean;
sizeFormatted: string;
} {
try {
const size = fs.statSync(imagePath).size;
return {
size,
exceedsLimit: size > 1024 * 1024,
sizeFormatted:
size >= 1024 * 1024
? `${(size / 1024 / 1024).toFixed(2)} MB`
: `${(size / 1024).toFixed(1)} KB`,
};
} catch {
return { size: 0, exceedsLimit: false, sizeFormatted: '0 KB' };
}
}
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