fix(win32): fix plugin resolution with createRequire fallback (#14898)

This commit is contained in:
Luke Parker 2026-02-24 22:20:57 +10:00 committed by GitHub
commit 1af3e9e557
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View file

@ -689,7 +689,7 @@ test("resolves scoped npm plugins in config", async () => {
const pluginEntries = config.plugin ?? []
const baseUrl = pathToFileURL(path.join(tmp.path, "opencode.json")).href
const expected = import.meta.resolve("@scope/plugin", baseUrl)
const expected = pathToFileURL(path.join(tmp.path, "node_modules", "@scope", "plugin", "index.js")).href
expect(pluginEntries.includes(expected)).toBe(true)