diff --git a/packages/analysis/package.json b/packages/analysis/package.json index e1f3b9d..dfcfe76 100644 --- a/packages/analysis/package.json +++ b/packages/analysis/package.json @@ -88,7 +88,7 @@ "@babel/core": "^7.19.6", "@types/bytes": "^3.1.1", "@types/d3": "^7.4.0", - "@types/node": "^18.11.3", + "@types/node": "^18.11.4", "del-cli": "^5.0.0", "esno": "^0.16.3", "pnpm": "^7.14.0", diff --git a/packages/core/package.json b/packages/core/package.json index b6638c3..fcfe6b1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -87,7 +87,7 @@ "esbuild-wasm": "^0.15.12" }, "devDependencies": { - "@types/node": "^18.11.3", + "@types/node": "^18.11.4", "cross-fetch": "^3.1.5", "del-cli": "^5.0.0", "esno": "^0.16.3", diff --git a/packages/website/astro.config.ts b/packages/website/astro.config.ts index f234575..7190f02 100644 --- a/packages/website/astro.config.ts +++ b/packages/website/astro.config.ts @@ -108,7 +108,7 @@ export default defineConfig({ clientsClaim: false, // globDirectory: outDir, - globPatterns: ["**/*.{html,js,css,svg,ttf,woff2,png,jpg,jpeg,wasm,ico,json}"], // + globPatterns: ["**/*.{html,js,css,svg,ttf,woff2,png,webp,jpg,jpeg,wasm,ico,json,xml}"], // ignoreURLParametersMatching: [/index\.html\?(.*)/, /\\?(.*)/], cleanupOutdatedCaches: true, @@ -117,7 +117,7 @@ export default defineConfig({ { // Match any request that starts with https://api.producthunt.com, https://api.countapi.xyz, https://opencollective.com, etc... urlPattern: - /^https:\/\/((?:api\.producthunt\.com)|(?:api\.countapi\.xyz)|(?:opencollective\.com)|(?:giscus\.bundlejs\.com)|(?:bundlejs\.com\/take-measurement))|(?:unpkg\.com)|(?:cdn\.skypack\.dev)|(?:(cdn\.)?esm\.sh)|(?:esm\.run)|(?:cdn\.jsdelivr\.net)|(?:deno\.land)|(?:raw\.githubusercontent\.com)/, + /^https:\/\/((?:api\.producthunt\.com)|(?:api\.countapi\.xyz)|(?:opencollective\.com)|(?:giscus\.bundlejs\.com)|(?:bundlejs\.com\/take-measurement))/, // Apply a network-first strategy. handler: "NetworkFirst", method: "GET", @@ -130,7 +130,7 @@ export default defineConfig({ { // Match any request that ends with .png, .jpg, .jpeg, .svg, etc.... urlPattern: - /workbox\-(.*)\.js|\.(?:png|jpg|jpeg|svg|webp|map|wasm|css)$|^https:\/\/(?:cdn\.polyfill\.io)/, + /workbox\-(.*)\.js|\.(?:png|jpg|jpeg|svg|webp|map|ts|wasm|css)$|^https:\/\/(?:cdn\.polyfill\.io)/, // Apply a stale-while-revalidate strategy. handler: "StaleWhileRevalidate", method: "GET", @@ -143,7 +143,7 @@ export default defineConfig({ { // Cache `monaco-editor` etc... urlPattern: - /chunks\/(.*)$/, + /(?:chunks|assets|favicon|fonts|giscus)\/(.*)$/, // Apply a network-first strategy. handler: "CacheFirst", method: "GET", diff --git a/packages/website/package.json b/packages/website/package.json index c6f49f4..bd789fe 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -37,7 +37,9 @@ "@astrojs/solid-js": "^1.2.1", "@astrojs/tailwind": "^2.1.1", "@babel/core": "^7.19.6", - "@iconify/json": "^2.1.126", + "@iconify/json": "^2.1.127", + "@types/offscreencanvas": "^2019.7.0", + "@typescript/lib-dom": "npm:@types/web@^0.0.75", "astro": "^1.5.2", "astrojs-service-worker": "^0.0.8", "babel-preset-solid": "^1.6.0", diff --git a/packages/website/src/components/DocsSection/VisitCounter/Counter.tsx b/packages/website/src/components/DocsSection/VisitCounter/Counter.tsx index 38371e9..6c37582 100644 --- a/packages/website/src/components/DocsSection/VisitCounter/Counter.tsx +++ b/packages/website/src/components/DocsSection/VisitCounter/Counter.tsx @@ -6,7 +6,7 @@ const [count, setCount] = createSignal("00000"); // countapi-js hit counter. It counts the number of times the website is loaded (async () => { - if (!PRODUCTION_MODE || !("document" in globalThis)) return; + if (!PRODUCTION_MODE || !("visualViewport" in globalThis)) return; try { const { value } = await hit("bundle.js.org", "visits"); setCount(`${value}`); diff --git a/packages/website/src/components/MainSection/EditorSection/Console.tsx b/packages/website/src/components/MainSection/EditorSection/Console.tsx index dc0e421..15bf422 100644 --- a/packages/website/src/components/MainSection/EditorSection/Console.tsx +++ b/packages/website/src/components/MainSection/EditorSection/Console.tsx @@ -1,5 +1,5 @@ import type { ComponentProps } from "solid-js"; -import { createEffect, createSignal } from "solid-js"; +import { createEffect, createSignal, For } from "solid-js"; import { ConsoleButtons } from "./ConsoleButtons"; import { Log } from "./ConsoleLogs"; @@ -13,17 +13,11 @@ export function addLogs(...args: unknown[]) { setLogsList([...logsList(), ...args]); } -if ("document" in globalThis) { +if ("visualViewport" in globalThis) { expose(addLogs, TASK_RUNNER); } export function Console(props?: ComponentProps<"div">) { - createEffect(() => { - if ("document" in globalThis) { - console.log(logsList()); - } - }); - return (
@@ -31,14 +25,18 @@ export function Console(props?: ComponentProps<"div">) {
- {/*
-        
-          

No logs...

-
-
*/} -
- Class + + +

No logs...

+
+ + }> + {(value) => ( + {value.data} + )} +
{/*
What do you mean? diff --git a/packages/website/src/components/MainSection/EditorSection/Editor.tsx b/packages/website/src/components/MainSection/EditorSection/Editor.tsx index 7701d54..b28c9d1 100644 --- a/packages/website/src/components/MainSection/EditorSection/Editor.tsx +++ b/packages/website/src/components/MainSection/EditorSection/Editor.tsx @@ -9,8 +9,8 @@ import { state, setState, initial } from "../../../scripts/utils/store"; import { getShareURLValues } from "../../../scripts/utils/get-initial"; import { createShareURL } from "../../../scripts/utils/share"; -const { configValue: configInitialValue } = "document" in globalThis && getShareURLValues(); -const [monaco] = "document" in globalThis ? createResource(() => { +const { configValue: configInitialValue } = "visualViewport" in globalThis && getShareURLValues(); +const [monaco] = "visualViewport" in globalThis ? createResource(() => { return import("../../../scripts/modules/monaco"); }) : []; diff --git a/packages/website/src/components/MainSection/EditorSection/EditorButtons.tsx b/packages/website/src/components/MainSection/EditorSection/EditorButtons.tsx index da5065d..70b69d7 100644 --- a/packages/website/src/components/MainSection/EditorSection/EditorButtons.tsx +++ b/packages/website/src/components/MainSection/EditorSection/EditorButtons.tsx @@ -78,7 +78,7 @@ export function EditorButtons() { URL.revokeObjectURL(blobUrl); } - const media = ("document" in globalThis) && globalThis?.matchMedia("(max-width: 410px)"); + const media = ("visualViewport" in globalThis) && globalThis?.matchMedia("(max-width: 410px)"); const [placement, setPlacement] = createSignal(media?.matches ? "bottom" : "top"); function mediaQueryRun(e?: MediaQueryListEvent) { setPlacement(e?.matches ? "bottom" : "top"); diff --git a/packages/website/src/components/MainSection/SearchSection/Result.tsx b/packages/website/src/components/MainSection/SearchSection/Result.tsx index 61d7111..d2c8591 100644 --- a/packages/website/src/components/MainSection/SearchSection/Result.tsx +++ b/packages/website/src/components/MainSection/SearchSection/Result.tsx @@ -9,6 +9,7 @@ import { createTextSwitch } from "../../../hooks/text-switch"; import Anchor from "../../../components/Anchor"; import Button from "../../../components/Button"; +import { inputModelResetValue } from "../../../scripts/utils/get-initial"; export interface SearchResultProps extends ComponentProps<"div"> { type?: string; @@ -33,27 +34,27 @@ export function SearchResult(props?: SearchResultProps) { const BtnText = createTextSwitch(["Add Module", "Added!"]); // When user clicks the "Add Module button" give the user some feedback - function onClick() { - (async () => { - toast.success(`Added ${_package}`); - await BtnText.switch("next"); - - const inputValue = state.monaco.models.input.getValue(); - const inputInitialValue = state.monaco.initialValue.input; - - // Ths initial values starting comment - const startingComment = inputInitialValue.split("\n")[0]; - - state.monaco.models.input.setValue( - // If the input model has change from it's initial value then - // add the module under the rest of the code - // Otherwise, replace the input model value with the new export - (inputValue !== inputInitialValue ? inputValue : startingComment)?.trim() + - `\nexport * from "${_package}";` - ); - - await BtnText.switch("initial", 500); - })(); + async function onClick() { + toast.success(`Added ${_package}`); + await BtnText.switch("next"); + + const inputValue = state.monaco.models.input.getValue(); + const inputInitialValue = state.monaco.initialValue.input ?? inputModelResetValue; + + // Ths initial values starting comment + const startingComment = inputInitialValue.split("\n")[0]; + + console.log({ _package }) + + state.monaco.models.input.setValue( + // If the input model has change from it's initial value then + // add the module under the rest of the code + // Otherwise, replace the input model value with the new export + (inputValue !== inputInitialValue ? inputValue : startingComment)?.trim() + + `\nexport * from "${_package}";` + ); + + await BtnText.switch("initial", 500); } return ( diff --git a/packages/website/src/components/OfflineBanner.tsx b/packages/website/src/components/OfflineBanner.tsx index e55500d..2bc52c3 100644 --- a/packages/website/src/components/OfflineBanner.tsx +++ b/packages/website/src/components/OfflineBanner.tsx @@ -4,7 +4,7 @@ import OfflineIcon from "~icons/fluent/cloud-offline-24-regular"; const [isOnline, setIsOnline] = createSignal(true); -if ("document" in globalThis) { +if ("visualViewport" in globalThis) { setIsOnline(navigator.onLine); globalThis.addEventListener("online", () => { diff --git a/packages/website/src/components/ThemeSwitch.tsx b/packages/website/src/components/ThemeSwitch.tsx index 6bf325f..cf357a7 100644 --- a/packages/website/src/components/ThemeSwitch.tsx +++ b/packages/website/src/components/ThemeSwitch.tsx @@ -3,7 +3,7 @@ import { themeSet, themeGet } from "../scripts/theme"; import { onMount } from "solid-js"; let html: HTMLHtmlElement; -if ("document" in globalThis) { +if ("visualViewport" in globalThis) { html = html ?? document.querySelector("html"); } diff --git a/packages/website/src/env.ts b/packages/website/src/env.ts index d5e01a6..dd7d1b5 100644 --- a/packages/website/src/env.ts +++ b/packages/website/src/env.ts @@ -1,5 +1,5 @@ export const env = import.meta.env; export const ENABLE_SW = env.PROD; -export const USE_SHAREDWORKER = env.PROD; +export const USE_SHAREDWORKER = true ?? env.PROD; export const PRODUCTION_MODE = env.PROD; \ No newline at end of file diff --git a/packages/website/src/hooks/roving-index.ts b/packages/website/src/hooks/roving-index.ts index 722744d..eb8a17e 100644 --- a/packages/website/src/hooks/roving-index.ts +++ b/packages/website/src/hooks/roving-index.ts @@ -117,7 +117,7 @@ const focusNextItem = rover => { rx.index = rx.targets.length - 1; // use rover index state to find next - const next = rx.targets[rx.index]; + let next = rx.targets[rx.index]; // found something, activate it next && activate(rover, next); @@ -134,13 +134,14 @@ const focusPreviousItem = rover => { rx.index = 0; // use rover index state to find next - const prev = rx.targets[rx.index]; + let prev = rx.targets[rx.index]; // found something, activate it prev && activate(rover, prev); }; const activate = (rover, item) => { + if (!item) return; const rx = state.get(rover); // remove old tab index item diff --git a/packages/website/src/hooks/tooltip.tsx b/packages/website/src/hooks/tooltip.tsx index 08efa36..24b737e 100644 --- a/packages/website/src/hooks/tooltip.tsx +++ b/packages/website/src/hooks/tooltip.tsx @@ -40,7 +40,7 @@ export function ToolTip(props?: ComponentProps & { mobile?: string, as?: ke mobile: "(max-width: 640px)" }, newProps); - const media = ("document" in globalThis) && globalThis?.matchMedia(mergedProps?.mobile); + const media = ("visualViewport" in globalThis) && globalThis?.matchMedia(mergedProps?.mobile); function mediaQueryRun(e?: MediaQueryListEvent) { if (e?.matches) diff --git a/packages/website/src/scripts/index.ts b/packages/website/src/scripts/index.ts index dc96f77..408dbe9 100644 --- a/packages/website/src/scripts/index.ts +++ b/packages/website/src/scripts/index.ts @@ -6,26 +6,28 @@ import { SharedWorkerPolyfill as SharedWorker } from "@okikio/sharedworker"; import * as Comlink from "comlink"; -export const TS_WORKER = "document" in globalThis && ( +import "./utils/transferhandle"; + +export const TS_WORKER = "visualViewport" in globalThis && ( USE_SHAREDWORKER ? new SharedWorker(new URL("./workers/typescript.ts", import.meta.url), { name: "typescript", type: "module" }) : new Worker(new URL("./workers/typescript.ts", import.meta.url), { name: "typescript", type: "module" }) ); -export const EDITOR_WORKER = "document" in globalThis && ( +export const EDITOR_WORKER = "visualViewport" in globalThis && ( USE_SHAREDWORKER ? new SharedWorker(new URL("./workers/editor.ts", import.meta.url), { name: "editor", type: "module" }) : new Worker(new URL("./workers/editor.ts", import.meta.url), { name: "editor", type: "module" }) ); EDITOR_WORKER?.terminate?.(); -export const TASK_RUNNER = "document" in globalThis && ( +export const TASK_RUNNER = "visualViewport" in globalThis && ( USE_SHAREDWORKER ? new SharedWorker(new URL("./workers/task-runner.ts", import.meta.url), { name: "task-runner", type: "module" }) : new Worker(new URL("./workers/task-runner.ts", import.meta.url), { name: "task-runner", type: "module" }) ); -export const taskRunner = "document" in globalThis && Comlink.wrap(TASK_RUNNER); +export const taskRunner = "visualViewport" in globalThis && Comlink.wrap(TASK_RUNNER); setState("workers", { tasks: taskRunner }); globalThis?.addEventListener?.("pagehide", (event) => { diff --git a/packages/website/src/scripts/modules/monaco.ts b/packages/website/src/scripts/modules/monaco.ts index 268fdfe..0845158 100644 --- a/packages/website/src/scripts/modules/monaco.ts +++ b/packages/website/src/scripts/modules/monaco.ts @@ -18,7 +18,7 @@ import { mediaTheme, themeGet } from "../theme"; import { toLocaleDateString } from "../utils/locale-date-string"; import { configModelResetValue, getShareURLValues, inputModelResetValue, outputModelResetValue } from "../utils/get-initial"; -export { configModelResetValue }; +export { inputModelResetValue, outputModelResetValue, configModelResetValue }; // Since packaging is done by you, you need // to instruct the editor how you named the diff --git a/packages/website/src/scripts/utils/build.tsx b/packages/website/src/scripts/utils/build.tsx index 983e943..f0ab7af 100644 --- a/packages/website/src/scripts/utils/build.tsx +++ b/packages/website/src/scripts/utils/build.tsx @@ -5,6 +5,7 @@ import { setState, state } from "./store"; import { taskRunner } from "../index"; import { outputModelResetValue } from "./get-initial"; +import { addLogs } from "../../components/MainSection/EditorSection/Console"; export const timeFormatter = new Intl.RelativeTimeFormat("en", { style: "narrow", @@ -63,6 +64,8 @@ export async function build() { setState("bundleSize", result.size); } + addLogs({ type: "info", data: `Build Done with a size of ${result.size} ${timeFormatter.format(elapsed, "seconds")}` }) + // Signifier to no longer hold results in memory result = null; } catch (e) { diff --git a/packages/website/src/scripts/utils/transferhandle.ts b/packages/website/src/scripts/utils/transferhandle.ts new file mode 100644 index 0000000..5c66608 --- /dev/null +++ b/packages/website/src/scripts/utils/transferhandle.ts @@ -0,0 +1,86 @@ +import type { TransferHandler } from "comlink"; +import * as Comlink from "comlink"; + +const TypedArray = Object.getPrototypeOf(Int8Array); +const AudioData = globalThis.AudioData; +const VideoFrame = globalThis.VideoFrame; +const OffscreenCanvas = globalThis.OffscreenCanvas; +const RTCDataChannel = globalThis.RTCDataChannel; + +type TypeTypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; +type Transferable = ArrayBuffer | MessagePort | ReadableStream | WritableStream | TransformStream | typeof AudioData | ImageBitmap | typeof VideoFrame | OffscreenCanvas | RTCDataChannel; + +const isObject = (val: unknown): val is object => + (typeof val === "object" && val !== null) || typeof val === "function"; + +function isTypedArray(obj: unknown) { + return obj instanceof TypedArray || obj instanceof DataView; +} + +function isTransferable(obj: unknown) { + return ("ArrayBuffer" in globalThis && obj instanceof ArrayBuffer) || + ("MessagePort" in globalThis && obj instanceof MessagePort) || + ("ReadableStream" in globalThis && obj instanceof ReadableStream) || + ("WritableStream" in globalThis && obj instanceof WritableStream) || + ("TransformStream" in globalThis && obj instanceof TransformStream) || + ("AudioData" in globalThis && obj instanceof AudioData) || + ("ImageBitmap" in globalThis && obj instanceof ImageBitmap) || + ("VideoFrame" in globalThis && obj instanceof VideoFrame) || + ("OffscreenCanvas" in globalThis && obj instanceof OffscreenCanvas) || + ("RTCDataChannel" in globalThis && obj instanceof RTCDataChannel); +} + +function filterOutDuplicates(array: T[]): T[] { + return [...new Set(array)]; +} + +// Get transferable objects from an object +function getTransferables(obj: unknown): Transferable[] { + if (isTypedArray(obj)) { + const buffer = (obj as TypeTypedArray).buffer; + return [buffer]; + } else if (isTransferable(obj)) { + return [obj as Transferable]; + } else if (Array.isArray(obj)) { + const transferables = obj.flatMap(x => getTransferables(x)); + return filterOutDuplicates(transferables); + } else if (isObject(obj)) { + const transferables = Object.values(obj).flatMap(x => getTransferables(x)); + return filterOutDuplicates(transferables); + } + + return []; +} + +// Check is object contains transferable objects +function hasTransferables(obj: unknown): boolean { + if (isTypedArray(obj) || isTransferable(obj)) { + return true; + } else if (Array.isArray(obj)) { + return obj.flatMap(x => hasTransferables(x)).includes(true); + } else if (isObject(obj)) { + return Object.values(obj).flatMap(x => hasTransferables(x)).includes(true); + } else { + return false; + } +} + +/** + * Internal transfer handle to handle objects marked to proxy. + */ +const transferableTransferHandler: TransferHandler = { + canHandle(obj): obj is object { + return hasTransferables(obj); + }, + serialize(obj) { + return [ + obj, + getTransferables(obj), + ]; + }, + deserialize(obj) { + return obj; + }, +}; + +Comlink.transferHandlers.set("transferable", transferableTransferHandler); \ No newline at end of file diff --git a/packages/website/src/scripts/workers/task-runner.ts b/packages/website/src/scripts/workers/task-runner.ts index cac247c..79772af 100644 --- a/packages/website/src/scripts/workers/task-runner.ts +++ b/packages/website/src/scripts/workers/task-runner.ts @@ -1,4 +1,6 @@ /// +import type { addLogs } from "../../components/MainSection/EditorSection/Console"; + import { format } from "./tasks/format"; import { createFile } from "./tasks/create-file"; import { createShareURL } from "./tasks/create-share-url"; @@ -7,7 +9,8 @@ import { parseConfig } from "./tasks/parse-config"; import { EVENTS } from "@bundlejs/core/src/index"; import * as Comlink from "comlink"; -import type { addLogs } from "../../components/MainSection/EditorSection/Console"; + +import "../utils/transferhandle"; export const TaskRunner = { format, @@ -19,14 +22,14 @@ export const TaskRunner = { export const connect = async (port: MessagePort | typeof globalThis) => { Comlink.expose(TaskRunner, port); - const proxy = Comlink.wrap(port); + const addLog = Comlink.wrap(port); EVENTS.on("init.complete", (data) => { - proxy({ type: "info", data: "Initialized 🚀✨" }); + addLog({ type: "info", data: "Initialized 🚀✨" }); }); EVENTS.on("logger.info", (data) => { - proxy({ type: "log", data }); + addLog({ type: "log", data }); }); }; diff --git a/packages/website/src/scripts/workers/tasks/build.ts b/packages/website/src/scripts/workers/tasks/build.ts index 99b2ece..fc8dcdc 100644 --- a/packages/website/src/scripts/workers/tasks/build.ts +++ b/packages/website/src/scripts/workers/tasks/build.ts @@ -7,7 +7,7 @@ import { build, compress, deepAssign, setFile } from "@bundlejs/core/src/index"; import { parseConfig } from "./parse-config"; import { DefaultConfig } from "../../configs/options"; -import { initOpts, ready } from "./utils/esbuild-init"; +import { initOpts, ready } from "./utils/init"; export async function bundle(fileName: string, content: string, _config = "export default {}") { setFile("/index.tsx", content); @@ -23,6 +23,8 @@ export async function bundle(fileName: string, content: string, _config = "expor init: initOpts, }); + console.log({ result }) + const sizeInfo = await compress( result.contents.map(x => x.contents), config.compression diff --git a/packages/website/src/scripts/workers/tasks/format.ts b/packages/website/src/scripts/workers/tasks/format.ts index b2d6e9f..12d3b65 100644 --- a/packages/website/src/scripts/workers/tasks/format.ts +++ b/packages/website/src/scripts/workers/tasks/format.ts @@ -69,7 +69,7 @@ const getFormatter = async () => { return formatter; }; -getFormatter().then(result => (formatter = result)); +// getFormatter().then(result => (formatter = result)); export async function format(fileName: string, content: string) { if (!formatter) formatter = await getFormatter(); diff --git a/packages/website/src/scripts/workers/tasks/parse-config.ts b/packages/website/src/scripts/workers/tasks/parse-config.ts index f28187a..039c6cc 100644 --- a/packages/website/src/scripts/workers/tasks/parse-config.ts +++ b/packages/website/src/scripts/workers/tasks/parse-config.ts @@ -2,7 +2,7 @@ import { configModelResetValue } from "../../utils/get-initial"; import { transform } from "@bundlejs/core/src/index"; -import { initOpts, ready } from "./utils/esbuild-init"; +import { initOpts, ready } from "./utils/init"; const configs = new Map(); diff --git a/packages/website/src/scripts/workers/tasks/utils/esbuild-init.ts b/packages/website/src/scripts/workers/tasks/utils/init.ts similarity index 61% rename from packages/website/src/scripts/workers/tasks/utils/esbuild-init.ts rename to packages/website/src/scripts/workers/tasks/utils/init.ts index 472c136..821ffe9 100644 --- a/packages/website/src/scripts/workers/tasks/utils/esbuild-init.ts +++ b/packages/website/src/scripts/workers/tasks/utils/init.ts @@ -1,16 +1,11 @@ /// import type { ESBUILD } from "@bundlejs/core/src/index"; -import { init } from "@bundlejs/core/src/index"; -import ESBUILD_WASM_URL from "@bundlejs/core/src/esbuild.wasm?url"; +import { init } from "@bundlejs/core/src/index"; import { PLATFORM_AUTO } from "@bundlejs/core/src/index"; export let initOpts: ESBUILD.InitializeOptions = null; - export const ready = (async () => { - initOpts = { - wasmURL: ESBUILD_WASM_URL, - worker: false - }; + initOpts = { worker: false }; return await init(PLATFORM_AUTO, initOpts); })(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d934df6..9e6845b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,7 +64,7 @@ importers: '@bundlejs/core': workspace:^0.0.0 '@types/bytes': ^3.1.1 '@types/d3': ^7.4.0 - '@types/node': ^18.11.3 + '@types/node': ^18.11.4 bytes: ^3.1.2 d3: ^7.6.1 del-cli: ^5.0.0 @@ -91,7 +91,7 @@ importers: '@babel/core': 7.19.6 '@types/bytes': 3.1.1 '@types/d3': 7.4.0 - '@types/node': 18.11.3 + '@types/node': 18.11.4 del-cli: 5.0.0 esno: 0.16.3 pnpm: 7.14.0 @@ -104,7 +104,7 @@ importers: packages/core: specifiers: '@okikio/emitter': ^2.1.7 - '@types/node': ^18.11.3 + '@types/node': ^18.11.4 cross-fetch: ^3.1.5 del-cli: ^5.0.0 esbuild: ^0.15.12 @@ -121,7 +121,7 @@ importers: esbuild: 0.15.12 esbuild-wasm: 0.15.12 devDependencies: - '@types/node': 18.11.3 + '@types/node': 18.11.4 cross-fetch: 3.1.5 del-cli: 5.0.0 esno: 0.16.3 @@ -141,10 +141,12 @@ importers: '@babel/core': ^7.19.6 '@bundlejs/core': workspace:^0.0.0 '@dprint/formatter': ^0.2.0 - '@iconify/json': ^2.1.126 + '@iconify/json': ^2.1.127 '@okikio/emitter': ^2.1.7 '@okikio/native': ^3.0.1 '@okikio/sharedworker': ^1.0.4 + '@types/offscreencanvas': ^2019.7.0 + '@typescript/lib-dom': npm:@types/web@^0.0.75 '@typescript/vfs': ^1.4.0 astro: ^1.5.2 astrojs-service-worker: ^0.0.8 @@ -192,7 +194,9 @@ importers: '@astrojs/solid-js': 1.2.1_halbqdcynamd2xnv2lolknuczy '@astrojs/tailwind': 2.1.1_tailwindcss@3.2.1 '@babel/core': 7.19.6 - '@iconify/json': 2.1.126 + '@iconify/json': 2.1.127 + '@types/offscreencanvas': 2019.7.0 + '@typescript/lib-dom': /@types/web/0.0.75 astro: 1.5.2_sass@1.55.0 astrojs-service-worker: 0.0.8 babel-preset-solid: 1.6.0_@babel+core@7.19.6 @@ -1530,7 +1534,7 @@ packages: babel-plugin-polyfill-corejs2: 0.3.3_@babel+core@7.19.6 babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.19.6 babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.19.6 - core-js-compat: 3.25.5 + core-js-compat: 3.26.0 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -1848,8 +1852,8 @@ packages: requiresBuild: true optional: true - /@iconify/json/2.1.126: - resolution: {integrity: sha512-qT5BbEcX8vbsdlzizukGH2lm4fRJ+jNZ7qeZT1W4X9zs2ZKMBXXg1vcrhtM5UC9U1HRr45fa9TXcUnb4oIlpCQ==} + /@iconify/json/2.1.127: + resolution: {integrity: sha512-pahFCt5Q8XyXHgDz/PQ7LDwqcB+GZ6fuIcikxMYTTI/uoodjT+97QqYV2AcNrYK+gWZU7DqzY2T689Icf4uYfA==} dependencies: '@iconify/types': 2.0.0 pathe: 0.3.9 @@ -2691,14 +2695,18 @@ packages: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node/18.11.3: - resolution: {integrity: sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==} + /@types/node/18.11.4: + resolution: {integrity: sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==} dev: true /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/offscreencanvas/2019.7.0: + resolution: {integrity: sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==} + dev: true + /@types/parse-json/4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true @@ -2710,7 +2718,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.11.3 + '@types/node': 18.11.4 dev: true /@types/resolve/1.20.2: @@ -2734,6 +2742,10 @@ packages: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true + /@types/web/0.0.75: + resolution: {integrity: sha512-42MBIWop5E6TENKBwwMONJfctJsHc5o1k6Fn3FOXsPz892cW6wuiWGPvQh+Tle+yaAMaIpRsdOnlFMDKUKkdGw==} + dev: true + /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -3102,7 +3114,7 @@ packages: dependencies: '@babel/core': 7.19.6 '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.19.6 - core-js-compat: 3.25.5 + core-js-compat: 3.26.0 transitivePeerDependencies: - supports-color dev: true @@ -3616,8 +3628,8 @@ packages: engines: {node: '>= 0.6'} dev: true - /core-js-compat/3.25.5: - resolution: {integrity: sha512-ovcyhs2DEBUIE0MGEKHP4olCUW/XYte3Vroyxuh38rD1wAO4dHohsovUC4eAOuzFxE6b+RXvBU3UZ9o0YhUTkA==} + /core-js-compat/3.26.0: + resolution: {integrity: sha512-piOX9Go+Z4f9ZiBFLnZ5VrOpBl0h7IGCkiFUN11QTe6LjAvOT3ifL/5TdoizMh99hcGy5SoLyWbapIY/PIb/3A==} dependencies: browserslist: 4.21.4 dev: true @@ -5251,7 +5263,7 @@ packages: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.17.3 + uglify-js: 3.17.4 dev: true /hard-rejection/2.1.0: @@ -5954,7 +5966,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.11.3 + '@types/node': 18.11.4 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -9029,8 +9041,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /uglify-js/3.17.3: - resolution: {integrity: sha512-JmMFDME3iufZnBpyKL+uS78LRiC+mK55zWfM5f/pWBJfpOttXAqYfdDGRukYhJuyRinvPVAtUhvy7rlDybNtFg==} + /uglify-js/3.17.4: + resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true @@ -9427,7 +9439,7 @@ packages: dependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.11.3 + '@types/node': 18.11.4 chai: 4.3.6 debug: 4.3.4 local-pkg: 0.4.2 @@ -9468,7 +9480,7 @@ packages: dependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.11.3 + '@types/node': 18.11.4 chai: 4.3.6 debug: 4.3.4 local-pkg: 0.4.2