Build(deps): Bump html-void-elements from 1.0.5 to 2.0.0 (#10623)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
dependabot[bot]andfisker Cheung authored and Sosuke Suzuki committed 2022-04-03 00:32:33 +09:00
1 parent 875694e3a9
commit e88adfb9fa
7 files changed
+89 -15

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@
"html-element-attributes": "2.3.0",
"html-styles": "1.0.0",
"html-tag-names": "1.1.5",
"html-void-elements": "1.0.5",
"html-void-elements": "2.0.1",
"ignore": "5.2.0",
"jest-docblock": "27.5.1",
"json5": "2.2.1",
+25 -8
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env node
import fs from "node:fs/promises";
import assert from "node:assert";
import { fileURLToPath } from "node:url";
import createEsmUtils from "esm-utils";
import esbuild from "esbuild";
import { outdent } from "outdent";
import { PROJECT_ROOT } from "../utils/index.mjs";
import { PROJECT_ROOT, writeJson } from "../utils/index.mjs";
import esbuildPluginLicense from "../build/esbuild-plugins/license.mjs";
import vendors from "./vendors.mjs";
import { vendorMetaFile, saveVendorLicenses } from "./utils.mjs";
@@ -16,8 +17,18 @@ const rootDir = new URL("../../", import.meta.url);
// prettier/vendors
const vendorsDir = new URL("./vendors/", rootDir);
// prettier/vendors/*.js
const getVendorFilePath = (vendorName) =>
fileURLToPath(new URL(`./${vendorName}.js`, vendorsDir));
const getVendorFilePath = (vendorName, extension = "js") =>
fileURLToPath(new URL(`./${vendorName}.${extension}`, vendorsDir));
// Unsafe, but good enough for now.
const isJson = (value) => {
try {
assert.deepStrictEqual(JSON.parse(JSON.stringify(value)), { ...value });
return true;
} catch {
return false;
}
};
async function clean() {
for (const directoryOrFile of [vendorsDir, vendorMetaFile]) {
@@ -29,10 +40,8 @@ async function clean() {
}
}
async function generateDts(vendor) {
const hasDefault = await import(vendor).then((module) =>
Boolean(module.default)
);
async function generateDts({ vendor, module }) {
const hasDefault = Boolean(module.default);
await fs.writeFile(
new URL(`${vendor}.d.ts`, vendorsDir),
[
@@ -70,7 +79,15 @@ async function bundle(vendor, options) {
};
await esbuild.build(esbuildOption);
await generateDts(vendor);
// Still running esbuild, because we want collect license
const module = await import(vendor);
if (isJson(module)) {
await fs.rm(outfile);
await writeJson(getVendorFilePath(vendor, "json"), module);
return;
}
await generateDts({ vendor, module });
}
async function main() {
+23
View File
@@ -1491,6 +1491,29 @@
"licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n",
"author": null,
"contributors": []
},
{
"name": "html-void-elements",
"maintainers": [],
"version": "2.0.1",
"description": "List of HTML void tag names",
"repository": "wooorm/html-void-elements",
"homepage": null,
"private": false,
"license": "MIT",
"licenseText": "(The MIT License)\n\nCopyright (c) 2016 Titus Wormer <tituswormer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
"url": "https://wooorm.com"
},
"contributors": [
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
"url": "https://wooorm.com"
}
]
}
]
}
+8 -1
View File
@@ -1,3 +1,10 @@
const vendors = ["string-width", "mem", "execa", "tempy", "chalk"];
const vendors = [
"string-width",
"mem",
"execa",
"tempy",
"chalk",
"html-void-elements",
];
export default vendors;
+1 -1
View File
@@ -1,6 +1,6 @@
"use strict";
const htmlVoidElements = require("html-void-elements");
const { htmlVoidElements } = require("../../vendors/html-void-elements.json");
const getLast = require("../utils/get-last.js");
function isLastNodeOfSiblings(path) {
+27
View File
@@ -0,0 +1,27 @@
{
"htmlVoidElements": [
"area",
"base",
"basefont",
"bgsound",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"image",
"img",
"input",
"isindex",
"keygen",
"link",
"menuitem",
"meta",
"nextid",
"param",
"source",
"track",
"wbr"
]
}
+4 -4
View File
@@ -3618,10 +3618,10 @@ html-tag-names@1.1.5:
resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.5.tgz#f537420c16769511283f8ae1681785fbc89ee0a9"
integrity sha512-aI5tKwNTBzOZApHIynaAwecLBv8TlZTEy/P4Sj2SzzAhBrGuI8yGZ0UIXVPQzOHGS+to2mjb04iy6VWt/8+d8A==
html-void-elements@1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483"
integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==
html-void-elements@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-2.0.1.tgz#29459b8b05c200b6c5ee98743c41b979d577549f"
integrity sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==
http-proxy-agent@^4.0.1:
version "4.0.1"