@@ -339,6 +339,50 @@ ndicator that it is doing too much.
339
339
Look through the tests of this package to see all
340
340
features that ` space:base ` provides for you.
341
341
342
+ ## Migration Guide
343
+
344
+ ### 3.2.1 → 4.0.0
345
+
346
+ The 4.0.0 release has brought many small breaking changes and improvements.
347
+
348
+ #### Lowercase API properties
349
+
350
+ All api properties, * significant* to the framework are now like "normal" properties:
351
+ ``` javascript
352
+ Space .Module .define (' My.CustomModule' , {
353
+ requiredModules: [' My.OtherModule' ], // instead of RequiredModules
354
+ singletons: [' My.OtherModule' ], // instead of Singletons
355
+ })
356
+ Space .Object .extend (' My.CustomClass' , {
357
+ dependencies: { /* … */ } // instead of Dependencies
358
+ })
359
+ ```
360
+
361
+ #### Module Lifecycle Changes
362
+
363
+ Previous hooks like ` onStart ` and ` onConfigure ` have been replaced with a complete
364
+ lifecycle split into three main phases: ` initialize ` , ` start ` , ` reset ` . Each
365
+ with ` on ` , ` before ` and ` after ` hooks like ` onInitialize ` / ` afterStart ` etc.
366
+
367
+ ``` javascript
368
+ Space .Module .define (' My.CustomModule' , {
369
+ onInitialize () {} // instead of "onConfigure"
370
+ onStart () {} // same as previous "onStart"
371
+ onReset () {} // did not exist before -> hook to reset collections etc.
372
+ })
373
+ ```
374
+
375
+ #### New Class Registry
376
+
377
+ There is a new recommended way to define classes with full class path for improved
378
+ debugging and automatic type registration (EJSON / toData):
379
+ ``` javascript
380
+ // Instead of:
381
+ Space .Object .extend (My .namespace , ' MyCustomClass' );
382
+ // Do this now:
383
+ Space .Object .extend (' My.namespace.MyCustomClass' );
384
+ ```
385
+
342
386
## Install
343
387
` meteor add space:base `
344
388
0 commit comments