Skip to content

Comments

feat: add TypeScript ecosystem support#25

Open
jxom wants to merge 2 commits intomasterfrom
feat/typescript-ecosystem
Open

feat: add TypeScript ecosystem support#25
jxom wants to merge 2 commits intomasterfrom
feat/typescript-ecosystem

Conversation

@jxom
Copy link
Member

@jxom jxom commented Feb 3, 2026

Summary

Adds full TypeScript/JavaScript ecosystem support for changelogs, completing the trifecta of Rust, Python, and TypeScript.

Features

  • Workspace formats: npm/yarn/bun (workspaces field in package.json) and pnpm (pnpm-workspace.yaml)
  • Package manager detection: Auto-detects from lockfile (bun.lockb, pnpm-lock.yaml, yarn.lock, package-lock.json)
  • Scoped packages: Handles @org/pkg with proper URL encoding and --access public for publishing
  • Registry check: Uses npm registry API (registry.npmjs.org) to check if versions are published
  • GitHub Action: New npm-token input for publishing

Changes

  • src/ecosystems/typescript.rs - new TypeScriptAdapter (350 lines)
  • src/ecosystems/mod.rs - added Ecosystem::TypeScript variant and wiring
  • src/error.rs - 3 new error variants
  • src/workspace.rs - added package.json manifest detection
  • Cargo.toml - added glob dependency
  • action.yml - added npm-token input
  • README.md - TypeScript documentation

Tests

7 new unit tests covering:

  • Single package discovery
  • npm/pnpm workspace discovery
  • Scoped package handling
  • Version read/write
  • Dependency updates
  • Package manager detection

All 47 tests pass.

- Add TypeScriptAdapter implementing EcosystemAdapter trait
- Support npm/yarn/bun workspaces (package.json) and pnpm (pnpm-workspace.yaml)
- Auto-detect package manager from lockfile (bun.lockb, pnpm-lock.yaml, yarn.lock, package-lock.json)
- Handle scoped packages (@org/pkg) with proper URL encoding and --access public
- Add npm registry check via registry.npmjs.org API
- Add npm-token input to GitHub Action
- Add glob dependency for workspace pattern expansion
- Include comprehensive unit tests

Amp-Thread-ID: https://ampcode.com/threads/T-019c2111-b969-761e-b5d3-70a67850a61f
Co-authored-by: Amp <amp@ampcode.com>
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
changelogs-rs Ready Ready Preview, Comment Feb 3, 2026 1:25am

Request Review

@socket-security
Copy link

socket-security bot commented Feb 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​glob@​0.3.310010093100100

View full report

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.

1 participant