Update web-platform-tests to revision 66dc9c93f2c8ebd7c8fdc28fae20d92713c97806

This commit is contained in:
WPT Sync Bot 2019-06-26 10:22:48 +00:00
parent e488ea750b
commit 12f4ae132e
1651 changed files with 8123 additions and 14152 deletions

View file

@ -1,4 +0,0 @@
scratch
node_modules
lib-cov
browser-tests.html

View file

@ -1,5 +0,0 @@
language: node_js
node_js:
- node
- lts/*
- 6

View file

@ -1,292 +0,0 @@
# Change Log
## [v10.2.1](https://github.com/w3c/webidl2.js/tree/v10.2.1) (2018-03-09)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.2.0...v10.2.1)
**Merged pull requests:**
- Optimise tokenisation and whitespace skipping [\#139](https://github.com/w3c/webidl2.js/pull/139) ([ricea](https://github.com/ricea))
- refactor: small syntax changes [\#137](https://github.com/w3c/webidl2.js/pull/137) ([saschanaz](https://github.com/saschanaz))
## [v10.2.0](https://github.com/w3c/webidl2.js/tree/v10.2.0) (2018-01-30)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.1.0...v10.2.0)
**Merged pull requests:**
- Type on union idlType [\#135](https://github.com/w3c/webidl2.js/pull/135) ([saschanaz](https://github.com/saschanaz))
- feat: add argument/return type [\#134](https://github.com/w3c/webidl2.js/pull/134) ([saschanaz](https://github.com/saschanaz))
- feat: add dictionary/typedef-type [\#133](https://github.com/w3c/webidl2.js/pull/133) ([saschanaz](https://github.com/saschanaz))
- feat: add const-type for idlTypes [\#132](https://github.com/w3c/webidl2.js/pull/132) ([saschanaz](https://github.com/saschanaz))
- feat: add types on idlTypes [\#131](https://github.com/w3c/webidl2.js/pull/131) ([saschanaz](https://github.com/saschanaz))
- Auto acquisition for parser result changes [\#130](https://github.com/w3c/webidl2.js/pull/130) ([saschanaz](https://github.com/saschanaz))
## [v10.1.0](https://github.com/w3c/webidl2.js/tree/v10.1.0) (2018-01-19)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.0.0...v10.1.0)
**Closed issues:**
- Support `raises` and `setraises` [\#128](https://github.com/w3c/webidl2.js/issues/128)
- Support `legacycaller` [\#127](https://github.com/w3c/webidl2.js/issues/127)
- Improve "No semicolon after enum" message [\#119](https://github.com/w3c/webidl2.js/issues/119)
**Merged pull requests:**
- Let error messages include the current definition name [\#129](https://github.com/w3c/webidl2.js/pull/129) ([saschanaz](https://github.com/saschanaz))
## [v10.0.0](https://github.com/w3c/webidl2.js/tree/v10.0.0) (2017-12-20)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v9.0.0...v10.0.0)
**Closed issues:**
- Always return an array for idlType, etc. [\#113](https://github.com/w3c/webidl2.js/issues/113)
- Maintain writer.js or not? [\#109](https://github.com/w3c/webidl2.js/issues/109)
**Merged pull requests:**
- Remove typeExtAttrs from docs [\#124](https://github.com/w3c/webidl2.js/pull/124) ([saschanaz](https://github.com/saschanaz))
- Remove iterator documentation [\#123](https://github.com/w3c/webidl2.js/pull/123) ([saschanaz](https://github.com/saschanaz))
- Maintain writer.js [\#122](https://github.com/w3c/webidl2.js/pull/122) ([saschanaz](https://github.com/saschanaz))
- BREAKING CHANGE: remove deprecated iterator operation [\#121](https://github.com/w3c/webidl2.js/pull/121) ([saschanaz](https://github.com/saschanaz))
- Use for-of on tests [\#120](https://github.com/w3c/webidl2.js/pull/120) ([saschanaz](https://github.com/saschanaz))
- docs\(README\): iterables ildType is always array [\#118](https://github.com/w3c/webidl2.js/pull/118) ([marcoscaceres](https://github.com/marcoscaceres))
## [v9.0.0](https://github.com/w3c/webidl2.js/tree/v9.0.0) (2017-11-30)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.1.0...v9.0.0)
**Closed issues:**
- Code quality [\#116](https://github.com/w3c/webidl2.js/issues/116)
- Unable to parse HTMLAllCollection interface [\#114](https://github.com/w3c/webidl2.js/issues/114)
- Add support for mixin syntax [\#112](https://github.com/w3c/webidl2.js/issues/112)
- Whitespace issues [\#111](https://github.com/w3c/webidl2.js/issues/111)
**Merged pull requests:**
- Consistent array type for iterable.idlType [\#117](https://github.com/w3c/webidl2.js/pull/117) ([saschanaz](https://github.com/saschanaz))
- Revert "chore: drop Node 6 support \(\#102\)" [\#115](https://github.com/w3c/webidl2.js/pull/115) ([TimothyGu](https://github.com/TimothyGu))
## [v8.1.0](https://github.com/w3c/webidl2.js/tree/v8.1.0) (2017-11-03)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.0.1...v8.1.0)
**Closed issues:**
- Extended Attributes `rhs` should always be there [\#96](https://github.com/w3c/webidl2.js/issues/96)
**Merged pull requests:**
- Always add rhs property [\#110](https://github.com/w3c/webidl2.js/pull/110) ([saschanaz](https://github.com/saschanaz))
## [v8.0.1](https://github.com/w3c/webidl2.js/tree/v8.0.1) (2017-11-03)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v8.0.0...v8.0.1)
**Fixed bugs:**
- Comment order parsing bug [\#107](https://github.com/w3c/webidl2.js/issues/107)
**Merged pull requests:**
- Remove m postfix from all\_ws\(\) [\#108](https://github.com/w3c/webidl2.js/pull/108) ([saschanaz](https://github.com/saschanaz))
## [v8.0.0](https://github.com/w3c/webidl2.js/tree/v8.0.0) (2017-11-03)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v7.0.0...v8.0.0)
**Closed issues:**
- Remove creators support [\#100](https://github.com/w3c/webidl2.js/issues/100)
- Add mixin support [\#92](https://github.com/w3c/webidl2.js/issues/92)
**Merged pull requests:**
- Support mixins + includes statements [\#105](https://github.com/w3c/webidl2.js/pull/105) ([saschanaz](https://github.com/saschanaz))
- chore: drop Node 6 support [\#102](https://github.com/w3c/webidl2.js/pull/102) ([marcoscaceres](https://github.com/marcoscaceres))
- BREAKING CHANGE: drop creator support [\#101](https://github.com/w3c/webidl2.js/pull/101) ([saschanaz](https://github.com/saschanaz))
- Normalize some whitespace to pass wpt's lint [\#99](https://github.com/w3c/webidl2.js/pull/99) ([foolip](https://github.com/foolip))
## [v7.0.0](https://github.com/w3c/webidl2.js/tree/v7.0.0) (2017-10-27)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.1.0...v7.0.0)
**Closed issues:**
- Type conversion on default values is destructive [\#94](https://github.com/w3c/webidl2.js/issues/94)
- extended attribute structure missing type [\#89](https://github.com/w3c/webidl2.js/issues/89)
**Merged pull requests:**
- BREAKING CHANGE: argument + default types should be string [\#95](https://github.com/w3c/webidl2.js/pull/95) ([marcoscaceres](https://github.com/marcoscaceres))
## [v6.1.0](https://github.com/w3c/webidl2.js/tree/v6.1.0) (2017-10-23)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.0.1...v6.1.0)
**Merged pull requests:**
- feat: give extended attributes a type [\#90](https://github.com/w3c/webidl2.js/pull/90) ([marcoscaceres](https://github.com/marcoscaceres))
## [v6.0.1](https://github.com/w3c/webidl2.js/tree/v6.0.1) (2017-10-18)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v6.0.0...v6.0.1)
**Closed issues:**
- Enum values should be objects [\#86](https://github.com/w3c/webidl2.js/issues/86)
**Merged pull requests:**
- Use ES2015 syntax for tests [\#88](https://github.com/w3c/webidl2.js/pull/88) ([saschanaz](https://github.com/saschanaz))
## [v6.0.0](https://github.com/w3c/webidl2.js/tree/v6.0.0) (2017-10-17)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v5.0.0...v6.0.0)
**Merged pull requests:**
- BREAKING CHANGE: ret enum value as object [\#87](https://github.com/w3c/webidl2.js/pull/87) ([marcoscaceres](https://github.com/marcoscaceres))
## [v5.0.0](https://github.com/w3c/webidl2.js/tree/v5.0.0) (2017-10-17)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.2.0...v5.0.0)
**Closed issues:**
- Unable to parse annotated types in generics [\#83](https://github.com/w3c/webidl2.js/issues/83)
- Drop support for Node 4, move to 6 LTS [\#82](https://github.com/w3c/webidl2.js/issues/82)
**Merged pull requests:**
- BREAKING CHANGE: Use ES2015 syntax [\#84](https://github.com/w3c/webidl2.js/pull/84) ([saschanaz](https://github.com/saschanaz))
## [v4.2.0](https://github.com/w3c/webidl2.js/tree/v4.2.0) (2017-10-16)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.1.0...v4.2.0)
**Closed issues:**
- Remove legacy caller support [\#78](https://github.com/w3c/webidl2.js/issues/78)
- Should report error for using duplicate names [\#77](https://github.com/w3c/webidl2.js/issues/77)
**Merged pull requests:**
- Check duplicated names [\#80](https://github.com/w3c/webidl2.js/pull/80) ([saschanaz](https://github.com/saschanaz))
- Remove legacycaller [\#79](https://github.com/w3c/webidl2.js/pull/79) ([saschanaz](https://github.com/saschanaz))
- Add "sequence" property to IDL Type AST definition [\#76](https://github.com/w3c/webidl2.js/pull/76) ([lerouche](https://github.com/lerouche))
## [v4.1.0](https://github.com/w3c/webidl2.js/tree/v4.1.0) (2017-07-04)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.0.0...v4.1.0)
**Closed issues:**
- Parsing error for annonated inner types of generic types [\#71](https://github.com/w3c/webidl2.js/issues/71)
**Merged pull requests:**
- Support TypeWithExtendedAttributes on generics [\#75](https://github.com/w3c/webidl2.js/pull/75) ([saschanaz](https://github.com/saschanaz))
## [v4.0.0](https://github.com/w3c/webidl2.js/tree/v4.0.0) (2017-06-27)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v3.0.2...v4.0.0)
**Closed issues:**
- Remove serializer-related productions [\#73](https://github.com/w3c/webidl2.js/issues/73)
- Records don't seem to be working right [\#72](https://github.com/w3c/webidl2.js/issues/72)
- Document namespace member output [\#59](https://github.com/w3c/webidl2.js/issues/59)
**Merged pull requests:**
- BREAKING CHANGE: remove serializers \(closes \#73\) [\#74](https://github.com/w3c/webidl2.js/pull/74) ([marcoscaceres](https://github.com/marcoscaceres))
- Add documentation for namespaces [\#70](https://github.com/w3c/webidl2.js/pull/70) ([saschanaz](https://github.com/saschanaz))
## [v3.0.2](https://github.com/w3c/webidl2.js/tree/v3.0.2) (2017-05-29)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v3.0.1...v3.0.2)
**Closed issues:**
- Whitespace issues [\#64](https://github.com/w3c/webidl2.js/issues/64)
**Merged pull requests:**
- Test for latest LTS/stable node versions [\#69](https://github.com/w3c/webidl2.js/pull/69) ([saschanaz](https://github.com/saschanaz))
## [v3.0.1](https://github.com/w3c/webidl2.js/tree/v3.0.1) (2017-05-18)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v2.4.0...v3.0.1)
**Closed issues:**
- Is array syntax dead? [\#66](https://github.com/w3c/webidl2.js/issues/66)
- Remove exceptions support [\#65](https://github.com/w3c/webidl2.js/issues/65)
**Merged pull requests:**
- Fix whitespace error on parsing extended attributes [\#68](https://github.com/w3c/webidl2.js/pull/68) ([saschanaz](https://github.com/saschanaz))
- Remove deprecated IDL arrays and exceptions [\#67](https://github.com/w3c/webidl2.js/pull/67) ([saschanaz](https://github.com/saschanaz))
## [v2.4.0](https://github.com/w3c/webidl2.js/tree/v2.4.0) (2017-04-12)
[Full Changelog](https://github.com/w3c/webidl2.js/compare/v2.1.0...v2.4.0)
**Closed issues:**
- Add support for Annotated Types [\#60](https://github.com/w3c/webidl2.js/issues/60)
- Question: Convert WebIDL -\> Javascript [\#56](https://github.com/w3c/webidl2.js/issues/56)
- Get Robin to give us push permissions on npm [\#54](https://github.com/w3c/webidl2.js/issues/54)
- Add support for records [\#53](https://github.com/w3c/webidl2.js/issues/53)
- module not supported? [\#52](https://github.com/w3c/webidl2.js/issues/52)
- Add support for namespaces [\#51](https://github.com/w3c/webidl2.js/issues/51)
- Export is not AMD compatible [\#48](https://github.com/w3c/webidl2.js/issues/48)
- Can't represent large constants [\#21](https://github.com/w3c/webidl2.js/issues/21)
**Merged pull requests:**
- Update webidl2.js [\#63](https://github.com/w3c/webidl2.js/pull/63) ([tqeto](https://github.com/tqeto))
- Remove support for MapClass \(no longer valid in WebIDL\) [\#62](https://github.com/w3c/webidl2.js/pull/62) ([dontcallmedom](https://github.com/dontcallmedom))
- Add support for annotated types [\#61](https://github.com/w3c/webidl2.js/pull/61) ([dontcallmedom](https://github.com/dontcallmedom))
- Support namespaces [\#58](https://github.com/w3c/webidl2.js/pull/58) ([saschanaz](https://github.com/saschanaz))
- Add support for records [\#57](https://github.com/w3c/webidl2.js/pull/57) ([TimothyGu](https://github.com/TimothyGu))
- Refactor [\#50](https://github.com/w3c/webidl2.js/pull/50) ([marcoscaceres](https://github.com/marcoscaceres))
- feat\(lib\): add AMD export support \(closes \#48\) [\#49](https://github.com/w3c/webidl2.js/pull/49) ([marcoscaceres](https://github.com/marcoscaceres))
## [v2.1.0](https://github.com/w3c/webidl2.js/tree/v2.1.0) (2016-08-12)
**Closed issues:**
- Exception when parsing test/syntax/idl/typedef.widl [\#46](https://github.com/w3c/webidl2.js/issues/46)
- Wrong jsondiffpatch location [\#42](https://github.com/w3c/webidl2.js/issues/42)
- 'npm install' fails on building microtime [\#40](https://github.com/w3c/webidl2.js/issues/40)
- Can't represent union types in typedefs [\#38](https://github.com/w3c/webidl2.js/issues/38)
- tokenise\(\) assumes a specific property enumeration order [\#27](https://github.com/w3c/webidl2.js/issues/27)
- Add support for iterable\<\>, maplike\<\>, setlike\<\> declarations [\#24](https://github.com/w3c/webidl2.js/issues/24)
- WebIDL2 fails to parse `attribute Promise\<DOMString\>\[\] baz` [\#19](https://github.com/w3c/webidl2.js/issues/19)
- Support for ExtendedAttributeIdentList \(current editor's draft\) [\#18](https://github.com/w3c/webidl2.js/issues/18)
- No Licensing Information [\#17](https://github.com/w3c/webidl2.js/issues/17)
- how to regenerate w3c idl files ? [\#14](https://github.com/w3c/webidl2.js/issues/14)
- What is lib/writer.js [\#13](https://github.com/w3c/webidl2.js/issues/13)
- Numerous tests are failing [\#7](https://github.com/w3c/webidl2.js/issues/7)
- Add support for missing types in ServiceWorker [\#5](https://github.com/w3c/webidl2.js/issues/5)
- How can I parse just a function? [\#3](https://github.com/w3c/webidl2.js/issues/3)
- Parser throws on nullable array of nullable array [\#2](https://github.com/w3c/webidl2.js/issues/2)
- Parser throws on nullable array of any [\#1](https://github.com/w3c/webidl2.js/issues/1)
**Merged pull requests:**
- Fix "default": undefined [\#47](https://github.com/w3c/webidl2.js/pull/47) ([mkwtys](https://github.com/mkwtys))
- Replace expect.js with expct [\#45](https://github.com/w3c/webidl2.js/pull/45) ([halton](https://github.com/halton))
- Correct jsondiffpatch location. [\#44](https://github.com/w3c/webidl2.js/pull/44) ([halton](https://github.com/halton))
- Bump microtime to 2.1.1 [\#43](https://github.com/w3c/webidl2.js/pull/43) ([halton](https://github.com/halton))
- Expand writer support [\#39](https://github.com/w3c/webidl2.js/pull/39) ([markandrus](https://github.com/markandrus))
- Accept wider \(but still incomplete\) set of allowed syntax for extended attributes [\#37](https://github.com/w3c/webidl2.js/pull/37) ([mlogan](https://github.com/mlogan))
- Add test for callback with multiple arguments. [\#36](https://github.com/w3c/webidl2.js/pull/36) ([tobie](https://github.com/tobie))
- Iterables [\#34](https://github.com/w3c/webidl2.js/pull/34) ([motiz88](https://github.com/motiz88))
- Allow trailing comma in enum value lists, per spec [\#33](https://github.com/w3c/webidl2.js/pull/33) ([motiz88](https://github.com/motiz88))
- Allow typedefs within interfaces \(behind an opt-in flag\) [\#32](https://github.com/w3c/webidl2.js/pull/32) ([motiz88](https://github.com/motiz88))
- In draft [\#31](https://github.com/w3c/webidl2.js/pull/31) ([othree](https://github.com/othree))
- Add support for extended attributes identifier lists [\#29](https://github.com/w3c/webidl2.js/pull/29) ([tobie](https://github.com/tobie))
- Make `attribute Promise\<T\>\[\] attr;` work. [\#26](https://github.com/w3c/webidl2.js/pull/26) ([jyasskin](https://github.com/jyasskin))
- Parse required dictionary fields. [\#25](https://github.com/w3c/webidl2.js/pull/25) ([jyasskin](https://github.com/jyasskin))
- Define the WebIDL2 property on self rather than window. [\#23](https://github.com/w3c/webidl2.js/pull/23) ([Ms2ger](https://github.com/Ms2ger))
- Teach WebIDL2 to parse \[\] default values. [\#22](https://github.com/w3c/webidl2.js/pull/22) ([jyasskin](https://github.com/jyasskin))
- Support ID list in extended attributes [\#20](https://github.com/w3c/webidl2.js/pull/20) ([othree](https://github.com/othree))
- Make sure that `sequence` property of idl types is set to false if the type is actually `sequence`. [\#16](https://github.com/w3c/webidl2.js/pull/16) ([tobie](https://github.com/tobie))
- Parametrized [\#15](https://github.com/w3c/webidl2.js/pull/15) ([tobie](https://github.com/tobie))
- Add promise support [\#12](https://github.com/w3c/webidl2.js/pull/12) ([tobie](https://github.com/tobie))
- Remove broken coverage support from travis for now. [\#11](https://github.com/w3c/webidl2.js/pull/11) ([tobie](https://github.com/tobie))
- Add support for \[MapClass\(type, type\)\]. [\#10](https://github.com/w3c/webidl2.js/pull/10) ([tobie](https://github.com/tobie))
- Incorporate tests from widlproc\[1\] and remove dependency on said project. [\#9](https://github.com/w3c/webidl2.js/pull/9) ([tobie](https://github.com/tobie))
- README incorrectly recommended updating the widlproc submodule. [\#8](https://github.com/w3c/webidl2.js/pull/8) ([tobie](https://github.com/tobie))
- Fix bug where instrumented version of webidl2 was loaded. [\#6](https://github.com/w3c/webidl2.js/pull/6) ([tobie](https://github.com/tobie))
- Use https:// instead of git:// [\#4](https://github.com/w3c/webidl2.js/pull/4) ([Manishearth](https://github.com/Manishearth))
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

View file

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 Robin Berjon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,629 +0,0 @@
# WebIDL 2
[![NPM version](https://badge.fury.io/js/webidl2.svg)](http://badge.fury.io/js/webidl2)
## Purpose
This is a parser for the [WebIDL](http://dev.w3.org/2006/webapi/WebIDL/) language. If
you don't know what that is, then you probably don't need it. It is meant to be used
both in Node and in the browser (the parser likely works in other JS environments, but
not the test suite).
## Installation
Just the usual. For Node:
```Bash
npm install webidl2
```
In the browser:
```HTML
<script src='webidl2.js'></script>
```
## Documentation
The API to WebIDL2 is trivial: you parse a string of WebIDL and it returns a syntax tree.
### Parsing
In Node, that happens with:
```JS
var WebIDL2 = require("webidl2");
var tree = WebIDL2.parse("string of WebIDL");
```
In the browser:
```HTML
<script src='webidl2.js'></script>
<script>
var tree = WebIDL2.parse("string of WebIDL");
</script>
```
### Errors
When there is a syntax error in the WebIDL, it throws an exception object with the following
properties:
* `message`: the error message
* `line`: the line at which the error occurred.
* `input`: a short peek at the text at the point where the error happened
* `tokens`: the five tokens at the point of error, as understood by the tokeniser
(this is the same content as `input`, but seen from the tokeniser's point of view)
The exception also has a `toString()` method that hopefully should produce a decent
error message.
### AST (Abstract Syntax Tree)
The `parse()` method returns a tree object representing the parse tree of the IDL.
Comment and white space are not represented in the AST.
The root of this object is always an array of definitions (where definitions are
any of interfaces, dictionaries, callbacks, etc. — anything that can occur at the root
of the IDL).
### IDL Type
This structure is used in many other places (operation return types, argument types, etc.).
It captures a WebIDL type with a number of options. Types look like this and are typically
attached to a field called `idlType`:
```JS
{
"type": "attribute-type",
"generic": null,
"idlType": "unsigned short",
"nullable": false,
"union": false,
"extAttrs": [...]
}
```
Where the fields are as follows:
* `type`: String indicating where this type is used. Can be `null` if not applicable.
* `generic`: String indicating the generic type (e.g. "Promise", "sequence"). `null`
otherwise.
* `idlType`: Can be different things depending on context. In most cases, this will just
be a string with the type name. But the reason this field isn't called "typeName" is
because it can take more complex values. If the type is a union, then this contains an
array of the types it unites. If it is a generic type, it contains the IDL type
description for the type in the sequence, the eventual value of the promise, etc.
* `nullable`: Boolean indicating whether this is nullable or not.
* `union`: Boolean indicating whether this is a union type or not.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Interface
Interfaces look like this:
```JS
{
"type": "interface",
"name": "Animal",
"partial": false,
"members": [...],
"inheritance": null,
"extAttrs": [...]
}, {
"type": "interface",
"name": "Human",
"partial": false,
"members": [...],
"inheritance": "Animal",
"extAttrs": [...]
}
```
The fields are as follows:
* `type`: Always "interface".
* `name`: The name of the interface.
* `partial`: A boolean indicating whether it's a partial interface.
* `members`: An array of interface members (attributes, operations, etc.). Empty if there are none.
* `inheritance`: A string giving the name of an interface this one inherits from, `null` otherwise.
**NOTE**: In v1 this was an array, but multiple inheritance is no longer supported so this didn't make
sense.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Interface mixins
Interfaces mixins look like this:
```JS
{
"type": "interface mixin",
"name": "Animal",
"partial": false,
"members": [...],
"extAttrs": [...]
}, {
"type": "interface mixin",
"name": "Human",
"partial": false,
"members": [...],
"extAttrs": [...]
}
```
The fields are as follows:
* `type`: Always "interface mixin".
* `name`: The name of the interface mixin.
* `partial`: A boolean indicating whether it's a partial interface mixin.
* `members`: An array of interface members (attributes, operations, etc.). Empty if there are none.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Namespace
Namespaces look like this:
```JS
{
"type": "namespace",
"name": "Console",
"partial": false,
"members": [...],
"extAttrs": [...]
}
```
The fields are as follows:
* `type`: Always "namespace".
* `name`: The name of the namespace.
* `partial`: A boolean indicating whether it's a partial namespace.
* `members`: An array of namespace members (attributes and operations). Empty if there are none.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Callback Interfaces
These are captured by the same structure as [Interfaces](#interface) except that
their `type` field is "callback interface".
### Callback
A callback looks like this:
```JS
{
"type": "callback",
"name": "AsyncOperationCallback",
"idlType": {
"type": "return-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "void",
"extAttrs": []
},
"arguments": [...],
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "callback".
* `name`: The name of the callback.
* `idlType`: An [IDL Type](#idl-type) describing what the callback returns.
* `arguments`: A list of [arguments](#arguments), as in function paramters.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Dictionary
A dictionary looks like this:
```JS
{
"type": "dictionary",
"name": "PaintOptions",
"partial": false,
"members": [{
"type": "field",
"name": "fillPattern",
"required": false,
"idlType": {
"type": "dictionary-type",
"sequence": false,
"generic": null,
"nullable": true,
"union": false,
"idlType": "DOMString",
"extAttrs": [...]
},
"extAttrs": [],
"default": {
"type": "string",
"value": "black"
}
}],
"inheritance": null,
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "dictionary".
* `name`: The dictionary name.
* `partial`: Boolean indicating whether it's a partial dictionary.
* `members`: An array of members (see below).
* `inheritance`: A string indicating which dictionary is being inherited from, `null` otherwise.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
All the members are fields as follows:
* `type`: Always "field".
* `name`: The name of the field.
* `required`: Boolean indicating whether this is a [required](https://heycam.github.io/webidl/#required-dictionary-member) field.
* `idlType`: An [IDL Type](#idl-type) describing what field's type.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
* `default`: A [default value](#default-and-const-values), absent if there is none.
### Enum
An enum looks like this:
```JS
{
"type": "enum",
"name": "MealType",
"values": [
{ "type": "string", "value": "rice" },
{ "type": "string", "value": "noodles" },
{ "type": "string", "value": "other" }
],
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "enum".
* `name`: The enum's name.
* `values`: An array of values.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Typedef
A typedef looks like this:
```JS
{
"type": "typedef",
"idlType": {
"type": "typedef-type",
"sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"type": "typedef-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "Point",
"extAttrs": [...]
},
"extAttrs": [...]
},
"name": "PointSequence",
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "typedef".
* `name`: The typedef's name.
* `idlType`: An [IDL Type](#idl-type) describing what typedef's type.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Implements
An implements definition looks like this:
```JS
{
"type": "implements",
"target": "Node",
"implements": "EventTarget",
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "implements".
* `target`: The interface that implements another.
* `implements`: The interface that is being implemented by the target.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Includes
An includes definition looks like this:
```JS
{
"type": "includes",
"target": "Node",
"includes": "EventTarget",
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "includes".
* `target`: The interface that includes an interface mixin.
* `includes`: The interface mixin that is being included by the target.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Operation Member
An operation looks like this:
```JS
{
"type": "operation",
"getter": false,
"setter": false,
"deleter": false,
"static": false,
"stringifier": false,
"idlType": {
"type": "return-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "void",
"extAttrs": []
},
"name": "intersection",
"arguments": [{
"optional": false,
"variadic": true,
"extAttrs": [],
"idlType": {
"type": "argument-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "long",
"extAttrs": [...]
},
"name": "ints"
}],
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "operation".
* `getter`: True if a getter operation.
* `setter`: True if a setter operation.
* `deleter`: True if a deleter operation.
* `static`: True if a static operation.
* `stringifier`: True if a stringifier operation.
* `idlType`: An [IDL Type](#idl-type) of what the operation returns. If a stringifier, may be absent.
* `name`: The name of the operation. If a stringifier, may be `null`.
* `arguments`: An array of [arguments](#arguments) for the operation.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Attribute Member
An attribute member looks like this:
```JS
{
"type": "attribute",
"static": false,
"stringifier": false,
"inherit": false,
"readonly": false,
"idlType": {
"type": "attribute-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "RegExp",
"extAttrs": [...]
},
"name": "regexp",
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "attribute".
* `name`: The attribute's name.
* `static`: True if it's a static attribute.
* `stringifier`: True if it's a stringifier attribute.
* `inherit`: True if it's an inherit attribute.
* `readonly`: True if it's a read-only attribute.
* `idlType`: An [IDL Type](#idl-type) for the attribute.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Constant Member
A constant member looks like this:
```JS
{
"type": "const",
"nullable": false,
"idlType": {
"type": "const-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "boolean"
"extAttrs": []
},
"name": "DEBUG",
"value": {
"type": "boolean",
"value": false
},
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always "const".
* `nullable`: Whether its type is nullable.
* `idlType`: An [IDL Type](#idl-type) of the constant that represents a simple type, the type name.
* `name`: The name of the constant.
* `value`: The constant value as described by [Const Values](#default-and-const-values)
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Arguments
The arguments (e.g. for an operation) look like this:
```JS
{
"arguments": [{
"optional": false,
"variadic": true,
"extAttrs": [],
"idlType": {
"type": "argument-type",
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "long",
"extAttrs": [...]
},
"name": "ints"
}]
}
```
The fields are as follows:
* `optional`: True if the argument is optional.
* `variadic`: True if the argument is variadic.
* `idlType`: An [IDL Type](#idl-type) describing the type of the argument.
* `name`: The argument's name.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
### Extended Attributes
Extended attributes are arrays of items that look like this:
```JS
{
"extAttrs": [{
"name": "TreatNullAs",
"arguments": null,
"type": "extended-attribute",
"rhs": {
"type": "identifier",
"value": "EmptyString"
}
}]
}
```
The fields are as follows:
* `name`: The extended attribute's name.
* `arguments`: If the extended attribute takes arguments (e.g. `[Foo()]`) or if
its right-hand side does (e.g. `[NamedConstructor=Name(DOMString blah)]`) they
are listed here. Note that an empty arguments list will produce an empty array,
whereas the lack thereof will yield a `null`. If there is an `rhs` field then
they are the right-hand side's arguments, otherwise they apply to the extended
attribute directly.
* `type`: Always `"extended-attribute"`.
* `rhs`: If there is a right-hand side, this will capture its `type` (which can be
"identifier" or "identifier-list") and its `value`.
### Default and Const Values
Dictionary fields and operation arguments can take default values, and constants take
values, all of which have the following fields:
* `type`: One of string, number, boolean, null, Infinity, NaN, or sequence.
For string, number, boolean, and sequence:
* `value`: The value of the given type, as a string. For sequence, the only possible value is `[]`.
For Infinity:
* `negative`: Boolean indicating whether this is negative Infinity or not.
### `iterable<>`, `legacyiterable<>`, `maplike<>`, `setlike<>` declarations
These appear as members of interfaces that look like this:
```JS
{
"type": "maplike", // or "legacyiterable" / "iterable" / "setlike"
"idlType": /* One or two types */ ,
"readonly": false, // only for maplike and setlike
"extAttrs": []
}
```
The fields are as follows:
* `type`: Always one of "iterable", "legacyiterable", "maplike" or "setlike".
* `idlType`: An array with one or more [IDL Types](#idl-type) representing the declared type arguments.
* `readonly`: Whether the maplike or setlike is declared as read only.
* `extAttrs`: A list of [extended attributes](#extended-attributes).
## Testing
### Running
The test runs with mocha and expect.js. Normally, running mocha in the root directory
should be enough once you're set up.
### Coverage
Current test coverage, as documented in `coverage.html`, is 95%. You can run your own
coverage analysis with:
```Bash
jscoverage lib lib-cov
```
That will create the lib-cov directory with instrumented code; the test suite knows
to use that if needed. You can then run the tests with:
```Bash
JSCOV=1 mocha --reporter html-cov > coverage.html
```
Note that I've been getting weirdly overescaped results from the html-cov reporter,
so you might wish to try this instead:
```Bash
JSCOV=1 mocha --reporter html-cov | sed "s/&lt;/</g" | sed "s/&gt;/>/g" | sed "s/&quot;/\"/g" > coverage.html
```
### Browser tests
In order to test in the browser, get inside `test/web` and run `make-web-tests.js`. This
will generate a `browser-tests.html` file that you can open in a browser. As of this
writing tests pass in the latest Firefox, Chrome, Opera, and Safari. Testing on IE
and older versions will happen progressively.

View file

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>WebIDL 2 Checker</title>
<script src='../lib/webidl2.js'></script>
<script>
let parserResult = undefined;
function formatParserOutput() {
const outputEl = document.getElementById('webidl-checker-output');
if (parserResult) {
const prettyPrintEl = document.getElementById('pretty-print');
outputEl.innerText = JSON.stringify(parserResult, null, prettyPrintEl.checked ? 2 : null);
} else {
outputEl.innerText = '';
}
}
function checkWebIDL(textToCheck) {
const validation = document.getElementById('webidl-checker-validation');
parserResult = null;
try {
parserResult = WebIDL2.parse(textToCheck);
validation.innerText = 'WebIDL parsed successfully!';
} catch (e) {
validation.innerText = 'Exception while parsing WebIDL. See JavaScript console for more details.\n\n' + e.toString();
// Pass it along to the JavaScript console.
throw e;
} finally {
formatParserOutput();
}
}
</script>
<style>
textarea {
font-family: monospace;
}
</style>
</head>
<body>
<h2>WebIDL Checker</h2>
<p>This is an online checker for WebIDL built on the <a href="https://github.com/w3c/webidl2.js">webidl2.js</a> project.</p>
<p>Enter your WebIDL to check below:</p>
<textarea id='webidl-to-check' rows='20' cols='80'></textarea>
<br>
<input type='button' value='Check WebIDL' onclick='checkWebIDL(document.getElementById("webidl-to-check").value)'>
<p>Validation results:</p>
<textarea id='webidl-checker-validation' rows='20' cols='80'></textarea>
<p>Parser output:</p>
<textarea id='webidl-checker-output' rows='20' cols='80'></textarea>
<br>
<input type='checkbox' id='pretty-print' checked='true' onchange='formatParserOutput()'>Pretty Print
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
module.exports = require("./lib/webidl2.js");

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
Content-Type: text/javascript; charset=utf-8

View file

@ -1,221 +0,0 @@
"use strict";
(() => {
function write(ast, opt = {}) {
const noop = str => str;
const optNames = "type".split(" ");
const context = [];
for (const o of optNames) {
if (!opt[o]) opt[o] = noop;
}
function literal(it) {
return it.value;
};
function type(it) {
if (typeof it === "string") return opt.type(it); // XXX should maintain some context
let ret = extended_attributes(it.extAttrs);
if (it.union) ret += `(${it.idlType.map(type).join(" or ")})`;
else {
if (it.generic) ret += `${it.generic}<`;
if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(", ");
else ret += type(it.idlType);
if (it.generic) ret += ">";
}
if (it.nullable) ret += "?";
return ret;
};
function const_value(it) {
const tp = it.type;
if (tp === "boolean") return it.value ? "true" : "false";
else if (tp === "null") return "null";
else if (tp === "Infinity") return (it.negative ? "-" : "") + "Infinity";
else if (tp === "NaN") return "NaN";
else if (tp === "number") return it.value;
else if (tp === "sequence") return "[]";
else return `"${it.value}"`;
};
function argument(arg) {
let ret = extended_attributes(arg.extAttrs);
if (arg.optional) ret += "optional ";
ret += type(arg.idlType);
if (arg.variadic) ret += "...";
ret += ` ${arg.escapedName}`;
if (arg.default) ret += ` = ${const_value(arg.default)}`;
return ret;
};
function make_ext_at(it) {
context.unshift(it);
let ret = it.name;
if (it.rhs) {
if (it.rhs.type === "identifier-list") ret += `=(${it.rhs.value.join(",")})`;
else ret += `=${it.rhs.value}`;
}
if (it.arguments) ret += `(${it.arguments.length ? it.arguments.map(argument).join(",") : ""})`;
context.shift(); // XXX need to add more contexts, but not more than needed for ReSpec
return ret;
};
function extended_attributes(eats) {
if (!eats || !eats.length) return "";
return `[${eats.map(make_ext_at).join(", ")}]`;
};
const modifiers = "getter setter deleter stringifier static".split(" ");
function operation(it) {
let ret = extended_attributes(it.extAttrs);
if (it.stringifier && !it.idlType) return "stringifier;";
for (const mod of modifiers) {
if (it[mod]) ret += mod + " ";
}
ret += type(it.idlType) + " ";
if (it.name) ret += it.escapedName;
ret += `(${it.arguments.map(argument).join(",")});`;
return ret;
};
function attribute(it) {
let ret = extended_attributes(it.extAttrs);
if (it.static) ret += "static ";
if (it.stringifier) ret += "stringifier ";
if (it.inherit) ret += "inherit ";
if (it.readonly) ret += "readonly ";
ret += `attribute ${type(it.idlType)} ${it.escapedName};`;
return ret;
};
function interface_(it) {
let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `interface ${it.name} `;
if (it.inheritance) ret += `: ${it.inheritance} `;
ret += `{${iterate(it.members)}};`;
return ret;
};
function interface_mixin(it) {
let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `interface mixin ${it.name} `;
ret += `{${iterate(it.members)}};`;
return ret;
}
function namespace(it) {
let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `namespace ${it.name} `;
ret += `{${iterate(it.members)}};`;
return ret;
}
function dictionary(it) {
let ret = extended_attributes(it.extAttrs);
if (it.partial) ret += "partial ";
ret += `dictionary ${it.name} `;
if (it.inheritance) ret += `: ${it.inheritance} `;
ret += `{${iterate(it.members)}};`;
return ret;
};
function field(it) {
let ret = extended_attributes(it.extAttrs);
if (it.required) ret += "required ";
ret += `${type(it.idlType)} ${it.escapedName}`;
if (it.default) ret += ` = ${const_value(it.default)}`;
ret += ";";
return ret;
};
function const_(it) {
const ret = extended_attributes(it.extAttrs);
return `${ret}const ${type(it.idlType)}${it.nullable ? "?" : ""} ${it.name} = ${const_value(it.value)};`;
};
function typedef(it) {
let ret = extended_attributes(it.extAttrs);
ret += `typedef ${extended_attributes(it.typeExtAttrs)}`;
return `${ret}${type(it.idlType)} ${it.name};`;
};
function implements_(it) {
const ret = extended_attributes(it.extAttrs);
return `${ret}${it.target} implements ${it.implements};`;
};
function includes(it) {
const ret = extended_attributes(it.extAttrs);
return `${ret}${it.target} includes ${it.includes};`;
};
function callback(it) {
const ret = extended_attributes(it.extAttrs);
return `${ret}callback ${it.name} = ${type(it.idlType)}(${it.arguments.map(argument).join(",")});`;
};
function enum_(it) {
let ret = extended_attributes(it.extAttrs);
ret += `enum ${it.name} {`;
for (const v of it.values) {
ret += `"${v.value}",`;
}
return ret + "};";
};
function iterable(it) {
return `iterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`;
};
function legacyiterable(it) {
return `legacyiterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`;
};
function maplike(it) {
return `${it.readonly ? "readonly " : ""}maplike<${it.idlType.map(type).join(", ")}>;`;
};
function setlike(it) {
return `${it.readonly ? "readonly " : ""}setlike<${type(it.idlType[0])}>;`;
};
function callbackInterface(it) {
return `callback ${interface_(it)}`;
};
const table = {
interface: interface_,
"interface mixin": interface_mixin,
namespace,
operation,
attribute,
dictionary,
field,
const: const_,
typedef,
implements: implements_,
includes,
callback,
enum: enum_,
iterable,
legacyiterable,
maplike,
setlike,
"callback interface": callbackInterface
};
function dispatch(it) {
const dispatcher = table[it.type];
if (!dispatcher) {
throw new Error(`Type "${it.type}" is unsupported`)
}
return table[it.type](it);
};
function iterate(things) {
if (!things) return;
let ret = "";
for (const thing of things) ret += dispatch(thing);
return ret;
};
return iterate(ast);
};
const obj = {
write
};
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = obj;
} else if (typeof define === 'function' && define.amd) {
define([], () => obj);
} else {
(self || window).WebIDL2Writer = obj;
}
})();

View file

@ -1,700 +0,0 @@
{
"name": "webidl2",
"version": "13.0.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz",
"integrity": "sha512-eVXQSbu/RimU6OKcK2/gDJVTFcxXJI4sHbIqw2mhwMZeQ2as/8AhS9DGkEDoHMBBNJZ5B0US63lF56x+KDcxiA==",
"dev": true,
"requires": {
"@babel/highlight": "7.0.0-beta.40"
}
},
"@babel/highlight": {
"version": "7.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.40.tgz",
"integrity": "sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^3.0.0"
}
},
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"arr-diff": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
"dev": true,
"requires": {
"arr-flatten": "^1.0.1"
}
},
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
"dev": true
},
"array-unique": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"dev": true,
"requires": {
"expand-range": "^1.8.1",
"preserve": "^0.2.0",
"repeat-element": "^1.1.2"
}
},
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
"chalk": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",
"integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"color-convert": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
"integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
"dev": true,
"requires": {
"color-name": "^1.1.1"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"commander": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"diff-match-patch": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz",
"integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=",
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
"expand-brackets": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
"dev": true,
"requires": {
"is-posix-bracket": "^0.1.0"
}
},
"expand-range": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"dev": true,
"requires": {
"fill-range": "^2.1.0"
}
},
"expect": {
"version": "22.4.0",
"resolved": "https://registry.npmjs.org/expect/-/expect-22.4.0.tgz",
"integrity": "sha512-Fiy862jT3qc70hwIHwwCBNISmaqBrfWKKrtqyMJ6iwZr+6KXtcnHojZFtd63TPRvRl8EQTJ+YXYy2lK6/6u+Hw==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.0",
"jest-diff": "^22.4.0",
"jest-get-type": "^22.1.0",
"jest-matcher-utils": "^22.4.0",
"jest-message-util": "^22.4.0",
"jest-regex-util": "^22.1.0"
}
},
"extglob": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
"dev": true,
"requires": {
"is-extglob": "^1.0.0"
}
},
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
"dev": true
},
"fill-range": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
"integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
"dev": true,
"requires": {
"is-number": "^2.1.0",
"isobject": "^2.0.0",
"randomatic": "^3.0.0",
"repeat-element": "^1.1.2",
"repeat-string": "^1.5.2"
}
},
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
"dev": true
},
"for-own": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
"dev": true,
"requires": {
"for-in": "^1.0.1"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"glob-base": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
"dev": true,
"requires": {
"glob-parent": "^2.0.0",
"is-glob": "^2.0.0"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
"is-glob": "^2.0.0"
}
},
"growl": {
"version": "1.10.3",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz",
"integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
"is-dotfile": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
"dev": true
},
"is-equal-shallow": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
"dev": true,
"requires": {
"is-primitive": "^2.0.0"
}
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
"dev": true
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "^1.0.0"
}
},
"is-number": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
"dev": true,
"requires": {
"kind-of": "^3.0.2"
}
},
"is-posix-bracket": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
"dev": true
},
"is-primitive": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
"dev": true
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"isobject": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
"dev": true,
"requires": {
"isarray": "1.0.0"
}
},
"jest-diff": {
"version": "22.4.0",
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.0.tgz",
"integrity": "sha512-+/t20WmnkOkB8MOaGaPziI8zWKxquMvYw4Ub+wOzi7AUhmpFXz43buWSxVoZo4J5RnCozpGbX3/FssjJ5KV9Nw==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
"diff": "^3.2.0",
"jest-get-type": "^22.1.0",
"pretty-format": "^22.4.0"
}
},
"jest-get-type": {
"version": "22.1.0",
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.1.0.tgz",
"integrity": "sha512-nD97IVOlNP6fjIN5i7j5XRH+hFsHL7VlauBbzRvueaaUe70uohrkz7pL/N8lx/IAwZRTJ//wOdVgh85OgM7g3w==",
"dev": true
},
"jest-matcher-utils": {
"version": "22.4.0",
"resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz",
"integrity": "sha512-03m3issxUXpWMwDYTfmL8hRNewUB0yCRTeXPm+eq058rZxLHD9f5NtSSO98CWHqe4UyISIxd9Ao9iDVjHWd2qg==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
"jest-get-type": "^22.1.0",
"pretty-format": "^22.4.0"
}
},
"jest-message-util": {
"version": "22.4.0",
"resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.0.tgz",
"integrity": "sha512-eyCJB0T3hrlpFF2FqQoIB093OulP+1qvATQmD3IOgJgMGqPL6eYw8TbC5P/VCWPqKhGL51xvjIIhow5eZ2wHFw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0-beta.35",
"chalk": "^2.0.1",
"micromatch": "^2.3.11",
"slash": "^1.0.0",
"stack-utils": "^1.0.1"
}
},
"jest-regex-util": {
"version": "22.1.0",
"resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.1.0.tgz",
"integrity": "sha512-on0LqVS6Xeh69sw3d1RukVnur+lVOl3zkmb0Q54FHj9wHoq6dbtWqb3TSlnVUyx36hqjJhjgs/QLqs07Bzu72Q==",
"dev": true
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"dev": true
},
"jsondiffpatch": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.3.5.tgz",
"integrity": "sha512-v7eaGLDMCHXH+fsIaZhptEUJmS8EJpunq7IM4cc4vIT/kSRAkaZ6ZF4ebiNcyUelL0znbvj6o2B5Gh9v7Og0BQ==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
"diff-match-patch": "^1.0.0"
}
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
},
"math-random": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
"integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=",
"dev": true
},
"micromatch": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
"dev": true,
"requires": {
"arr-diff": "^2.0.0",
"array-unique": "^0.2.1",
"braces": "^1.8.2",
"expand-brackets": "^0.1.4",
"extglob": "^0.3.1",
"filename-regex": "^2.0.0",
"is-extglob": "^1.0.0",
"is-glob": "^2.0.1",
"kind-of": "^3.0.2",
"normalize-path": "^2.0.1",
"object.omit": "^2.0.0",
"parse-glob": "^3.0.4",
"regex-cache": "^0.4.2"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"mocha": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz",
"integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==",
"dev": true,
"requires": {
"browser-stdout": "1.3.1",
"commander": "2.11.0",
"debug": "3.1.0",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
"glob": "7.1.2",
"growl": "1.10.3",
"he": "1.1.1",
"mkdirp": "0.5.1",
"supports-color": "4.4.0"
},
"dependencies": {
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
},
"supports-color": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
"integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
"dev": true,
"requires": {
"has-flag": "^2.0.0"
}
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"dev": true,
"requires": {
"remove-trailing-separator": "^1.0.1"
}
},
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
"dev": true,
"requires": {
"for-own": "^0.1.4",
"is-extendable": "^0.1.1"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
"dev": true,
"requires": {
"glob-base": "^0.3.0",
"is-dotfile": "^1.0.0",
"is-extglob": "^1.0.0",
"is-glob": "^2.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"preserve": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
"dev": true
},
"pretty-format": {
"version": "22.4.0",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.0.tgz",
"integrity": "sha512-pvCxP2iODIIk9adXlo4S3GRj0BrJiil68kByAa1PrgG97c1tClh9dLMgp3Z6cHFZrclaABt0UH8PIhwHuFLqYA==",
"dev": true,
"requires": {
"ansi-regex": "^3.0.0",
"ansi-styles": "^3.2.0"
}
},
"randomatic": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz",
"integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==",
"dev": true,
"requires": {
"is-number": "^4.0.0",
"kind-of": "^6.0.0",
"math-random": "^1.0.1"
},
"dependencies": {
"is-number": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
"integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
"dev": true
},
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
}
}
},
"regex-cache": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
"dev": true,
"requires": {
"is-equal-shallow": "^0.1.3"
}
},
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
"dev": true
},
"repeat-element": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
"dev": true
},
"repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
"dev": true
},
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
"dev": true
},
"stack-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz",
"integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=",
"dev": true
},
"supports-color": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
"integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
}
}
}

View file

@ -1,27 +0,0 @@
{
"name": "webidl2",
"description": "A WebIDL Parser",
"version": "13.0.3",
"contributors": [
"Robin Berjon <robin@berjon.com> (https://berjon.com)",
"Marcos Caceres <marcos@marcosc.com> (https://marcosc.com)",
"Kagami Sascha Rosylight <saschaplas@outlook.com>",
"Timothy Gu <timothygu99@gmail.com>"
],
"license": "W3C",
"dependencies": {},
"devDependencies": {
"expect": "22.4.0",
"jsondiffpatch": "0.3.5",
"mocha": "5.0.4"
},
"scripts": {
"test": "mocha",
"acquire": "node test/util/acquire.js"
},
"repository": "git://github.com/w3c/webidl2.js",
"main": "index.js",
"files": [
"lib/*"
]
}

View file

@ -1,20 +0,0 @@
// NOTES:
// - the errors actually still need to be reviewed to check that they
// are fully correct interpretations of the IDLs
"use strict";
const { collect } = require("./util/collect");
const fs = require("fs");
const expect = require("expect");
describe("Parses all of the invalid IDLs to check that they blow up correctly", () => {
for (const test of collect("invalid", { expectError: true })) {
it(`should produce the right error for ${test.path}`, () => {
const err = test.readJSON();
expect(test.error).toBeTruthy();
expect(test.error.message).toEqual(err.message);
expect(test.error.line).toEqual(err.line);
});
}
});

View file

@ -1,6 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
// T[] is removed by https://github.com/heycam/webidl/commit/079cbb861a99e9e857a3f2a169c0beeb49cd020a
[Constructor]
interface LotteryResults {
readonly attribute unsigned short[][] numbers;
};

View file

@ -1,7 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
// legacycallers are removed by https://github.com/heycam/webidl/pull/412
interface NumberQuadrupler {
// This operation simply returns four times the given number x.
legacycaller float compute(float x);
};

View file

@ -1,5 +0,0 @@
// https://heycam.github.io/webidl/#required-dictionary-member
// "A required dictionary member must not have a default value."
dictionary Dict {
required long member = 0;
};

View file

@ -1,5 +0,0 @@
typedef int Test;
interface Test {
void foo();
};

View file

@ -1 +0,0 @@
enum NoComma { "value1" "value2" };

View file

@ -1 +0,0 @@
enum foo { 1, 2, 3};

View file

@ -1,6 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
// IDL exceptions are removed by https://github.com/heycam/webidl/commit/50e172ec079db073c3724c9beac1b576fb5dbc47
exception SomeException {
};

View file

@ -1,2 +0,0 @@
[Exposed=()]
interface Unexposed {};

View file

@ -1,4 +0,0 @@
// This hits the unshifting of whitespace in the "implements" and
// "includes" productions. If there is a bug in that whitespace
// rollback, the wrong exception will be produced.
foobar;

View file

@ -1,35 +0,0 @@
interface SessionManager {
Session getSessionForUser(DOMString username);
readonly attribute unsigned long sessionCount;
Session iterator;
};
interface Session {
readonly attribute DOMString username;
// ...
};
interface SessionManager2 {
Session2 getSessionForUser(DOMString username);
readonly attribute unsigned long sessionCount;
Session2 iterator = SessionIterator;
};
interface Session2 {
readonly attribute DOMString username;
// ...
};
interface SessionIterator {
readonly attribute unsigned long remainingSessions;
};
interface NodeList {
Node iterator = NodeIterator;
};
interface NodeIterator {
Node iterator object;
};

View file

@ -1,3 +0,0 @@
interface MapLikeOneType {
maplike<long>;
}

View file

@ -1,25 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
module gfx {
module geom {
interface Shape { /* ... */ };
interface Rectangle : Shape { /* ... */ };
interface Path : Shape { /* ... */ };
};
interface GraphicsContext {
void fillShape(geom::Shape s);
void strokeShape(geom::Shape s);
};
};
module gui {
interface Widget { /* ... */ };
interface Window : Widget {
gfx::GraphicsContext getGraphicsContext();
};
interface Button : Widget { /* ... */ };
};

View file

@ -1,3 +0,0 @@
namespace CSS {
attribute object readwrite;
};

View file

@ -1,7 +0,0 @@
callback interface NoSemicolon {
attribute boolean noSemiColon;
}
enum YouNeedOne {
"really"
}

View file

@ -1,7 +0,0 @@
partial interface NoSemicolon {
attribute boolean noSemiColon;
}
enum YouNeedOne {
"really"
}

View file

@ -1,3 +0,0 @@
interface NonNullable {
attribute any? foo;
};

View file

@ -1,6 +0,0 @@
interface Foo {};
interface NonNullable {
attribute Foo??
foo;
};

View file

@ -1,4 +0,0 @@
interface X {
attribute Promise<void>?
promise;
};

View file

@ -1,3 +0,0 @@
interface Foo {
Promise<[XAttr] DOMString> foo(any param);
};

View file

@ -1,18 +0,0 @@
// getraises and setraises are not longer valid Web IDL
interface Person {
// An attribute that can raise an exception if it is set to an invalid value.
attribute DOMString name setraises (InvalidName);
// An attribute whose value cannot be assigned to, and which can raise an
// exception some circumstances.
readonly attribute DOMString petName getraises (NoSuchPet);
};
exception SomeException {
};
interface ExceptionThrower {
// This attribute always throws a SomeException and never returns a value.
attribute long valueOf getraises(SomeException);
};

View file

@ -1,3 +0,0 @@
interface ReadonlyIterable {
readonly iterable<long>;
}

View file

@ -1,3 +0,0 @@
interface Foo {
void foo(record<[XAttr] DOMString, any> param);
};

View file

@ -1,3 +0,0 @@
interface Foo {
void foo(record<octet, any> param);
};

View file

@ -1,3 +0,0 @@
interface Foo {
void foo(record<DOMString> param);
};

View file

@ -1,2 +0,0 @@
// scoped names are no longer valid in WebIDL
typedef gfx::geom::geom2d::Point Point;

View file

@ -1,3 +0,0 @@
interface sequenceAsAttribute {
attribute sequence<short> invalid;
};

View file

@ -1,3 +0,0 @@
interface SetLikeTwoTypes {
setlike<long, long>;
}

View file

@ -1,4 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface OrderedMap {
setter creator void set(DOMString name, any value);
};

View file

@ -1,3 +0,0 @@
interface X {
const float infinity = - Infinity;
};

View file

@ -1,3 +0,0 @@
interface X {
void operation(object . . . args);
};

View file

@ -1,8 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
// omittable is no longer a recognized keyword as of 20110905
interface Dictionary {
readonly attribute unsigned long propertyCount;
omittable getter float getProperty(DOMString propertyName);
omittable setter void setProperty(DOMString propertyName, float propertyValue);
};

View file

@ -1,2 +0,0 @@
// This is a comment.
/ This is not.

View file

@ -1,3 +0,0 @@
interface Util {
const DOMString hello = "world";
};

View file

@ -1,22 +0,0 @@
interface Point {
attribute float x;
attribute float y;
};
interface Rect {
attribute Point topleft;
attribute Point bottomright;
};
interface Widget {
typedef sequence<Point> PointSequence;
readonly attribute Rect bounds;
boolean pointWithinBounds(Point p);
boolean allPointsWithinBounds(PointSequence ps);
};
typedef [Clamp] octet value;

View file

@ -1 +0,0 @@
typedef (One or Two or) UnionOr;

View file

@ -1 +0,0 @@
typedef (OnlyOne) UnionOne;

View file

@ -1,3 +0,0 @@
interface FetchEvent : Event {
ResponsePromise<any> default();
};

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface LotteryResults`: No name in attribute",
"line": 5
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface NumberQuadrupler`: Invalid operation",
"line": 6
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `dictionary Dict`: Required member must not have a default"
, "line": 4
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `typedef Test`: The name \"Test\" of type \"typedef\" is already seen",
"line": 3
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `enum Empty`: No value in enum",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `enum NoComma`: No comma between enum values",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `enum foo`: Unexpected value in enum"
, "line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: Unrecognised tokens",
"line": 4
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: Expected identifiers but not found",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: No name for interface",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: Unrecognised tokens",
"line": 4
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface SessionManager`: Invalid operation",
"line": 5
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface MapLikeOneType`: Missing second type argument in maplike declaration",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: Unrecognised tokens"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `namespace CSS`: Attributes must be readonly in this context",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `callback interface NoSemicolon`: Missing semicolon after interface",
"line": 5
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `partial interface NoSemicolon`: Missing semicolon after interface",
"line": 5
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface NonNullable`: Type any cannot be made nullable"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface NonNullable`: Can't nullable more than once",
"line": 4
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface X`: Promise type cannot be nullable",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Foo`: Promise type cannot have extended attribute",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Person`: Unterminated attribute"
, "line": 5
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface ReadonlyIterable`: Missing return type",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Foo`: Record key cannot have extended attribute",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Foo`: Record key must be a string type",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Foo`: Missing comma after record key type",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: No name in typedef"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface sequenceAsAttribute`: Attributes cannot accept sequence types"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface SetLikeTwoTypes`: Unterminated setlike declaration",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface OrderedMap`: Invalid operation",
"line": 3
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface X`: No value for const",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface X`: Unterminated operation",
"line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Dictionary`: Invalid operation"
, "line": 6
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: Unrecognised tokens"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Util`: No type for const"
, "line": 2
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface Widget`: Missing return type"
, "line": 14
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: At least two types are expected in a union type but found less",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type",
"line": 1
}

View file

@ -1,4 +0,0 @@
{
"message": "Got an error during or right after parsing `interface FetchEvent`: Unsupported generic type ResponsePromise",
"line": 2
}

View file

@ -1 +0,0 @@
--reporter spec

View file

@ -1,19 +0,0 @@
"use strict";
const { collect } = require("./util/collect");
const expect = require("expect");
const debug = true;
describe("Parses all of the IDLs to produce the correct ASTs", () => {
for (const test of collect("syntax")) {
it(`should produce the same AST for ${test.path}`, () => {
try {
expect(test.diff()).toBeFalsy();
}
catch (e) {
console.log(e.toString());
throw e;
}
});
}
});

View file

@ -1,6 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface B {
void g();
void g(B b);
void g([AllowAny] DOMString s);
};

View file

@ -1,11 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface Person {
// A simple attribute that can be set to any value the range an unsigned
// short can take.
attribute unsigned short age;
// required is an allowed attribute name
attribute any required;
};

View file

@ -1,7 +0,0 @@
callback AsyncOperationCallback = void (DOMString status);
callback interface EventHandler {
void eventOccurred(DOMString details);
};
callback SortCallback = boolean (any a, any b);

View file

@ -1,11 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface Util {
const boolean DEBUG = false;
const short negative = -1;
const octet LF = 10;
const unsigned long BIT_MASK = 0x0000fc00;
const float AVOGADRO = 6.022e23;
const unrestricted float sobig = Infinity;
const unrestricted double minusonedividedbyzero = -Infinity;
const short notanumber = NaN;
};

Some files were not shown because too many files have changed in this diff Show more