Tools: automatically generate exports from common
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 41
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 12
Description
The current pattern in adaptors is for an adaptor to export a list of useful functions from common for use in job writing code.
Most adaptors include a link like this at the bottom:
export {
field,
fields,
sourceValue,
alterState,
fn,
each,
merge,
dataPath,
dataValue,
lastReferenceValue,
} from '@openfn/language-common';
There are a couple of problems with this:
- It's tedious
- It's brittle
- How do you know you're exposing the right functions?
- Users creating new adaptors will basically never touch these exports
I think we should be able to auto-generate this function list as part of the build process - so that adaptor source does not export from common, but the build inserts an export list. This would have to be smart and only expose functions which are not also exported by the adaptor itself.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repeated adaptor export blocks and tracing the build process that handles adaptor source. Define how generated exports should include common functions while excluding names exported by each adaptor, then verify that adaptor source no longer needs to maintain these lists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100