Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update all non-major dependencies #12366

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: pnpm run build

- name: Run the benchmarks
uses: CodSpeedHQ/action@b587655f756aab640e742fec141261bc6f0a569d # v3.0.1
uses: CodSpeedHQ/action@fa1dcde8d58f2ab0b407a6a24d6cc5a8c1444a8c # v3.1.0
timeout-minutes: 30
with:
run: pnpm benchmark codspeed
Expand Down
4 changes: 2 additions & 2 deletions benchmark/bench/memory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { exec } from 'tinyexec';
import { markdownTable } from 'markdown-table';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import { markdownTable } from 'markdown-table';
import { exec } from 'tinyexec';
import { astroBin } from './_util.js';

/** @typedef {Record<string, import('../../packages/astro/src/core/config/timer').Stat>} AstroTimerStat */
Expand Down
2 changes: 1 addition & 1 deletion benchmark/packages/timer/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export function createExports(manifest: SSRManifest) {
const end = performance.now();
res.write(end - start + '');
res.end();
}
},
};
}
1 change: 1 addition & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"**/.vercel/**",
"benchmark/projects/",
"benchmark/results/",
"benchmark/bench/_template.js",
],
"include": ["test/**", "e2e/**", "packages/**", "/scripts/**", "benchmark/bench"],
},
Expand Down
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"astro": "^4.16.9",
"sass": "^1.80.4",
"sass": "^1.80.6",
"sharp": "^0.33.3"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
"@changesets/cli": "^2.27.9",
"@types/node": "^18.17.8",
"esbuild": "^0.21.5",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-plugin-regexp": "^2.6.0",
"globby": "^14.0.2",
"only-allow": "^1.2.1",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"turbo": "^2.2.3",
"typescript": "~5.6.3",
"typescript-eslint": "^8.11.0"
"typescript-eslint": "^8.13.0"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/error-sass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"dependencies": {
"astro": "workspace:*",
"sass": "^1.80.4"
"sass": "^1.80.6"
}
}
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"preact": "^10.24.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.80.4",
"sass": "^1.80.6",
"solid-js": "^1.9.3",
"svelte": "^4.2.19",
"vue": "^3.5.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/hmr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"private": true,
"devDependencies": {
"astro": "workspace:*",
"sass": "^1.80.4"
"sass": "^1.80.6"
}
}
8 changes: 4 additions & 4 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"micromatch": "^4.0.8",
"mrmime": "^2.0.0",
"neotraverse": "^0.6.18",
"ora": "^8.1.0",
"ora": "^8.1.1",
"p-limit": "^6.1.0",
"p-queue": "^8.0.1",
"preferred-pm": "^4.0.0",
Expand Down Expand Up @@ -211,7 +211,7 @@
"eol": "^0.10.0",
"execa": "^8.0.1",
"expect-type": "^1.1.0",
"fs-fixture": "^2.5.0",
"fs-fixture": "^2.6.0",
"mdast-util-mdx": "^3.0.0",
"mdast-util-mdx-jsx": "^3.1.3",
"node-mocks-http": "^1.16.1",
Expand All @@ -220,8 +220,8 @@
"rehype-slug": "^6.0.0",
"rehype-toc": "^3.0.2",
"remark-code-titles": "^0.1.2",
"rollup": "^4.24.2",
"sass": "^1.80.4",
"rollup": "^4.24.4",
"sass": "^1.80.6",
"undici": "^6.20.1",
"unified": "^11.0.5"
},
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/assets/services/squoosh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async function getRotationForEXIF(
case 7:
case 8:
return { type: 'rotate', numRotations: 3 };
case undefined:
default:
return undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export async function processBuffer(
imageData,
quality,
})) as Uint8Array;
case 'svg':
default:
throw Error(`Unsupported encoding format`);
}
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/assets/services/vendor/squoosh/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export async function processBuffer(
return await impl.encodePng(imageData);
case 'webp':
return await impl.encodeWebp(imageData, { quality });
case 'svg':
default:
throw Error(`Unsupported encoding format`)
}
Expand Down
8 changes: 6 additions & 2 deletions packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ export async function add(names: string[], { flags }: AddOptions) {
logger.info('SKIP_FORMAT', msg.success(`Configuration up-to-date.`));
break;
}
default: {
// NOTE: failure shouldn't happen in practice because `updateAstroConfig` doesn't return that.
// Pipe this to the same handling as `UpdateResult.updated` for now.
case UpdateResult.failure:
case UpdateResult.updated:
case undefined: {
const list = integrations.map((integration) => ` - ${integration.packageName}`).join('\n');
logger.info(
'SKIP_FORMAT',
Expand Down Expand Up @@ -375,7 +379,7 @@ export async function add(names: string[], { flags }: AddOptions) {
`Unknown error parsing tsconfig.json or jsconfig.json. Could not update TypeScript settings.`,
);
}
default:
case UpdateResult.updated:
logger.info('SKIP_FORMAT', msg.success(`Successfully updated TypeScript settings`));
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/cli/docs/open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const getPlatformSpecificCommand = (): [string] | [string, string[]] => {
const isGitPod = Boolean(process.env.GITPOD_REPO_ROOT);
const platform = isGitPod ? 'gitpod' : process.platform;

// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (platform) {
case 'android':
case 'linux':
Expand Down
12 changes: 4 additions & 8 deletions packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,10 @@ export class App {
throw new Error(`Unable to resolve [${specifier}]`);
}
const bundlePath = this.#manifest.entryModules[specifier];
switch (true) {
case bundlePath.startsWith('data:'):
case bundlePath.length === 0: {
return bundlePath;
}
default: {
return createAssetLink(bundlePath, this.#manifest.base, this.#manifest.assetsPrefix);
}
if (bundlePath.startsWith('data:') || bundlePath.length === 0) {
return bundlePath;
} else {
return createAssetLink(bundlePath, this.#manifest.base, this.#manifest.assetsPrefix);
}
},
serverLike: true,
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ function getUrlForPath(
ending = trailingSlash === 'never' ? '' : '/';
break;
}
case 'file':
default: {
ending = '.html';
break;
Expand Down
31 changes: 12 additions & 19 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,18 @@ export async function staticBuild(
contentFileNames?: string[],
) {
const { settings } = opts;
switch (true) {
case settings.config.output === 'static': {
settings.timer.start('Static generate');
await generatePages(opts, internals);
await cleanServerOutput(opts, ssrOutputChunkNames, contentFileNames, internals);
settings.timer.end('Static generate');
return;
}
case isServerLikeOutput(settings.config): {
settings.timer.start('Server generate');
await generatePages(opts, internals);
await cleanStaticOutput(opts, internals);
opts.logger.info(null, `\n${bgMagenta(black(' finalizing server assets '))}\n`);
await ssrMoveAssets(opts);
settings.timer.end('Server generate');
return;
}
default:
return;
if (settings.config.output === 'static') {
settings.timer.start('Static generate');
await generatePages(opts, internals);
await cleanServerOutput(opts, ssrOutputChunkNames, contentFileNames, internals);
settings.timer.end('Static generate');
} else if (isServerLikeOutput(settings.config)) {
settings.timer.start('Server generate');
await generatePages(opts, internals);
await cleanStaticOutput(opts, internals);
opts.logger.info(null, `\n${bgMagenta(black(' finalizing server assets '))}\n`);
await ssrMoveAssets(opts);
settings.timer.end('Server generate');
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/preferences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function isValidKey(key: string): key is PreferenceKey {
}
export function coerce(key: string, value: unknown) {
const type = typeof dget(DEFAULT_PREFERENCES, key);
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (type) {
case 'string':
return value;
Expand Down Expand Up @@ -143,6 +144,7 @@ function getGlobalPreferenceDir() {
const { XDG_CONFIG_HOME = path.join(homedir, '.config') } = process.env;
return path.join(XDG_CONFIG_HOME, name);
};
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (process.platform) {
case 'darwin':
return macos();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ export default {
label.append(astroSelect);
break;
}
case 'number':
case 'text':
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions packages/astro/src/runtime/server/render/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function guessRenderers(componentUrl?: string): string[] {
case 'jsx':
case 'tsx':
return ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js', '@astrojs/vue (jsx)'];
case undefined:
default:
return [
'@astrojs/react',
Expand Down
3 changes: 3 additions & 0 deletions packages/astro/src/vite-plugin-astro/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ export default function astro({ settings, logger }: AstroPluginOptions): vite.Pl

return result;
}
case 'custom':
case 'template':
case undefined:
default:
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/postcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"vue": "^3.5.12"
},
"devDependencies": {
"postcss-preset-env": "^10.0.8"
"postcss-preset-env": "^10.0.9"
}
}
2 changes: 1 addition & 1 deletion packages/astro/test/fixtures/solid-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@astrojs/solid-js": "workspace:*",
"@solidjs/router": "^0.14.10",
"@solidjs/router": "^0.15.1",
"@test/solid-jsx-component": "file:./deps/solid-jsx-component",
"astro": "workspace:*",
"solid-js": "^1.9.3"
Expand Down
1 change: 1 addition & 0 deletions packages/create-astro/src/data/seasonal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function getSeasonalHouston({ fancy }: { fancy?: boolean }): Seas
`Your creativity is the gift that keeps on giving!`,
],
};
case undefined:
default:
return {
hats: fancy ? ['🎩', '🎩', '🎩', '🎩', '🎓', '👑', '🧢', '🍦'] : undefined,
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"kleur": "^4.1.5",
"nanoid": "^5.0.8",
"open": "^10.1.0",
"ora": "^8.1.0",
"ora": "^8.1.1",
"prompts": "^2.4.2",
"yargs-parser": "^21.1.1",
"zod": "^3.23.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"astro-scripts": "workspace:*",
"cheerio": "1.0.0",
"lit": "^3.2.1",
"sass": "^1.80.4"
"sass": "^1.80.6"
},
"peerDependencies": {
"@webcomponents/template-shadowroot": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@vue/compiler-sfc": "^3.5.12",
"vite-plugin-vue-devtools": "^7.5.4"
"vite-plugin-vue-devtools": "^7.6.3"
},
"devDependencies": {
"astro": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"dependencies": {
"ci-info": "^4.0.0",
"kleur": "^4.1.5",
"ora": "^8.1.0"
"ora": "^8.1.1"
},
"devDependencies": {
"astro": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/telemetry/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function getConfigDir(name: string) {
const { XDG_CONFIG_HOME = path.join(homedir, '.config') } = process.env;
return path.join(XDG_CONFIG_HOME, name);
};
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (process.platform) {
case 'darwin':
return macos();
Expand Down
Loading
Loading