-
Notifications
You must be signed in to change notification settings - Fork 43
fix bugs and move to angular 21 #44
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
base: master
Are you sure you want to change the base?
Conversation
projects/editor/package.json
Outdated
| "monaco-editor": "^0.52.2" | ||
| "@angular/common": "^21.0.0", | ||
| "@angular/core": "^21.0.0", | ||
| "monaco-editor": "^0.55.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I was wondering if it wouldn't be better to put a more permissive range here
^0.55.1 is equivalent to >=0.55.1 <0.56.0-0
isn't the intended range more like >=0.55.1 <1.0.0-0 ? or is it intentional to force the exact minor version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
"peerDependencies": {
"@angular/common": ">=20",
"@angular/core": ">=20",
"monaco-editor": ">=0.51"
},
Because it works with angular 20 and 21 so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
|
@miki995 thoughts? |
|
Thanks god, i also found the console error in my browser. So, is it means when we upgrading to latest monaco editor version can be fixed it? thanks again |
Are you using the latest monaco-editor 0.55.1? |
|
+1 |
|
I ended up using |
|
Any information on when we can move on to angular 21? If it helps, I had to do the following in my code to use monaco 0.52.1 with angular 19: angular.json: Remove leading / {
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "/assets/monaco/"
}becomes {
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "assets/monaco/"
}And register a base URL: `{ provide: NGX_MONACO_EDITOR_CONFIG, useValue: {} }`becomes: {
provide: NGX_MONACO_EDITOR_CONFIG, useFactory: () => {
const base = new URL('assets/monaco/min/vs', document.baseURI).toString().replace(/\/$/, '');
return {
baseUrl: base
};
}
} |
|
Also need an update, this is blocking our upgrade to Angular v21 |
@LiamCalculus I recommend integrating monaco and angular directly, it's not that hard https://tbo47.github.io/angular-monaco-editor.html |
|
@miki995 a release for Angular v21 will be super appreciated 🙏 |
I tested this update with my angular 20 project. Everything works fine.
I updated angular 20 to 21 following this guide: https://angular.dev/update-guide?v=20.0-21.0&l=1
Update monaco lib to the latest 0.55.1
It fixes the error: