Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .changeset/config.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@effect-aws/client-account": "1.10.9",
"@effect-aws/client-api-gateway": "1.10.9",
"@effect-aws/client-api-gateway-management-api": "1.10.9",
"@effect-aws/client-api-gateway-v2": "1.10.9",
"@effect-aws/client-athena": "1.10.9",
"@effect-aws/client-auto-scaling": "1.10.9",
"@effect-aws/client-bedrock": "1.10.9",
"@effect-aws/client-bedrock-runtime": "1.10.9",
"@effect-aws/client-cloudformation": "1.10.9",
"@effect-aws/client-cloudsearch": "1.10.9",
"@effect-aws/client-cloudtrail": "1.10.9",
"@effect-aws/client-cloudwatch": "1.10.9",
"@effect-aws/client-cloudwatch-events": "1.10.9",
"@effect-aws/client-cloudwatch-logs": "1.10.9",
"@effect-aws/client-codedeploy": "1.10.9",
"@effect-aws/client-cognito-identity-provider": "1.10.9",
"@effect-aws/client-data-pipeline": "1.10.9",
"@effect-aws/client-dsql": "1.10.9",
"@effect-aws/client-dynamodb": "1.10.9",
"@effect-aws/client-ec2": "1.10.9",
"@effect-aws/client-ecr": "1.10.9",
"@effect-aws/client-ecs": "1.10.9",
"@effect-aws/client-elasticache": "1.10.9",
"@effect-aws/client-eventbridge": "1.10.9",
"@effect-aws/client-firehose": "1.10.9",
"@effect-aws/client-glue": "1.10.9",
"@effect-aws/client-iam": "1.10.9",
"@effect-aws/client-iot": "1.10.9",
"@effect-aws/client-iot-data-plane": "1.10.9",
"@effect-aws/client-iot-events": "1.10.9",
"@effect-aws/client-iot-events-data": "1.10.9",
"@effect-aws/client-iot-jobs-data-plane": "1.10.9",
"@effect-aws/client-iot-wireless": "1.10.9",
"@effect-aws/client-ivs": "1.10.9",
"@effect-aws/client-kafka": "1.10.9",
"@effect-aws/client-kafkaconnect": "1.10.9",
"@effect-aws/client-kinesis": "1.10.9",
"@effect-aws/client-kms": "1.10.9",
"@effect-aws/client-lambda": "1.10.9",
"@effect-aws/client-mq": "1.10.9",
"@effect-aws/client-opensearch": "1.10.9",
"@effect-aws/client-opensearch-serverless": "1.10.9",
"@effect-aws/client-organizations": "1.10.9",
"@effect-aws/client-rds": "1.10.9",
"@effect-aws/client-s3": "1.10.9",
"@effect-aws/client-scheduler": "1.10.9",
"@effect-aws/client-secrets-manager": "1.10.9",
"@effect-aws/client-ses": "1.10.9",
"@effect-aws/client-sfn": "1.10.9",
"@effect-aws/client-sns": "1.10.9",
"@effect-aws/client-sqs": "1.10.9",
"@effect-aws/client-ssm": "1.10.9",
"@effect-aws/client-sts": "1.10.9",
"@effect-aws/client-textract": "1.10.9",
"@effect-aws/client-timestream-influxdb": "1.10.9",
"@effect-aws/client-timestream-query": "1.10.9",
"@effect-aws/client-timestream-write": "1.10.9",
"@effect-aws/commons": "0.3.1",
"@effect-aws/dsql": "0.1.0",
"@effect-aws/dynamodb": "1.0.3",
"@effect-aws/http-handler": "0.1.2",
"@effect-aws/lambda": "1.5.2",
"@effect-aws/powertools-logger": "1.5.1",
"@effect-aws/powertools-tracer": "1.0.1",
"@effect-aws/s3": "0.2.6",
"@effect-aws/secrets-manager": "1.3.3",
"@effect-aws/ssm": "1.3.6"
},
"changesets": []
}
71 changes: 71 additions & 0 deletions .changeset/sour-parents-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
"@effect-aws/client-api-gateway-management-api": major
"@effect-aws/client-cognito-identity-provider": major
"@effect-aws/client-opensearch-serverless": major
"@effect-aws/client-iot-jobs-data-plane": major
"@effect-aws/client-timestream-influxdb": major
"@effect-aws/client-cloudwatch-events": major
"@effect-aws/client-timestream-query": major
"@effect-aws/client-timestream-write": major
"@effect-aws/client-bedrock-runtime": major
"@effect-aws/client-cloudwatch-logs": major
"@effect-aws/client-iot-events-data": major
"@effect-aws/client-secrets-manager": major
"@effect-aws/client-api-gateway-v2": major
"@effect-aws/client-cloudformation": major
"@effect-aws/client-iot-data-plane": major
"@effect-aws/client-data-pipeline": major
"@effect-aws/client-organizations": major
"@effect-aws/client-auto-scaling": major
"@effect-aws/client-iot-wireless": major
"@effect-aws/client-kafkaconnect": major
"@effect-aws/client-api-gateway": major
"@effect-aws/client-cloudsearch": major
"@effect-aws/client-elasticache": major
"@effect-aws/client-eventbridge": major
"@effect-aws/client-cloudtrail": major
"@effect-aws/client-cloudwatch": major
"@effect-aws/client-codedeploy": major
"@effect-aws/client-iot-events": major
"@effect-aws/client-opensearch": major
"@effect-aws/powertools-logger": major
"@effect-aws/powertools-tracer": major
"@effect-aws/client-scheduler": major
"@effect-aws/client-dynamodb": major
"@effect-aws/client-firehose": major
"@effect-aws/client-textract": major
"@effect-aws/secrets-manager": major
"@effect-aws/client-account": major
"@effect-aws/client-bedrock": major
"@effect-aws/client-kinesis": major
"@effect-aws/client-athena": major
"@effect-aws/client-lambda": major
"@effect-aws/client-kafka": major
"@effect-aws/http-handler": major
"@effect-aws/client-dsql": major
"@effect-aws/client-glue": major
"@effect-aws/client-ec2": major
"@effect-aws/client-ecr": major
"@effect-aws/client-ecs": major
"@effect-aws/client-iam": major
"@effect-aws/client-iot": major
"@effect-aws/client-ivs": major
"@effect-aws/client-kms": major
"@effect-aws/client-rds": major
"@effect-aws/client-ses": major
"@effect-aws/client-sfn": major
"@effect-aws/client-sns": major
"@effect-aws/client-sqs": major
"@effect-aws/client-ssm": major
"@effect-aws/client-sts": major
"@effect-aws/client-mq": major
"@effect-aws/client-s3": major
"@effect-aws/dynamodb": major
"@effect-aws/commons": major
"@effect-aws/lambda": major
"@effect-aws/dsql": major
"@effect-aws/ssm": major
"@effect-aws/s3": major
---

Migrate to effect v4
80 changes: 80 additions & 0 deletions .github/agents/code-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Code Style & Formatting

Formatting is enforced by `@effect/eslint-plugin` (dprint integration), not Prettier. Run `pnpm eslint --fix` to auto-format.

## Formatting Rules

| Rule | Value |
|---|---|
| Indent | 2 spaces |
| Line width | 120 characters |
| Semicolons | Always |
| Quotes | Double quotes |
| Trailing commas | Multiline only |
| Arrow function parens | Always (`force`) |
| Quote props | As needed |

## Imports

```typescript
// 1. Use `import type` for type-only imports
import type { S3ClientConfig } from "@aws-sdk/client-s3";

// 2. Internal imports use .js extension
import { Service } from "./Service.js";

// 3. Effect modules: destructure from "effect" or namespace from subpath
import { Data, Effect, Layer } from "effect";
import * as Effect from "effect/Effect"; // alternative

// 4. Newline required after import block (import/newline-after-import)
// 5. No duplicate imports (import/no-duplicates)
```

Import sort order is not enforced (simple-import-sort is OFF).

## Type Conventions

```typescript
// Use Array<T>, not T[]
const items: Array<string> = [];
const nested: Array<Array<number>> = [];

// Destructure keys must be sorted alphabetically
const { alpha, beta, gamma } = obj; // correct
const { gamma, alpha, beta } = obj; // ESLint error

// Unused variables: prefix with _ to suppress error
const _unused = someValue;
function handler(_event: Event) { ... }

// Object shorthand required
const obj = { name, value }; // correct
const obj = { name: name }; // ESLint error
```

## Naming

- Service classes: PascalCase (`S3Service`, `DynamoDBDocumentService`)
- Service interfaces: PascalCase with `$` suffix (`S3Service$`, `DynamoDBDocumentService$`)
- Service factories: camelCase with `make` prefix (`makeS3Service`)
- Error types: PascalCase (`NoSuchKeyError`, `SdkError`)
- Tag identifiers: scoped string (`"@effect-aws/client-s3/S3Service"`)

## Module Exports

```typescript
// index.ts -- namespace re-export for modules, barrel re-export for types
export * as Service from "./Service.js";
export * from "./Errors.js";
```

All public exports require JSDoc `@since` annotations for `@effect/docgen`:

```typescript
/**
* @since 1.0.0
* @category constructors
*/
export const make = ...
```
55 changes: 55 additions & 0 deletions .github/agents/codegen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Code Generation & Projen

## Projen (Project Configuration)

This monorepo uses [Projen](https://projen.io/) for infrastructure-as-code project management. All project config (package.json, tsconfig, vitest config, etc.) is generated from `.projenrc.ts`.

**Rules:**
- Edit `.projenrc.ts` (or files in `projenrc/`) to change project structure, deps, or config.
- Run `pnpm default` after any change -- this synthesizes all managed files.
- Files with `// ~~ Generated by projen` headers must not be edited manually.

### Adding a new package

1. Add the package definition in `.projenrc.ts` using `TypeScriptLibProject`.
2. Set `workspaceDeps` for internal dependencies and `workspacePeerDeps` for peer relationships.
3. Run `pnpm default` to generate the package scaffolding.

## Code Generation (AWS Client Wrappers)

The `packages/client-*` packages are auto-generated from AWS SDK v3 client definitions. **Never edit files in `packages/client-*/src/`** -- they will be overwritten.

### Adding a new AWS client

```bash
# 1. Add the service definition to the registry
# Edit scripts/client-singularities.ts -- add description + commandToTest

# 2. If the SDK package name needs normalization (e.g., apigatewayv2 -> api-gateway-v2),
# update scripts/utils.ts

# 3. Regenerate project structure
pnpm default

# 4. Generate the client wrapper code (interactive CLI)
pnpm codegen-client

# 5. Format the generated code
pnpm eslint --fix
```

### What gets generated

For each client, the codegen produces:

| File | Contents |
|---|---|
| `{Service}Service.ts` | Service interface, factory, Tag class with `defaultLayer`/`layer`/`baseLayer` |
| `{Service}ServiceConfig.ts` | Configuration layer for the AWS SDK client |
| `{Service}ClientInstance.ts` | Client instance layer wrapping the raw SDK client |
| `Errors.ts` | Tagged error types derived from SDK `ServiceException` subclasses |
| `index.ts` | Public re-exports |

### Modifying generated client behavior

If you need to customize a generated client (e.g., `client-s3` has extra deps like `@aws-sdk/s3-request-presigner`), add special-case logic in `.projenrc.ts` rather than editing the generated source.
Loading