Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/deploy.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & deploy
name: CI

on:
push:
Expand All @@ -7,21 +7,49 @@ on:
branches: [ main ]

jobs:
build:
test:
name: Test
runs-on: ubuntu-latest
permissions: {}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false # Currently not necessary

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install JSON validator
run: npm install -g ajv-cli@5 ajv-formats@2

- name: Validate features table
run: ajv -c ajv-formats -s features.schema.json -d features.json --strict=true --errors=text

build:
name: Build & Deploy
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true

- name: Build
run: bundle exec jekyll build

- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion features.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./features.schema.json",
"features": {
"bigInt": {
"description": "JS BigInt to Wasm i64 integration",
Expand Down Expand Up @@ -146,7 +147,6 @@
"Wasmtime": {
"url": "https://wasmtime.dev/",
"logo": "/images/bca.svg",
"version": "0.33",
"features": {
"bigInt": null,
"bulkMemory": "0.20",
Expand Down
78 changes: 78 additions & 0 deletions features.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/WebAssembly/website/raw/main/features.schema.json",
"title": "WebAssembly feature table",
"type": "object",
"definitions": {
"feature-info": {
"type": "object",
"properties": {
"description": { "type": "string" },
"url": { "type": "string", "format": "uri-reference" },
"phase": { "type": "integer", "minimum": 1 }
},
"additionalProperties": false,
"required": ["description", "url", "phase"]
},
"browser-features": {
"type": "object",
"properties": {
"url": { "type": "string", "format": "uri" },
"logo": { "type": "string", "format": "uri-reference" },
"features": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/status" }
}
},
"additionalProperties": false,
"required": ["url", "logo", "features"]
},
"status": {
"title": "Status of this feature",
"anyOf": [
{ "$ref": "#/definitions/status-na" },
{ "$ref": "#/definitions/status-supported" },
{ "$ref": "#/definitions/status-unsupported" },
{ "$ref": "#/definitions/status-flag" },
{ "$ref": "#/definitions/status-version" },
{ "$ref": "#/definitions/status-note" }
]
},
"status-na": { "type": "null", "title": "Not applicable" },
"status-supported": { "const": true, "title": "Supported in unknown version" },
"status-unsupported": { "const": false, "title": "Unsupported" },
"status-flag": { "const": "flag", "title": "Flag required" },
"status-version": { "type": "string", "title": "Supported in this version", "minLength": 1 },
"status-note": {
"type": "array",
"items": [
{
"anyOf": [
{ "$ref": "#/definitions/status-na" },
{ "$ref": "#/definitions/status-supported" },
{ "$ref": "#/definitions/status-unsupported" },
{ "$ref": "#/definitions/status-flag" },
{ "$ref": "#/definitions/status-version" }
]
},
{ "type": "string", "title": "Attached note", "minLength": 1 }
],
"additionalItems": false,
"minItems": 2,
"maxItems": 2
}
},
"properties": {
"$schema": { "type": "string", "format": "uri-reference" },
"features": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/feature-info" }
},
"browsers": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/browser-features" }
}
},
"additionalProperties": false,
"required": ["features", "browsers"]
}
3 changes: 3 additions & 0 deletions roadmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,14 @@
// * [true, "footnotes"] => supported, with "footnotes"
// * ["version", "footnotes"] => supported since "version", with "footnotes"
// ...and any combination thereof

/** @type {null|boolean|string|[boolean|string,string]} */
let support = features[featName];
let box, note;

// First extract the footnote part if it's an array
if (Array.isArray(support)) {
if (support.length !== 2) throw new TypeError();
note = support[1];
support = support[0];
}
Expand Down