diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e4366b48d..39b6076a2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,7 @@ updates: - package-ecosystem: "npm" # Look for `package.json` and `lock` files in the `root` directory directory: "/" - # Check the npm registry for updates every day (weekdays) + # Check the npm registry for updates every month schedule: interval: "monthly" # Bump versions in package.json diff --git a/.github/workflows/update-webref.yml b/.github/workflows/update-webref.yml index f53bdec91..c4913568e 100644 --- a/.github/workflows/update-webref.yml +++ b/.github/workflows/update-webref.yml @@ -18,7 +18,7 @@ jobs: - run: npm ci - id: run-update-webref - run: npm run update-webref + run: npm i @webref/idl@latest @webref/css@latest continue-on-error: true - run: npm run build && npm run baseline-accept if: ${{ steps.run-update-webref.outcome == 'success' }} diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 7eda92257..87a0fa611 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -8779,8 +8779,8 @@ interface History { back(): void; forward(): void; go(delta?: number): void; - pushState(data: any, title: string, url?: string | URL | null): void; - replaceState(data: any, title: string, url?: string | URL | null): void; + pushState(data: any, unused: string, url?: string | URL | null): void; + replaceState(data: any, unused: string, url?: string | URL | null): void; } declare var History: { diff --git a/inputfiles/removedTypes.json b/inputfiles/removedTypes.json index be4b16229..c971879a1 100644 --- a/inputfiles/removedTypes.json +++ b/inputfiles/removedTypes.json @@ -5,7 +5,7 @@ "PerformanceObserverCallback": { "signature": { "0": { - "param": ["hasDroppedEntry"] + "param": ["options"] } } } @@ -160,6 +160,7 @@ "NavigatorBadge", "NavigatorDeviceMemory", "NavigatorFonts", + "NavigatorGPU", "NavigatorLocks", "NavigatorUA" ] @@ -200,9 +201,6 @@ } } }, - "SVGAElement": { - "implements": ["HTMLHyperlinkElementUtils"] - }, "SVGAnimationElement": { "properties": { "property": { @@ -269,6 +267,7 @@ "NavigatorBadge", "NavigatorDeviceMemory", "NavigatorFonts", + "NavigatorGPU", "NavigatorLocks", "NavigatorUA" ] diff --git a/package-lock.json b/package-lock.json index 255345884..f51106a00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,8 @@ "@types/webidl2": "^23.13.5", "@typescript-eslint/eslint-plugin": "^4.18.0", "@typescript-eslint/parser": "^4.18.0", + "@webref/css": "^1.0.0", + "@webref/idl": "^1.0.10", "browser-specs": "^1.32.0", "cpx2": "^3.0.0", "eslint": "^7.22.0", @@ -26,8 +28,7 @@ "print-diff": "^1.0.0", "styleless-innertext": "^1.1.2", "typescript": "^4.2.3", - "webidl2": "^23.13.1", - "webref": "github:w3c/webref#41a8ec6b85634d1bdf5daa85f3c32a1adad1d2f8" + "webidl2": "^23.13.1" } }, "node_modules/@babel/code-frame": { @@ -393,6 +394,24 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@webref/css": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@webref/css/-/css-1.0.0.tgz", + "integrity": "sha512-fFdtGz8a2I18TsxzefMWBk93ohd+1BkRE+v5NErzTVXcsY6S+oayiiwohBWtUyXImDixgYJUUZ1eKmix7J+pIw==", + "dev": true, + "peerDependencies": { + "css-tree": "^1.1.2" + } + }, + "node_modules/@webref/idl": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-1.0.10.tgz", + "integrity": "sha512-GzcQWm71ZMsQ4AYISJ2uzijNQB5lDwN3peJTf2FM/zcZ7ZyAdS43iyzcSrcokWyACg1mmGU2LIpVOfZPQbXmPQ==", + "dev": true, + "peerDependencies": { + "webidl2": "^23.13.1" + } + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -735,6 +754,20 @@ "node": ">= 8" } }, + "node_modules/css-tree": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "dev": true, + "peer": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/cssom": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", @@ -1924,6 +1957,13 @@ "node": ">=10" } }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true, + "peer": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2521,7 +2561,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "optional": true, "engines": { "node": ">=0.10.0" } @@ -2548,11 +2587,6 @@ "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, "engines": { "node": ">=0.10.0" } @@ -2883,16 +2917,6 @@ "integrity": "sha512-u5njf3ZyqPr/4K8D6Cxm3B6MwSgwAdtrzxqHklwKaUdP1aQTmtKN5b65k4wlweJ/pRM6fpKUKYz8RlCJ9tka+w==", "dev": true }, - "node_modules/webref": { - "version": "0.0.1", - "resolved": "git+ssh://git@github.com/w3c/webref.git#41a8ec6b85634d1bdf5daa85f3c32a1adad1d2f8", - "integrity": "sha512-C9LVbQeYt5t34l9Flz/m9ifY6m4rKIhNQ0b3oxI8+3a8oWTBaeHQMwh0qvrS1ueBces66X0FCBDkKpit5BH9FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", @@ -3257,6 +3281,20 @@ "eslint-visitor-keys": "^2.0.0" } }, + "@webref/css": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@webref/css/-/css-1.0.0.tgz", + "integrity": "sha512-fFdtGz8a2I18TsxzefMWBk93ohd+1BkRE+v5NErzTVXcsY6S+oayiiwohBWtUyXImDixgYJUUZ1eKmix7J+pIw==", + "dev": true, + "requires": {} + }, + "@webref/idl": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-1.0.10.tgz", + "integrity": "sha512-GzcQWm71ZMsQ4AYISJ2uzijNQB5lDwN3peJTf2FM/zcZ7ZyAdS43iyzcSrcokWyACg1mmGU2LIpVOfZPQbXmPQ==", + "dev": true, + "requires": {} + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -3526,6 +3564,17 @@ "which": "^2.0.1" } }, + "css-tree": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "dev": true, + "peer": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, "cssom": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", @@ -4453,6 +4502,13 @@ "yallist": "^4.0.0" } }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true, + "peer": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4870,8 +4926,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true + "dev": true }, "sprintf-js": { "version": "1.0.3", @@ -5152,12 +5207,6 @@ "integrity": "sha512-u5njf3ZyqPr/4K8D6Cxm3B6MwSgwAdtrzxqHklwKaUdP1aQTmtKN5b65k4wlweJ/pRM6fpKUKYz8RlCJ9tka+w==", "dev": true }, - "webref": { - "version": "git+ssh://git@github.com/w3c/webref.git#41a8ec6b85634d1bdf5daa85f3c32a1adad1d2f8", - "integrity": "sha512-C9LVbQeYt5t34l9Flz/m9ifY6m4rKIhNQ0b3oxI8+3a8oWTBaeHQMwh0qvrS1ueBces66X0FCBDkKpit5BH9FA==", - "dev": true, - "from": "webref@github:w3c/webref#41a8ec6b85634d1bdf5daa85f3c32a1adad1d2f8" - }, "whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", diff --git a/package.json b/package.json index 4efc2d723..2a9578e90 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "baseline-accept": "cpx \"generated\\*\" baselines\\", "lint": "eslint --max-warnings 0 src", "test": "npm run lint && npm run build && node ./lib/test.js && node ./unittests/index.js", - "update-webref": "tsc && node ./lib/update-webref.js", "changelog": "tsc && node ./lib/changelog.js" }, "author": { @@ -40,6 +39,8 @@ "@types/webidl2": "^23.13.5", "@typescript-eslint/eslint-plugin": "^4.18.0", "@typescript-eslint/parser": "^4.18.0", + "@webref/css": "^1.0.0", + "@webref/idl": "^1.0.10", "browser-specs": "^1.32.0", "cpx2": "^3.0.0", "eslint": "^7.22.0", @@ -51,8 +52,7 @@ "print-diff": "^1.0.0", "styleless-innertext": "^1.1.2", "typescript": "^4.2.3", - "webidl2": "^23.13.1", - "webref": "github:w3c/webref#41a8ec6b85634d1bdf5daa85f3c32a1adad1d2f8" + "webidl2": "^23.13.1" }, "files": [ "baselines/*" diff --git a/src/build/webref.ts b/src/build/webref.ts index 8c01e93d0..524f68652 100644 --- a/src/build/webref.ts +++ b/src/build/webref.ts @@ -2,9 +2,9 @@ import { fileURLToPath } from "url"; import { tryReadFile } from "./utils/fs.js"; import { createTryRequire } from "./utils/require.js"; -const webrefDir = new URL("../../node_modules/webref/ed/idl/", import.meta.url); +const webrefDir = new URL("../../node_modules/@webref/idl/", import.meta.url); const webrefCssDir = new URL( - "../../node_modules/webref/ed/css/", + "../../node_modules/@webref/css/", import.meta.url ); diff --git a/src/update-webref.ts b/src/update-webref.ts deleted file mode 100644 index f69976bb7..000000000 --- a/src/update-webref.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { execSync } from "child_process"; -import { createRequire } from "module"; -import fetch from "node-fetch"; - -const require = createRequire(import.meta.url); -const packageJson = require("../package.json"); - -const res = await fetch( - "https://api.github.com/repos/w3c/webref/git/trees/HEAD" -); -if (!res.ok) { - throw new Error("Tree API request failed"); -} -const data = await res.json(); -if (packageJson.devDependencies.webref.endsWith(`#${data.sha}`)) { - console.log(`Already using the latest commit ${data.sha}`); - process.exit(1); -} - -console.log(`Found a new commit ${data.sha}`); -execSync(`npm i github:w3c/webref#${data.sha}`, { stdio: "inherit" });