@microtronics/studio-cli 1.1.0-alpha.2 → 1.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -274,6 +274,27 @@ $ studio-cli usb sync -s 1234567890ABCDEF
274
274
  $ studio-cli usb sync -s 1234567890ABCDEF --debug
275
275
  ```
276
276
 
277
+ ## Library APM parts: version and dependencies
278
+
279
+ Studio libraries (`type: "library"`) ship npm-consumable APM parts as `dist/blo/package.json` and
280
+ `dist/pov/details/package.json`. `studio-cli` treats the library's `studio.json` as the single source of truth
281
+ for both files:
282
+
283
+ - **Version**: the `version` field in a library's own `blo/package.json` / `pov/details/package.json` source
284
+ files is irrelevant. `studio-cli build` (and therefore `pack`/`publish`) and `studio-cli install`/`i` both
285
+ stamp the `dist/<part>/package.json` `version` with the library's `studio.json` version.
286
+ - **Dependencies**: other Studio libraries must be declared in `studio.json` `libraryDependencies` /
287
+ `libraryDevDependencies`, never as npm `peerDependencies`/`dependencies`/`optionalDependencies`. npm semver
288
+ ranges never match prereleases of a different major.minor (e.g. `^1.8.0` does not match `1.14.0-alpha.2`), and
289
+ Studio libraries are commonly consumed as prereleases. Any such entry found in a `dist/<part>/package.json` is
290
+ stripped, with a warning naming the removed entry and the file.
291
+
292
+ Build time is authoritative for newly built/published libraries. Install time (via `studio-cli install`/`i`)
293
+ additionally normalizes the whole installed dependency tree - every library reachable from the project's
294
+ `libraryDependencies`/`libraryDevDependencies`, walked transitively through each library's own dependencies -
295
+ which fixes libraries that were published before this normalization existed. A part `package.json` is patched
296
+ in place, and each patch is logged as a warning so it is visible without `--debug`.
297
+
277
298
  ## Development
278
299
 
279
300
  Execute commands from the root dir