feat: Custom events & optimizations#159
Conversation
…ing and sending stats
…d functionality and code clarity
…DiscordAnalytics class
… method of DiscordAnalytics class
…dling in DiscordAnalytics class
…ytics class (eris)
|
Warning Don't merge the pull request because the api is currently not compatible with the new custom events |
Nonolanlan1007
left a comment
There was a problem hiding this comment.
Il faut faire gaffe, la plupart de mes review concernent l'ensemble du package, donc j'ai pas répété le commentaire à chaque fois.
De plus, il probablement modifier les fichiers de tests
|
j'ai pas edit les tests car je sais que tu vas tester plus tard |
…rdAnalytics classes
…ase and DiscordAnalytics classes
…s, discord.js-light, eris, oceanic) with tracking capabilities - Implemented core analytics functionality in @discordanalytics/core - Created @discordanalytics/discordjs, @discordanalytics/discordjs-light, @discordanalytics/eris, and @discordanalytics/oceanic packages - Added event tracking for interactions, guild creation, and deletion - Included API integration for sending analytics data - Configured TypeScript support and package.json for each library - Established a pnpm workspace for better package management
…ld and test steps
|
Faudra update les tokens npm pour que le npm publish work sans problème |
|
Yep, il faut que je réfléchisse à comment je vais faire. Autant pour le monorepo, que pour le token (si je dis pas de bêtises, on peut plus en avoir un à durée indéfinie). |
|
pour le monorepo: https://pnpm.io/workspaces#publishing-workspace-packages |
|
ah nop, pour write access c'est 90 days maxi |
# Conflicts: # src/discordjs/index.ts
There was a problem hiding this comment.
Pull request overview
This pull request introduces a significant architectural change by migrating the discord-analytics package to a monorepo structure. The update includes the implementation of a new core package, custom events functionality, and various optimizations to improve modularity and maintainability.
Key Changes:
- Migration to monorepo structure with separate packages for each Discord library
- Introduction of
@discordanalytics/corepackage containing base functionality - Implementation of custom events tracking with increment/decrement/set operations
- Updated API with retry logic and better error handling
- New testing infrastructure using Vitest
Reviewed changes
Copilot reviewed 49 out of 53 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/index.ts | Core analytics functionality including custom events and base class |
| packages/core/src/types.ts | Type definitions and constants for the core package |
| packages/oceanic/src/index.ts | Oceanic.js wrapper implementation |
| packages/eris/src/index.ts | Eris wrapper implementation |
| packages/discordjs/src/index.ts | Discord.js wrapper implementation |
| packages/discordjs-light/src/index.ts | Discord.js-light wrapper implementation |
| vitest.config.ts & vitest.workspace.ts | Testing configuration for the monorepo |
| .github/workflows/ci.yml | Updated CI workflow for testing |
| package.json | Root package configuration for monorepo |
| pnpm-workspace.yaml | Workspace configuration for pnpm |
Files not reviewed (2)
- packages/core/pnpm-lock.yaml: Language not supported
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 2.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Warning
Don't merge the pull request because the api is currently not compatible with the new custom events
This pull request introduces significant updates to the
discord-analyticspackage, including a migration to a monorepo structure, implementation of a new core package, and updates to documentation and configuration files. The changes aim to improve modularity, enhance functionality, and provide better documentation for users.Monorepo Migration and Core Package Introduction:
package.json: Transitioned the project to a monorepo structure by introducing workspaces and removing unnecessary dependencies and scripts. Updated the package metadata to reflect the new structure.packages/core/package.json: Added a new core package (@discordanalytics/core) as part of the monorepo structure. This package serves as the foundational library for working with Discord Analytics.packages/core/src/index.ts: Implemented the core functionality fordiscord-analytics, including theAnalyticsBaseclass for API interactions, custom event tracking, and guild statistics management.packages/core/src/types.ts: Added new types (LocaleData,GuildsStatsData) and updated constants for better API endpoint management and error handling. [1] [2]Documentation Updates:
README.md: Updated the documentation to reflect the new initialization process (analytics.init()), corrected outdated links to the new documentation site, and improved clarity for users. [1] [2] [3] [4]Dependency and Configuration Updates:
packages/core/pnpm-lock.yaml: Added a lock file for the new core package, ensuring consistent dependency management across environments.