Skip to content

Commit d8d45c7

Browse files
authored
Set up publishing of @webref/idl with Lerna (w3c#68)
Package gets prepared and published from the `packages/*` subfolder with Lerna. Further packages are expected to be created. Note this introduces a couple of line ending fixes for scripts to run on Windows: - The .gitattributes file tells Git not to convert LF line endings of the bash script. The script cannot run on typical Git configs on Windows otherwise. - The `--binary` option tells `patch` to disable any CRLF to LF conversion when applying the patches. That is also needed for patches to run smoothly on Windows. Fixes w3c#63.
1 parent 63c04e3 commit d8d45c7

24 files changed

+8119
-201
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.sh text eol=lf

.github/workflows/test.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on:
3+
pull_request: {}
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
test:
9+
name: Test
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 14.x
16+
- run: npm ci
17+
- run: npx lerna bootstrap
18+
- run: npm test
19+
env:
20+
FORCE_COLOR: 3

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
2+
packages/idl/*.idl
23
wpt/

ed/idlpatches/SRI.idl.patch

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 3476739b49c9fbf76816b735e3a7767a6cb0d395 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Thu, 21 Jan 2021 20:58:12 +0100
4+
Subject: [PATCH] Remove SRI.idl (now part of HTML)
5+
6+
---
7+
ed/idl/SRI.idl | 12 ------------
8+
1 file changed, 12 deletions(-)
9+
delete mode 100644 ed/idl/SRI.idl
10+
11+
diff --git a/ed/idl/SRI.idl b/ed/idl/SRI.idl
12+
deleted file mode 100644
13+
index 78f916fe6..000000000
14+
--- a/ed/idl/SRI.idl
15+
+++ /dev/null
16+
@@ -1,12 +0,0 @@
17+
-// GENERATED CONTENT - DO NOT EDIT
18+
-// Content was automatically extracted by Reffy into webref
19+
-// (https://github.com/w3c/webref)
20+
-// Source: Subresource Integrity (https://w3c.github.io/webappsec-subresource-integrity/)
21+
-
22+
-partial interface HTMLLinkElement {
23+
- attribute DOMString integrity;
24+
-};
25+
-
26+
-partial interface HTMLScriptElement {
27+
- attribute DOMString integrity;
28+
-};
29+
--
30+
2.30.0.365.g02bc693789-goog
31+

ed/idlpatches/SVG.idl.patch

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
From b613b767652effae7f44680cb08d895658460318 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Wed, 10 Feb 2021 13:13:29 +0100
4+
Subject: [PATCH] Remove duplicate SVG definitions
5+
6+
---
7+
ed/idl/SVG.idl | 32 --------------------------------
8+
1 file changed, 32 deletions(-)
9+
10+
diff --git a/ed/idl/SVG.idl b/ed/idl/SVG.idl
11+
index f8d24c9c6..64ad64f8f 100644
12+
--- a/ed/idl/SVG.idl
13+
+++ b/ed/idl/SVG.idl
14+
@@ -417,10 +417,6 @@ interface SVGAnimatedPreserveAspectRatio {
15+
[SameObject] readonly attribute SVGPreserveAspectRatio animVal;
16+
};
17+
18+
-[Exposed=Window]
19+
-interface SVGPathElement : SVGGeometryElement {
20+
-};
21+
-
22+
[Exposed=Window]
23+
interface SVGRectElement : SVGGeometryElement {
24+
[SameObject] readonly attribute SVGAnimatedLength x;
25+
@@ -566,34 +562,6 @@ interface SVGForeignObjectElement : SVGGraphicsElement {
26+
[SameObject] readonly attribute SVGAnimatedLength height;
27+
};
28+
29+
-[Exposed=Window]
30+
-interface SVGMarkerElement : SVGElement {
31+
-
32+
- // Marker Unit Types
33+
- const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
34+
- const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
35+
- const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
36+
-
37+
- // Marker Orientation Types
38+
- const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
39+
- const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
40+
- const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
41+
-
42+
- [SameObject] readonly attribute SVGAnimatedLength refX;
43+
- [SameObject] readonly attribute SVGAnimatedLength refY;
44+
- [SameObject] readonly attribute SVGAnimatedEnumeration markerUnits;
45+
- [SameObject] readonly attribute SVGAnimatedLength markerWidth;
46+
- [SameObject] readonly attribute SVGAnimatedLength markerHeight;
47+
- [SameObject] readonly attribute SVGAnimatedEnumeration orientType;
48+
- [SameObject] readonly attribute SVGAnimatedAngle orientAngle;
49+
- attribute DOMString orient;
50+
-
51+
- void setOrientToAuto();
52+
- void setOrientToAngle(SVGAngle angle);
53+
-};
54+
-
55+
-SVGMarkerElement includes SVGFitToViewBox;
56+
-
57+
[Exposed=Window]
58+
interface SVGGradientElement : SVGElement {
59+
60+
--
61+
2.30.0.365.g02bc693789-goog
62+

ed/idlpatches/cssom-view.idl.patch

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 68686f764a9943de5ad5ac1372995545a7745a62 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Tue, 21 Jul 2020 20:58:26 +0200
4+
Subject: [PATCH] Drop duplicate MouseEvent members
5+
6+
https://github.com/w3c/csswg-drafts/issues/4084
7+
---
8+
ed/idl/cssom-view.idl | 11 -----------
9+
1 file changed, 11 deletions(-)
10+
11+
diff --git a/ed/idl/cssom-view.idl b/ed/idl/cssom-view.idl
12+
index f998758dd..747361527 100644
13+
--- a/ed/idl/cssom-view.idl
14+
+++ b/ed/idl/cssom-view.idl
15+
@@ -139,25 +139,14 @@ partial interface Range {
16+
};
17+
18+
partial interface MouseEvent {
19+
- readonly attribute double screenX;
20+
- readonly attribute double screenY;
21+
readonly attribute double pageX;
22+
readonly attribute double pageY;
23+
- readonly attribute double clientX;
24+
- readonly attribute double clientY;
25+
readonly attribute double x;
26+
readonly attribute double y;
27+
readonly attribute double offsetX;
28+
readonly attribute double offsetY;
29+
};
30+
31+
-partial dictionary MouseEventInit {
32+
- double screenX = 0.0;
33+
- double screenY = 0.0;
34+
- double clientX = 0.0;
35+
- double clientY = 0.0;
36+
-};
37+
-
38+
enum CSSBoxType { "margin", "border", "padding", "content" };
39+
dictionary BoxQuadOptions {
40+
CSSBoxType box = "border";
41+
--
42+
2.30.0.365.g02bc693789-goog
43+

ed/idlpatches/keyboard-map.idl.patch

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 233474456ee5395ccde82eef47fc0b157798102c Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Tue, 21 Jul 2020 19:44:55 +0200
4+
Subject: [PATCH] Use partial interface Keyboard
5+
6+
https://github.com/WICG/keyboard-map/issues/25
7+
---
8+
ed/idl/keyboard-map.idl | 7 +------
9+
1 file changed, 1 insertion(+), 6 deletions(-)
10+
11+
diff --git a/ed/idl/keyboard-map.idl b/ed/idl/keyboard-map.idl
12+
index 8d95d8850..67c40333b 100644
13+
--- a/ed/idl/keyboard-map.idl
14+
+++ b/ed/idl/keyboard-map.idl
15+
@@ -3,15 +3,10 @@
16+
// (https://github.com/w3c/webref)
17+
// Source: Keyboard Map (https://wicg.github.io/keyboard-map/)
18+
19+
-[Exposed=Window]
20+
-partial interface Navigator {
21+
- [SecureContext, SameObject] readonly attribute Keyboard keyboard;
22+
-};
23+
-
24+
interface KeyboardLayoutMap {
25+
readonly maplike<DOMString, DOMString>;
26+
};
27+
28+
-[SecureContext, Exposed=Window] interface Keyboard {
29+
+partial interface Keyboard {
30+
Promise<KeyboardLayoutMap> getLayoutMap();
31+
};
32+
--
33+
2.30.0.365.g02bc693789-goog
34+

ed/idlpatches/mathml-core.idl.patch

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 8eb951f405d795e58b03b3a1f67a2f629a3ad8b7 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Fri, 3 Jul 2020 23:04:42 +0200
4+
Subject: [PATCH] Fix mathml-core.idl
5+
6+
https://github.com/mathml-refresh/mathml-core/pull/19
7+
https://github.com/whatwg/html/pull/5248
8+
https://github.com/mathml-refresh/mathml-core/pull/31
9+
---
10+
ed/idl/mathml-core.idl | 3 +--
11+
1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+
diff --git a/ed/idl/mathml-core.idl b/ed/idl/mathml-core.idl
14+
index a226ff084..7ea134625 100644
15+
--- a/ed/idl/mathml-core.idl
16+
+++ b/ed/idl/mathml-core.idl
17+
@@ -7,5 +7,4 @@
18+
interface MathMLElement : Element { };
19+
MathMLElement includes GlobalEventHandlers;
20+
MathMLElement includes DocumentAndElementEventHandlers;
21+
-MathMLElement includes HTMLOrForeignElement;
22+
-MathMLElement includes ElementCSSInlineStyle;
23+
+MathMLElement includes HTMLOrSVGElement;
24+
--
25+
2.30.0.365.g02bc693789-goog
26+

ed/idlpatches/media-source.idl.patch

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 185485ef4640ba3bb4380f393a34f2b2e7e9402c Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Thu, 23 Jul 2020 12:48:05 +0200
4+
Subject: [PATCH] Remove createObjectURL extension
5+
6+
https://github.com/w3c/media-source/pull/229
7+
---
8+
ed/idl/media-source.idl | 5 -----
9+
1 file changed, 5 deletions(-)
10+
11+
diff --git a/ed/idl/media-source.idl b/ed/idl/media-source.idl
12+
index f32df3aae..ba57b1310 100644
13+
--- a/ed/idl/media-source.idl
14+
+++ b/ed/idl/media-source.idl
15+
@@ -66,11 +66,6 @@ interface SourceBufferList : EventTarget {
16+
getter SourceBuffer (unsigned long index);
17+
};
18+
19+
-[Exposed=Window]
20+
-partial interface URL {
21+
- static DOMString createObjectURL (MediaSource mediaSource);
22+
-};
23+
-
24+
partial interface AudioTrack {
25+
readonly attribute SourceBuffer? sourceBuffer;
26+
};
27+
--
28+
2.30.0.365.g02bc693789-goog
29+
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From ea0f23f43b8ffcf2b7118e53e7d990eba59205da Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Tue, 21 Jul 2020 19:49:05 +0200
4+
Subject: [PATCH] Drop duplicate PermissionState definition
5+
6+
https://github.com/w3c/deviceorientation/pull/88
7+
---
8+
ed/idl/orientation-event.idl | 5 -----
9+
1 file changed, 5 deletions(-)
10+
11+
diff --git a/ed/idl/orientation-event.idl b/ed/idl/orientation-event.idl
12+
index 4cd4356d2..f6ff96f0e 100644
13+
--- a/ed/idl/orientation-event.idl
14+
+++ b/ed/idl/orientation-event.idl
15+
@@ -25,11 +25,6 @@ dictionary DeviceOrientationEventInit : EventInit {
16+
boolean absolute = false;
17+
};
18+
19+
-enum PermissionState {
20+
- "granted",
21+
- "denied",
22+
-};
23+
-
24+
partial interface Window {
25+
[SecureContext] attribute EventHandler ondeviceorientationabsolute;
26+
};
27+
--
28+
2.30.0.365.g02bc693789-goog
29+

ed/idlpatches/portals.idl.patch

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From f7d204a5a5004b1fc1e8273c3e7b8220dc0a8ff1 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Tue, 21 Jul 2020 19:56:23 +0200
4+
Subject: [PATCH] Remove duplicate typedef MessageEventSource
5+
6+
https://github.com/WICG/portals/issues/230
7+
---
8+
ed/idl/portals.idl | 2 --
9+
1 file changed, 2 deletions(-)
10+
11+
diff --git a/ed/idl/portals.idl b/ed/idl/portals.idl
12+
index 0957b2a9c..d0b132889 100644
13+
--- a/ed/idl/portals.idl
14+
+++ b/ed/idl/portals.idl
15+
@@ -43,8 +43,6 @@ dictionary PortalActivateEventInit : EventInit {
16+
any data = null;
17+
};
18+
19+
-typedef (WindowProxy or MessagePort or ServiceWorker or HTMLPortalElement or PortalHost) MessageEventSource;
20+
-
21+
partial interface mixin WindowEventHandlers {
22+
attribute EventHandler onportalactivate;
23+
};
24+
--
25+
2.30.0.365.g02bc693789-goog
26+

ed/idlpatches/svg-paths.idl.patch

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From c1893436732e2d22c2c59f1556b52df24c05c718 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= <[email protected]>
3+
Date: Fri, 3 Jul 2020 23:00:39 +0200
4+
Subject: [PATCH] Fix svg-paths.idl
5+
6+
https://github.com/w3c/svgwg/pull/802
7+
---
8+
ed/idl/svg-paths.idl | 7 +++----
9+
1 file changed, 3 insertions(+), 4 deletions(-)
10+
11+
diff --git a/ed/idl/svg-paths.idl b/ed/idl/svg-paths.idl
12+
index 84a067491..c3dd8249b 100644
13+
--- a/ed/idl/svg-paths.idl
14+
+++ b/ed/idl/svg-paths.idl
15+
@@ -3,15 +3,14 @@
16+
// (https://github.com/w3c/webref)
17+
// Source: SVG Paths (https://svgwg.org/specs/paths/)
18+
19+
-[NoInterfaceObject]
20+
interface SVGPathSegment {
21+
- DOMString type;
22+
- sequence<float> values;
23+
+ attribute DOMString type;
24+
+ attribute FrozenArray<float> values;
25+
};
26+
27+
dictionary SVGPathDataSettings {
28+
boolean normalize = false;
29+
-}
30+
+};
31+
32+
interface mixin SVGPathData {
33+
sequence<SVGPathSegment> getPathData(optional SVGPathDataSettings settings);
34+
--
35+
2.30.0.365.g02bc693789-goog
36+

0 commit comments

Comments
 (0)