@betarena/scores-lib

中文文档
5.2.0发布于 2026/10/08ISCTypeScriptES Module近 30 天下载 2198

Global methods, graphQL, types & Declarations for Betarena Scores Platform

原始使用文档
文档目录4 节
  1. 📝 - Package Description
  2. 🚀 - Get Started:
  3. 🧪 - Local Development:
  4. 🚢 - Release Flow

WOS - World of Sports

npm version

📝 - Package Description

This pacakge is a gateway for developing at WOS - World of Sports, giving access to (but not limited to):

  1. Global common TS functions
  2. Typescript declarations (d.ts) for:
    1. Detailed and accurate PostgreSQL database table schemas (tailored for Hasura/GraphQL format)
    2. Detailed endpoint (1) responses & (2) requests from complementary internal backend services
  3. Wrappers for:
    1. GraphQL (Hasura) queries & websockets instances
    2. Redis connection
    3. API for communication with complementary backend services

, which is used internally at WOS - World of Sports and its Javascript/Typescript based projects.

🚀 - Get Started:

npm install @betarena/scores-lib@latest
# OR
# pnpm [..]
# yarm [..]

🧪 - Local Development:

pnpm run 'local/1-click/pnpm'

[!IMPORTANT] It is strongly recommended to use pnpm, for its (1) symlink capabilites and (2) better node_modules/ management when working on other WOS - World of Sports projects simultanously, that depend on scores-lib.

🚢 - Release Flow

This repository uses a PR-based release flow so that main can remain protected.

  1. Open a regular pull request to main.
  2. Add exactly one label: semver:patch, semver:minor, or semver:major.
  3. Merge the pull request after checks pass.
  4. GitHub Actions will automatically open a release pull request with the version bump and updated CHANGELOG.md.
  5. Merge that release pull request to publish the package to npm and create the GitHub release/tag.

[!NOTE] The automated release pull request is created by GitHub Actions and does not need a semver:* label

版本与发布记录

@betarena/scores-lib 共发布 408 个版本,首次发布于 2023/02/28;过去 12 个月发布了 89 个版本。

版本发布日期距今
5.2.0latest2026/10/0830 天前
5.1.02026/10/051 个月前
5.0.22026/09/291 个月前
5.0.12026/09/181 个月前
5.0.02026/09/171 个月前
4.34.22026/08/142 个月前

其他发布通道:faulty → 3.3.7,stable → 4.0.0,broken → 4.0.1,alpha → 4.5.3-alpha.0。

关于 @betarena/scores-lib 的常见问题

@betarena/scores-lib 是什么?

Global methods, graphQL, types & Declarations for Betarena Scores Platform

如何安装 @betarena/scores-lib?

在项目目录运行 npm install @betarena/scores-lib,或使用 pnpm add / yarn add / bun add。

@betarena/scores-lib 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@betarena/scores-lib 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@betarena/scores-lib 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js v18.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@betarena/scores-lib 可以商用吗?

@betarena/scores-lib 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@betarena/scores-lib 的下载量有多少?

根据 npm 官方下载统计,@betarena/scores-lib 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,198 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@betarena/scores-lib 还在维护吗?

最新版本 5.2.0 发布于 2026/10/08(30 天前);至今共发布 408 个版本,其中过去 12 个月发布了 89 个;首次发布于 2023/02/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。