When your module incorporates code from other CodeLibra modules, you need to declare these as license dependencies. This guide explains what license dependencies are, how they work, and how to manage them effectively.
A license dependency exists when your module includes code from another CodeLibra module in a way that requires a license to that module for your module to function properly.
Not every software dependency is a license dependency. Your code may rely on many packages and libraries, but only those that require licensing through CodeLibra—because they're on CodeLibra with a commercial license requirement and your use constitutes incorporation—are license dependencies.
When you declare a license dependency:
Your module contains or bundles the dependency's code. If your module includes source files, compiled code, or other content from another CodeLibra module, that's a license dependency. Example: You build a framework that bundles a CodeLibra-licensed logging library.
Your module is a derivative work. If your module is based on or derived from another CodeLibra module (in the copyright sense), that's a license dependency. Example: You fork a CodeLibra-licensed library and build additional features on top.
The dependency's code must be present for your module to work. If your module cannot function without the dependency's code being distributed with it, that's a license dependency. Example: Your application embeds a CodeLibra-licensed image processing library.
Your module calls an API or service. If your module communicates with an external API or service but doesn't incorporate the service's code, there's no license dependency.
The dependency is available under a permissive license. If the dependency is available under MIT, BSD, or similar permissive licenses (even if also on CodeLibra), you don't need a CodeLibra license dependency—the permissive license already covers your use.
It's a runtime dependency users obtain separately. If users install the dependency separately (not bundled with your module), there may not be a license dependency—but this requires careful analysis.
The dependency is not on CodeLibra. You can only declare license dependencies for modules that exist in the CodeLibra catalog. Dependencies on modules outside CodeLibra are handled through their own licensing.
When you onboard a module to CodeLibra, you identify which other CodeLibra modules are license dependencies. This creates a dependency graph:
Your Module
├── Dependency A (CodeLibra)
│ └── Dependency C (CodeLibra) ← transitive
└── Dependency B (CodeLibra)
When a licensee purchases your module:
When a licensee purchases your module, they see a total price that includes your module's price plus each license dependency's price (set by the respective developers).
For example:
If a licensee already has active licenses to some of your dependencies, they receive credit and aren't charged twice:
Revenue flows to each developer based on their module's price. Using the $200 composite example:
You receive 80% of your module's price regardless of dependencies.
Transitive dependencies are dependencies of your dependencies. If Module A depends on Module C, and your module depends on Module A, then Module C is a transitive dependency of your module.
CodeLibra handles transitive dependencies automatically. You only need to declare your direct dependencies:
The total price reflects the entire chain. You don't need to manually declare transitive dependencies—they're included via their parent modules.
If your dependencies update their own dependencies, this affects the composite price for your module. Stay aware of changes in your upstream dependencies.
During initial onboarding:
Be thorough—missing a dependency could create licensing issues for your licensees.
With each new release:
Each release records its direct dependencies, so different releases can have different dependency configurations.
If you add a license dependency in a new release of an established module, there's a special consideration: existing subscribers receive the new dependency license at no additional charge, but someone has to pay the upstream developer. CodeLibra requires you (the module developer) to cover this cost.
How it works:
Before adding dependencies to an established module with many subscribers, calculate the one-time cost: Number of active subscribers × Dependency price = Your cost.
This approach ensures existing subscribers aren't surprised with new charges, upstream developers are fairly compensated, and the licensing chain remains consistent.
If a new release no longer requires a previously-declared dependency:
No refunds are issued for previously-paid dependencies, and existing licenses aren't revoked.
A circular dependency exists when Module A depends on Module B, and Module B depends on Module A (or longer chains that loop back). CodeLibra prevents circular dependency declarations—the dependency graph must be acyclic.
If you encounter this situation, redesign your module structure by extracting common code into a shared module that both can depend on.
Be conservative about declaring dependencies. When in doubt, declare the dependency. It's better to have a clear licensing chain than to risk licensing gaps.
Plan ahead. If you know you'll add dependencies in future releases, factor this into your initial pricing and planning. Remember: you'll cover the cost for existing subscribers.
Minimize dependencies. Only include what's necessary. Consider the composite price impact on your licensees and evaluate whether you could implement functionality yourself.
Document your dependencies. Keep track of which dependencies you've declared and why. This helps when reviewing for new releases.
Stay aware of upstream changes. Be aware of changes in your dependencies' licensing and pricing. Consider what happens if a dependency changes pricing significantly.
What if I'm not sure whether something is a license dependency? The key question is: "Does my module include code from this other module in a way that requires distributing that code?" If yes, declare it. If genuinely uncertain, declaring it is the safer choice.
What if a dependency is available both on CodeLibra and under a permissive license elsewhere? If you're using the permissive-licensed version (e.g., from npm), you don't need to declare a CodeLibra license dependency. But if you want the benefits of the CodeLibra version (support, updates through subscription), you can declare it.
What happens if a dependency is removed from CodeLibra? Existing licenses remain valid. However, new subscribers couldn't get that dependency through CodeLibra. This is rare and would be handled case-by-case.