Skip to content

Refactor and update dependencies for LanguageTags library - #67

Merged
ptr727 merged 10 commits into
developfrom
template
Jan 30, 2026
Merged

Refactor and update dependencies for LanguageTags library#67
ptr727 merged 10 commits into
developfrom
template

Conversation

@ptr727

Copy link
Copy Markdown
Owner

Enhance the LanguageTags library with refactoring for better encapsulation, asynchronous operations, and improved logging. Update various dependencies, including actions and NuGet packages, to their latest versions. Add tests for new functionalities and improve documentation for clarity.

ptr727and others added 8 commits January 4, 2026 20:08
* Bump actions/checkout from 4 to 5 in the actions-deps group
Bumps the actions-deps group with 1 update: [actions/checkout](https://github.com/actions/checkout).
Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump the nuget-deps group with 3 updates
Bumps csharpier from 1.1.1 to 1.1.2
Bumps xunit.analyzers from 1.23.0 to 1.24.0
Bumps xunit.runner.visualstudio from 3.1.3 to 3.1.4
---
updated-dependencies:
- dependency-name: csharpier
dependency-version: 1.1.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
- dependency-name: xunit.analyzers
dependency-version: 1.24.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: nuget-deps
- dependency-name: xunit.runner.visualstudio
dependency-version: 3.1.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump the nuget-deps group with 1 update
Bumps AwesomeAssertions from 9.1.0 to 9.2.0
---
updated-dependencies:
- dependency-name: AwesomeAssertions
dependency-version: 9.2.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump the nuget-deps group with 1 update
Bumps xunit.runner.visualstudio from 3.1.4 to 3.1.5
---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
dependency-version: 3.1.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump csharpier and husky
Bumps csharpier from 1.1.2 to 1.2.1
Bumps husky from 0.7.2 to 0.8.0
---
updated-dependencies:
- dependency-name: csharpier
dependency-version: 1.2.1
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: nuget-deps
- dependency-name: husky
dependency-version: 0.8.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump Serilog.Sinks.Console from 6.0.0 to 6.1.1
---
updated-dependencies:
- dependency-name: Serilog.Sinks.Console
dependency-version: 6.1.1
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update dependencies
* Bump the nuget-deps group with 1 update
Bumps csharpier from 1.2.1 to 1.2.3
---
updated-dependencies:
- dependency-name: csharpier
dependency-version: 1.2.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump the actions-deps group across 1 directory with 3 updates (#48)
Bumps the actions-deps group with 3 updates in the / directory: [actions/setup-dotnet](https://github.com/actions/setup-dotnet), [actions/checkout](https://github.com/actions/checkout) and [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).
Updates `actions/setup-dotnet` from 4 to 5
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](actions/setup-dotnet@v4...v5)
Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)
Updates `peter-evans/create-pull-request` from 7 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v7...v8)
---
updated-dependencies:
- dependency-name: actions/setup-dotnet
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions-deps
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions-deps
- dependency-name: peter-evans/create-pull-request
dependency-version: '8'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump the nuget-deps group with 1 update
Bumps csharpier from 1.2.3 to 1.2.4
---
updated-dependencies:
- dependency-name: csharpier
dependency-version: 1.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump the nuget-deps group with 1 update
Bumps csharpier from 1.2.4 to 1.2.5
---
updated-dependencies:
- dependency-name: csharpier
dependency-version: 1.2.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: nuget-deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Add AOT support, document code and add test cases with help from copilot
* Add version history
* readme
* Fix missing `},` and enable docs generation
* dotnet 10
* install husky
* lf
* crlf
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ptr727 <2061579+ptr727@users.noreply.github.com>
- Change Rfc5646Record to a sealed record for better encapsulation.
- Add tests for null or empty input handling in Iso6392 and Iso6393.
- Enhance LanguageLookupTests with case-insensitive tag comparison and validation for null inputs.
- Extend LanguageTagBuilderTests to include multiple variant additions and null checks.
- Improve LanguageTagTests with new tests for ExtensionTag and PrivateUseTag constructors and equality.
- Add tests for Rfc5646Data to check file date and null input handling.
- Update README.md for improved clarity on build status, usage, and references.
…mmand line handling
- Changed `Iso6392Data`, `Iso6393Data`, and `Rfc5646Data` classes to be sealed for better performance and clarity.
- Updated logging configuration to use Serilog with improved context handling.
- Introduced a new command line interface for downloading and generating language tag data.
- Added options for configuring logging behavior and file paths.
- Implemented data downloading and JSON conversion in a structured manner.
- Removed unused namespaces and improved code organization across various files.
- Added global usings and simplified test project structure.
…enhanced logging
- Updated LanguageSchema to provide asynchronous file writing with WriteFileAsync.
- Enhanced LanguageTag and LanguageTagParser to support parsing with logging options.
- Introduced LogOptions for global logging configuration and integrated logging into parsing and data loading processes.
- Converted data loading and saving methods in Rfc5646Data, Iso6392Data, and Iso6393Data to asynchronous counterparts.
- Added unit tests for asynchronous loading and saving of JSON data for Iso6392Data, Iso6393Data, and Rfc5646Data.
- Improved CreateTagData to utilize asynchronous methods for data conversion and code generation.
CopilotAI review requested due to automatic review settings January 30, 2026 00:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a major refactoring of the LanguageTags library (version 1.1 → 1.2) to improve code quality, add logging support, and modernize async patterns. The changes include breaking API changes by converting all IO operations to async-only, adding comprehensive logging infrastructure using ILogger/ILoggerFactory, and refactoring the LanguageTagsCreate CLI tool with improved structure.

Changes:

  • Converted all synchronous IO APIs to async-only (LoadDataAsync, LoadJsonAsync, SaveJsonAsync, GenCodeAsync)
  • Added comprehensive logging support through Options, LogOptions, and extension methods with structured logging
  • Refactored ExtensionTag and PrivateUseTag to be immutable records with improved encapsulation
  • Restructured LanguageTagsCreate CLI with command-line parsing, improved error handling, and modular design
  • Updated GitHub Actions workflows with improved naming and task separation
  • Added extensive documentation (HISTORY.md, CODESTYLE.md, AGENTS.md) and updated README with better structure

Reviewed changes

Copilot reviewed 63 out of 66 changed files in this pull request and generated 17 comments.

Show a summary per file
FileDescription
version.jsonVersion bump from 1.1 to 1.2
README.mdMajor restructuring with improved organization, new sections for logging and installation
HISTORY.mdNew file documenting release history
CODESTYLE.mdNew comprehensive coding standards documentation
AGENTS.mdNew AI agent instructions file
LanguageTags/*.csAsync conversions, logging integration, record types for immutability
LanguageTags/Options.cs, LogOptions.cs, Extensions.csNew logging infrastructure
LanguageTagsCreate/*.csComplete refactoring with CommandLine parsing, modular design
LanguageTagsTests/*.csAsync test conversions, new test coverage for records and edge cases
.github/workflows/*.ymlWorkflow reorganization and improvements
.vscode/, .husky/, .config/*Tooling and configuration updates

Comment thread.vscode/launch.json Outdated
Comment thread.github/copilot-instructions.md Outdated
Comment threadREADME.md
Comment threadLanguageTags/LanguageTag.cs Outdated
Comment threadLanguageTags/Iso6392Data.cs Outdated
Comment threadLanguageTags/Rfc5646Data.cs Outdated
Comment threadLanguageTags/Rfc5646Data.cs Outdated
Comment threadLanguageTags/Rfc5646Data.cs Outdated
Comment threadLanguageTags/Rfc5646Data.cs Outdated
Comment threadLanguageTagsCreate/CreateTagData.cs Outdated
- Updated launch configuration to include a trailing comma for args.
- Added new language tags "ANTLR" and "datebadge" to the workspace.
- Improved asynchronous file handling in Iso6392Data and Iso6393Data classes by using await using for file streams.
- Simplified record parsing logic in Iso6392Data and Iso6393Data to reduce redundancy.
- Enhanced error handling for invalid records in both classes.
- Updated Rfc5646Data to improve async file operations and error logging.
- Refactored CreateTagData to streamline HTTP stream handling and file writing.
- Modified ExtensionTag to return an empty string when tags are empty.
- Added unit test for ExtensionTag to verify empty tag behavior.
CopilotAI review requested due to automatic review settings January 30, 2026 01:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 64 out of 65 changed files in this pull request and generated 7 comments.

Comment threadLanguageTags/Iso6392Data.cs
Comment threadLanguageTags/Iso6392Data.cs
Comment threadLanguageTags/Iso6393Data.cs
Comment threadLanguageTags/Iso6393Data.cs
Comment threadLanguageTags/Rfc5646Data.cs
Comment threadLanguageTags/Rfc5646Data.cs
Comment threadLanguageTagsCreate/CreateTagData.cs
@ptr727
ptr727 merged commit 3b2da08 into developJan 30, 2026
14 checks passed
@ptr727
ptr727 deleted the template branch January 30, 2026 01:53
Sign up for freeto 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

@ptr727