Skip to content

Commit

Permalink
fix: use new shorted syntax for workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Oct 29, 2024
1 parent a75a049 commit e94eb71
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/workers/editor.worker.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from 'vs/editor/editor.worker'
export * from 'vs/editor/common/services/editorSimpleWorker.esm.js'
11 changes: 1 addition & 10 deletions src/workers/languageDetection.worker.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import { create } from 'vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker'
import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker'

const simpleWorker = new SimpleWorkerServer((msg) => {
globalThis.postMessage(msg)
}, create)

globalThis.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data)
}
import 'vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker.esm.js'
11 changes: 1 addition & 10 deletions src/workers/localFileSearch.worker.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import { create } from 'vs/workbench/services/search/worker/localFileSearch'
import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker'

const simpleWorker = new SimpleWorkerServer((msg) => {
globalThis.postMessage(msg)
}, create)

globalThis.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data)
}
import 'vs/workbench/services/search/worker/localFileSearch.esm.js'
11 changes: 1 addition & 10 deletions src/workers/notebook.worker.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import { create } from 'vs/workbench/contrib/notebook/common/services/notebookSimpleWorker'
import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker'

const simpleWorker = new SimpleWorkerServer((msg) => {
globalThis.postMessage(msg)
}, create)

globalThis.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data)
}
import 'vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.esm.js'
11 changes: 1 addition & 10 deletions src/workers/outputLinkComputer.worker.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker'
import { create } from 'vs/workbench/contrib/output/common/outputLinkComputer'

const simpleWorker = new SimpleWorkerServer((msg) => {
globalThis.postMessage(msg)
}, create)

globalThis.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data)
}
import 'vs/workbench/contrib/output/common/outputLinkComputer.esm.js'
11 changes: 1 addition & 10 deletions src/workers/textmate.worker.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import { create } from 'vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker'
import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker'

const simpleWorker = new SimpleWorkerServer((msg) => {
globalThis.postMessage(msg)
}, create)

globalThis.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data)
}
import 'vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker.esm.js'

0 comments on commit e94eb71

Please sign in to comment.