Skip to content

chore(FR-2789): fix backend.ai-client package.json for publishable distribution#7201

Open
yomybaby wants to merge 1 commit intomainfrom
04-30-chore_fr-2789_fix_backend.ai-client_package.json_for_publishable_distribution
Open

chore(FR-2789): fix backend.ai-client package.json for publishable distribution#7201
yomybaby wants to merge 1 commit intomainfrom
04-30-chore_fr-2789_fix_backend.ai-client_package.json_for_publishable_distribution

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Apr 30, 2026

Resolves #7196(FR-2789)

Epic: FR-2792 (backend.ai-client production readiness)

Summary

Tightens packages/backend.ai-client/package.json so the package is safe to publish and predictable to consume. The package is built ESM-only by tsup (format: ['esm'] + "type": "module"), so the metadata is shaped to match an ESM-only tarball.

Changes

  • exports — moved types before import per Node ESM resolution rules, no require branch (ESM-only).
  • main — kept as ./dist/index.js for parity with sibling publishable packages (backend.ai-ui, backend.ai-docs-toolkit) that all retain main alongside module + exports for legacy bundlers.
  • engines — added "node": ">=18" (matches the global-fetch baseline that client.ts relies on).
  • publishConfig.access: public — explicit so a first publish doesn't depend on local registry defaults.
  • repository — switched from a tree URL to a proper git+https:// URL with directory: "packages/backend.ai-client" so npm's "View Source" link works correctly.
  • homepage — added a tree-anchored URL pointing at the package README.
  • files — added README.md and LICENSE (sibling PR docs(FR-2788): add LICENSE and README to backend.ai-client #7202 / FR-2788 lands them; pack tolerates missing entries until that lands).

Out of scope

Verification

  • pnpm install from repo root — workspace link unchanged.
  • pnpm --filter backend.ai-client run build — ESM 174.99 KB + DTS 65.36 KB.
  • pnpm pack --dry-run (combined with docs(FR-2788): add LICENSE and README to backend.ai-client #7202) — tarball lists dist/, LICENSE, package.json, README.md.
  • ESM smoke import (import { Client, ClientConfig } from 'backend.ai-client') — both resolve.
  • bash scripts/verify.sh — Relay/Lint/Format pass; TypeScript pre-existing errors in client.ts exist on origin/main and are unrelated to this PR.

Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the size:S 10~30 LoC label Apr 30, 2026
@yomybaby yomybaby marked this pull request as ready for review April 30, 2026 16:25
Copilot AI review requested due to automatic review settings April 30, 2026 16:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates backend.ai-client’s package metadata to improve npm publishability and repo linkage within the monorepo.

Changes:

  • Adjusts repository metadata to use a git URL plus directory, and adds a homepage URL.
  • Updates published package contents (files) and adds publishConfig.access: public.
  • Adds a Node.js engine constraint (>=18) and tweaks export field ordering.

Comment thread packages/backend.ai-client/package.json
Comment thread packages/backend.ai-client/package.json
@yomybaby yomybaby force-pushed the 04-30-chore_fr-2789_fix_backend.ai-client_package.json_for_publishable_distribution branch from a2c1072 to d889b7e Compare April 30, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix backend.ai-client package metadata for publishable distribution

2 participants