Skip to content
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
8 changes: 8 additions & 0 deletions .changeset/three-jobs-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@studiocms/markdown-remark": patch
"@withstudiocms/kysely": patch
"@studiocms/wysiwyg": patch
"studiocms": patch
---

Update dependencies, and lint
4 changes: 3 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn",
"noTsIgnore": "warn",
Expand Down Expand Up @@ -76,6 +75,9 @@
"complexity": {
"noImportantStyles": "off",
"noStaticOnlyClass": "off"
},
"a11y": {
"noSvgWithoutTitle": "off"
}
}
},
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,33 +82,33 @@
"ci:effect-check:withstudiocms": "pnpm --filter @withstudiocms/* --filter effectify -r --workspace-concurrency=1 ci:effect-check"
},
"devDependencies": {
"@actions/core": "^3.0.0",
"@biomejs/biome": "^2.4.8",
"@changesets/changelog-github": "^0.6.0",
"@changesets/cli": "^2.30.0",
"@changesets/config": "^3.1.3",
"@actions/core": "^3.0.1",
"@biomejs/biome": "^2.5.3",
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.0",
"@changesets/config": "^3.1.4",
"@changesets/write": "^0.4.0",
"@crowdin/crowdin-api-client": "^1.53.3",
"@dotenvx/dotenvx": "^1.55.1",
"@effect/language-service": "^0.80.0",
"@effect/vitest": "^0.28.0",
"@crowdin/crowdin-api-client": "^1.56.1",
"@dotenvx/dotenvx": "^1.75.1",
"@effect/language-service": "^0.86.4",
"@effect/vitest": "^0.29.0",
"@types/node": "catalog:",
"@vitest/coverage-v8": "^3.2.4",
"@withstudiocms/buildkit": "workspace:^",
"allure-js-commons": "^3.6.0",
"allure-vitest": "^3.6.0",
"allure-commandline": "^2.38.0",
"allure-js-commons": "^3.10.2",
"allure-vitest": "^3.10.2",
"allure-commandline": "^2.43.0",
"execa": "^9.6.1",
"knip": "^5.88.0",
"pkg-pr-new": "^0.0.66",
"publint": "^0.3.18",
"knip": "^5.88.1",
"pkg-pr-new": "^0.0.75",
"publint": "^0.3.21",
"studiocms": "workspace:^",
"tinyglobby": "catalog:",
"typescript": "catalog:",
"ts-patch": "^3.3.0",
"tsdown": "catalog:",
"vite": "catalog:astrojs-current",
"vitest": "^3.2.4",
"jsdom": "^29.0.0"
"jsdom": "^29.1.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function isMDXFile(file: VFile): boolean {
* If it is, return the variable path (i.e. `["*", ..., "VARIABLE"]`) minus the `frontmatter` prefix.
*/
function getMdxFrontmatterVariablePath(node: MdxTextExpression): string[] | Error {
if (!node.data?.estree || node.data.estree.body.length !== 1) return new Error();
if (node.data?.estree?.body.length !== 1) return new Error();

const statement = node.data.estree.body[0];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export function loadPanels(editor: Editor, opts: RequiredGrapesBlocksOptions) {

// Don't switch when the Layer Manager is on or
// there is no selected component
if ((!openLayersBtn || !openLayersBtn.get('active')) && editor.getSelected()) {
if (!openLayersBtn?.get('active') && editor.getSelected()) {
openSmBtn?.set('active', true);
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/@withstudiocms/kysely/src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class QueryParseError extends Data.TaggedError('QueryParseError')<{
cause = this.parseError.cause;
message = this.parseError.message;
stack = this.parseError.stack;
toJSON = this.parseError.toJSON;
toString = this.parseError.toString;
toJSON = () => this.parseError.toJSON();
toString = () => this.parseError.toString();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const OAuthAPIHandler = HttpApiBuilder.group(StudioCMSAuthApi, 'oauth', (
const matchedProvider = oAuthProviders.find((p) => p.safeName === provider);

// If the provider is not found, not enabled, or does not have an initSession handler, return a 404 to avoid exposing the existence of the endpoint or the provider.
if (!matchedProvider || !matchedProvider.enabled || !matchedProvider.initSession) {
if (!matchedProvider?.enabled || !matchedProvider.initSession) {
return yield* new NotFound();
}

Expand Down Expand Up @@ -64,7 +64,7 @@ export const OAuthAPIHandler = HttpApiBuilder.group(StudioCMSAuthApi, 'oauth', (
const matchedProvider = oAuthProviders.find((p) => p.safeName === provider);

// If the provider is not found, not enabled, or does not have an initCallback handler, return a 404 to avoid exposing the existence of the endpoint or the provider.
if (!matchedProvider || !matchedProvider.enabled || !matchedProvider.initCallback) {
if (!matchedProvider?.enabled || !matchedProvider.initCallback) {
return yield* new NotFound();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const ResetPasswordHandlers = HttpApiBuilder.group(

const tokenInfo = yield* sdk.UTIL.Generators.testToken(token);

if (!tokenInfo || !tokenInfo.userId) {
if (!tokenInfo?.userId) {
return yield* new DashboardAPIError({
error: 'Invalid or expired reset token',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { metric, summary } = Astro.props;

let message: string | undefined;

if (!summary || !summary.percentiles.p75) {
if (!summary?.percentiles.p75) {
message = 'Not enough data yet';
}

Expand Down
2 changes: 1 addition & 1 deletion packages/studiocms/src/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export class StudioCMSPluginTester {
const pageType = pageTypes.find((pt) => pt.identifier === identifier);

// If no page type or renderer component is found, return null
if (!pageType || !pageType.rendererComponent) return null;
if (!pageType?.rendererComponent) return null;

try {
// Dynamically import the renderer module
Expand Down
2 changes: 1 addition & 1 deletion packages/studiocms/src/virtuals/i18n/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { ComponentsJSON, TranslationsJSON } from '../../schemas/plugins/i18
export function $pluginI18n(pluginId: string, componentId: string): Messages<TranslationsJSON> {
const translations = pluginTranslations[pluginId];

if (!translations || !translations[defaultLang]) {
if (!translations?.[defaultLang]) {
console.warn(`[i18n] Missing translations for plugin "${pluginId}".`);
return createI18n($locale, {
baseLocale: defaultLang,
Expand Down
Loading
Loading