Skip to content

Conversation

hidetaka-dc
Copy link
Contributor

No description provided.

devin-ai-integration bot and others added 5 commits September 2, 2025 01:38
- Replace aws-sdk dependency with @aws-sdk/client-cloudfront
- Update imports to use modular v3 pattern
- Migrate to command pattern for CloudFront API calls
- Remove .promise() calls (v3 returns promises directly)
- Update TypeScript types to use v3 interfaces
- Add Jest mock for AWS SDK v3 to resolve module resolution issues
- Update Node.js engine requirement to >=14.0.0
- All unit tests passing (12/12)

Co-Authored-By: hidetaka@digitalcube.jp <hidetaka@digitalcube.jp>
- Explain why the mock exists (Jest module resolution issues)
- Document ideal solution (upgrade Jest and ts-jest)
- Specify conditions for safe removal
- Provide testing instructions for future developers

Co-Authored-By: hidetaka@digitalcube.jp <hidetaka@digitalcube.jp>
- Add examples directory for local testing
- Implement dotenv support for environment variable management
- Create unified aws-test.js script that combines all functionality
- Add config.js for centralized configuration management
- Include comprehensive README with setup instructions
- Add .gitignore to protect sensitive .env files
- Upgrade Jest from 24.9.0 to 29.7.0
- Upgrade TypeScript from 3.6.2 to 5.5.0
- Upgrade ESLint from 6.3.0 to 8.57.0
- Upgrade Rollup from 1.20.3 to 4.9.0
- Remove AWS SDK v3 mock file (no longer needed)
- Fix examples/aws-test.js to use correct eventType variable
- Update configuration files for modern toolchain
- Add ESM support and modern TypeScript features
…gration

feat: migrate AWS SDK from v2 to v3
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @hidetaka-dc, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly upgrades the lambda-edge-controller library by migrating its AWS interactions to the latest AWS SDK v3. This modernization effort not only updates core dependencies but also refines the development environment, improves code quality through updated linting and TypeScript configurations, and vastly expands the project's documentation and practical examples. The changes aim to enhance maintainability, leverage modern JavaScript features, and provide clearer guidance for users.

Highlights

  • AWS SDK v3 Migration: The core functionality of the library has been migrated from AWS SDK v2 to v3, leveraging the new modular clients and command patterns for CloudFront operations. This update improves performance and reduces bundle size.
  • Modernization of Tooling and Language Features: The project's development environment, including Node.js engine requirement (now >=18.0.0), Jest testing framework, ESLint, Rollup, and TypeScript configurations, has been updated to support modern ECMAScript 2022 features and ES Modules (ESM).
  • Enhanced Documentation and Examples: The README.md has been completely rewritten to provide comprehensive details on the library's features, API, and usage. A new examples directory, complete with its own documentation, configuration utilities, and an integration test script, has been added to showcase the library's functionality with AWS SDK v3.
  • Improved Code Quality and Type Safety: ESLint and TypeScript configurations have been updated to enforce stricter rules, such as no-unused-vars and no-explicit-any, and to improve type safety with explicit type imports from AWS SDK v3.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a significant and valuable update, migrating the project from AWS SDK v2 to v3 and modernizing the entire development toolchain, including Node.js version, TypeScript configuration, and linting rules. The documentation has also been substantially improved. My review includes a few minor suggestions to address some typos and inconsistencies for an even more polished result.

https://www.conventionalcommits.org/en/v1.0.0-beta.4/
### Prerequisites

- Node.js >= 14.0.0

Choose a reason for hiding this comment

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

medium

The required Node.js version mentioned here (>= 14.0.0) is inconsistent with the engines field in package.json, which specifies >=18.0.0. Please update the documentation to reflect the correct requirement to avoid confusion for users.

Suggested change
- Node.js >= 14.0.0
- Node.js >= 18.0.0


### 前提条件

- Node.js >= 14.0.0

Choose a reason for hiding this comment

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

medium

The required Node.js version mentioned here (>= 14.0.0) is inconsistent with the engines field in package.json, which specifies >=18.0.0. Please update the documentation to reflect the correct requirement.

Suggested change
- Node.js >= 14.0.0
- Node.js >= 18.0.0

* @return {CloudFront.Types.DistributionConfig} updated distribution config
**/
public attatchEdgeFunction (config: Types.DistributionConfig): Types.DistributionConfig {
public attatchEdgeFunction (config: DistributionConfig): DistributionConfig {

Choose a reason for hiding this comment

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

medium

There's a typo in the method name. It should be attachEdgeFunction instead of attatchEdgeFunction. Correcting this will improve code clarity and consistency, especially since it's called using the string 'attachEdge' elsewhere.

Suggested change
public attatchEdgeFunction (config: DistributionConfig): DistributionConfig {
public attachEdgeFunction (config: DistributionConfig): DistributionConfig {

@hideokamoto hideokamoto merged commit b64276d into hideokamoto:master Sep 2, 2025
@hideokamoto hideokamoto mentioned this pull request Sep 2, 2025
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.

2 participants