Skip to content

Conversation

finnvoor
Copy link
Contributor

@finnvoor finnvoor commented Oct 1, 2025

Motivation

Docs mention:

// Only remap the environment variables, not the JSON config
let keyMappedEnvProvider = KeyMappingProvider(upstream: envProvider) { key in
    key.prepending(["myapp", "prod"])
}

but prepending(_:)/appending(_:) were internal.

Modifications

Switched internal to public.

Result

KeyMappingProvider is easier to use :-)

Test Plan

n/a

@czechboy0
Copy link
Contributor

Thanks for the PR, @finnvoor - I'll take a look next week, attending ServerSide.Swift in London this week.

Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Thanks @finnvoor - I agree it'll be useful to make these public, let's just duplicate the first one and only publicize a non-optional variant.

@finnvoor finnvoor force-pushed the main branch 2 times, most recently from 7e74564 to f2bf83b Compare October 7, 2025 17:45
@czechboy0
Copy link
Contributor

Could you add a few unit tests for these two methods please? To make sure the path and context get combined correctly.

@finnvoor
Copy link
Contributor Author

Could you add a few unit tests for these two methods please? To make sure the path and context get combined correctly.

done, note swift-format also updated Examples/hello-world-cli-example/Package.swift

Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

lgtm, thank you @finnvoor 👏

@czechboy0 czechboy0 enabled auto-merge (squash) October 16, 2025 18:04
@czechboy0 czechboy0 added the 🆕 semver/minor Adds new public API. label Oct 16, 2025
@czechboy0 czechboy0 merged commit 6a0e3dd into apple:main Oct 16, 2025
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants