Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor-monaco): track lifecycle of monaco/vscode initialization #4344

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

char0n
Copy link
Member

@char0n char0n commented Aug 4, 2023

This will allow language plugins to inspect
the state of monaco/vscode initialization and
hook wherever and whenever needed.


Initialization of services only happens once.
Initialization of extensions happens after services initialization and happens only once as well.
If SwaggerEditor@5 is unmounted and mounted again the initialization is not run again.
Initialization phases are now tracked in window.MonacoEnvironment.initPhase.

SwaggerUI plugin system roon inject named monacoInitializationDeferred is now exposed to plugin system and can be used in following way:

system.monacoInitializationDeferred().promise.then(() => {
  console.dir('both services and extensions are now initialized');
});

This will allow language plugins to inspect
the state of monaco/vscode initialization and
hook wherever and whenever needed.
@char0n char0n merged commit bf9d455 into next Aug 4, 2023
2 checks passed
@char0n char0n deleted the char0n/initialization-vscode-monaco branch August 4, 2023 12:35
swagger-bot pushed a commit that referenced this pull request Aug 4, 2023
# [5.0.0-alpha.73](v5.0.0-alpha.72...v5.0.0-alpha.73) (2023-08-04)

### Bug Fixes

* **editor-monaco:** track lifecycle of monaco/vscode initialization ([#4344](#4344)) ([bf9d455](bf9d455))
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 5.0.0-alpha.73 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants