Skip to content

Commit

Permalink
Revert "Fixed webworker startup bc elkjs hidden dependency (#78)" (#81)
Browse files Browse the repository at this point in the history
This reverts commit 9634f64.
  • Loading branch information
tortmayr authored Apr 29, 2024
1 parent 38f8bb5 commit 6f61be1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ report.xml

wf-glsp-server-node.js
wf-glsp-server-node.js.map
wf-glsp-server-webworker.js
wf-glsp-server-webworker.js.map
2 changes: 1 addition & 1 deletion examples/workflow-server-bundled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"wf-glsp-server-node.js.map"
],
"scripts": {
"clean": "rimraf wf-glsp-server-node.js wf-glsp-server-node.js.map wf-glsp-server-webworker.js wf-glsp-server-webworker.js.map",
"clean": "rimraf wf-glsp-server-node.js wf-glsp-server-node.js.map",
"start": "node --enable-source-maps ./wf-glsp-server-node.js --port 5007",
"start:websocket": "node --enable-source-maps ./wf-glsp-server-node.js -w --port 8081",
"watch": "tsc -w"
Expand Down
6 changes: 1 addition & 5 deletions packages/layout-elk/src/di.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ export function configureELKLayoutModule(options: ElkModuleOptions): ContainerMo
const elkFactory: ElkFactory = () =>
new ElkConstructor({
algorithms: options.algorithms,
defaultLayoutOptions: options.defaultLayoutOptions,
// The node implementation relied on elkjs' `FakeWorker` to set the `workerFactory`.
// However, since the required file is dynamically loaded and not available in a web-worker context,
// it needs to be mocked manually.
workerFactory: () => ({ postMessage: () => {} }) as unknown as Worker
defaultLayoutOptions: options.defaultLayoutOptions
});

bind(ElkFactory).toConstantValue(elkFactory);
Expand Down

0 comments on commit 6f61be1

Please sign in to comment.