RFC: Namespaced APIs #6364
anusree-bruno
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We want to improve the discoverability and structure of the scripting APIs by introducing namespaces instead of keeping everything at the top level of bru.
This will:
This RFC proposes two possible namespaced designs to replace the current environment-related APIs.
Proposal 1 - Unified Namespace:
All environment APIs are grouped under bru.env, with sub-namespaces for collection, global, etc .
Proposal 2 - Split Namespaces:
Environment types are exposed as separate top-level namespaces (bru.env, bru.globalEnv, ...).
bru.getEnvVar(key)bru.env.collection.get(key)bru.env.get(key)bru.setEnvVar(key, value, options)bru.env.collection.set(key, value, options)bru.env.set(key, value)bru.deleteEnvVar(key)bru.env.collection.delete(key)bru.env.delete(key)bru.hasEnvVar(key)bru.env.collection.has(key)bru.env.has(key)bru.getEnvName()bru.env.collection.name()bru.env.name()bru.getGlobalEnvVar(key)bru.env.global.get(key)bru.globalEnv.get(key)bru.setGlobalEnvVar(key, value)bru.env.global.set(key, value)bru.globalEnv.set(key, value)bru.getProcessEnv(key)bru.processEnv.get(key)bru.processEnv.get(key)We’d love your thoughts on:
Beta Was this translation helpful? Give feedback.
All reactions