fix: lint failing on astro and some integrations (#3794)
* fix: lint failing on astro and some integrations * chore: fix telemetry lint * chore: fix turbo cache (thx nate) * chore: fix runtime server
This commit is contained in:
parent
515e876598
commit
c6ba6ec4d9
7 changed files with 18 additions and 17 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -21,7 +21,6 @@ defaults:
|
||||||
env:
|
env:
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
TURBO_REMOTE_ONLY: true
|
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
ASTRO_TELEMETRY_DISABLED: true
|
ASTRO_TELEMETRY_DISABLED: true
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,6 @@ async function throwAndExit(cmd: string, err: unknown) {
|
||||||
setTimeout(exitWithErrorMessage, 400);
|
setTimeout(exitWithErrorMessage, 400);
|
||||||
// Wait for the telemetry event to send, then exit. Ignore any error.
|
// Wait for the telemetry event to send, then exit. Ignore any error.
|
||||||
await telemetryPromise
|
await telemetryPromise
|
||||||
.catch((err) => debug('telemetry', `record() error: ${err.message}`))
|
.catch((err2) => debug('telemetry', `record() error: ${err2.message}`))
|
||||||
.then(exitWithErrorMessage);
|
.then(exitWithErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@ const createIntegration = (options: IntegrationOptions = {}): AstroIntegration =
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inputBuffer) {
|
if (!inputBuffer) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.warn(`"${transform.src}" image could not be fetched`);
|
console.warn(`"${transform.src}" image could not be fetched`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,8 @@ export function createPlugin(config: AstroConfig, options: Required<IntegrationO
|
||||||
return {
|
return {
|
||||||
name: '@astrojs/image',
|
name: '@astrojs/image',
|
||||||
enforce: 'pre',
|
enforce: 'pre',
|
||||||
configResolved(config) {
|
configResolved(viteConfig) {
|
||||||
resolvedConfig = config;
|
resolvedConfig = viteConfig;
|
||||||
},
|
},
|
||||||
async resolveId(id) {
|
async resolveId(id) {
|
||||||
// The virtual model redirects imports to the ImageService being used
|
// The virtual model redirects imports to the ImageService being used
|
||||||
|
|
|
@ -71,6 +71,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
|
||||||
if (config.site) {
|
if (config.site) {
|
||||||
finalSiteUrl = new URL(config.base, config.site);
|
finalSiteUrl = new URL(config.base, config.site);
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.warn(
|
console.warn(
|
||||||
'The Sitemap integration requires the `site` astro.config option. Skipping.'
|
'The Sitemap integration requires the `site` astro.config option. Skipping.'
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { getSystemInfo, SystemInfo } from './system-info.js';
|
||||||
export type AstroTelemetryOptions = { astroVersion: string; viteVersion: string };
|
export type AstroTelemetryOptions = { astroVersion: string; viteVersion: string };
|
||||||
export type TelemetryEvent = { eventName: string; payload: Record<string, any> };
|
export type TelemetryEvent = { eventName: string; payload: Record<string, any> };
|
||||||
|
|
||||||
interface EventMeta extends SystemInfo {}
|
type EventMeta = SystemInfo
|
||||||
interface EventContext extends ProjectInfo {
|
interface EventContext extends ProjectInfo {
|
||||||
anonymousId: string;
|
anonymousId: string;
|
||||||
anonymousSessionId: string;
|
anonymousSessionId: string;
|
||||||
|
|
24
packages/webapi/mod.d.ts
vendored
24
packages/webapi/mod.d.ts
vendored
|
@ -1,12 +1,12 @@
|
||||||
export { pathToPosix } from './lib/utils';
|
export { pathToPosix } from './lib/utils';
|
||||||
export { AbortController, AbortSignal, alert, atob, Blob, btoa, ByteLengthQueuingStrategy, cancelAnimationFrame, cancelIdleCallback, CanvasRenderingContext2D, CharacterData, clearTimeout, Comment, CountQueuingStrategy, CSSStyleSheet, CustomElementRegistry, CustomEvent, Document, DocumentFragment, DOMException, Element, Event, EventTarget, fetch, File, FormData, Headers, HTMLBodyElement, HTMLCanvasElement, HTMLDivElement, HTMLDocument, HTMLElement, HTMLHeadElement, HTMLHtmlElement, HTMLImageElement, HTMLSpanElement, HTMLStyleElement, HTMLTemplateElement, HTMLUnknownElement, Image, ImageData, IntersectionObserver, MediaQueryList, MutationObserver, Node, NodeFilter, NodeIterator, OffscreenCanvas, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, Request, requestAnimationFrame, requestIdleCallback, ResizeObserver, Response, setTimeout, ShadowRoot, structuredClone, StyleSheet, Text, TransformStream, TreeWalker, URLPattern, Window, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from './mod.js';
|
export { AbortController, AbortSignal, alert, atob, Blob, btoa, ByteLengthQueuingStrategy, cancelAnimationFrame, cancelIdleCallback, CanvasRenderingContext2D, CharacterData, clearTimeout, Comment, CountQueuingStrategy, CSSStyleSheet, CustomElementRegistry, CustomEvent, Document, DocumentFragment, DOMException, Element, Event, EventTarget, fetch, File, FormData, Headers, HTMLBodyElement, HTMLCanvasElement, HTMLDivElement, HTMLDocument, HTMLElement, HTMLHeadElement, HTMLHtmlElement, HTMLImageElement, HTMLSpanElement, HTMLStyleElement, HTMLTemplateElement, HTMLUnknownElement, Image, ImageData, IntersectionObserver, MediaQueryList, MutationObserver, Node, NodeFilter, NodeIterator, OffscreenCanvas, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, Request, requestAnimationFrame, requestIdleCallback, ResizeObserver, Response, setTimeout, ShadowRoot, structuredClone, StyleSheet, Text, TransformStream, TreeWalker, URLPattern, Window, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter, } from './mod.js';
|
||||||
export declare const polyfill: {
|
export declare const polyfill: {
|
||||||
(target: any, options?: PolyfillOptions): any;
|
(target: any, options?: PolyfillOptions): any;
|
||||||
internals(target: any, name: string): any;
|
internals(target: any, name: string): any;
|
||||||
};
|
};
|
||||||
interface PolyfillOptions {
|
interface PolyfillOptions {
|
||||||
exclude?: string | string[];
|
exclude?: string | string[];
|
||||||
override?: Record<string, {
|
override?: Record<string, {
|
||||||
(...args: any[]): any;
|
(...args: any[]): any;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
Loading…
Reference in a new issue