Repository navigation
chore: Bump Imposter from 0.2.23 to 1.0.1 - #897
dependabot[bot] wants to merge 1 commit into
Conversation
--- updated-dependencies: - dependency-name: Imposter dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
Superseded by #902. |
🚀 Benchmark ResultsDetails
Details
Details
Details
Details
Details
|
Updated Imposter from 0.2.23 to 1.0.1.
Release notes
Sourced from Imposter's releases.
1.0.1
Fixes
Arg<int>.Is(5),_ => { }and$GITHUB_OUTPUTreached the package asArg\<int>,\_ =>and$GITHUB\_OUTPUT. A small script in the repository now drops only the markup the notes use, and the package smoke test checks the converted text on every pull request.No change to the generator or the runtime API.
1.0.0
Imposter 1.0.0 is the first stable release. The package is the same single
Imposterpackage as the 0.2.x line, with the generator and theImposter.Abstractionsruntime inside, and 0.2.27 upgrades to it without code changes.What 1.0.0 commits to
Imposter.Abstractions: theGenerateImposterattribute,Argand the span and out matchers,Count,ImposterMode,IHaveImposterInstance<T>withInstance(), and the two exceptions. See the Key API Reference.TypeCaster,SpanElementsComparer<T>andSetupCollection<T>are public because generated imposters call them, but they are hidden from IntelliSense and may change with the generator in the same package.Changes since 0.2.27
TypeCasterandSpanElementsComparer<T>carryEditorBrowsable(Never)likeSetupCollection<T>; the Key API Reference gains an "Imposter Instance" section forIHaveImposterInstance<T>andInstance()._lastestInvocationImposterfield is now spelled_latestInvocationImposter(#394, closes #390). The field is private to the generated class, so nothing changes for callers.0.2.27
Maintenance
$GITHUB_OUTPUTwith a fixedEOFdelimiter is gone, so a release body that contains a line of exactlyEOFcan no longer truncate the notes or fail the job. With #387, this is the first release whose notes reach the package through the file-based path, and it exercises that path end to end. No change to the generator or the runtime API.0.2.26
Fixes
Setups that aren't configured yet no longer hide configured ones (#383, closes #381). A method setup took part in matching as soon as its arguments were given, before
Returns,ThrowsorCallbackconfigured it. Until then, a matching call returned the default value or threwMissingImposterException, even when an older setup had an outcome. That could happen in three ways:imposter.Get(Arg<int>.Is(5)).Called(Count.Once()), which made laterGet(5)calls lose an earlierReturns;A call now uses the newest matching setup that has an outcome. A setup without one is used only when nothing configured matches, so a bare void setup still allows its call in explicit mode. Behaviour change: a newer bare setup no longer overrides an older
ThrowsorCallbackfor the same arguments. To make such a case do nothing, give its setup an empty callback:.Callback(_ => { }).Maintenance
using(#385, closes #384). No behaviour change.0.2.25
Performance
Calls no longer allocate to find their setup (#376, closes #371). Looking up the matching setup used to enumerate a concurrent stack, which allocated on every call. Setups now live in a
SetupCollection<T>that's enumerated without allocating, and the newest matching setup still wins. Bytes per call:SetupCollection<T>is a new public type inImposter.Abstractions, for generated code only. It's hidden from IntelliSense.Less generator work on every edit (#377, closes #370). The generator now chooses each type parameter's generated name once per symbol. It writes types with no renamed type parameter directly. This drops the allocations of the incremental run after an edit by 20% for plain targets and by half for generic ones, and the generated code is unchanged.
Maintenance
benchmarks/Imposter.GeneratorBenchmarks) measures cold and incremental runs (#377, #382, closes #374).0.2.24
Fixes
Type parameters named
await,file,required,scopedorextension(#378, closes #369). A target or method type parameter with one of these names made the imposter fail to compile:fileandrequiredfrom C# 11, read as modifiers;extensionfrom C# 14, read as an extension block;scopedfrom C# 11;awaitin async methods.A type parameter named like any contextual keyword your compiler knows now takes another name in generated code, as
var,_,recordandpartialalready did. That covers keywords later compilers add, such as the C# 15 preview'sclosedandunion. You still write the imposter and its setups with your own type arguments, and dedicated namespaces keep the original names.Method type parameters named like members of their generated types (#373, closes #349). A generic method whose type parameter was named
Invoke,Returns,Matches,As,Callback,Then,Resultor another member of the types generated for it failed with CS0102. Such a type parameter now takes another name in generated code; your setups don't change.Maintenance
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)