Skip to content

Commit 25b30c3

Browse files
authored
Merge pull request #59 from AngleSharp/devel
Release 0.13
2 parents c25fe98 + b44dba0 commit 25b30c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1208
-692
lines changed

.github/CODE_OF_CONDUCT.md

+9-37
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,18 @@
11
# Contributor Covenant Code of Conduct
22

3-
## Our Pledge
3+
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
In particular this means:
66

7-
## Our Standards
8-
9-
Examples of behavior that contributes to creating a positive environment include:
10-
11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
7+
> We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
168
179
Examples of unacceptable behavior by participants include:
1810

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
11+
* The use of sexualized language or imagery
12+
* Personal attacks
13+
* Trolling or insulting/derogatory comments
2114
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
24-
25-
## Our Responsibilities
26-
27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28-
29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30-
31-
## Scope
32-
33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34-
35-
## Enforcement
36-
37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38-
39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40-
41-
## Attribution
42-
43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
15+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
16+
* Other unethical or unprofessional conduct
4417

45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
18+
For the complete set of rules and more information on the topic see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).

.github/CONTRIBUTING.md

+53-28
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The AngleSharp project ultimately tries to provide tools to parse, inspect, modi
66

77
## Code License
88

9-
This is an open source project falling under the MIT License. By using, distributing, or contributing to this project, you accept and agree that all code within the AngleSharp project are licensed under MIT license.
9+
This is an open source project falling under the [MIT License](../LICENSE). By using, distributing, or contributing to this project, you accept and agree that all code within the AngleSharp project and its libraries are licensed under MIT license.
1010

1111
## Becoming a Contributor
1212

13-
Until the project has enough contributors a BDFL model is followed. As such the sole key maintainer keeps the right to appoint GitHub members as regular project contributors. Nevertheless, usually appointing someone follows this process:
13+
Until the project has enough contributors a [BDFL](https://en.wikipedia.org/wiki/Benevolent_dictator_for_life) model is followed. As such the sole key maintainer keeps the right to appoint GitHub members as regular project contributors. Nevertheless, usually appointing someone follows this process:
1414

1515
1. An individual contributes actively via discussions (reporting bugs, giving feedback to existing or opening new issues) and / or pull requests
1616
2. The individual is either directly asked, invited or asks for contributor rights on the project
@@ -22,19 +22,25 @@ Every contributor has to sign the contributor's license agreement (CLA) to estab
2222

2323
### Issue Discussion
2424

25-
Discussion of issues should be placed transparently in the [issue tracker](https://github.com/FlorianRappl/AngleSharp/issues/) here on GitHub.
25+
Discussion of issues should be placed transparently in the issue tracker here on GitHub.
26+
27+
* [AngleSharp.Core](https://github.com/AngleSharp/AngleSharp/issues/)
28+
* [AngleSharp.Css](https://github.com/AngleSharp/AngleSharp.Css/issues/)
29+
* [AngleSharp.Io](https://github.com/AngleSharp/AngleSharp.Io/issues/)
30+
* [AngleSharp.Js](https://github.com/AngleSharp/AngleSharp.Js/issues/)
31+
* [AngleSharp.Xml](https://github.com/AngleSharp/AngleSharp.Xml/issues/)
2632

2733
### Modifying the code
2834

29-
AngleSharp uses features from C# 6 and will soon switch to C# 7. You will therefore need a C# compiler that is up for the job.
35+
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.
3036

3137
1. Fork and clone the repo.
3238
2. First try to build the AngleSharp.Core libray and see if you get the tests running.
3339
3. You will be required to resolve some dependencies via NuGet.
3440

3541
AngleSharp itself does not have dependencies, however, the tests are dependent on NUnit.
3642

37-
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 requires NuGet 3.5, which looks for MSBuild pre-15, i.e., before Visual Studio 2017 on Windows systems.
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.
3844

3945
### Code Conventions
4046

@@ -49,12 +55,13 @@ There are a couple of rules, which are definitely not standard, but highly recom
4955
- AngleSharp uses the RHS convention, where types are always put on the right hand side if possible, i.e., preferring `var` under all circumstances
5056
- A single empty line between two non-simple statements (e.g., for-loop and if-condition) should be inserted
5157
- Types are preferred to keywords (`String` instead of `string` or `Int32` instead of `int`)
58+
- `using` statements must be inside the namespace declaration
5259

5360
### Development Workflow
5461

5562
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.
5663
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.
57-
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`).
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`).
5865
3. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification).
5966
4. Fix stuff. Always go from edge case to edge case.
6067
5. All tests should pass now. Also your new implementation should not break existing tests.
@@ -63,46 +70,64 @@ There are a couple of rules, which are definitely not standard, but highly recom
6370

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

66-
Initially AngleSharp starts at the `master` branch. This branch should contain the latest stable (or released) version.
67-
68-
![AngleSharp Initial Master](https://github.com/AngleSharp/AngleSharp/wiki/initial-master.png)
73+
Initially, AngleSharp starts at the `master` branch. This branch should contain the latest stable (or released) version.
6974

7075
Here we now created a new branch called `devel`. This is the development branch.
7176

72-
![AngleSharp Initial Devel](https://github.com/AngleSharp/AngleSharp/wiki/initial-devel.png)
73-
7477
Now active work is supposed to be done. Therefore a new branch should be created. Let's create one:
7578

76-
git checkout -b feature-#777
79+
```
80+
git checkout -b feature/#777
81+
```
7782

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

80-
git push -u origin feature-#777
85+
```
86+
git push -u origin feature/#777
87+
```
8188

82-
At this point the graph could look as follows. The diagram shows two feature branches in different stages.
89+
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.
8390

84-
![AngleSharp Feature Branches](https://github.com/AngleSharp/AngleSharp/wiki/feature-branches.png)
91+
```
92+
git checkout devel
93+
git pull
94+
git pull origin feature/#777
95+
git push
96+
```
8597

86-
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.
98+
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`.
8799

88-
git checkout devel
89-
git pull
90-
git pull origin feature-#777
91-
git push
100+
```
101+
git checkout master
102+
git merge devel
103+
git tag v1.0
104+
```
92105

93-
This aggregates to the graph below.
106+
(The last part is automatically performed by our CI system.)
94107

95-
![AngleSharp Merge Branches](https://github.com/AngleSharp/AngleSharp/wiki/feature-merges.png)
108+
### Basic Files
96109

97-
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`.
110+
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.
98111

99-
git checkout master
100-
git merge devel
101-
git tag v1.0
112+
```
113+
.editorconfig
114+
.gitignore
115+
.gitattributes
116+
.github/*
117+
appveyor.yml
118+
build.ps1
119+
build.sh
120+
tools/anglesharp.cake
121+
tools/packages.config
122+
LICENSE
123+
```
102124

103-
Hence finally we have the full graph.
125+
To sync manually:
104126

105-
![AngleSharp Release Git Graph](https://github.com/AngleSharp/AngleSharp/wiki/release.png)
127+
```
128+
git remote add gitbase [email protected]:AngleSharp/AngleSharp.GitBase.git
129+
git pull gitbase master
130+
```
106131

107132
### Versioning
108133

.github/ISSUE_TEMPLATE.md

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1-
## Bug Report
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
28

3-
### Prerequisites
9+
# Bug Report
10+
11+
## Prerequisites
412

513
- [ ] Can you reproduce the problem in a [MWE](https://en.wikipedia.org/wiki/Minimal_working_example)?
614
- [ ] Are you running the latest version of AngleSharp?
715
- [ ] Did you check the FAQs to see if that helps you?
8-
- [ ] Are you reporting to the correct repository? (if its an issue with the core library, please report to `AngleSharp` directly)
16+
- [ ] Are you reporting to the correct repository? (there are multiple AngleSharp libraries, e.g., `AngleSharp.Css` for CSS support)
917
- [ ] Did you perform a search in the issues?
1018

1119
For more information, see the `CONTRIBUTING` guide.
1220

13-
### Description
21+
## Description
1422

1523
[Description of the bug]
1624

17-
### Steps to Reproduce
25+
## Steps to Reproduce
1826

1927
1. [First Step]
2028
2. [Second Step]
@@ -26,6 +34,6 @@ For more information, see the `CONTRIBUTING` guide.
2634

2735
**Environment details:** [OS, .NET Runtime, ...]
2836

29-
### Possible Solution
37+
## Possible Solution
3038

3139
[Optionally, share your idea to fix the issue]
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
## New Feature Proposal
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
28

3-
### Description
9+
# New Feature Proposal
10+
11+
## Description
412

513
[Description of the proposed feature]
614

7-
### Background
15+
## Background
816

917
Provide any additional background for the feature. e.g., user scenarios.
1018

11-
### Specification
19+
## Specification
1220

1321
In case of updates that adhere to specification changes, please reference the used specification.

.github/PULL_REQUEST_TEMPLATE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
## Types of Changes
1+
# Types of Changes
22

3-
### Prerequisites
3+
## Prerequisites
44

55
Please make sure you can check the following two boxes:
66

77
- [ ] I have read the **CONTRIBUTING** document
88
- [ ] My code follows the code style of this project
99

10-
### Contribution Type
10+
## Contribution Type
1111

1212
What types of changes does your code introduce? Put an `x` in all the boxes that apply:
1313

@@ -19,6 +19,6 @@ What types of changes does your code introduce? Put an `x` in all the boxes that
1919
- [ ] I have added tests to cover my changes
2020
- [ ] All new and existing tests passed
2121

22-
### Description
22+
## Description
2323

2424
[Place a meaningful description here.]

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 0.13.0
2+
3+
Released on Friday, September 6 2019.
4+
5+
- Added thread-based event loop implementation `JsEventLoop`
6+
- Included new `WithEventLoop` configuration extensions
7+
- Added constructors to `window` (#12)
8+
- Fixed `btoa` and `atob` missing (#55)
9+
- Included `javascript:` URL handler (#47)
10+
- Included support for .NET Standard 1.3 (#58)
11+
112
# 0.12.1
213

314
Released on Wednesday, May 15 2019.

LICENSE

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

3-
Copyright (c) 2015 - 2019 AngleSharp
3+
Copyright (c) 2013 - 2019 AngleSharp
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

README.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ var config = Configuration.Default
3333

3434
in the previous example `MyConsoleLogger` refers to a class implementing the `IConsoleLogger` interface. Examples of classes implementing this interface are available in our [samples repository](https://github.com/AngleSharp/AngleSharp.Samples).
3535

36+
## Extension Methods
37+
38+
This plugin also delivers some extension methods to be used together with elements from AngleSharp, e.g., `IDocument` or `IElement`.
39+
40+
For instance, the following waits until a stable point has been reached (and the document is fully available):
41+
42+
```cs
43+
var context = BrowsingContext.New(config);
44+
var document = await context.OpenAsync(address)
45+
.WaitUntilAvailable();
46+
```
47+
48+
Scripts can also be run in the context of the document, where the result of the last expression is returned:
49+
50+
```cs
51+
var numEntries = document.ExecuteScript("document.querySelectorAll('div').length");
52+
```
53+
3654
## Vision and Status
3755

3856
The repository contains DOM bindings for the *Jint* JavaScript engine. *Jint* is fully ECMAScript 5 compatible and provides the basis for evaluating JavaScripts in the context of the AngleSharp DOM representation.
@@ -41,7 +59,9 @@ The library comes with a service that exposes `WithJs` to `IConfiguration`. This
4159

4260
## Features
4361

44-
(tbd)
62+
- Support of ES5 through Jint
63+
- Connection to the DOM
64+
- Evaluation of simple scripts (incl. jQuery)
4565

4666
## Participating
4767

appveyor.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '{build}'
2+
branches:
3+
only:
4+
- master
5+
- devel
6+
skip_tags: true
7+
image: Visual Studio 2015
8+
configuration: Release
9+
platform: Any CPU
10+
build_script:
11+
- ps: >-
12+
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $env:APPVEYOR_REPO_BRANCH -eq "master") {
13+
.\build.ps1 -Target Publish
14+
} elseif ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $env:APPVEYOR_REPO_BRANCH -eq "devel") {
15+
.\build.ps1 -Target PrePublish
16+
} else {
17+
.\build.ps1 -Target AppVeyor
18+
}
19+
test: off
20+
deploy: off

0 commit comments

Comments
 (0)