Skip to content

Commit cd7825a

Browse files
authored
Merge pull request #12 from AngleSharp/devel
0.15.0 release
2 parents 98e4546 + 1d7eb12 commit cd7825a

17 files changed

+120
-125
lines changed

.github/CONTRIBUTING.md

+24-22
Original file line numberDiff line numberDiff line change
@@ -26,47 +26,50 @@ Discussion of issues should be placed transparently in the issue tracker here on
2626

2727
* [AngleSharp.Core](https://github.com/AngleSharp/AngleSharp/issues/)
2828
* [AngleSharp.Css](https://github.com/AngleSharp/AngleSharp.Css/issues/)
29+
* [AngleSharp.Diffing](https://github.com/AngleSharp/AngleSharp.Diffing/issues/)
2930
* [AngleSharp.Io](https://github.com/AngleSharp/AngleSharp.Io/issues/)
3031
* [AngleSharp.Js](https://github.com/AngleSharp/AngleSharp.Js/issues/)
3132
* [AngleSharp.Xml](https://github.com/AngleSharp/AngleSharp.Xml/issues/)
33+
* [AngleSharp.XPath](https://github.com/AngleSharp/AngleSharp.XPath/issues/)
34+
* [AngleSharp.Wasm](https://github.com/AngleSharp/AngleSharp.Wasm/issues/)
3235

3336
### Modifying the code
3437

3538
AngleSharp and its libraries uses features from the latest versions of C# (e.g., C# 7). You will therefore need a C# compiler that is up for the job.
3639

3740
1. Fork and clone the repo.
38-
2. First try to build the AngleSharp.Core libray and see if you get the tests running.
41+
2. First try to build the AngleSharp.Core library and see if you get the tests running.
3942
3. You will be required to resolve some dependencies via NuGet.
4043

4144
AngleSharp itself does not have dependencies, however, the tests are dependent on NUnit.
4245

43-
The build system of AngleSharp uses Cake. A bootstrap script (build.ps1 for Windows or build.sh for *nix systems) is included. Note, that at the moment AngleSharp may require NuGet 3.5, which looks for MSBuild pre-15, i.e., before Visual Studio 2017 on Windows systems. We aim to drop this requirement enitirely soon.
46+
The build system of AngleSharp uses Cake. A bootstrap script (build.ps1 for Windows or build.sh for *nix systems) is included. Note, that at the moment AngleSharp may require NuGet 3.5, which looks for MSBuild pre-15, i.e., before Visual Studio 2017 on Windows systems. We aim to drop this requirement entirely soon.
4447

4548
### Code Conventions
4649

4750
Most parts in the AngleSharp project are fairly straight forward. Among these are:
4851

49-
- Always use statement blocks for control statements, e.g., in a for-loop, if-condition, ...
50-
- You may use a simple (throw) statement in case of enforcing contracts on argument
51-
- Be explicit about modifiers (some files follow an older convention of the code base, but we settled on the explicit style)
52+
* Always use statement blocks for control statements, e.g., in a for-loop, if-condition, ...
53+
* You may use a simple (throw) statement in case of enforcing contracts on argument
54+
* Be explicit about modifiers (some files follow an older convention of the code base, but we settled on the explicit style)
5255

5356
There are a couple of rules, which are definitely not standard, but highly recommended for consistency and readability:
5457

55-
- AngleSharp uses the RHS convention, where types are always put on the right hand side if possible, i.e., preferring `var` under all circumstances
56-
- A single empty line between two non-simple statements (e.g., for-loop and if-condition) should be inserted
57-
- Types are preferred to keywords (`String` instead of `string` or `Int32` instead of `int`)
58-
- `using` statements must be inside the namespace declaration
58+
* AngleSharp uses the RHS convention, where types are always put on the right hand side if possible, i.e., preferring `var` under all circumstances
59+
* A single empty line between two non-simple statements (e.g., for-loop and if-condition) should be inserted
60+
* Types are preferred to keywords (`String` instead of `string` or `Int32` instead of `int`)
61+
* `using` statements must be inside the namespace declaration
5962

6063
### Development Workflow
6164

6265
1. If no issue already exists for the work you'll be doing, create one to document the problem(s) being solved and self-assign.
6366
2. Otherwise please let us know that you are working on the problem. Regular status updates (e.g. "still in progress", "no time anymore", "practically done", "pull request issued") are highly welcome.
64-
2. Create a new branch—please don't work in the `master` branch directly. It is reserved for releases. We recommend naming the branch to match the issue being addressed (`feature/#777` or `issue-777`).
65-
3. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification).
66-
4. Fix stuff. Always go from edge case to edge case.
67-
5. All tests should pass now. Also your new implementation should not break existing tests.
68-
6. Update the documentation to reflect any changes. (or document such changes in the original issue)
69-
7. Push to your fork or push your issue-specific branch to the main repository, then submit a pull request against `devel`.
67+
3. Create a new branch—please don't work in the `master` branch directly. It is reserved for releases. We recommend naming the branch to match the issue being addressed (`feature/#777` or `issue-777`).
68+
4. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification).
69+
5. Fix stuff. Always go from edge case to edge case.
70+
6. All tests should pass now. Also your new implementation should not break existing tests.
71+
7. Update the documentation to reflect any changes. (or document such changes in the original issue)
72+
8. Push to your fork or push your issue-specific branch to the main repository, then submit a pull request against `devel`.
7073

7174
Just to illustrate the git workflow for AngleSharp a little bit more we've added the following graphs.
7275

@@ -76,19 +79,19 @@ Here we now created a new branch called `devel`. This is the development branch.
7679

7780
Now active work is supposed to be done. Therefore a new branch should be created. Let's create one:
7881

79-
```
82+
```sh
8083
git checkout -b feature/#777
8184
```
8285

8386
There may be many of these feature branches. Most of them are also pushed to the server for discussion or synchronization.
8487

85-
```
88+
```sh
8689
git push -u origin feature/#777
8790
```
8891

8992
Now feature branches may be closed when they are done. Here we simply merge with the feature branch(es). For instance the following command takes the `feature/#777` branch from the server and merges it with the `devel` branch.
9093

91-
```
94+
```sh
9295
git checkout devel
9396
git pull
9497
git pull origin feature/#777
@@ -97,7 +100,7 @@ git push
97100

98101
Finally, we may have all the features that are needed to release a new version of AngleSharp. Here we tag the release. For instance for the 1.0 release we use `v1.0`.
99102

100-
```
103+
```sh
101104
git checkout master
102105
git merge devel
103106
git tag v1.0
@@ -109,12 +112,11 @@ git tag v1.0
109112

110113
The following files should not be edited directly in the current repository, but rather in the `AngleSharp.GitBase` repository. They are then synced via `git pull` from a different remote.
111114

112-
```
115+
```plaintext
113116
.editorconfig
114117
.gitignore
115118
.gitattributes
116119
.github/*
117-
appveyor.yml
118120
build.ps1
119121
build.sh
120122
tools/anglesharp.cake
@@ -124,7 +126,7 @@ LICENSE
124126

125127
To sync manually:
126128

127-
```
129+
```sh
128130
git remote add gitbase [email protected]:AngleSharp/AngleSharp.GitBase.git
129131
git pull gitbase master
130132
```

.github/FUNDING.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# These are supported funding model platforms
22

3-
github: [egil] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
#patreon: # Replace with a single Patreon username
5-
#open_collective: # Replace with a single Open Collective username
6-
#ko_fi: # Replace with a single Ko-fi username
7-
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
#liberapay: # Replace with a single Liberapay username
10-
#issuehunt: # Replace with a single IssueHunt username
11-
#otechie: # Replace with a single Otechie username
12-
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
3+
github: [FlorianRappl,egil]
4+
custom: https://salt.bountysource.com/teams/anglesharp

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
8+
9+
jobs:
10+
linux:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Build
17+
run: ./build.sh
18+
19+
windows:
20+
runs-on: windows-latest
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Build
26+
run: |
27+
if ($env:GITHUB_REF -eq "refs/heads/master") {
28+
.\build.ps1 -Target Publish
29+
} elseif ($env:GITHUB_REF -eq "refs/heads/devel") {
30+
.\build.ps1 -Target PrePublish
31+
} else {
32+
.\build.ps1
33+
}

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 0.15.0
2+
3+
Released on Wednesday, April 28, 2021.
4+
5+
- Upgraded to version 0.15.0 of AngleSharp.
6+
- Added strong name signing of assembly.
7+
18
# 0.14.0
29

310
Released on Wednesday, April 16, 2020.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Egil Hansen
3+
Copyright (c) 2019-2021 Egil Hansen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

appveyor.yml

-20
This file was deleted.

build.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ $NUGET_OLD_URL = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe"
2626
# Should we use experimental build of Roslyn?
2727
$UseExperimental = "";
2828
if ($Experimental.IsPresent) {
29-
$UseExperimental = "-experimental"
29+
$UseExperimental = "--experimental"
3030
}
3131

3232
# Is this a dry run?
3333
if ($WhatIf.IsPresent) {
34-
$UseDryRun = "-dryrun"
34+
$UseDryRun = "--dryrun"
3535
}
3636

3737
# Should we use mono?
3838
if ($Mono.IsPresent) {
39-
$UseMono = "-mono"
39+
$UseMono = "--mono"
4040
}
4141

4242
# Try download NuGet.exe if do not exist.
@@ -77,5 +77,5 @@ if (!(Test-Path $CAKE_EXE)) {
7777
}
7878

7979
# Start Cake
80-
Invoke-Expression "$CAKE_EXE `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
80+
Invoke-Expression "$CAKE_EXE `"$Script`" --target=`"$Target`" --configuration=`"$Configuration`" --verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
8181
exit $LASTEXITCODE

build.sh

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for i in "$@"; do
2727
-t|--target) TARGET="$2"; shift ;;
2828
-c|--configuration) CONFIGURATION="$2"; shift ;;
2929
-v|--verbosity) VERBOSITY="$2"; shift ;;
30-
-d|--dryrun) DRYRUN="-dryrun" ;;
30+
-d|--dryrun) DRYRUN="--dryrun" ;;
3131
--version) SHOW_VERSION=true ;;
3232
--) shift; SCRIPT_ARGUMENTS+=("$@"); break ;;
3333
*) SCRIPT_ARGUMENTS+=("$1") ;;
@@ -87,7 +87,7 @@ fi
8787

8888
# Start Cake
8989
if $SHOW_VERSION; then
90-
exec mono $CAKE_EXE -version
90+
exec mono $CAKE_EXE --version
9191
else
92-
exec mono $CAKE_EXE $SCRIPT -verbosity=$VERBOSITY -configuration=$CONFIGURATION -target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}"
92+
exec mono $CAKE_EXE $SCRIPT --verbosity=$VERBOSITY --configuration=$CONFIGURATION --target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}"
9393
fi
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<AssemblyName>AngleSharp.Diffing.Tests</AssemblyName>
77
<RootNamespace>AngleSharp.Diffing</RootNamespace>
8+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- https://github.com/Tyrrrz/GitHubActionsTestLogger/issues/5 -->
89
</PropertyGroup>
910

1011
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
12-
<PackageReference Include="Shouldly" Version="4.0.0-beta0002" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
13+
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
14+
<PackageReference Include="Shouldly" Version="4.0.3" />
1315
<PackageReference Include="xunit" Version="2.4.1" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
1517
<PrivateAssets>all</PrivateAssets>
1618
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1719
</PackageReference>
18-
<PackageReference Include="coverlet.collector" Version="1.1.0">
20+
<PackageReference Include="coverlet.collector" Version="3.0.3">
1921
<PrivateAssets>all</PrivateAssets>
2022
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2123
</PackageReference>
@@ -25,4 +27,4 @@
2527
<ProjectReference Include="..\AngleSharp.Diffing\AngleSharp.Diffing.csproj" />
2628
</ItemGroup>
2729

28-
</Project>
30+
</Project>

src/AngleSharp.Diffing.Tests/ShouldlyTestExtensions.cs

+1-13
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,7 @@
77
namespace AngleSharp.Diffing
88
{
99
public static class ShouldlyTestExtensions
10-
{
11-
// The ShouldSatisfyAllConditions are here until https://github.com/shouldly/shouldly/issues/472 lands in a release of Shouldly.
12-
public static void ShouldSatisfyAllConditions<T>(this T actual, params Action<T>[] conditions) => ShouldSatisfyAllConditions(actual, () => null, conditions);
13-
public static void ShouldSatisfyAllConditions<T>(this T actual, string customMessage, params Action<T>[] conditions) => ShouldSatisfyAllConditions(actual, () => customMessage, conditions);
14-
public static void ShouldSatisfyAllConditions<T>(this T actual, Func<string?> customMessage, params Action<T>[] conditions)
15-
{
16-
var convertedConditions = conditions
17-
.Select(a => new Action(() => a(actual)))
18-
.ToArray();
19-
20-
actual.ShouldSatisfyAllConditions(customMessage, convertedConditions);
21-
}
22-
10+
{
2311
public static void ShouldAllBe<T>(this IEnumerable<T> actual, Func<T, int, bool> elementPredicate)
2412
{
2513
actual.Select(elementPredicate).ShouldAllBe(x => x);
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
85
<GenerateDocumentationFile>true</GenerateDocumentationFile>
96
</PropertyGroup>
107

@@ -13,12 +10,12 @@
1310
<Product>AngleSharp.Diffing</Product>
1411
<Authors>AngleSharp</Authors>
1512
<PackageId>AngleSharp.Diffing</PackageId>
16-
<PackageLicenseFile>LICENSE</PackageLicenseFile>
13+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1714
<PackageProjectUrl>https://anglesharp.github.io</PackageProjectUrl>
1815
<PackageIcon>logo.png</PackageIcon>
1916
<PackageIconUrl>https://raw.github.com/AngleSharp/AngleSharp.Diffing/master/logo.png</PackageIconUrl>
2017
<PackageTags>html html5 css css3 dom library diffing anglesharp diff difference compare comparison testing</PackageTags>
21-
<Copyright>Copyright 2019, Egil Hansen</Copyright>
18+
<Copyright>Egil Hansen</Copyright>
2219
<RepositoryUrl>https://github.com/AngleSharp/AngleSharp.Diffing</RepositoryUrl>
2320
<RepositoryType>git</RepositoryType>
2421
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -30,18 +27,14 @@
3027
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
3128
</ItemGroup>
3229

33-
<PropertyGroup>
34-
<AnnotatedReferenceAssemblyVersion>3.0.0</AnnotatedReferenceAssemblyVersion>
35-
</PropertyGroup>
36-
3730
<ItemGroup>
38-
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.77" PrivateAssets="all" />
39-
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" />
31+
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" />
32+
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[5.0.0]" />
4033
</ItemGroup>
4134

4235
<ItemGroup>
4336
<None Include="..\..\logo.png" Pack="true" PackagePath="\" />
4437
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" />
4538
</ItemGroup>
4639

47-
</Project>
40+
</Project>

src/AngleSharp.Diffing/Assembly.cs

-2
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
using System.Runtime.CompilerServices;
2+
[assembly: InternalsVisibleTo("AngleSharp.Diffing.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010001adf274fa2b375134e8e4558d606f1a0f96f5cd0c6b99970f7cce9887477209d7c29f814e2508d8bd2526e99e8cd273bd1158a3984f1ea74830ec5329a77c6ff201a15edeb8b36ab046abd1bce211fe8dbb076d7d806f46b15bfda44def04ead0669971e96c5f666c9eda677f28824fff7aa90d32929ed91d529a7a41699893")]

0 commit comments

Comments
 (0)