astro 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/check/index.d.ts +2 -2
- package/dist/cli/check/index.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/overlay.js +1 -0
- package/dist/core/messages.js +2 -2
- package/dist/vite-plugin-load-fallback/index.js +1 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { AstroCheck } from '@astrojs/language-server';
|
|
3
|
-
import
|
|
3
|
+
import fs from 'fs';
|
|
4
4
|
import type { Arguments as Flags } from 'yargs-parser';
|
|
5
5
|
import type { AstroSettings } from '../../@types/astro';
|
|
6
6
|
import type { LogOptions } from '../../core/logger/core.js';
|
|
@@ -53,7 +53,7 @@ type CheckerConstructor = {
|
|
|
53
53
|
syncCli: (settings: AstroSettings, options: SyncOptions) => Promise<ProcessExit>;
|
|
54
54
|
settings: Readonly<AstroSettings>;
|
|
55
55
|
logging: Readonly<LogOptions>;
|
|
56
|
-
fileSystem: typeof
|
|
56
|
+
fileSystem: typeof fs;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* Responsible to check files - classic or watch mode - and report diagnostics.
|
package/dist/cli/check/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DiagnosticSeverity
|
|
4
4
|
} from "@astrojs/language-server";
|
|
5
5
|
import glob from "fast-glob";
|
|
6
|
-
import
|
|
6
|
+
import fs from "fs";
|
|
7
7
|
import { bold, dim, red, yellow } from "kleur/colors";
|
|
8
8
|
import { createRequire } from "module";
|
|
9
9
|
import { join } from "node:path";
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -53,7 +53,7 @@ async function dev(settings, options) {
|
|
|
53
53
|
isRestart: options.isRestart
|
|
54
54
|
})
|
|
55
55
|
);
|
|
56
|
-
const currentVersion = "2.2.
|
|
56
|
+
const currentVersion = "2.2.2";
|
|
57
57
|
if (currentVersion.includes("-")) {
|
|
58
58
|
warn(options.logging, null, msg.prerelease({ currentVersion }));
|
|
59
59
|
}
|
|
@@ -583,6 +583,7 @@ class ErrorOverlay extends HTMLElement {
|
|
|
583
583
|
super();
|
|
584
584
|
this.root = this.attachShadow({ mode: "open" });
|
|
585
585
|
this.root.innerHTML = overlayTemplate;
|
|
586
|
+
this.dir = "ltr";
|
|
586
587
|
const themeToggle = this.root.querySelector(".theme-toggle-checkbox");
|
|
587
588
|
if (localStorage.astroErrorOverlayTheme === "dark" || !("astroErrorOverlayTheme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
588
589
|
this == null ? void 0 : this.classList.add("astro-dark");
|
package/dist/core/messages.js
CHANGED
|
@@ -47,7 +47,7 @@ function serverStart({
|
|
|
47
47
|
base,
|
|
48
48
|
isRestart = false
|
|
49
49
|
}) {
|
|
50
|
-
const version = "2.2.
|
|
50
|
+
const version = "2.2.2";
|
|
51
51
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
52
52
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
53
53
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -233,7 +233,7 @@ function printHelp({
|
|
|
233
233
|
message.push(
|
|
234
234
|
linebreak(),
|
|
235
235
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
236
|
-
`v${"2.2.
|
|
236
|
+
`v${"2.2.2"}`
|
|
237
237
|
)} ${headline}`
|
|
238
238
|
);
|
|
239
239
|
}
|
|
@@ -5,7 +5,7 @@ function loadFallbackPlugin({
|
|
|
5
5
|
fs,
|
|
6
6
|
root
|
|
7
7
|
}) {
|
|
8
|
-
if (!fs || fs === nodeFs) {
|
|
8
|
+
if (!fs || fs === nodeFs || fs.default === nodeFs) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
11
|
const tryLoadModule = async (id) => {
|
|
@@ -38,11 +38,6 @@ function loadFallbackPlugin({
|
|
|
38
38
|
} catch {
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
let resolved = await this.resolve(id, parent, { skipSelf: true });
|
|
42
|
-
if (resolved) {
|
|
43
|
-
return resolved.id;
|
|
44
|
-
}
|
|
45
|
-
return slashify(id);
|
|
46
41
|
},
|
|
47
42
|
async load(id) {
|
|
48
43
|
const source = await tryLoadModule(id);
|