rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.01k stars 37 forks source link

Should we change the value of TEST_LICENSE_KEY to be "TEST_LICENSE_KEY"? #1024

Open aboodman opened 1 year ago

aboodman commented 1 year ago

We have one example of a user confusing this:

https://discord.com/channels/830183651022471199/1016346958320902244

... but also making the value of the key part of the API could facilitate using it in env vars and so on.

aboodman commented 1 year ago

@phritz for opinion.

phritz commented 1 year ago

SGTM. An even simpler solution might be to just update the docs to say "... pass replicache.TEST_LICENSE_KEY", but whatever you think is less easy to misuse seems fine. if we go the route of changing its value to "TEST_LICENSE_KEY" then:

aboodman commented 1 year ago

Yeah let's change it. Low priority, but a little bit nicer for the env var use case that tslocke describes if the value seems more purposeful. We should also document the value and consider it part of the API going forward.

aboodman commented 1 year ago

I think in JS code users will continue to prefer using the constant to avoid "magic number" code smell, but in env vars they can use the string and we will commit to maintaining it.

arv commented 1 year ago

sgtm