parallel-npm-packages
其他 活跃维护

parallel-npm-packages

parallel-web/parallel-npm-packages

采用 Monorepo 结构统一维护 @parallel-web 系列 npm 包,内置 @parallel-web/ai-sdk-tools 等工具,支持模块化发布与版本同步,提供简洁 API 调用,简化 AI 应用开发中的依赖管理与集成流程。

4
Stars 标星
7
Forks 分支
4
Watchers 关注
10
Open Issues
TypeScript
主要语言
MIT
开源协议
702 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:parallel-web/parallel-npm-packages
git clone https://github.com/parallel-web/parallel-npm-packages.git
git clone git@github.com:parallel-web/parallel-npm-packages.git
README.md main

@parallel-web npm packages

Monorepo for @parallel-web npm packages.

Packages

Development

This is a pnpm monorepo requiring Node >= 22.13. The pnpm version is pinned by
the packageManager field in package.json, so use corepack rather than a
globally installed pnpm:

corepack enable

Setup

Install dependencies:

pnpm install

With Nix (optional)

A flake provides Node and a corepack-backed pnpm matching CI:

nix develop
pnpm install

With direnv, echo "use flake" > .envrc && direnv allow
enters the shell automatically. .envrc is gitignored, so this stays per-developer.

Commands

# Build all packages
pnpm build

# Run tests
pnpm test

# Run tests in CI mode (no watch)
pnpm test:ci

# Lint
pnpm lint

# Fix linting issues
pnpm lint:fix

# Format code
pnpm format

# Check formatting
pnpm format:check

# Type check
pnpm typecheck

# Clean build artifacts
pnpm clean

Workspace Commands

To run a command in a specific package:

pnpm --filter @parallel-web/ai-sdk-tools build
pnpm --filter @parallel-web/ai-sdk-tools test

Adding a New Package

  1. Create a new directory in packages/
  2. Add a package.json with the package name @parallel-web/package-name
  3. Set up TypeScript config extending from root
  4. Add build configuration appropriate for the package
  5. Implement your package

Publishing

Each package is versioned, tagged, and released independently. Releases are PR-driven:
a local script opens a version-bump PR, and merging it publishes to npm. See
PUBLISHING.md for the full guide.

git checkout main && git pull

# Release candidate (1.2.0 -> 1.3.0-rc.1, or bump an existing rc)
./scripts/release.sh ai-sdk-tools rc

# Promote the current RC to stable (1.3.0-rc.2 -> 1.3.0)
./scripts/release.sh ai-sdk-tools stable

# Explicit version
./scripts/release.sh opencode-plugin 2.0.0

The script bumps the version, opens a release/<package>-vX.Y.Z PR, and on merge the
Release workflow (.github/workflows/release.yml) builds/tests the package, publishes to
npm, and creates the per-package git tag <package>-vX.Y.Z plus a GitHub Release.

  • RC support: x.y.z-rc.N versions publish under the rc npm dist-tag; stable versions
    under latest. So npm install @parallel-web/<package> gets the latest stable, and
    @rc opts into pre-releases.
  • Per-package tags: tags are namespaced per package and never collide.
  • Trusted publishing: uses npm OIDC trusted publishing — no npm token is stored in the repo.

License

MIT