From d5bee9039d86ffc1034205b21051af8aa9fb3688 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 14 Sep 2021 22:04:39 -0700 Subject: [PATCH] fred fixes --- lerna.json | 7 ++- packages/astro/src/@types/compiler.d.ts | 45 ------------------- packages/astro/src/runtime/hmr.ts | 2 +- packages/astro/src/runtime/ssr.ts | 2 +- packages/astro/src/runtime/vite/config.ts | 2 +- .../astro/src/runtime/vite/plugin-astro.ts | 6 +-- packages/astro/tsconfig.json | 3 +- 7 files changed, 14 insertions(+), 53 deletions(-) delete mode 100644 packages/astro/src/@types/compiler.d.ts diff --git a/lerna.json b/lerna.json index ae71dbae7..552757f22 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,10 @@ { "ignoreChanges": ["**/test/**", "**/*.md"], "useWorkspaces": true, - "version": "4.0.0" + "version": "4.0.0", + "command": { + "run": { + "npmClient": "yarn" + } + } } diff --git a/packages/astro/src/@types/compiler.d.ts b/packages/astro/src/@types/compiler.d.ts deleted file mode 100644 index 213e1c503..000000000 --- a/packages/astro/src/@types/compiler.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -declare module '@astrojs/compiler' { - export type Platform = 'browser' | 'node' | 'neutral'; - export type SourceMap = any; - - export interface TransformOptions {} - - export interface TransformResult { - code: string; - map: SourceMap; - warnings: any[]; - } - - export interface TransformResults { - js: TransformResult; - css?: TransformResult; - } - - // This function transforms a single JavaScript file. It can be used to minify - // JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript - // to older JavaScript. It returns a promise that is either resolved with a - // "TransformResult" object or rejected with a "TransformFailure" object. - // - // Works in node: yes - // Works in browser: yes - export declare function transform(input: string, options?: TransformOptions): Promise; - - // This configures the browser-based version of astro. It is necessary to - // call this first and wait for the returned promise to be resolved before - // making other API calls when using astro in the browser. - // - // Works in node: yes - // Works in browser: yes ("options" is required) - export declare function initialize(options: InitializeOptions): Promise; - - export interface InitializeOptions { - // The URL of the "astro.wasm" file. This must be provided when running - // astro in the browser. - wasmURL?: string; - - // By default astro runs the WebAssembly-based browser API in a web worker - // to avoid blocking the UI thread. This can be disabled by setting "worker" - // to false. - worker?: boolean; - } -} diff --git a/packages/astro/src/runtime/hmr.ts b/packages/astro/src/runtime/hmr.ts index c64ddb6d7..23c48d5e7 100644 --- a/packages/astro/src/runtime/hmr.ts +++ b/packages/astro/src/runtime/hmr.ts @@ -1,4 +1,4 @@ -import 'vite/client'; +import '@vite/client'; if (import.meta.hot) { const parser = new DOMParser(); diff --git a/packages/astro/src/runtime/ssr.ts b/packages/astro/src/runtime/ssr.ts index 26fc3964e..8f0e5146c 100644 --- a/packages/astro/src/runtime/ssr.ts +++ b/packages/astro/src/runtime/ssr.ts @@ -49,7 +49,7 @@ export async function renderAstroComponent(component: InstanceType