Skip to content

support package:module#1372

Merged
pelikhan merged 1 commit intomainfrom
support-for-module-projects
Mar 24, 2025
Merged

support package:module#1372
pelikhan merged 1 commit intomainfrom
support-for-module-projects

Conversation

@pelikhan
Copy link
Copy Markdown
Member

@pelikhan pelikhan commented Mar 24, 2025


Summary of Changes

Core Enhancements

  • 🛠️ Added debug logging to evalPrompt, callExpander, and importPrompt functions for improved traceability and troubleshooting.
  • 🗺️ Enhanced source map generation in evalPrompt with detailed debug logs and better handling of source paths.
  • 📦 Updated callExpander to check the type field in package.json for module type detection, enabling support for ESM-based workflows.

Module Sample Additions

  • ✨ Introduced a new modulesample package with:
    • A poem-js-module.genai.js script demonstrating the use of ESM and ini parsing.
    • A package.json file defining the package as an ESM module and including scripts for testing (yarn genai poem-js-module).
  • 📄 Added .gitignore for the modulesample/genaiscript folder to exclude specific configuration files.

Workflow Updates

  • ✅ Expanded the GitHub Actions build workflow to include a new test step (yarn test:modulesamples) for validating the newly added module sample.

Error Handling Improvements

  • 🚨 Improved error handling in importFile with additional debug logs for module resolution and import failures.

These changes enhance debugging capabilities, expand support for ESM workflows, and introduce a new module-based sample for testing and demonstration.

AI-generated content by prd may be incorrect


GitHub Pull Request Changes:

  1. High-Level Updates

    • 👨💻 Added debug utilities in evalprompt.ts, enhancing traceability for prompt evaluations.

      ➡️ Enhanced logging features to track prompt resolution steps.
  2. New Functionality

    • 📚 New INI file parsing added to poem-js-module.genai.js, enabling configuration parameter access.

      ← Expanded capabilities for extracting and using external variables in poem generation.
  3. Refactoring Initiatives

    • 🔧 Updated .gitignore in genaiscript folder, focusing on TypeScript configs.

      ➡️ Improved dev environment setup by excluding non-canonical configuration files.
  4. Testing Integration

    • 🛠️ Added "test" script to package.json, now accessible via yarn test genai,

      ⇧ Introducing a structured testing environment for module evaluation and function tests.
  5. Cross-Dependency Fixes

    • 🔄 Added import for JSON handling in expander.ts and utility debug functions.

      ⇦ Likely improving error tracking and project-related file system management.
  6. Testing Automation

    • 💡 Introduced a test script pointing to an existing CLI (yarn genai poem-js-module).

      ⤴ enables running automated tests for module functionality during future deployments or debugging sessions.

AI-generated content by pr-describe may be incorrect

@pelikhan pelikhan merged commit 8667fdf into main Mar 24, 2025
15 checks passed
@pelikhan pelikhan deleted the support-for-module-projects branch March 24, 2025 20:30
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.

1 participant