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
2 changes: 1 addition & 1 deletion packages/build/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ await bundleJs(join(root, 'dist', 'git-worker', 'src', 'gitWorkerMain.ts'), join

await bundleJs(join(root, 'dist', 'git-web', 'src', 'gitWebMain.ts'), join(root, 'dist', 'git-web', 'dist', 'gitWebMain.js'), false)

await bundleJs(join(extension, 'src', 'gitMain.ts'), join(root, 'dist', 'dist', 'gitMain.js'), false)
await bundleJs(join(root, 'dist', 'src', 'gitMain.ts'), join(root, 'dist', 'dist', 'gitMain.js'), false)

await packageExtension({
highestCompression: true,
Expand Down
16 changes: 16 additions & 0 deletions packages/extension/test/GitWorkerUrl.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { expect, test } from '@jest/globals'
import { readFileSync } from 'node:fs'

test('resolves the git worker from the development extension bundle', () => {
const sourceUrl = new URL('../src/parts/GitWorkerUrl/GitWorkerUrl.ts', import.meta.url)
const source = readFileSync(sourceUrl, 'utf8')

expect(source).toContain("new URL('../../git-worker/dist/gitWorkerMain.js', import.meta.url)")
})

test('bundles the rewritten extension source for the packaged layout', () => {
const sourceUrl = new URL('../../build/src/build.ts', import.meta.url)
const source = readFileSync(sourceUrl, 'utf8')

expect(source).toContain("bundleJs(join(root, 'dist', 'src', 'gitMain.ts')")
})
Loading