mirror of
https://github.com/esphome/esp-web-tools.git
synced 2025-07-28 14:16:41 +00:00
Bump prettier from 2.8.8 to 3.0.0 (#394)
* Bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Apply Prettier --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
fa1a4c5927
commit
ba62801bea
18
package-lock.json
generated
18
package-lock.json
generated
@ -30,7 +30,7 @@
|
|||||||
"@rollup/plugin-terser": "^0.4.3",
|
"@rollup/plugin-terser": "^0.4.3",
|
||||||
"@rollup/plugin-typescript": "^11.1.1",
|
"@rollup/plugin-typescript": "^11.1.1",
|
||||||
"@types/w3c-web-serial": "^1.0.3",
|
"@types/w3c-web-serial": "^1.0.3",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.0",
|
||||||
"rollup": "^3.24.0",
|
"rollup": "^3.24.0",
|
||||||
"serve": "^14.2.0",
|
"serve": "^14.2.0",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.3"
|
||||||
@ -2412,15 +2412,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin-prettier.js"
|
"prettier": "bin/prettier.cjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
@ -4807,9 +4807,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"punycode": {
|
"punycode": {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"@rollup/plugin-typescript": "^11.1.1",
|
"@rollup/plugin-typescript": "^11.1.1",
|
||||||
"@rollup/plugin-terser": "^0.4.3",
|
"@rollup/plugin-terser": "^0.4.3",
|
||||||
"@types/w3c-web-serial": "^1.0.3",
|
"@types/w3c-web-serial": "^1.0.3",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.0",
|
||||||
"rollup": "^3.24.0",
|
"rollup": "^3.24.0",
|
||||||
"serve": "^14.2.0",
|
"serve": "^14.2.0",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.3"
|
||||||
|
@ -100,7 +100,7 @@ export class EwtConsole extends HTMLElement {
|
|||||||
write: (chunk) => {
|
write: (chunk) => {
|
||||||
this._console!.addLine(chunk.replace("\r", ""));
|
this._console!.addLine(chunk.replace("\r", ""));
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
if (!abortSignal.aborted) {
|
if (!abortSignal.aborted) {
|
||||||
this._console!.addLine("");
|
this._console!.addLine("");
|
||||||
|
@ -8,7 +8,7 @@ export const connect = async (button: InstallButton) => {
|
|||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if ((err as DOMException).name === "NotFoundError") {
|
if ((err as DOMException).name === "NotFoundError") {
|
||||||
import("./no-port-picked/index").then((mod) =>
|
import("./no-port-picked/index").then((mod) =>
|
||||||
mod.openNoPortPickedDialog(() => connect(button))
|
mod.openNoPortPickedDialog(() => connect(button)),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ export const connect = async (button: InstallButton) => {
|
|||||||
() => {
|
() => {
|
||||||
port!.close();
|
port!.close();
|
||||||
},
|
},
|
||||||
{ once: true }
|
{ once: true },
|
||||||
);
|
);
|
||||||
document.body.appendChild(el);
|
document.body.appendChild(el);
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,7 @@ export const flash = async (
|
|||||||
port: SerialPort,
|
port: SerialPort,
|
||||||
manifestPath: string,
|
manifestPath: string,
|
||||||
manifest: Manifest,
|
manifest: Manifest,
|
||||||
eraseFirst: boolean
|
eraseFirst: boolean,
|
||||||
) => {
|
) => {
|
||||||
let build: Build | undefined;
|
let build: Build | undefined;
|
||||||
let chipFamily: Build["chipFamily"];
|
let chipFamily: Build["chipFamily"];
|
||||||
@ -116,7 +116,7 @@ export const flash = async (
|
|||||||
const resp = await fetch(url);
|
const resp = await fetch(url);
|
||||||
if (!resp.ok) {
|
if (!resp.ok) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Downlading firmware ${part.path} failed: ${resp.status}`
|
`Downlading firmware ${part.path} failed: ${resp.status}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ export const flash = async (
|
|||||||
(written / total) * fileArray[fileIndex].data.length;
|
(written / total) * fileArray[fileIndex].data.length;
|
||||||
|
|
||||||
const newPct = Math.floor(
|
const newPct = Math.floor(
|
||||||
((totalWritten + uncompressedWritten) / totalSize) * 100
|
((totalWritten + uncompressedWritten) / totalSize) * 100,
|
||||||
);
|
);
|
||||||
|
|
||||||
// we're done with this file
|
// we're done with this file
|
||||||
|
@ -34,7 +34,7 @@ import { dialogStyles } from "./styles";
|
|||||||
import { version } from "./version";
|
import { version } from "./version";
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`ESP Web Tools ${version} by Nabu Casa; https://esphome.github.io/esp-web-tools/`
|
`ESP Web Tools ${version} by Nabu Casa; https://esphome.github.io/esp-web-tools/`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const ERROR_ICON = "⚠️";
|
const ERROR_ICON = "⚠️";
|
||||||
@ -50,7 +50,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
public overrides?: {
|
public overrides?: {
|
||||||
checkSameFirmware?: (
|
checkSameFirmware?: (
|
||||||
manifest: Manifest,
|
manifest: Manifest,
|
||||||
deviceImprov: ImprovSerial["info"]
|
deviceImprov: ImprovSerial["info"],
|
||||||
) => boolean;
|
) => boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
this._renderProgress(
|
this._renderProgress(
|
||||||
this._ssids === undefined
|
this._ssids === undefined
|
||||||
? "Scanning for networks"
|
? "Scanning for networks"
|
||||||
: "Trying to connect"
|
: "Trying to connect",
|
||||||
),
|
),
|
||||||
true,
|
true,
|
||||||
];
|
];
|
||||||
@ -439,7 +439,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
error = `Unknown error (${this._client!.error})`;
|
error = `Unknown error (${this._client!.error})`;
|
||||||
}
|
}
|
||||||
const selectedSsid = this._ssids?.find(
|
const selectedSsid = this._ssids?.find(
|
||||||
(info) => info.name === this._selectedSsid
|
(info) => info.name === this._selectedSsid,
|
||||||
);
|
);
|
||||||
content = html`
|
content = html`
|
||||||
<div>
|
<div>
|
||||||
@ -470,7 +470,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
>
|
>
|
||||||
${info.name}
|
${info.name}
|
||||||
</ewt-list-item>
|
</ewt-list-item>
|
||||||
`
|
`,
|
||||||
)}
|
)}
|
||||||
<ewt-list-item .selected=${!selectedSsid} value="-1">
|
<ewt-list-item .selected=${!selectedSsid} value="-1">
|
||||||
Join other…
|
Join other…
|
||||||
@ -633,7 +633,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
: "2 minutes"}.<br />
|
: "2 minutes"}.<br />
|
||||||
Keep this page visible to prevent slow down
|
Keep this page visible to prevent slow down
|
||||||
`,
|
`,
|
||||||
percentage
|
percentage,
|
||||||
);
|
);
|
||||||
hideActions = true;
|
hideActions = true;
|
||||||
} else if (this._installState.state === FlashStateType.FINISHED) {
|
} else if (this._installState.state === FlashStateType.FINISHED) {
|
||||||
@ -695,7 +695,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
@click=${() => {
|
@click=${() => {
|
||||||
textDownload(
|
textDownload(
|
||||||
this.shadowRoot!.querySelector("ewt-console")!.logs(),
|
this.shadowRoot!.querySelector("ewt-console")!.logs(),
|
||||||
`esp-web-tools-logs.txt`
|
`esp-web-tools-logs.txt`,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.shadowRoot!.querySelector("ewt-console")!.reset();
|
this.shadowRoot!.querySelector("ewt-console")!.reset();
|
||||||
@ -805,7 +805,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
|
|
||||||
private _focusFormElement(selector = "ewt-textfield, ewt-select") {
|
private _focusFormElement(selector = "ewt-textfield, ewt-select") {
|
||||||
const formEl = this.shadowRoot!.querySelector(
|
const formEl = this.shadowRoot!.querySelector(
|
||||||
selector
|
selector,
|
||||||
) as LitElement | null;
|
) as LitElement | null;
|
||||||
if (formEl) {
|
if (formEl) {
|
||||||
formEl.updateComplete.then(() => setTimeout(() => formEl.focus(), 100));
|
formEl.updateComplete.then(() => setTimeout(() => formEl.focus(), 100));
|
||||||
@ -898,7 +898,7 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
this.port,
|
this.port,
|
||||||
this.manifestPath,
|
this.manifestPath,
|
||||||
this._manifest,
|
this._manifest,
|
||||||
this._installErase
|
this._installErase,
|
||||||
);
|
);
|
||||||
// YOLO2
|
// YOLO2
|
||||||
}
|
}
|
||||||
@ -911,14 +911,14 @@ export class EwtInstallDialog extends LitElement {
|
|||||||
this._selectedSsid === null
|
this._selectedSsid === null
|
||||||
? (
|
? (
|
||||||
this.shadowRoot!.querySelector(
|
this.shadowRoot!.querySelector(
|
||||||
"ewt-textfield[name=ssid]"
|
"ewt-textfield[name=ssid]",
|
||||||
) as EwtTextfield
|
) as EwtTextfield
|
||||||
).value
|
).value
|
||||||
: this._selectedSsid;
|
: this._selectedSsid;
|
||||||
const password =
|
const password =
|
||||||
(
|
(
|
||||||
this.shadowRoot!.querySelector(
|
this.shadowRoot!.querySelector(
|
||||||
"ewt-textfield[name=password]"
|
"ewt-textfield[name=password]",
|
||||||
) as EwtTextfield | null
|
) as EwtTextfield | null
|
||||||
)?.value || "";
|
)?.value || "";
|
||||||
try {
|
try {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import "./no-port-picked-dialog";
|
import "./no-port-picked-dialog";
|
||||||
|
|
||||||
export const openNoPortPickedDialog = async (
|
export const openNoPortPickedDialog = async (
|
||||||
doTryAgain?: () => void
|
doTryAgain?: () => void,
|
||||||
): Promise<boolean> => {
|
): Promise<boolean> => {
|
||||||
const dialog = document.createElement("ewt-no-port-picked-dialog");
|
const dialog = document.createElement("ewt-no-port-picked-dialog");
|
||||||
dialog.doTryAgain = doTryAgain;
|
dialog.doTryAgain = doTryAgain;
|
||||||
|
@ -7,7 +7,7 @@ export const fireEvent = <Event extends keyof HTMLElementEventMap>(
|
|||||||
bubbles?: boolean;
|
bubbles?: boolean;
|
||||||
cancelable?: boolean;
|
cancelable?: boolean;
|
||||||
composed?: boolean;
|
composed?: boolean;
|
||||||
}
|
},
|
||||||
): void => {
|
): void => {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
const event = new CustomEvent(type, {
|
const event = new CustomEvent(type, {
|
||||||
|
@ -3,7 +3,7 @@ export class LineBreakTransformer implements Transformer<string, string> {
|
|||||||
|
|
||||||
transform(
|
transform(
|
||||||
chunk: string,
|
chunk: string,
|
||||||
controller: TransformStreamDefaultController<string>
|
controller: TransformStreamDefaultController<string>,
|
||||||
) {
|
) {
|
||||||
// Append new chunks to existing chunks.
|
// Append new chunks to existing chunks.
|
||||||
this.chunks += chunk;
|
this.chunks += chunk;
|
||||||
|
@ -7,7 +7,7 @@ export const downloadManifest = async (manifestPath: string) => {
|
|||||||
|
|
||||||
if ("new_install_skip_erase" in manifest) {
|
if ("new_install_skip_erase" in manifest) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.'
|
'Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.',
|
||||||
);
|
);
|
||||||
if (manifest.new_install_skip_erase) {
|
if (manifest.new_install_skip_erase) {
|
||||||
manifest.new_install_prompt_erase = true;
|
manifest.new_install_prompt_erase = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user