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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: 10.0.x
dotnet-version: 11.0.x
- name: テスト
run: dotnet test -p:CoreTargetFramework=${{ matrix.core }}

Expand All @@ -85,7 +85,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: 10.0.x
dotnet-version: 11.0.x
- name: 書式の確認
# 崩れている場合は、ローカルで dotnet format ZipConvertCustomerBarCode.sln を実行して直す
run: dotnet format ZipConvertCustomerBarCode.sln --verify-no-changes
Expand All @@ -98,7 +98,7 @@ jobs:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: 10.0.x
dotnet-version: 11.0.x
- name: バージョン
id: version
shell: bash
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
subject-path: 'artifacts/*.nupkg'
- uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: 10.0.x
dotnet-version: 11.0.x
- name: NuGet ログイン(Trusted Publishing)
id: login
uses: NuGet/login@v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-dotnet@v6.1.0
with:
dotnet-version: 10.0.x
dotnet-version: 11.0.x
- name: デモサイトの作成
run: dotnet publish ZipConvertCustomerBarCode.Demo -c Release -o publish
- name: GitHub Pages 用に調整
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- `Span` を使うのは計測で効果があった箇所のみ(住所照合の正規化、CSV の読み込み)。`Span` を使わなくても両方で速くできる場合は、`#if` を使わず共通のコードにする。
- `ZipConvertCustomerBarCode.Drawing`: System.Drawing.Common による描画(Windows のみ)。
- `ZipConvertCustomerBarCode.SkiaSharp`: SkiaSharp による描画。名前空間は `SkiaSharp` との衝突を避けるため `ZipConvertCustomerBarCode.Skia`。
- `ZipConvertCustomerBarCode.Demo`: デモサイト(Blazor WebAssembly、net10.0、パッケージにはしない)。コアの `BarCode.Create` と `ToSvg` / `ToPrintSvg` だけを使い、郵便番号データは使わない(12万件あり、ブラウザーで読み込むには重い)。`InvariantGlobalization` で ICU を省いている(コアはカルチャに依存しない)。ソリューションに含めているので、CI の test でビルドされる。README の画面のスクリーンショットは `docs/demo.png`(NuGet のパッケージページでも表示されるよう、README からは raw.githubusercontent.com の絶対 URL で参照する)。
- `ZipConvertCustomerBarCode.Demo`: デモサイト(Blazor WebAssembly、net11.0、パッケージにはしない)。コアの `BarCode.Create` と `ToSvg` / `ToPrintSvg` だけを使い、郵便番号データは使わない(12万件あり、ブラウザーで読み込むには重い)。`InvariantGlobalization` で ICU を省いている(コアはカルチャに依存しない)。ソリューションに含めているので、CI の test でビルドされる。README の画面のスクリーンショットは `docs/demo.png`(NuGet のパッケージページでも表示されるよう、README からは raw.githubusercontent.com の絶対 URL で参照する)。
- ローカルでは `dotnet run --project ZipConvertCustomerBarCode.Demo` で起動する。Razor では `@code` が予約語なので、変数名に `code` を使わない。
- `netstandard2.0` の既定 C# は 7.3。`#if NET8_0_OR_GREATER` の外では `record` や null 許容参照型など新しい構文は使わない。
- バージョン・著作権表示・パッケージ情報は `Directory.Build.props` にまとめている。パッケージアイコン `icon.png`(128×128)は、このライブラリで作ったバーコードの先頭4シンボル(スタート + 郵便番号3桁)を縦に伸ばし、紺地に白で描いたもの。`dotnet run tools/GenerateIcon.cs -- icon.png` で生成する(色・拡大率・余白もこのスクリプトにある)。デモサイトのファビコン `ZipConvertCustomerBarCode.Demo/wwwroot/icon.png` も同じ画像なので、作り直したらコピーする。
Expand All @@ -28,7 +28,7 @@

## テスト

- `dotnet test` で実行(xUnit v3、net10.0)。`global.json` で Microsoft.Testing.Platform を指定しているため、`Microsoft.NET.Test.Sdk` や `xunit.runner.visualstudio` は追加しない。
- `dotnet test` で実行(xUnit v3、net11.0)。`global.json` で Microsoft.Testing.Platform を指定しているため、`Microsoft.NET.Test.Sdk` や `xunit.runner.visualstudio` は追加しない。
- コアは `#if` で処理が分かれるため、変更したら両方のビルドでテストする: `dotnet test`(net8.0 版)と `dotnet test -p:CoreTargetFramework=netstandard2.0`。`TargetFrameworkTests` が、指定したビルドが実際に使われていることを確認する。
- `TestData/cases.tsv` と `v1-*.png` は 1.x(.NET Framework 版)の出力で、シンボル列と画像がこれとピクセル単位で一致することを確認している。1.x がマニュアルと異なっていたケース(補足ルール対象など)は除いてあり、それらは `SupplementaryRuleTests` でマニュアルの「バーコード・データ」を期待値にしている。出力が変わる修正をした場合は、マニュアルに照らして意図した変更か確認してから期待値を更新する。
- `cases.tsv` はタブ区切り(郵便番号・住所・シンボル列・画像ファイル名)。住所が空の行があるので、シェルで加工するときは連続するタブがまとめられないよう注意する。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
郵便番号データ(utf_ken_all.csv)は大きいため使わず、コアの BarCode.Create だけで動かす
-->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
Expand All @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="11.0.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Loading