sliftutils 1.1.3 → 1.1.4

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/.cursorrules CHANGED
@@ -26,6 +26,8 @@ We use MobX for state management. Components should use a variable called synced
26
26
 
27
27
  The code automatically updates on save, so do not ever run commands to rerun the site.
28
28
 
29
+ If you need to add a dependency, don't just change the packs to JSON file. Properly use yarn add so you get the latest version, unless the user specifies a version or tells you otherwise.
30
+
29
31
  Use tool calls to read files and directories where possible, instead of running "ls", "dir", etc.
30
32
 
31
33
  Coding Styles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1,5 +1,6 @@
1
1
  import * as preact from "preact";
2
2
  import { observable, Reaction } from "mobx";
3
+ import { measureBlock } from "socket-function/src/profiling/measure";
3
4
 
4
5
  let globalConstructOrder = 1;
5
6
  export function observer<
@@ -27,7 +28,9 @@ export function observer<
27
28
  render(...args: any[]) {
28
29
  let output: preact.ComponentChild;
29
30
  this.reaction.track(() => {
30
- output = (super.render as any)(...args);
31
+ measureBlock(() => {
32
+ output = (super.render as any)(...args);
33
+ }, `${name}|render`);
31
34
  });
32
35
  return output;
33
36
  }