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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { AstroCheck } from '@astrojs/language-server';
3
- import fsMod from 'fs';
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 fsMod;
56
+ fileSystem: typeof fs;
57
57
  };
58
58
  /**
59
59
  * Responsible to check files - classic or watch mode - and report diagnostics.
@@ -3,7 +3,7 @@ import {
3
3
  DiagnosticSeverity
4
4
  } from "@astrojs/language-server";
5
5
  import glob from "fast-glob";
6
- import * as fs from "fs";
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";
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "2.2.1";
1
+ const ASTRO_VERSION = "2.2.2";
2
2
  const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
3
3
  ".markdown",
4
4
  ".mdown",
@@ -53,7 +53,7 @@ async function dev(settings, options) {
53
53
  isRestart: options.isRestart
54
54
  })
55
55
  );
56
- const currentVersion = "2.2.1";
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");
@@ -47,7 +47,7 @@ function serverStart({
47
47
  base,
48
48
  isRestart = false
49
49
  }) {
50
- const version = "2.2.1";
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.1"}`
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
5
5
  "type": "module",
6
6
  "author": "withastro",