Skip to content

Commit

Permalink
Rewrite to use Web IDL, and generally modernize
Browse files Browse the repository at this point in the history
Normative changes, all stemming from the Web IDL adaptation:

* All classes are now exposed globally. Formerly, ReadableStreamDefaultReader, ReadableStreamBYOBReader, ReadableStreamDefaultController, ReadableByteStreamController, WritableStreamDefaultWriter, WritableStreamDefaultController, and TransformStreamDefaultController were not exposed. Closes #586.

* All classes now have [Symbol.toStringTag] properties. (At least, pending whatwg/webidl#357 resolution.) Closes #952.

* All methods and accesors are now enumerable, per Web IDL defaults, instead of non-enumerable, per ECMAScript defaults.

* For the queuing strategy classes, their size and highWaterMark properties are now getters on the prototype, instead of data properties on the prototype and instance (respectively). Closes #1005. Note that the size function is not settable anymore, but highWaterMark has a setter.

* Some functions have changed their length property value.

* Some exceptions are thrown earlier, at argument-conversion time.

Editorial changes:

* All APIs are specified to using Web IDL now, instead of using a modified version of the ECMAScript specification conventions. We continue using abstract operations and completion records for now, and we have to drop down to the ECMAScript level in a couple places (notably for dealing with %ObjectPrototype% vs. null-prototype iteration result objects, and transferring array buffers). But overall this removes a lot of type-checking and conversion boilerplate from the specification.

* Individual abstract operations, constructors, methods, and properties no longer have their own heading. They are instead lumped together in sections. Closes #885.

* The constructors, methods, and properties are now documented in a per-class block, using the usual WHATWG "domintro" style. Closes #907.

* Abstract operations are now consistently alphabetized within their section. Closes #684.

* By using Bikeshed's <div algorithm> feature, we now get automatic identifier highlighting. Closes #687.

* Switched to 100-character line limits, 1-space indents, and omitting end tags, per WHATWG conventions.

* Removed usage of emu-algify in favor of using some more of Bikeshed's built-in features, plus manually annotating a few things.

* Switched to concise Bikeshed linking syntax, e.g. [=term=] and [$AbstractOp$].

* Eliminated a number of utility abstract operations, especially around calling functions, by better using Web IDL.

Other bug fixes:

* Web IDL makes constructor behavior clear, so this closes #965.
  • Loading branch information
domenic committed Apr 13, 2020
1 parent cfcd303 commit ca89482
Show file tree
Hide file tree
Showing 9 changed files with 5,476 additions and 5,452 deletions.
15 changes: 8 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ root = true
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 2
indent_size = 1
indent_style = space
trim_trailing_whitespace = true

[*.{js,bs}]
max_line_length = 120

[.gitmodules]
indent_style = tab
max_line_length = 100

[Makefile]
indent_style = tab

[.travis.yml]
indent_size = 2

[*.js]
max_line_length = 120

[.gitmodules]
indent_style = tab
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
/deploy_key.pub
/index.html
/review.sh
/index.html.*
/node_modules/
/npm-debug.log
6 changes: 0 additions & 6 deletions .pr-preview.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,5 @@
"force": 1,
"md-status": "LS-PR",
"md-Text-Macro": "PR-NUMBER {{ pull_request.number }}"
},
"post_processing": {
"name": "emu-algify",
"options": {
"throwingIndicators": true
}
}
}
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js: stable
sudo: false

env:
global:
Expand All @@ -12,7 +11,6 @@ before_install:
script:
- npm test
- cd ..
- npm install
- make deploy

branches:
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ SHELL=/bin/bash -o pipefail
.PHONY: local remote deploy review

remote: index.bs
curl https://api.csswg.org/bikeshed/ -f -F [email protected] > index.html.postbs -F md-Text-Macro="SNAPSHOT-LINK LOCAL COPY"
node_modules/.bin/emu-algify --throwing-indicators < index.html.postbs > index.html
curl https://api.csswg.org/bikeshed/ -f -F [email protected] > index.html -F md-Text-Macro="COMMIT-SHA LOCAL COPY"

local: index.bs
bikeshed spec index.bs index.html.postbs --md-Text-Macro="SNAPSHOT-LINK LOCAL COPY"
node_modules/.bin/emu-algify --throwing-indicators < index.html.postbs > index.html
bikeshed spec index.bs index.html --md-Text-Macro="COMMIT-SHA LOCAL COPY"

deploy: index.bs
curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh
EXTRA_FILES="demos/* demos/**/*" \
POST_BUILD_STEP='node_modules/.bin/emu-algify --throwing-indicators < "$$DIR/index.html" > "$$DIR/index.html.tmp"; mv "$$DIR/index.html.tmp" "$$DIR/index.html"' \
bash ./deploy.sh

review: index.bs
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ implementation in order to pass those tests.

## Building "locally"

This standard requires a recent version of [Node.js](https://nodejs.org/en/) to be installed as a
prerequisite. Once that's done, you'll need to do a one-time run of `npm install` to set up our
tooling.

For quick local iteration, run `make`. To verify your changes locally, run `make deploy`. See more
in the
[WHATWG Contributor Guidelines](https://github.com/whatwg/meta/blob/master/CONTRIBUTING.md#building).
Expand Down
10,797 changes: 5,466 additions & 5,331 deletions index.bs

Large diffs are not rendered by default.

83 changes: 0 additions & 83 deletions local-watch.js

This file was deleted.

11 changes: 0 additions & 11 deletions package.json

This file was deleted.

0 comments on commit ca89482

Please sign in to comment.