Releases: CXuesong/WikiClientLibrary
Releases · CXuesong/WikiClientLibrary
v0.9.0-int.2
WCL package
New features
- Added
PageHelper
class andWikiClientHelper
class to provide some opinionated but could-be-useful methods for- stripping the bracketed part from disambiguation page titles
- computing SHA-1 hash from a string containing the page content, with limited local page content normalization support.
- generating
User-Agent
header with reflection information from the providedAssembly
object.
These utilities used to exist in an old NuGet package named CXuesong.MW.WikiClientLibrary.Bots.
API changes
- Pushed down
AccountInfo.Block*
properties into a stand-aloneAccountBlockInfo
object stored inAccountInfo.BlockInfo
property.- Also added the rest of properties for the block detail, including
AccountBlockInfo.BlockComponents
for composite blocks. - Breaking change: Removed the old
AccountInfo.Block*
properties in this version.
- Also added the rest of properties for the block detail, including
- Preset
AutomaticDecompression
of the defaultHttpClientHandler
used inWikiClient
class toAll
. This will enable Brotli compression support when sending MW API requests.
Bug fixes
MediaWikiHelper.JoinValues<T>
has not been correctly switching delimiter to\u001F
, when there are one or more items containing pipe character (|
).
v0.9.0-int.1
- Migrated JSON framework dependency from
Newtonsoft.Json
toSystem.Text.Json
v8.0.- This is a major breaking change as planned in #108 (Yes it's happening now)
- All the
Newtonsoft.Json.Linq
public APIs are completely replaced bySystem.Text.Json.Nodes
API. - While most of the regression tests have passed (except those running against FANDOM/Wikia due to "readonly" error), there could be still bugs needing to be smoothed out. Expect
Exception
s to occur.- WCL Flow package is only migrated on a can-compile basis - StructuredDiscussion already has been deprecated.
- Meanwhile on dman Wiki
readonly: The wiki is currently in read-only mode. Our main datacenter is down, you are accessing our backup datacenter. We are working to fix the problem.
- We are going to eventually upgrade the
System.Text.Json
package to v9.0 after it enters stable release phase, because WCL Wikibase package depends on theJsonSerializer.DeserializeAsyncEnumerable[TValue]
API.- This means for now, WCL Wikibase package will be aggressively referencing the v9.0.0-preview.7 package.
- You can still consume WCL packages on .NET 6.0. Referencing WCL packages will automatically reference
System.Text.Json
v8.0 NuGet package, though.
- Converted all of the JSON contract object to leverage the new
init
accessor of the property andrequired
keyword. Also marked them all assealed
. - Added
MediaWikiReadOnlyException
to map thereadonly
MediaWiki API error code.
While we are still in the process of plugging the latest int
package in various projects, If you are experiencing any difficulty adopting this breaking change, feel free to open an issue. Thanks!
v0.9.0-int.0
- Dropped support for .NET Standard 2.1. Now WCL is targeting .NET 6.0/8.0. (#108)
- Revision IDs need to be
long
everywhere. (#113 by @mormegil-cz )
v0.8.0
v0.8.0-int.9
v0.8.0-int.8
- Added .NET 8.0 as target SDK. We are going to remove support for .NET Standard 2.1 in the next pre-release. (#108)
- Added
FilesGenerator
(#101 by @ashotjanibekyan) - Added
MyWatchlistGenerator
(#102 by @ashotjanibekyan) - Added
PagesWithPropGenerator
(#103 by @ashotjanibekyan) - Introduced
WikiPage.EditAsync
/EditSectionAsync
/AddSectionAsync
for Wiki page editing with more control (#99)- Deprecated the property setter of
WikiPage.Content
in favor ofWikiPage.EditAsync
.
- Deprecated the property setter of
Full Changelog: v0.8.0-int.7...v0.8.0-int.8
v0.8.0-int.7
- Add
token
parameter inScribuntoConsole.InvokeApiAsync
calls since MW 1.40.0-wmf.5 (wikimedia/mediawiki-extensions-Scribunto@0f25852). (6c2e2c0) - Bug fix:
WbTime.FromDateTime/FromDateTimeOffset
incorrectly loads the DateTime(Offset) components. (#98)
v0.8.0-int.6
- Bug fix:
QueryPageGenerator.EnumItemsAsync
haven't ever been working before. (#92)QueryPageGenerator
now yields a sequence ofQueryPageResultItem
instead ofWikiPageStub
.
- Bug fix: False-positive warnings on interwiki prefix casing violation "Interwiki prefix must be all lower-case".
v0.8.0-int.5
v0.8.0-int.4
- Added
FileUsageGenerator
. (#87 thanks to @User123698745)