Skip to content

fix(ci): upgrade GitHub Actions to v6 for Node 24#30

Open
lacymorrow wants to merge 1 commit into
mainfrom
fix/upgrade-actions-to-v6-2
Open

fix(ci): upgrade GitHub Actions to v6 for Node 24#30
lacymorrow wants to merge 1 commit into
mainfrom
fix/upgrade-actions-to-v6-2

Conversation

@lacymorrow

Copy link
Copy Markdown
Owner

Changes

Upgrades GitHub Actions from v3/v4 to v6 ahead of the Node.js 24 forced migration.

Workflows updated (14 files):

  • actions/checkout v3/v4 to v6
  • actions/setup-node v4 to v6
  • actions/upload-artifact v4 to v6
  • actions/download-artifact v4 to v6

Bonus TypeScript fixes:

  • packages/desktop/src/context/marked.tsx: cast markedShiki() return to MarkedExtension (type compat with marked@16 generic API change)
  • packages/console/core/src/drizzle/index.ts: update for drizzle-orm 1.0.0-rc.2 API — use EmptyRelations instead of ExtractTablesWithRelations, and drizzle({ client }) instead of drizzle(client, {})

Note on pre-push hook

The pre-push hook (bun run typecheck) fails on @opencode-ai/console-app due to pre-existing errors from @solidjs/start@2.0.0-devinxi.0 API changes (APIEvent, HttpHeader, defineConfig exports removed/renamed). These errors exist on main and are unrelated to this PR.

- actions/checkout v3/v4 → v6
- actions/setup-node v4 → v6
- actions/upload-artifact v4 → v6
- actions/download-artifact v4 → v6

Also fix pre-existing TypeScript errors uncovered by turbo:
- packages/desktop: cast markedShiki return to MarkedExtension (marked@16 type compat)
- packages/console/core: update drizzle-orm 1.0.0-rc.2 API — EmptyRelations, drizzle({ client })

Pre-push hook fails on main due to @opencode-ai/console-app @solidjs/start API changes
(upstream dependency, unrelated to this PR).

Co-Authored-By: Paperclip <noreply@paperclip.ing>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Drizzle ORM configuration by replacing ExtractTablesWithRelations with EmptyRelations and updating the initialization of the drizzle instance to use the new object-based syntax. It also adds a type cast to MarkedExtension in the marked configuration. The review feedback highlights a potential issue where using the global marked instance can lead to duplicate extension executions and memory leaks, suggesting the use of an isolated Marked instance instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

import { createContext, useContext, type ParentProps } from "solid-js"
import { useShiki } from "@/context"
import { marked } from "marked"
import { marked, type MarkedExtension } from "marked"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using marked.use() modifies the global marked instance. Since init is called inside MarkedProvider (which can be remounted or instantiated multiple times), this will repeatedly append the markedShiki extension to the global instance. This leads to duplicate extension execution, performance degradation, and potential memory leaks (as each extension closure retains a reference to the highlighter instance).

To fix this, import the Marked class and instantiate an isolated parser instance using new Marked(...) instead of calling marked.use(...) on the global instance.

Here is how you can update the init function:

function init(highlighter: ReturnType<typeof useShiki>) {
  return new Marked(
    markedShiki({
      async highlight(code, lang) {
        if (!(lang in bundledLanguages)) {
          lang = "text"
        }
        if (!highlighter.getLoadedLanguages().includes(lang)) {
          await highlighter.loadLanguage(lang as BundledLanguage)
        }
        return highlighter.codeToHtml(code, {
          lang: lang || "text",
          theme: "opencode",
          tabindex: false,
        })
      },
    }) as MarkedExtension,
  )
}
Suggested change
import { marked, type MarkedExtension } from "marked"
import { Marked, type MarkedExtension } from "marked"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant