Skip to content

Commit

Permalink
Merge pull request #59 from AngleSharp/devel
Browse files Browse the repository at this point in the history
Release 0.13
  • Loading branch information
FlorianRappl authored Sep 24, 2019
2 parents c25fe98 + b44dba0 commit 25b30c3
Show file tree
Hide file tree
Showing 42 changed files with 1,208 additions and 692 deletions.
46 changes: 9 additions & 37 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,18 @@
# Contributor Covenant Code of Conduct

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

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.
In particular this means:

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
> 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.
Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

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.

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.

## Scope

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.

## Enforcement

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.

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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
* Other unethical or unprofessional conduct

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
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).
81 changes: 53 additions & 28 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The AngleSharp project ultimately tries to provide tools to parse, inspect, modi

## Code License

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.
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.

## Becoming a Contributor

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:
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:

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

### Issue Discussion

Discussion of issues should be placed transparently in the [issue tracker](https://github.com/FlorianRappl/AngleSharp/issues/) here on GitHub.
Discussion of issues should be placed transparently in the issue tracker here on GitHub.

* [AngleSharp.Core](https://github.com/AngleSharp/AngleSharp/issues/)
* [AngleSharp.Css](https://github.com/AngleSharp/AngleSharp.Css/issues/)
* [AngleSharp.Io](https://github.com/AngleSharp/AngleSharp.Io/issues/)
* [AngleSharp.Js](https://github.com/AngleSharp/AngleSharp.Js/issues/)
* [AngleSharp.Xml](https://github.com/AngleSharp/AngleSharp.Xml/issues/)

### Modifying the code

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.
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.

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

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

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.
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.

### Code Conventions

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

### Development Workflow

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

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

Initially AngleSharp starts at the `master` branch. This branch should contain the latest stable (or released) version.

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

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

![AngleSharp Initial Devel](https://github.com/AngleSharp/AngleSharp/wiki/initial-devel.png)

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

git checkout -b feature-#777
```
git checkout -b feature/#777
```

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

git push -u origin feature-#777
```
git push -u origin feature/#777
```

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

![AngleSharp Feature Branches](https://github.com/AngleSharp/AngleSharp/wiki/feature-branches.png)
```
git checkout devel
git pull
git pull origin feature/#777
git push
```

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.
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`.

git checkout devel
git pull
git pull origin feature-#777
git push
```
git checkout master
git merge devel
git tag v1.0
```

This aggregates to the graph below.
(The last part is automatically performed by our CI system.)

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

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`.
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.

git checkout master
git merge devel
git tag v1.0
```
.editorconfig
.gitignore
.gitattributes
.github/*
appveyor.yml
build.ps1
build.sh
tools/anglesharp.cake
tools/packages.config
LICENSE
```

Hence finally we have the full graph.
To sync manually:

![AngleSharp Release Git Graph](https://github.com/AngleSharp/AngleSharp/wiki/release.png)
```
git remote add gitbase [email protected]:AngleSharp/AngleSharp.GitBase.git
git pull gitbase master
```

### Versioning

Expand Down
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
## Bug Report
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---

### Prerequisites
# Bug Report

## Prerequisites

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

For more information, see the `CONTRIBUTING` guide.

### Description
## Description

[Description of the bug]

### Steps to Reproduce
## Steps to Reproduce

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

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

### Possible Solution
## Possible Solution

[Optionally, share your idea to fix the issue]
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
## New Feature Proposal
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---

### Description
# New Feature Proposal

## Description

[Description of the proposed feature]

### Background
## Background

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

### Specification
## Specification

In case of updates that adhere to specification changes, please reference the used specification.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Types of Changes
# Types of Changes

### Prerequisites
## Prerequisites

Please make sure you can check the following two boxes:

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

### Contribution Type
## Contribution Type

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

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

### Description
## Description

[Place a meaningful description here.]
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 0.13.0

Released on Friday, September 6 2019.

- Added thread-based event loop implementation `JsEventLoop`
- Included new `WithEventLoop` configuration extensions
- Added constructors to `window` (#12)
- Fixed `btoa` and `atob` missing (#55)
- Included `javascript:` URL handler (#47)
- Included support for .NET Standard 1.3 (#58)

# 0.12.1

Released on Wednesday, May 15 2019.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 - 2019 AngleSharp
Copyright (c) 2013 - 2019 AngleSharp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ var config = Configuration.Default

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).

## Extension Methods

This plugin also delivers some extension methods to be used together with elements from AngleSharp, e.g., `IDocument` or `IElement`.

For instance, the following waits until a stable point has been reached (and the document is fully available):

```cs
var context = BrowsingContext.New(config);
var document = await context.OpenAsync(address)
.WaitUntilAvailable();
```

Scripts can also be run in the context of the document, where the result of the last expression is returned:

```cs
var numEntries = document.ExecuteScript("document.querySelectorAll('div').length");
```

## Vision and Status

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.
Expand All @@ -41,7 +59,9 @@ The library comes with a service that exposes `WithJs` to `IConfiguration`. This

## Features

(tbd)
- Support of ES5 through Jint
- Connection to the DOM
- Evaluation of simple scripts (incl. jQuery)

## Participating

Expand Down
20 changes: 20 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '{build}'
branches:
only:
- master
- devel
skip_tags: true
image: Visual Studio 2015
configuration: Release
platform: Any CPU
build_script:
- ps: >-
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $env:APPVEYOR_REPO_BRANCH -eq "master") {
.\build.ps1 -Target Publish
} elseif ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $env:APPVEYOR_REPO_BRANCH -eq "devel") {
.\build.ps1 -Target PrePublish
} else {
.\build.ps1 -Target AppVeyor
}
test: off
deploy: off
Loading

0 comments on commit 25b30c3

Please sign in to comment.