Skip to content

Commit

Permalink
[ci] update lockfile (#10551)
Browse files Browse the repository at this point in the history
Co-authored-by: matthewp <matthewp@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
  • Loading branch information
3 people authored Apr 2, 2024
1 parent f226cb6 commit 260f4fa
Show file tree
Hide file tree
Showing 15 changed files with 1,165 additions and 1,051 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const units: { [unit: string]: number } = {
}

const unitsReg = new RegExp(
// eslint-disable-next-line regexp/prefer-d
`^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join('|')})?$`,
)

Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/cli/install-package.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createRequire } from 'node:module';
import { sep } from 'node:path';
import { pathToFileURL } from 'node:url';
import boxen from 'boxen';
import { execa } from 'execa';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/core/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import { dim } from 'kleur/colors';
import { type HMRPayload, createServer } from 'vite';
import type { Arguments } from 'yargs-parser';
import type { AstroConfig, AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
import { getPackage } from '../../cli/install-package.js';
import { createContentTypesGenerator } from '../../content/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/i18n/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AstroConfig, AstroUserConfig, Locales } from '../@types/astro.js';
import type { AstroConfig, Locales } from '../@types/astro.js';
import { normalizeTheLocale, toCodes } from './index.js';

type BrowserLocale = {
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/runtime/server/astro-island.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ declare const Astro: {
this
);
} catch (e) {
// eslint-disable-next-line no-console
console.error(
`[astro-island] Error hydrating ${this.getAttribute('component-url')}`,
e
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/src/vite-plugin-astro-server/request.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type http from 'node:http';
import type { ManifestData } from '../@types/astro.js';
import { collapseDuplicateSlashes, removeTrailingForwardSlash } from '../core/path.js';
import { isServerLikeOutput } from '../prerender/utils.js';
import type { DevServerController } from './controller.js';
import { runWithErrorHandling } from './controller.js';
import { recordServerError } from './error.js';
Expand All @@ -27,7 +26,6 @@ export async function handleRequest({
}: HandleRequest) {
const { config, loader } = pipeline;
const origin = `${loader.isHttps() ? 'https' : 'http'}://${incomingRequest.headers.host}`;
const buildingToSSR = isServerLikeOutput(config);

const url = new URL(collapseDuplicateSlashes(origin + incomingRequest.url));
let pathname: string;
Expand Down
4 changes: 0 additions & 4 deletions packages/astro/src/vite-plugin-astro-server/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,3 @@ function getStatus(matchedRoute?: MatchedRoute): 404 | 500 | undefined {
if (matchedRoute.route.route === '/404') return 404;
if (matchedRoute.route.route === '/500') return 500;
}

function has404Route(manifest: ManifestData): boolean {
return manifest.routes.some((route) => route.route === '/404');
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ describe('Setting inlineStylesheets to auto in server output', () => {
const html = await response.text();
const $ = cheerio.load(html);

console.log($);
// the count of style/link tags depends on our css chunking logic
// this test should be updated if it changes
// assert.equal($('style').length, 3);
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/html-escape-complex.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { before, describe, it } from 'node:test';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/ssr-hoisted-script.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { before, describe, it } from 'node:test';
import { load as cheerioLoad } from 'cheerio';
import testAdapter from './test-adapter.js';
import { loadFixture } from './test-utils.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/units/vite-plugin-scanner/scan.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { describe, it } from 'node:test';
import { scan } from '../../../dist/vite-plugin-scanner/scan.js';

describe('astro scan', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFile, writeFile } from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { AstroIntegrationLogger } from 'astro';
import { bold, cyan } from 'kleur/colors';
import { bold } from 'kleur/colors';
import { normalizePath } from 'vite';
import { DB_TYPES_FILE } from '../consts.js';
import type { VitePlugin } from '../utils.js';
Expand Down
2 changes: 0 additions & 2 deletions packages/integrations/node/test/errors.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import assert from 'node:assert/strict';
import { spawn } from 'node:child_process';
import { after, before, describe, it } from 'node:test';
import { fileURLToPath } from 'node:url';
import { Worker } from 'node:worker_threads';
import * as cheerio from 'cheerio';
import nodejs from '../dist/index.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/integrations/vercel/test/edge-middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ describe('Vercel edge middleware', () => {
// this is abysmal...
'../.vercel/output/functions/render.func/www/withastro/astro/packages/integrations/vercel/test/fixtures/middleware-with-edge-file/dist/middleware.mjs'
);
console.log(contents);
// assert.equal(contents.includes('title:')).to.be.true;
// chaiJestSnapshot.setTestName('Middleware with handler file');
// assert.equal(contents).to.matchSnapshot(true);
Expand All @@ -55,6 +56,7 @@ describe('Vercel edge middleware', () => {
// this is abysmal...
'../.vercel/output/functions/render.func/www/withastro/astro/packages/integrations/vercel/test/fixtures/middleware-without-edge-file/dist/middleware.mjs'
);
console.log(contents);
// assert.equal(contents.includes('title:')).to.be.false;
// chaiJestSnapshot.setTestName('Middleware without handler file');
// assert.equal(contents).to.matchSnapshot(true);
Expand Down
Loading

0 comments on commit 260f4fa

Please sign in to comment.