longshotlabs / simpl-schema

A JavaScript schema validation package that supports direct validation of MongoDB update modifier objects
https://www.npmjs.com/package/simpl-schema
MIT License
560 stars 114 forks source link

schemaDefinitionOptions not public anymore #467

Closed mariusrak closed 1 year ago

mariusrak commented 1 year ago

Hi, I'm using

import { schemaDefinitionOptions } from "simpl-schema/dist/SimpleSchema";

even though it apparently is not for public use, it is great help for my project since I'm extending capabilities of schema in a great manner. New version disallows this. Would it be possible to export the schemaDefinitionOptions array or provide some getter?

Thanks

github-actions[bot] commented 1 year ago

Thank you for submitting an issue!

If this is a bug report, please be sure to include, at minimum, example code showing a small schema and any necessary calls with all their arguments, which will reproduce the issue. Even better, you can link to a saved online code editor example, where anyone can immediately run the code and see the issue.

If you are requesting a feature, include a code example of how you imagine it working if it were implemented.

If you need to edit your issue description, click the [...] and choose Edit.

Be patient. This is a free and freely licensed package that I maintain in my spare time. You may get a response in a day, but it could also take a month. If you benefit from this package and would like to see more of my time devoted to it, you can help by sponsoring.

aldeed commented 1 year ago

@mariusrak It is still exported from that module but the module has moved. Depending on whether you are using ESM or CommonJS, add either /esm or /cjs after /dist in the path. For ESM, you probably also need to add .js at the end.

mariusrak commented 1 year ago

But it is not exported from whole module. It says, that the /esm/ path is not exported from package.

aldeed commented 1 year ago

That should be an error you can work around by changing configuration, but also we can do an update to export it from the package.

mariusrak commented 1 year ago

The export would be awesome. I think the less configuration, the better and if exporting it is not a problem, I would be thankful :)

mariusrak commented 1 year ago

Seems like it is not possible to workaround this by configuration. So can the export be added, please?

mariusrak commented 1 year ago

Hi, I've noticed new version, but this export wasn't added. Is there any problem with adding this export? Thanks

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.4.0 :tada:

The release is available on:

If this makes you happy, please consider becoming a sponsor.

Your semantic-release bot :package::rocket: