@s2script/sdk 0.33.0 → 0.34.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.
Files changed (3) hide show
  1. package/README.md +37 -0
  2. package/dist/cli.js +348 -234
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -148,6 +148,43 @@ and records which member versions each release pinned. Make the workspace root t
148
148
  - A plugin already published **before** it joined a bundle must be republished at a new version
149
149
  from the bundle's workspace, so that its registry entry carries the claim.
150
150
 
151
+ #### Several bundles in one workspace
152
+
153
+ To combine several bundled monorepos (say a TTT and a Jailbreak, each its own bundle) into one
154
+ parent repo with one `.changeset/` and one release, make the parent the only workspace and list
155
+ each bundle's directory under `s2script.workspace.bundles`:
156
+
157
+ ```json
158
+ {
159
+ "name": "@edge/servers",
160
+ "private": true,
161
+ "workspaces": ["ttt/plugins/*", "ttt/packages/*", "jb/plugins/*", "jb/packages/*"],
162
+ "s2script": {
163
+ "workspace": { "plugins": ["ttt/plugins/*", "jb/plugins/*"], "bundles": ["ttt", "jb"] }
164
+ }
165
+ }
166
+ ```
167
+
168
+ Each listed directory keeps a package.json that describes its bundle and nothing else:
169
+
170
+ ```json
171
+ {
172
+ "name": "@edge/jailbreak",
173
+ "version": "1.0.0",
174
+ "s2script": { "kind": "bundle", "bundle": { "optional": ["@edge/jailbreak-gangperks"] } }
175
+ }
176
+ ```
177
+
178
+ - A bundle's **members** are the non-private plugins under its directory. A plugin under no listed
179
+ directory is published on its own, in no bundle.
180
+ - The descriptor must **not** keep `s2script.workspace` (s2s would stop there and treat it as a
181
+ separate workspace) and must not itself be a workspace package. Drop the child's own
182
+ `workspaces`, lockfile and `.changeset/` too: npm and changesets only read the parent's.
183
+ - **`s2s version`** at the parent bumps each bundle by the largest bump among its own members, and
184
+ `s2s deploy` publishes every bundle after its members. A member that fails to publish holds back
185
+ only its own bundle.
186
+ - The root and a listed directory cannot both be bundles, and bundle directories cannot nest.
187
+
151
188
  The membership claim travels in the registry upload only — the `.s2sp` manifest the runtime loads
152
189
  is unchanged, and the runtime has no notion of bundles.
153
190