Add support for publishing ropm packages with prefixes included. This will be a breaking change (minor version bump under 0.*).
Behavior
The ropm.prefix field in package.json declares that the package has been published with all prefixes already applied. ropm will skip prefixing at install time if the prefix is the same, or replace these prefixes with the user-defined one.
Setting ropm.prefix is an all-or-nothing contract. Every non-special function and SceneGraph component must already be prefixed. If any are not, ropm will hard-fail that package's install:
- Skip installing the offending package
- Continue installing all other packages normally
- After all packages are processed, exit non-zero with a clear console error identifying the offending package(s) and unprefixed symbols
Install scenarios
ropm.prefix |
npm alias |
Result |
| ✅ |
❌ |
Installed as-is. No renaming applied. |
| ✅ |
✅ |
Alias wins. ropm.prefix value is replaced with the alias throughout. |
| ❌ |
✅ |
(existing) Alias used as prefix; applied to all unprefixed symbols. |
| ❌ |
❌ |
(existing) Sanitized package.json name used as prefix. |
Docs
Update documentation to cover:
- What
ropm.prefix means and its strict all-or-nothing contract
- The hard-fail behavior and what triggers it
- All four install scenarios above
- Guidance for package authors on correctly pre-prefixing before publishing, which includes:
- specifying a peerDependency for ropm above this release version, so older ropm instances can't accidentally install ropm packages that are published with prefixes
- The breaking change
Add support for publishing ropm packages with prefixes included. This will be a breaking change (minor version bump under
0.*).Behavior
The
ropm.prefixfield inpackage.jsondeclares that the package has been published with all prefixes already applied.ropmwill skip prefixing at install time if the prefix is the same, or replace these prefixes with the user-defined one.Setting
ropm.prefixis an all-or-nothing contract. Every non-special function and SceneGraph component must already be prefixed. If any are not, ropm will hard-fail that package's install:Install scenarios
ropm.prefixropm.prefixvalue is replaced with the alias throughout.package.jsonname used as prefix.Docs
Update documentation to cover:
ropm.prefixmeans and its strict all-or-nothing contract