Skip to content

Commit 15d0820

Browse files
ncipollinaclaude
andauthored
refactor!: rename all namespaces to LayeredCraft.DynamoMapper.* (#86)
* build(deps): pin Microsoft.CodeAnalysis to 5.0.0, update remaining deps Downgrades Microsoft.CodeAnalysis.Common and Microsoft.CodeAnalysis.CSharp from 5.3.0 to 5.0.0 to work around a bug in the newer version that breaks source generator interception. Also updates AWSSDK.DynamoDBv2 (4.0.15 → 4.0.17), Scriban (6.6.0 → 7.0.0), and bumps VersionPrefix to 1.0.6. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor!: rename all namespaces to LayeredCraft.DynamoMapper.* Renames every C# namespace, using statement, and WellKnownType enum member from the old DynamoMapper.* prefix to LayeredCraft.DynamoMapper.* to align with the new NuGet package IDs (LayeredCraft.DynamoMapper and LayeredCraft.DynamoMapper.Runtime). Also sets AssemblyName and RootNamespace in both .csproj files and updates the Verify snapshot baselines to reflect the new runtime using directive in generated code. BREAKING CHANGE: All public namespaces have changed. Consumers must update their using statements from DynamoMapper.Runtime to LayeredCraft.DynamoMapper.Runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update all documentation for LayeredCraft.DynamoMapper rename Updates README.md and all docs/ pages to reflect the package rename from DynamoMapper to LayeredCraft.DynamoMapper: - Headings, titles, and NuGet badges updated to LayeredCraft.DynamoMapper - All using statements in code blocks changed to LayeredCraft.DynamoMapper.Runtime - Package install commands changed to LayeredCraft.DynamoMapper - Runtime/generator package name references updated in requirements.md - Migration callout added to README, docs/index.md, and installation.md explicitly noting this supersedes the DynamoMapper package - Changelog documents the breaking namespace/package rename Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6819c7b commit 15d0820

228 files changed

Lines changed: 625 additions & 607 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>1.0.6</VersionPrefix>
3+
<VersionPrefix>1.0.0</VersionPrefix>
44
<!-- SPDX license identifier for MIT -->
55
<PackageLicenseExpression>MIT</PackageLicenseExpression>
66
<!-- Other useful metadata -->

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
<PackageVersion Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
1010
<PackageVersion Include="AutoFixture.Xunit3" Version="4.19.0" />
1111
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
12-
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="4.0.17" />
12+
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="4.0.17.3" />
1313
<PackageVersion Include="Basic.Reference.Assemblies.Net100" Version="1.8.4" />
1414
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.4" />
1515
<PackageVersion Include="Basic.Reference.Assemblies.Net90" Version="1.8.4" />
1616
<PackageVersion Include="Humanizer.Core" Version="3.0.10" />
1717
<PackageVersion Include="LayeredCraft.SourceGeneratorTools" Version="0.1.0-beta.10" />
18-
<PackageVersion Include="Meziantou.Polyfill" Version="1.0.104" />
18+
<PackageVersion Include="Meziantou.Polyfill" Version="1.0.105" />
1919
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
2020
<PackageVersion Include="Microsoft.CodeAnalysis" Version="5.0.0" />
2121
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" />
@@ -24,7 +24,7 @@
2424
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
2525
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.201" />
2626
<PackageVersion Include="NSubstitute" Version="5.3.0" />
27-
<PackageVersion Include="Scriban" Version="7.0.0" />
27+
<PackageVersion Include="Scriban" Version="7.0.6" />
2828
<PackageVersion Include="Verify.SourceGenerators" Version="2.5.0" />
2929
<PackageVersion Include="Verify.XunitV3" Version="31.13.5" />
3030
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# DynamoMapper
1+
# LayeredCraft.DynamoMapper
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
33
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55

66
**High-performance source generator for DynamoDB attribute mapping**
77

8-
[![NuGet](https://img.shields.io/nuget/v/DynamoMapper.svg)](https://www.nuget.org/packages/DynamoMapper/)
8+
> **Migrating from `DynamoMapper`?** This package (`LayeredCraft.DynamoMapper`) is the successor to the original `DynamoMapper` NuGet package. Update your `using DynamoMapper.Runtime;` statements to `using LayeredCraft.DynamoMapper.Runtime;`.
9+
10+
[![NuGet](https://img.shields.io/nuget/v/LayeredCraft.DynamoMapper.svg)](https://www.nuget.org/packages/LayeredCraft.DynamoMapper/)
911
[![Build Status](https://github.com/LayeredCraft/dynamo-mapper/actions/workflows/build.yaml/badge.svg)](https://github.com/LayeredCraft/dynamo-mapper/actions/workflows/build.yaml)
1012
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
1113
[![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://layeredcraft.github.io/dynamo-mapper/)
@@ -29,7 +31,7 @@ DynamoMapper is a .NET incremental source generator that generates high-performa
2931
Install the NuGet package:
3032

3133
```bash
32-
dotnet add package DynamoMapper --prerelease
34+
dotnet add package LayeredCraft.DynamoMapper --prerelease
3335
```
3436

3537
Install the DynamoMapper agent skill:
@@ -66,7 +68,7 @@ public class Product
6668
### 2. Create a mapper class
6769

6870
```csharp
69-
using DynamoMapper.Runtime;
71+
using LayeredCraft.DynamoMapper.Runtime;
7072
using Amazon.DynamoDBv2.Model;
7173

7274
namespace MyApp.Data;

docs/api-reference/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Marks which constructor DynamoMapper should use when generating `FromItem` for a
9090
This attribute is applied to the **model's constructor**, not the mapper class.
9191

9292
```csharp
93-
using DynamoMapper.Runtime;
93+
using LayeredCraft.DynamoMapper.Runtime;
9494

9595
public class User
9696
{

docs/api-reference/generated-code.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ extension methods. The example below is a real-world output.
1515
1616
#nullable enable
1717

18-
using DynamoMapper.Runtime;
18+
using LayeredCraft.DynamoMapper.Runtime;
1919
using System.Collections.Generic;
2020
using Amazon.DynamoDBv2.Model;
2121

2222
namespace Trivia.Manager.Shared.Models;
2323

2424
internal static partial class DuplicateResultMapper
2525
{
26-
[global::System.CodeDom.Compiler.GeneratedCode("DynamoMapper", "1.0.0.0")]
26+
[global::System.CodeDom.Compiler.GeneratedCode("LayeredCraft.DynamoMapper", "1.0.0.0")]
2727
internal static partial global::System.Collections.Generic.Dictionary<string, global::Amazon.DynamoDBv2.Model.AttributeValue> ToItem(global::Trivia.Manager.Shared.Models.DuplicateResult duplicateResult) =>
2828
new Dictionary<string, AttributeValue>(2)
2929
.SetString("id", duplicateResult.Id, false, true)
3030
.Set("score", ScoreToAttribute(duplicateResult));
3131

32-
[global::System.CodeDom.Compiler.GeneratedCode("DynamoMapper", "1.0.0.0")]
32+
[global::System.CodeDom.Compiler.GeneratedCode("LayeredCraft.DynamoMapper", "1.0.0.0")]
3333
internal static partial global::Trivia.Manager.Shared.Models.DuplicateResult FromItem(global::System.Collections.Generic.Dictionary<string, global::Amazon.DynamoDBv2.Model.AttributeValue> item)
3434
{
3535
var duplicateResult = new global::Trivia.Manager.Shared.Models.DuplicateResult
@@ -43,7 +43,7 @@ internal static partial class DuplicateResultMapper
4343
```
4444

4545
Notes:
46-
- Generated code uses `SetX`/`GetX` helpers from `DynamoMapper.Runtime`.
46+
- Generated code uses `SetX`/`GetX` helpers from `LayeredCraft.DynamoMapper.Runtime`.
4747
- Class-level `[DynamoField]`/`[DynamoIgnore]` configuration influences argument values.
4848

4949
## Constructor-Based `FromItem`
@@ -55,7 +55,7 @@ See [Basic Mapping](../usage/basic-mapping.md#constructor-mapping-rules-fromitem
5555
constructor selection rules and gotchas.
5656

5757
```csharp
58-
[global::System.CodeDom.Compiler.GeneratedCode("DynamoMapper", "REPLACED")]
58+
[global::System.CodeDom.Compiler.GeneratedCode("LayeredCraft.DynamoMapper", "REPLACED")]
5959
public static partial global::MyNamespace.Product FromItem(
6060
global::System.Collections.Generic.Dictionary<string, global::Amazon.DynamoDBv2.Model.AttributeValue> item
6161
)

docs/api-reference/runtime-helpers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The runtime package exposes extension methods on
55

66
## Core Value Helpers
77

8-
These methods live in `DynamoMapper.Runtime` and are used by the generator.
8+
These methods live in `LayeredCraft.DynamoMapper.Runtime` and are used by the generator.
99

1010
String:
1111
- `GetString`, `GetNullableString`

docs/changelog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Changelog
22

3-
All notable changes to DynamoMapper will be documented here.
3+
All notable changes to LayeredCraft.DynamoMapper will be documented here.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
### Breaking Changes
11+
12+
- **Package renamed**: NuGet package renamed from `DynamoMapper` to `LayeredCraft.DynamoMapper`. This package supersedes `DynamoMapper`.
13+
- **Namespace renamed**: All public namespaces changed from `DynamoMapper.Runtime` to `LayeredCraft.DynamoMapper.Runtime`.
14+
- Update all `using DynamoMapper.Runtime;` to `using LayeredCraft.DynamoMapper.Runtime;`.
15+
- **Assembly renamed**: Runtime assembly is now `LayeredCraft.DynamoMapper.Runtime.dll`.
16+
1017
### Added
1118
- Nested object and nested collection mapping in the source generator.
1219
- Mapper registry lookup with inline fallback for nested types.

docs/core-concepts/how-it-works.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,22 @@ DynamoMapper generates:
129129
130130
#nullable enable
131131

132-
using DynamoMapper.Runtime;
132+
using LayeredCraft.DynamoMapper.Runtime;
133133
using System.Collections.Generic;
134134
using Amazon.DynamoDBv2.Model;
135135

136136
namespace MyApp;
137137

138138
public static partial class ProductMapper
139139
{
140-
[global::System.CodeDom.Compiler.GeneratedCode("DynamoMapper", "REPLACED")]
140+
[global::System.CodeDom.Compiler.GeneratedCode("LayeredCraft.DynamoMapper", "REPLACED")]
141141
public static partial global::System.Collections.Generic.Dictionary<string, global::Amazon.DynamoDBv2.Model.AttributeValue> ToItem(global::MyApp.Product source) =>
142142
new Dictionary<string, AttributeValue>(3)
143143
.SetGuid("productId", source.ProductId, false, true)
144144
.SetString("name", source.Name, false, true)
145145
.SetDecimal("price", source.Price, false, true);
146146

147-
[global::System.CodeDom.Compiler.GeneratedCode("DynamoMapper", "REPLACED")]
147+
[global::System.CodeDom.Compiler.GeneratedCode("LayeredCraft.DynamoMapper", "REPLACED")]
148148
public static partial global::MyApp.Product FromItem(global::System.Collections.Generic.Dictionary<string, global::Amazon.DynamoDBv2.Model.AttributeValue> item)
149149
{
150150
var product = new global::MyApp.Product

docs/examples/inheritance-mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To include inherited properties, enable the mapper option:
88
```csharp
99
using System.Collections.Generic;
1010
using Amazon.DynamoDBv2.Model;
11-
using DynamoMapper.Runtime;
11+
using LayeredCraft.DynamoMapper.Runtime;
1212

1313
namespace MyApp.Data;
1414

docs/examples/nested-mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `examples/DynamoMapper.Nested` project demonstrates:
1212
```csharp
1313
using System.Collections.Generic;
1414
using Amazon.DynamoDBv2.Model;
15-
using DynamoMapper.Runtime;
15+
using LayeredCraft.DynamoMapper.Runtime;
1616

1717
[DynamoMapper]
1818
public static partial class OrderMapper

0 commit comments

Comments
 (0)