@flighthq/entity 0.3.1-next.385.e32d957 → 0.3.1-next.407.d03a0bb

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.
@@ -7,7 +7,7 @@ export function disableEntityRuntimeGuards() {
7
7
  setEntityRuntimeWriteGuard(null);
8
8
  }
9
9
  // Opt-in development guard mode. When enabled, a direct write to an entity's runtime slot — or to an
10
- // EntityRuntime's binding slot — that bypasses ensureEntityRuntime / attachEntityBinding is reported,
10
+ // EntityRuntime's binding slot — that bypasses attachEntityBinding is reported,
11
11
  // making "the write landed on the wrong entity" and raw-slot-poke bugs visible early. The write is still
12
12
  // allowed: the guard observes, it does not block.
13
13
  //
@@ -27,7 +27,7 @@ function warnOnDirectWrite(slot) {
27
27
  return;
28
28
  }
29
29
  logOnce('entity:direct-runtime-write', LogLevel.Warn, {
30
- message: "An entity's runtime slot was written directly. Use ensureEntityRuntime or attachEntityBinding; the write was allowed, but bypassing them is how a runtime ends up on the wrong entity.",
30
+ message: "An entity's runtime slot was written directly. Use attachEntityBinding, which allocates the slot for you; the write was allowed, but bypassing it is how a runtime ends up on the wrong entity.",
31
31
  }, 'entity');
32
32
  }
33
33
  //# sourceMappingURL=enableEntityRuntimeGuards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enableEntityRuntimeGuards.js","sourceRoot":"","sources":["../src/enableEntityRuntimeGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEjF,6FAA6F;AAC7F,MAAM,UAAU,0BAA0B;IACxC,yBAAyB,CAAC,KAAK,CAAC,CAAC;IACjC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,qGAAqG;AACrG,sGAAsG;AACtG,yGAAyG;AACzG,kDAAkD;AAClD,EAAE;AACF,2GAA2G;AAC3G,0GAA0G;AAC1G,0GAA0G;AAC1G,uGAAuG;AACvG,MAAM,UAAU,yBAAyB;IACvC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChC,0BAA0B,CAAC,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,iBAAiB,CAAC,IAA4B;IACrD,IAAI,IAAI,KAAK,cAAc,EAAE,CAAC;QAC5B,OAAO,CACL,6BAA6B,EAC7B,QAAQ,CAAC,IAAI,EACb;YACE,OAAO,EACL,0LAA0L;SAC7L,EACD,QAAQ,CACT,CAAC;QACF,OAAO;IACT,CAAC;IACD,OAAO,CACL,6BAA6B,EAC7B,QAAQ,CAAC,IAAI,EACb;QACE,OAAO,EACL,wLAAwL;KAC3L,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"enableEntityRuntimeGuards.js","sourceRoot":"","sources":["../src/enableEntityRuntimeGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEjF,6FAA6F;AAC7F,MAAM,UAAU,0BAA0B;IACxC,yBAAyB,CAAC,KAAK,CAAC,CAAC;IACjC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,qGAAqG;AACrG,gFAAgF;AAChF,yGAAyG;AACzG,kDAAkD;AAClD,EAAE;AACF,2GAA2G;AAC3G,0GAA0G;AAC1G,0GAA0G;AAC1G,uGAAuG;AACvG,MAAM,UAAU,yBAAyB;IACvC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChC,0BAA0B,CAAC,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,iBAAiB,CAAC,IAA4B;IACrD,IAAI,IAAI,KAAK,cAAc,EAAE,CAAC;QAC5B,OAAO,CACL,6BAA6B,EAC7B,QAAQ,CAAC,IAAI,EACb;YACE,OAAO,EACL,0LAA0L;SAC7L,EACD,QAAQ,CACT,CAAC;QACF,OAAO;IACT,CAAC;IACD,OAAO,CACL,6BAA6B,EAC7B,QAAQ,CAAC,IAAI,EACb;QACE,OAAO,EACL,iMAAiM;KACpM,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/entity",
3
- "version": "0.3.1-next.385.e32d957",
3
+ "version": "0.3.1-next.407.d03a0bb",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,8 +38,8 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/log": "0.3.1-next.385.e32d957",
42
- "@flighthq/types": "0.3.1-next.385.e32d957"
41
+ "@flighthq/log": "0.3.1-next.407.d03a0bb",
42
+ "@flighthq/types": "0.3.1-next.407.d03a0bb"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "^5.3.0"
@@ -46,7 +46,9 @@ describe('enableEntityRuntimeGuards', () => {
46
46
  }
47
47
  });
48
48
  expect(entries.length).toBe(1);
49
- expect(messageOf(entries[0])).toContain('ensureEntityRuntime');
49
+ // Names a function that actually exists: the point of the warning is that the caller can act on it,
50
+ // and this guard spent its life directing readers to `ensureEntityRuntime`, which never existed.
51
+ expect(messageOf(entries[0])).toContain('attachEntityBinding');
50
52
  });
51
53
 
52
54
  it('WARNS separately for a direct binding-slot write', () => {