zodified-config 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -39,9 +39,11 @@ declare module 'zodified-config' {
39
39
  interface ValidatedConfig extends Config {}
40
40
  }
41
41
 
42
- const configResult = config.validate(configSchema);
43
- if (configResult instanceof Error) {
44
- // if you enter here, it means the config is invalid
42
+ try {
43
+ zodifiedConfig.validate(invalidSchema);
44
+ } catch (error: unknown) {
45
+ // if you enter here, it means the config is invalid or something else went wrong
46
+ // check the error.message
45
47
  }
46
48
  ```
47
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zodified-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Typesafe config validated by Zod",
5
5
  "repository": {
6
6
  "type": "git",