Fix the widget `require` export that points at the browser bundle
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- build-system, devtools
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 7
- Merge medio
- 4 h 11 min
- PR fusionados (30 d)
- 122
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/chatcops
-
enhancement hacktoberfest help wanted server
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Document the pre-chat formPosiblemente ocupada @masyarakatai la tomó hace 4 días. Abiertodocumentation good first issue hacktoberfest widget
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
codercops/chatcops#70 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
enhancement hacktoberfest help wanted server
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Create @chatcops/store-redis for Upstash and other Redis clientsPosiblemente ocupada @bhushan4work la tomó hoy. Abiertoenhancement hacktoberfest help wanted server
codercops/chatcops#248 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
enhancement hacktoberfest help wanted server
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/chatcops
Issues similares
-
area: repo priority: P2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
appandflow/stim#4107 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 1-3 horas Aptitud para principiantes 60/100
lingdojo/kana-dojo#32859 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/gh-aw-firewall#10364 ·
Los mantenedores suelen responder en 1 día
-
Merge the duplicate kaffir_corn record into sorghumPosiblemente ocupada @Crypto-Shroom la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
drizzle-team/drizzle-orm#6552 ·
Los mantenedores suelen responder en 2 días