Fix the widget `require` export that points at the browser bundle
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- node.js, typescript
- Domínio
- build-system, devtools
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 13
- Forks
- 7
- Merge médio
- 4h 11min
- PRs com merge (30d)
- 122
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codercops/chatcops
-
enhancement hacktoberfest help wanted server
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Document the pre-chat formTalvez já em andamento @masyarakatai assumiu há 4 dias. Abertadocumentation good first issue hacktoberfest widget
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
codercops/chatcops#70 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
enhancement hacktoberfest help wanted server
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
-
Create @chatcops/store-redis for Upstash and other Redis clientsTalvez já em andamento @bhushan4work assumiu hoje. Abertaenhancement hacktoberfest help wanted server
codercops/chatcops#248 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
enhancement hacktoberfest help wanted server
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
Todas as issues de codercops/chatcops
Issues semelhantes
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
mobile-next/mobile-mcp#526 ·
Mantenedores costumam responder em até 1 dia
-
e2e-failure ready-to-code
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 comentário ·
Mantenedores costumam responder em até 1 dia