Closed hyperborea closed 6 years ago
In fact the namespace issue is already problematic for collection2 itself as it invokes the wrong library. Am I using it wrong?
For now I'll be using the meteor wrapper (aldeed:simple-schema@2.0.0-rc.1) instead, I'm not really sure how to make it work with the npm module.
This package should drop it's dependency to simpl-schema and tell the user to import their own. I am having problem using SimpleSchema as this package imports a version that is not compatible with the npm implementation (e.g. error when using SimpleSchema.oneOf
, no support for foo.$.bar
, etc.)
Make this package use the correct simpl-schema package, or make users import it from npm directly. In any case, this will make maintenance easier for everyone.
See this related issue.
Any updates on this issue? What is the possibility for a npm collection2 module?
@Gervwyk this was addressed in https://github.com/aldeed/node-simple-schema/issues/8
Collection2 is inherently a isomorphic Meteor package so there isn't any reason for now to move it to NPM, and it couldn't be done easily until MDG standardizes some kind of pattern for putting isomorphic code on NPM.
You should be able to import and use the npm SS instead of the one from the package. I can do an update to Collection2 to switch it to a weak dependency on the SS Meteor package.
Closing old issues. Please comment if this is still an issue and should be reopened.
I'm using the aldeed:collection2 package and have recently switched to the simpl-schema (2.0) npm module. Sadly as collection2 also implies aldeed:simple-schema (1.x) that causes a namespace conflict resulting in meteor-schema-index to extend the wrong library.
For now I'm duplicating the following code, but is there a better way?