launchdarkly / ld-find-code-refs

Build tool for automatically sending feature flag code references to LaunchDarkly
https://launchdarkly.com
Other
46 stars 34 forks source link

Monorepo Support #181

Closed InTheCloudDan closed 2 years ago

InTheCloudDan commented 2 years ago

Initial monorepo support. Mostly implemented in a backwards compatible way. Anyone running via CLI args today are supported.

Added:

Changes:

Breaking Changes:

Testing: Add a coderefs.yaml under .launchdarkly directory that contains multiple projects and optional dir along with aliases.

projects:
  - projectKey: code-refs-test
    dir: public/
    aliases:
       - type: camelcase
  - projectKey: demo-test-project
yusinto commented 2 years ago

This looks good! Apart from the dir ~ relative path issue we discussed in the blitz everything else seems to work!

InTheCloudDan commented 2 years ago

@XieX I updated the sections of code we talked over. I also added a few new helper functions. Rather than looping over all of the references for each project in a loop multiple times we now return a map[string]map[string]int64 which is [project][flag]int so it's less processing.