Skip to content

feat(install): O43/O58 npm one-line install with Node gate - #85

Merged
QiaolongLi1201 merged 1 commit into
mainfrom
feat/o43-npm-one-line-install
Oct 11, 2026
Merged

QiaolongLi1201 merged 1 commit into
mainfrom
feat/o43-npm-one-line-install

Conversation

@QiaolongLi1201

Copy link
Copy Markdown
Collaborator

Summary

O43/O58: make npm install -g @rdk-moss/agent@latest the recommended install path (README en+zh), with an immediate Node-too-old failure that prints copyable upgrade commands for macOS / Ubuntu / Windows and the success-path npm i -g command. No curl native-binary installer in this phase.

Changes

  • package.json: "private": false; prepare runs check-node-version.cjs before build (so npm install -g --install-links . does not leave a broken moss shim on old Node)
  • scripts/check-node-version.cjs + bin/node-version-message.cjs: three-platform upgrade commands (brew / nvm / fnm / NodeSource / winget) + npm install -g @rdk-moss/agent@latest; zh locale lead-in; MOSS_TEST_FAKE_NODE_VERSION for easy QA/UX failure-path testing
  • README (en+zh): one-line npm install first; source clone kept as optional developer path; remove「即将发布」/「coming soon」
  • Tests: unit + global --install-links fixture asserting non-zero exit, upgrade text, and no leftover moss shims
  • moss update: with private: false, npm-global installs print npm install -g @rdk-moss/agent@latest

Acceptance (PM locked)

  1. Node too old → fail immediately with copyable upgrade/install command (includes npm i -g path) — exercised via MOSS_TEST_FAKE_NODE_VERSION=20.19.2 node scripts/check-node-version.cjs and test/check-node-version-global-install.spec.mjs
  2. Success path: one npm command; README EN+ZH aligned
  3. Failures are actionable (no dead ends)
  4. Three platforms covered in docs/tests; no curl binary installer

Gate

  • Check + Ubuntu must be green
  • Windows known-red on main is OK if not worse
  • QA: O58 failure cases; UX: first-install acceptance

Local

Recommend `npm install -g @rdk-moss/agent@latest` in README (en+zh).
Flip package.json private to false so moss update prints the registry
path. Run check-node-version from preinstall and prepare with copyable
macOS/Ubuntu/Windows upgrade commands plus the npm i -g success path;
fake-version env makes the failure path easy to test without old Node.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@QiaolongLi1201
QiaolongLi1201 merged commit 93ef58a into main Oct 11, 2026
10 of 12 checks passed
@QiaolongLi1201
QiaolongLi1201 deleted the feat/o43-npm-one-line-install branch October 12, 2026 10:29
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