Comments (4)
@Nexxado I am a relatively new npm package author. The reason not using regular dependency at the first place is that I thought there might be an issue if dependent package versions in different libraries collide. Imagine that Angular used a class based Token DI system but if libraries are using incompatible libraries, the runtime behavior would bite us. However it is an overkill if we put all dependencies as peer-dependencies. It should be a common issue since most npm libs are putting dependencies as normal dependencies. So why people still widely use regular dependencies since it may cause issues?
This reminds me that I might not be so familiar with how npm handles package dependencies and Google a good article here and reddit thread here.
I will issue a new PR today to revise the dependencies. By the way, thanks for reporting the issue and using this library.
from ng-monaco-editor.
@pengx17 I'm sorry if I came off negatively towards you, it was not my intention.
Thanks for your time and work, I really do appreciate it.
from ng-monaco-editor.
This lib is dependent on css-element-queries
for resizing the editor. You may already saw it when you do npm install.
Other peer dependencies:
"css-element-queries": "^1.0.2",
"lodash": "^4.17.11",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"monaco-editor": "^0.15.2",
"zone.js": "^0.8.26"
from ng-monaco-editor.
@pengx17 Why is it a peer-dependency and not a regular dependency?
As a peer-dependency it means i have to maintain the correct version of it in my project instead of it coming with the library.
Npm install output:
npm WARN [email protected] requires a peer of css-element-queries@^1.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of lodash@^4.17.11 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of lodash.isequal@^4.5.0 but none is installed. You must install peer dependencies yourself.
from ng-monaco-editor.
Related Issues (18)
- MonacoProviderService.colorizeElement error with Monaco Editor 0.17.0 HOT 1
- An in-range update of webpack is breaking the build 🚨 HOT 21
- allow CodeColorizeDirective to rerender when content changed
- An in-range update of storybook is breaking the build 🚨 HOT 53
- An in-range update of @types/storybook__addon-knobs is breaking the build 🚨 HOT 1
- CI: replace travis-ci with circle-ci HOT 1
- todo: remove demo folder from repository
- Typescript compile error (duplicate import?) HOT 4
- [feat!] replace `css-element-queries` with native `ResizeObserver`
- Compilation error
- Error TS2451: Cannot redeclare block-scoped variable 'MonacoEnvironment' HOT 4
- Entry point 'ng-monaco-editor' contains deep imports
- MonacoEditor as a feature module HOT 4
- Validating JSON is not working HOT 7
- The theme and language in global defaultOptions are not working HOT 1
- v6: use Angular 14+ features like `inject`
- How to change the theme dynamically? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-monaco-editor.