Skip to content

Refactor imports for logger#458

Merged
rido-min merged 13 commits intomainfrom
fix/docs-activity-exports
Jul 16, 2025
Merged

Refactor imports for logger#458
rido-min merged 13 commits intomainfrom
fix/docs-activity-exports

Conversation

@rido-min
Copy link
Copy Markdown
Member

This pull request includes several updates to improve module imports, streamline version management, and enhance TypeScript configuration. The most significant changes include consolidating logger imports, simplifying version handling, and updating the TypeScript configuration for better project structure.

Improvements to module imports:

Version management:

  • Updated the version reference in CopilotStudioClient to directly use the version property from package.json instead of importing the entire package JSON file. This change simplifies the code and reduces unnecessary imports.
  • Removed redundant dynamic imports of package.json files for version retrieval in startServer. Instead, the version is now statically imported for better performance and clarity. [1] [2]

TypeScript configuration:

  • Added an include property in the tsconfig.json file for the agents-copilotstudio-client package to explicitly include the src directory and package.json, ensuring proper compilation of all necessary files.

Package export updates:

  • Updated the exports field in package.json for agents-activity to simplify the path for the logger module, improving usability for consumers of the package.

These changes collectively enhance the maintainability, performance, and structure of the codebase.

Copilot AI review requested due to automatic review settings July 15, 2025 20:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors imports for logger module and improves project structure by consolidating logger import paths, updating version handling, and enhancing TypeScript configuration. The changes primarily focus on standardizing module imports for better maintainability and consistency across the codebase.

  • Consolidated logger imports to use @microsoft/agents-activity/logger instead of the previous @microsoft/agents-activity/src/logger path across 26 files
  • Updated version management to use static imports instead of dynamic imports for better performance
  • Enhanced TypeScript configuration and package exports for improved project structure

Reviewed Changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/agents-activity/package.json Updated exports field to simplify logger module path from ./src/logger to ./logger
packages/agents-hosting/src/*.ts (multiple files) Updated logger imports to use new consolidated path
packages/agents-copilotstudio-client/src/*.ts Updated logger imports and version handling
packages/agents-hosting-express/src/startServer.ts Changed from dynamic to static version import
test-agents//src/.ts Updated dynamic imports to include .js extensions
tsconfig.json files Added explicit include properties for better TypeScript compilation

Comment thread packages/agents-hosting/tsconfig.json Outdated
@rido-min rido-min requested review from JimDaly and sw-joelmut July 15, 2025 20:27
Comment thread tsconfig.json
Copy link
Copy Markdown
Collaborator

@sw-joelmut sw-joelmut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rido-min rido-min merged commit 7e5696e into main Jul 16, 2025
9 checks passed
@rido-min rido-min deleted the fix/docs-activity-exports branch July 16, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants