Skip to content

Commit

Permalink
Merge branch 'master' into yarn-berry
Browse files Browse the repository at this point in the history
* master: (21 commits)
  Rework the way DOM parent pointers are handled (#283)
  Create a GitHub release as part of release workflow
  Backtrack on shortcut links
  v0.3.0
  Prepare release
  Update changelog
  Update changelog
  `RoleOptions#allowPresentational` must be optional
  Update SIA R67 (#272)
  Update lockfile
  Correctly resolve important and overridden CSS properties (#282)
  Introduce HyperScript-like DSL for constructing DOM (#281)
  Use dynamic import rather than `require()` for loading formatters (#278)
  Add `Future#get()` and accept thunked promises in `Future.from()` (#279)
  Fix default argument type parameter of several types
  Speedup table building (#276)
  Add initial support for `background` shorthand property (#277)
  Output stack in CLI errors if available
  Chesterton's fence strikes again!
  Correctly pull `.message` from expectations
  ...
  • Loading branch information
kasperisager committed Jul 1, 2020
2 parents 4b9c2b0 + 6468f9d commit 83f933d
Show file tree
Hide file tree
Showing 189 changed files with 4,181 additions and 3,580 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ jobs:
- run: yarn lerna publish --yes from-package
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
[Changelog for this release](CHANGELOG.md)
prerelease: true
52 changes: 50 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,64 @@ Each entry may begin with an general description of the changes introduced in th

Items that are related, such as breaking changes, new features, or changes to existing features, should be grouped under an appropriate heading.

**Note on links:** For all links to repository resources rooted at `https://github.com/<owner>/<repo>`, make sure to use paths relative to `https://github.com/<owner>/<repo>/blob` which is the path from which GitHub [performs autolinking](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-readmes#relative-links-and-image-paths-in-readme-files). This helps keeps links short and ensures that they are not tied to a specific owner and repository name in the event that we should move and/or rename the repository.
**Note on links:** For all links to repository resources rooted at `https://github.com/<owner>/<repo>`, make sure to use paths relative to `https://github.com/<owner>/<repo>/blob` which is the path from which GitHub [performs autolinking](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-readmes#relative-links-and-image-paths-in-readme-files). This helps keeps links short and ensures that they are not tied to a specific owner and repository name in the event that we should move and/or rename the repository. Also, please refrain from using [shortcut reference links](https://github.github.com/gfm/#shortcut-reference-link) as they make it difficult to copy/paste entries to outside the changelog.

</details>

## [Unreleased]

## [0.3.0](../../compare/v0.2.0...v0.3.0) (2020-07-01)

### Breaking

- [@siteimprove/alfa-act](packages/alfa-act): The way expectations are handled in rules has been reworked to allow for additional information to be passed through the new `Diagnostic` class. This means that the type of expectations has changed from `Option<Result<string>>` to `Option<Result<Diagnostic>>`; to get the status message, one therefore has to extract the `Diagnostic#message` property. ([#246](../../pull/246))

- [@siteimprove/alfa-scraper](packages/alfa-scraper): The `Awaiter` class now expects an instance of `Timeout`, rather than a `number`, for its `timeout` argument ([#254](../../pull/254))

- [@siteimprove/alfa-device](packages/alfa-device), [@siteimprove/alfa-scraper](packages/alfa-scraper), [@siteimprove/alfa-cli](packages/alfa-cli): Scripting and user preferences, such as `prefers-reduced-motion`, are now included in the `Device` class. This also means that the `javascript` option in `Scraper#scrape()` has been removed as this is now dealt with in the `Device` class. Lastly, the `--javascript` flag used by the `scrape` and `audit` CLI commands has been renamed `--scripting` to align with these changes.

- [@siteimprove/alfa-highlight](packages/alfa-highlight): Syntax definitions are now lazy loaded and so the `syntax()` function has become asynchronous and returns a `Promise<string>` rather than a `string`. ([#263](../../pull/263))

- [@siteimprove/alfa-math](packages/alfa-math): The package has been rewritten to remove its dependence on the `mathjs` library as it was the source of a performance bottleneck. ([#268](../../pull/268))

- [@siteimprove/alfa-formatter](packages/alfa-formatter): The `Formatter.load()` function now uses dynamic imports rather than `require()` for loading formatters, removing the dependence on Node.js. This also means that the `Formatter.load()` function has become asynchronous. ([#278](../../pull/278))

- [@siteimprove/alfa-dom](packages/alfa-dom): The `jsx()` now requires that the `style` attribute be passed as property-value record, `Record<string, string>`. ([#281](../../pull/281))

- [@siteimprove/alfa-cli](packages/alfa-cli): The CLI has been reworked to make use of the new [@siteimprove/alfa-command](packages/alfa-command) package. This has however required a breaking change to the `--headers`, `--cookies`, and `--outcomes` flags as outlined in the associated pull request. Make sure to check out the `--help` output for up-to-date documentation on these flags. ([#265](../../pull/265))

### Added

- [@siteimprove/alfa-parser](packages/alfa-parser): Additional arguments can now be defined for `Parser<I, T, E, A>` instances through a fourth type parameter, `A`.

- [@siteimprove/alfa-style](packages/alfa-style): The `background` shorthand property is now supported, albeit with a limited scope as it only supports a single `<color>` layer. ([#277](../../pull/277))

- [@siteimprove/alfa-future](packages/alfa-future): The `Future#get()` method has been added for synchronously resolving non-deferred futures, which was the very reason for implementing and using futures over native promises. ([#279](../../pull/279))

- [@siteimprove/alfa-dom](packages/alfa-dom): A HyperScript-like DSL is now available to ease the construction of DOM. ([#281](../../pull/281))

- [@siteimprove/alfa-command](packages/alfa-command): A new package has been added with functionality for modelling command line applications, removing the previous dependence on the oclif framework. ([#265](../../pull/265))

### Changed

- [@siteimprove/alfa-rules](packages/alfa-rules): SIA-R67 has been updated to reflect the latest version of the rule in Sanshikan. ([#272](../../pull/272))

### Fixed

- [@siteimprove/alfa-scraper](packages/alfa-scraper): `Awaiter.loaded()` is not used as the default awaiter in `Scraper#scrape()` to fix a bug where stylesheets were not ready at the time of scraping. ([#253](../../pull/253))

- [@siteimprove/alfa-rules](packages/alfa-rules): SIA-R69 now correctly uses automatically determined background or foreground colors when only one of the two cannot be determined automatically. Previously, both would be deferred to `Oracle` when either couldn't be determined. ([#256](../../pull/256))

- [@siteimprove/alfa-cascade](packages/alfa-cascade), [@siteimprove/alfa-media](packages/alfa-media): User agent styles have been added for the `<noscript>` element and the associated `scripting` media feature is now matched by `Media.Query#matches()`. ([#260](../../pull/260))

- [@siteimprove/alfa-act](packages/alfa-act): The `Interview` type is now limited to a fixed recursion depth which fixes type inference in TypeScript 3.8 and below and avoids a stack overflow in TypeScript 3.9 and above. ([#266](../../pull/266))

- [@siteimprove/alfa-rules](packages/alfa-rules): The `kind` attribute of the `<video>` element is now correctly treated as an enumerable attribute. ([#269](../../pull/269))

- [@siteimprove/alfa-aria](packages/alfa-aria): Presentional roles conflict resolution is now correctly accounted for in the ARIA feature mappings. ([#264](../../pull/264))

- [@siteimprove/alfa-cascade](packages/alfa-cascade): Rules with identical selectors are no longer incorrectly deduplicated when added to the rule tree, which lead to rules being discarded. ([#274](../../pull/274))

## [0.2.0](../../compare/v0.1.0...v0.2.0) (2020-06-08)

### Breaking
Expand All @@ -39,7 +87,7 @@ Items that are related, such as breaking changes, new features, or changes to ex

### Added

- [@siteimprove/alfa-rules](packages/alfa-rules): Implementations of SIA-R81, SIA-R83, SIA-R84, and SIA-R85 are now available. ([#232](../../pull/232), [#239](../../239), [#241](../../pull/241), [#242](../../pull/242))
- [@siteimprove/alfa-rules](packages/alfa-rules): Implementations of SIA-R81, SIA-R83, SIA-R84, and SIA-R85 are now available. ([#232](../../pull/232), [#239](../../pull/239), [#241](../../pull/241), [#242](../../pull/242))

- [@siteimprove/alfa-dom](packages/alfa-dom): The `Document#frame` property has been added to better model embedded documents. ([#244](../../pull/244))

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/component-testing/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "component-testing-angular",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "jest"
},
Expand Down Expand Up @@ -34,8 +34,8 @@
"zone.js": "^0.9.1"
},
"devDependencies": {
"@siteimprove/alfa-angular": "^0.2.0",
"@siteimprove/alfa-jest": "^0.2.0",
"@siteimprove/alfa-angular": "^0.3.0",
"@siteimprove/alfa-jest": "^0.3.0",
"@types/jest": "^24.0.13",
"jest": "^24.8.0",
"jest-preset-angular": "^7.1.1"
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/component-testing/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "component-testing-react",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "jest"
},
Expand All @@ -23,8 +23,8 @@
"react-dom": "^16.8.6"
},
"devDependencies": {
"@siteimprove/alfa-enzyme": "^0.2.0",
"@siteimprove/alfa-jest": "^0.2.0",
"@siteimprove/alfa-enzyme": "^0.3.0",
"@siteimprove/alfa-jest": "^0.3.0",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^25.2.3",
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/component-testing/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "component-testing-vue",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "jest"
},
Expand All @@ -21,8 +21,8 @@
"vue-template-compiler": "^2.6.10"
},
"devDependencies": {
"@siteimprove/alfa-jest": "^0.2.0",
"@siteimprove/alfa-vue": "^0.2.0",
"@siteimprove/alfa-jest": "^0.3.0",
"@siteimprove/alfa-vue": "^0.3.0",
"@types/jest": "^25.2.3",
"@vue/test-utils": "^1.0.0-beta.29",
"jest": "^24.8.0"
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/page-testing/cypress/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"private": true,
"name": "page-testing-cypress",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "cypress run"
},
"devDependencies": {
"@siteimprove/alfa-cypress": "^0.2.0",
"@siteimprove/alfa-cypress": "^0.3.0",
"cypress": "^3.3.1"
}
}
6 changes: 3 additions & 3 deletions docs/examples/page-testing/puppeteer/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"private": true,
"name": "page-testing-puppeteer",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "mocha"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.2.0",
"@siteimprove/alfa-puppeteer": "^0.2.0",
"@siteimprove/alfa-chai": "^0.3.0",
"@siteimprove/alfa-puppeteer": "^0.3.0",
"@types/chai": "^4.2.3",
"@types/mocha": "^5.2.7",
"@types/puppeteer": "^2.0.1",
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/page-testing/webdriver/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"private": true,
"name": "page-testing-webdriver",
"version": "0.2.0",
"version": "0.3.0",
"scripts": {
"test": "wdio wdio.conf.js"
},
"devDependencies": {
"@siteimprove/alfa-chai": "^0.2.0",
"@siteimprove/alfa-webdriver": "^0.2.0",
"@siteimprove/alfa-chai": "^0.3.0",
"@siteimprove/alfa-webdriver": "^0.3.0",
"@types/chai": "^4.2.3",
"@types/mocha": "^5.2.7",
"@wdio/cli": "^5.14.4",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json.schemastore.org/lerna",
"version": "0.2.0",
"version": "0.3.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
Expand Down
34 changes: 17 additions & 17 deletions packages/alfa-act/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json.schemastore.org/package",
"name": "@siteimprove/alfa-act",
"homepage": "https://siteimprove.com",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"description": "Functionality for implementing rules specified in the ACT Rules Format",
"repository": {
Expand All @@ -18,24 +18,24 @@
"src/**/*.d.ts"
],
"dependencies": {
"@siteimprove/alfa-earl": "^0.2.0",
"@siteimprove/alfa-equatable": "^0.2.0",
"@siteimprove/alfa-functor": "^0.2.0",
"@siteimprove/alfa-future": "^0.2.0",
"@siteimprove/alfa-iterable": "^0.2.0",
"@siteimprove/alfa-json": "^0.2.0",
"@siteimprove/alfa-list": "^0.2.0",
"@siteimprove/alfa-mapper": "^0.2.0",
"@siteimprove/alfa-monad": "^0.2.0",
"@siteimprove/alfa-option": "^0.2.0",
"@siteimprove/alfa-record": "^0.2.0",
"@siteimprove/alfa-result": "^0.2.0",
"@siteimprove/alfa-sequence": "^0.2.0",
"@siteimprove/alfa-thunk": "^0.2.0",
"@siteimprove/alfa-trilean": "^0.2.0"
"@siteimprove/alfa-earl": "^0.3.0",
"@siteimprove/alfa-equatable": "^0.3.0",
"@siteimprove/alfa-functor": "^0.3.0",
"@siteimprove/alfa-future": "^0.3.0",
"@siteimprove/alfa-iterable": "^0.3.0",
"@siteimprove/alfa-json": "^0.3.0",
"@siteimprove/alfa-list": "^0.3.0",
"@siteimprove/alfa-mapper": "^0.3.0",
"@siteimprove/alfa-monad": "^0.3.0",
"@siteimprove/alfa-option": "^0.3.0",
"@siteimprove/alfa-record": "^0.3.0",
"@siteimprove/alfa-result": "^0.3.0",
"@siteimprove/alfa-sequence": "^0.3.0",
"@siteimprove/alfa-thunk": "^0.3.0",
"@siteimprove/alfa-trilean": "^0.3.0"
},
"devDependencies": {
"@siteimprove/alfa-test": "^0.2.0"
"@siteimprove/alfa-test": "^0.3.0"
},
"publishConfig": {
"access": "public",
Expand Down
5 changes: 3 additions & 2 deletions packages/alfa-act/src/outcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export namespace Outcome {
"earl:info": this._expectations
.toArray()
.reduce(
(message, [, expectation]) => message + "\n" + expectation.get(),
(message, [, expectation]) =>
message + "\n" + expectation.get().message,
""
)
.trim(),
Expand Down Expand Up @@ -223,7 +224,7 @@ export namespace Outcome {
.toArray()
.reduce((message, [, expectation]) => {
if (expectation.isErr()) {
message += "\n" + expectation.getErr();
message += "\n" + expectation.getErr().message;
}

return message;
Expand Down
12 changes: 6 additions & 6 deletions packages/alfa-affine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json.schemastore.org/package",
"name": "@siteimprove/alfa-affine",
"homepage": "https://siteimprove.com",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"description": "Functionality for working with affine transformations",
"repository": {
Expand All @@ -18,13 +18,13 @@
"src/**/*.d.ts"
],
"dependencies": {
"@siteimprove/alfa-equatable": "^0.2.0",
"@siteimprove/alfa-json": "^0.2.0",
"@siteimprove/alfa-math": "^0.2.0",
"@siteimprove/alfa-option": "^0.2.0"
"@siteimprove/alfa-equatable": "^0.3.0",
"@siteimprove/alfa-json": "^0.3.0",
"@siteimprove/alfa-math": "^0.3.0",
"@siteimprove/alfa-option": "^0.3.0"
},
"devDependencies": {
"@siteimprove/alfa-test": "^0.2.0"
"@siteimprove/alfa-test": "^0.3.0"
},
"publishConfig": {
"access": "public",
Expand Down
24 changes: 12 additions & 12 deletions packages/alfa-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json.schemastore.org/package",
"name": "@siteimprove/alfa-angular",
"homepage": "https://siteimprove.com",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"description": "Integrations and utilities for the Angular application framework",
"repository": {
Expand All @@ -21,21 +21,21 @@
],
"dependencies": {
"@angular/core": "^8.2.0",
"@siteimprove/alfa-chai": "^0.2.0",
"@siteimprove/alfa-device": "^0.2.0",
"@siteimprove/alfa-dom": "^0.2.0",
"@siteimprove/alfa-future": "^0.2.0",
"@siteimprove/alfa-http": "^0.2.0",
"@siteimprove/alfa-jasmine": "^0.2.0",
"@siteimprove/alfa-jest": "^0.2.0",
"@siteimprove/alfa-option": "^0.2.0",
"@siteimprove/alfa-unexpected": "^0.2.0",
"@siteimprove/alfa-web": "^0.2.0",
"@siteimprove/alfa-chai": "^0.3.0",
"@siteimprove/alfa-device": "^0.3.0",
"@siteimprove/alfa-dom": "^0.3.0",
"@siteimprove/alfa-future": "^0.3.0",
"@siteimprove/alfa-http": "^0.3.0",
"@siteimprove/alfa-jasmine": "^0.3.0",
"@siteimprove/alfa-jest": "^0.3.0",
"@siteimprove/alfa-option": "^0.3.0",
"@siteimprove/alfa-unexpected": "^0.3.0",
"@siteimprove/alfa-web": "^0.3.0",
"rxjs": "^6.5.2",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@siteimprove/alfa-test": "^0.2.0"
"@siteimprove/alfa-test": "^0.3.0"
},
"publishConfig": {
"access": "public",
Expand Down
5 changes: 1 addition & 4 deletions packages/alfa-angular/src/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Type,
} from "@siteimprove/alfa-dom";
import { Request, Response } from "@siteimprove/alfa-http";
import { Option } from "@siteimprove/alfa-option";
import { Page } from "@siteimprove/alfa-web";

import { ComponentFixture } from "@angular/core/testing";
Expand All @@ -32,9 +31,7 @@ export namespace Angular {
return Page.of(
Request.empty(),
Response.empty(),
Document.of((self) => [
Element.fromElement(toElement(nativeElement), Option.of(self)),
]),
Document.of([Element.from(toElement(nativeElement))]),
Device.standard()
);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/alfa-applicative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json.schemastore.org/package",
"name": "@siteimprove/alfa-applicative",
"homepage": "https://siteimprove.com",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"description": "Types for modelling applicative functors",
"repository": {
Expand All @@ -18,10 +18,10 @@
"src/**/*.d.ts"
],
"dependencies": {
"@siteimprove/alfa-mapper": "^0.2.0"
"@siteimprove/alfa-mapper": "^0.3.0"
},
"devDependencies": {
"@siteimprove/alfa-test": "^0.2.0"
"@siteimprove/alfa-test": "^0.3.0"
},
"publishConfig": {
"access": "public",
Expand Down
Loading

0 comments on commit 83f933d

Please sign in to comment.