Skip to content

Commit a189ed0

Browse files
committed
Add rescript-schema V7 support
1 parent e2639e6 commit a189ed0

File tree

5 files changed

+47
-57
lines changed

5 files changed

+47
-57
lines changed

__tests__/EnvSafe_Example_test.res

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ test(`Works with Example code`, t => {
1919
),
2020
#development,
2121
)
22-
t->Assert.is(envSafe->EnvSafe.get("PORT", S.int->S.Int.port, ~devFallback=3000), 80)
22+
t->Assert.is(envSafe->EnvSafe.get("PORT", S.int->S.port, ~devFallback=3000), 80)
2323
t->Assert.is(
2424
envSafe->EnvSafe.get(
2525
"API_URL",
26-
S.string->S.String.url,
26+
S.string->S.url,
2727
~devFallback="https://example.com/graphql",
2828
),
2929
"https://example.com/foo",

__tests__/EnvSafe_json_test.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test(`Uses JSON parsing with JSON schema`, t => {
4646
}),
4747
)
4848

49-
t->Assert.deepEqual(envSafe->EnvSafe.get("ENV", S.json), [1, 2]->Obj.magic)
49+
t->Assert.deepEqual(envSafe->EnvSafe.get("ENV", S.json(~validate=true)), [1, 2]->Obj.magic)
5050
t->Assert.notThrows(() => {
5151
envSafe->EnvSafe.close
5252
})

package-lock.json

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rescript-envsafe",
3-
"version": "4.0.0",
3+
"version": "4.1.0",
44
"description": "🔒 Makes sure you don't accidentally deploy apps with missing or invalid environment variables",
55
"homepage": "https://github.com/DZakh/rescript-envsafe#readme",
66
"keywords": [
@@ -40,11 +40,11 @@
4040
"devDependencies": {
4141
"@dzakh/rescript-ava": "3.0.0",
4242
"ava": "5.2.0",
43-
"rescript": "11.1.0",
44-
"rescript-schema": "6.4.0"
43+
"rescript": "11.1.1",
44+
"rescript-schema": "7.0.0"
4545
},
4646
"peerDependencies": {
4747
"rescript": "11.x",
48-
"rescript-schema": "6.x"
48+
"rescript-schema": "6.x || 7.x"
4949
}
5050
}

src/EnvSafe.bs.js

+23-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)