Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 8, 2025

🤖 Automated fix by Claude Code

Related Issue: #15
Executed by: @DavidWells


If additional fixes are needed: Mention @ claude in a comment on this PR.

resolves #15


Automated PR by Claude Code Action - Run #19196587999

This new example demonstrates how to detect changes in serverless projects within a monorepo by:
- Finding directories containing serverless.yml/serverless.ts/serverless.js files
- Detecting changes in those directories and subdirectories
- Checking for package.json modifications
- Extracting function handlers from serverless config files

Closes #15

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: David Wells <DavidWells@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 8, 2025

💬 Claude Code execution complete

📊 Execution Info: Pull Request #16 | React (286 files) | @DavidWells
🌿 Branch: claude/issue-15-20251108-1800master
ℹ️ Action Run: https://github.com/DavidWells/packages/actions/runs/19214336641

Copy link
Owner

@DavidWells DavidWells left a comment

Choose a reason for hiding this comment

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

address the comments plz thanks @claude

@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 8, 2025

Claude finished @github-actions[bot]'s task —— View job


Changes completed! ✅

Todo List:

  • Read the current implementation to understand the extract handler
  • Research configorama package and its usage
  • Update extract handler to use configorama
  • Add configorama as a dependency
  • Commit and push changes

Summary

I've successfully updated the extract handler to use the configorama npm package as requested. Here are the changes made:

1. Updated extractFunctionHandlers function (serverless-monorepo-detection.js:258)

  • Replaced manual regex-based parsing with configorama
  • The new implementation is much cleaner and more robust
  • Now handles all config formats automatically: YAML, JSON, TOML, JS/TS

2. Added configorama dependency (package.json)

  • Added "configorama": "^1.0.0" to dependencies

Benefits of using configorama:

  • Automatic parsing of multiple config formats (YAML, JSON, TOML, JS/TS)
  • No need for complex regex patterns
  • Handles variable resolution and dynamic values
  • More maintainable and reliable code

The changes have been committed and pushed to the PR branch.

--- | Branch

Replace manual regex-based parsing with configorama package which handles
YAML, JSON, TOML, and JS/TS files automatically. This makes the code
cleaner and more robust.

Co-authored-by: David Wells <DavidWells@users.noreply.github.com>
@github-actions github-actions bot added auto-generated Automatically generated content claude-code Items created or modified by Claude Code labels Nov 8, 2025
@DavidWells
Copy link
Owner

add a fixtures dir to https://github.com/DavidWells/packages/tree/master/packages/util-git-info/tests with a "monorepo" setup with sub folders with serverless.yml files

we will use this to test the new example

thanks @claude

@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 9, 2025

Claude finished @DavidWells's task —— View job


Changes completed! ✅

Todo List:

  • Read the serverless-monorepo-detection.js example to understand requirements
  • Create fixtures directory structure
  • Create monorepo subdirectories with serverless.yml files
  • Commit and push changes

Summary

I've successfully created a comprehensive test fixtures directory for the serverless monorepo example. Here's what was added:

📁 Fixture Structure:

packages/util-git-info/tests/fixtures/monorepo/
├── README.md                        # Documentation
├── service-api/                     # REST API service
│   ├── serverless.yml              # YAML config
│   └── package.json
├── service-worker/                  # Background jobs service
│   ├── serverless.yml              # YAML config
│   └── package.json
└── service-frontend/                # Frontend service
    ├── serverless.js               # JavaScript config
    └── package.json

🎯 Key Features:

  1. service-api (YAML config)

    • 5 functions: getUsers, createUser, updateUser, deleteUser, authenticateUser
    • Handler pattern: src/handlers/*.{method}
    • HTTP API endpoints with REST operations
  2. service-worker (YAML config)

    • 4 functions: processJob, scheduleJob, sendNotification, cleanupOldRecords
    • Handler pattern: handlers/*.*
    • Mix of SQS, SNS, and scheduled (cron) events
  3. service-frontend (JavaScript config)

    • 3 functions: renderPage, generateSitemap, optimizeImages
    • Handler pattern: lib/*.*
    • HTTP proxy, scheduled tasks, and S3 events

✨ Benefits:

  • Tests multiple config formats (YAML and JavaScript)
  • Realistic serverless architectures
  • Different handler patterns to test extraction logic
  • Package.json files for dependency change detection
  • Documentation for future reference

These fixtures are now ready to be used for testing the serverless-monorepo-detection example!

--- | Branch

github-actions bot and others added 3 commits November 9, 2025 20:59
- Created fixtures/monorepo directory with three sample services
- service-api: YAML config with REST API endpoints
- service-worker: YAML config with background jobs and scheduled functions
- service-frontend: JavaScript config with SSR and asset optimization
- Added package.json files to each service
- Added README documenting the fixture structure

These fixtures can be used to test the serverless-monorepo-detection example.

Co-authored-by: David Wells <DavidWells@users.noreply.github.com>
@DavidWells DavidWells merged commit a15bf9e into master Nov 10, 2025
2 checks passed
@DavidWells DavidWells deleted the claude/issue-15-20251108-1800 branch November 10, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-generated Automatically generated content claude-code Items created or modified by Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add serverless monorepo example

2 participants