Some of you may have experienced issues after upgrading simpl-schema to 3.x as it has dropped Meteor support. Now this is a problem, since a few packages, namely Collection2 or AutoForm still rely on this heavily.
I already proposed to re-use the old aldeed:simple-schema namespace to create and maintain a wrapper package that uses the latest Simple Schema from npm but adds all the missing Tracker integration, RegExes etc. so we can all continue focusing on other things.
However, this seems not to be the easiest thing as involves monkey patching a few prototype functions of SimpleSchema.
I hope this will not become a bigger problem than expected.
It dropped MessageBox, Tracker integration and the RegEx but apart from that it remained the same. If you don’t make use of these features then you should face no issues.
I have just checked out v3 and I have a problem with uniforms and SimpleSchema2Bridge (duh… ). There seem to be changes that will have to be addressed with a new bridge version. bridge.getSubfields does not seem to work anymore (I use that in my mongo db query editor).
I had been meaning to contact you about this for the last month or so Jan
We had been using a fork anyway of simpl-schema before this latest version because nested schema validation didn’t work. What we did recently was take the final v1 (before he jumped to v3) and then applied @znewsham’s fix for the nested schema bug. We also changed the structure so the package.json is in the root so you can import without publishing. Our fork is here.
If MCP was going to take it on I’d pretty much grab exactly this. I’m not sure it’s worth putting in much effort to rewrite elements that have been removed in v3 as I don’t think there are any new features except TS support.
@jkuester behind on stuff. I will look into it at earliest opportunity. @marklynch if you would be interested in helping to maintain the fork that would make it easier.
It depends! If you don’t need any reactivity and no async validation then you can use the version 3 of the npm package.
However, if you need any reactivity, such as in AutoForm or you have computed fields or autovalues then you won’t be able to call any collections when validating on the server. On the client you can still use the sync methods of minimongo.
This is the reason why we are working on a hard fork for the meteor package.