Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Fix the widget `require` export that points at the browser bundle

Fechada
#179 0 comentários 0 reações 0 responsáveis Ver no GitHub

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

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

bug good first issue hacktoberfest widget

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 require condition, so CommonJS consumers get a clear error (or use Node's require(esm) on the import file) instead of a silent empty object.
  • Leave main and the dist/chatcops.min.js path alone: the CDN snippet in the docs links to that file directly.
  • Add publint as a root dev dependency and a pnpm publint script that checks all three packages, and run it in CI after the build.

Acceptance criteria

  • exports["."] in the widget has types and import only
  • pnpm publint passes 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

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codercops/chatcops

Todas as issues de codercops/chatcops

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.