Fix the widget `require` export that points at the browser bundle
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- build-system, devtools
调研方向
Start with packages/widget/package.json and inspect its exports, main, and dist/chatcops.min.js entries; then read CONTRIBUTING.md for the pnpm build workflow. Check the root package scripts and CI configuration to see how the three packages are built and validated. Done when publint passes for core, server, and widget, the widget export has only types and import, the quick start script tag still works, and a patch changeset is added.
由索引模型根据 Issue 内容生成。
描述
packages/widget/package.json maps require to ./dist/chatcops.min.js (line 13). That file is the IIFE for script tags: it assigns window.ChatCops and never sets module.exports. The package is also "type": "module", so Node loads that file as ESM anyway. require('@chatcops/widget') therefore never returns the widget API.
What to do
- Remove the
requirecondition, so CommonJS consumers get a clear error (or use Node'srequire(esm)on theimportfile) instead of a silent empty object. - Leave
mainand thedist/chatcops.min.jspath alone: the CDN snippet in the docs links to that file directly. - Add
publintas a root dev dependency and apnpm publintscript that checks all three packages, and run it in CI after the build.
Acceptance criteria
-
exports["."]in the widget hastypesandimportonly -
pnpm publintpasses for core, server and widget (fix or explain anything else it reports) - The script tag snippet from the quick start still works with the built file
- Changeset for
@chatcops/widget(patch)
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 4 小时 11 分钟
- 30 天内合并 PR
- 122
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
enhancement hacktoberfest help wanted server
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
Document the pre-chat form可能已有人在做 @masyarakatai 于 4 天前认领。 未关闭documentation good first issue hacktoberfest widget
难度 2/5 1-3 小时 新手友好度 88/100
codercops/chatcops#70 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement hacktoberfest help wanted server
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
Create @chatcops/store-redis for Upstash and other Redis clients可能已有人在做 @bhushan4work 今天认领。 未关闭enhancement hacktoberfest help wanted server
codercops/chatcops#248 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement hacktoberfest help wanted server
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
Area/Cloud Needs Triage Type/Bug
难度 1/5 1-3 小时 新手友好度 86/100
wso2/product-integrator#2847 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
bluesky-social/social-app#12118 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
heygen-com/hyperframes#6021 ·
维护者通常 1 天内回复
-
check:passed streams:edit
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复