@vworlds/vecs 1.0.13 → 1.0.15

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/dist/entity.js CHANGED
@@ -14,18 +14,20 @@ import { Bitset } from "./util/bitset.js";
14
14
  * e.set(Position, { x: 100 });
15
15
  * ```
16
16
  *
17
- * Entities support a parentchild hierarchy. `parent` and `children` form a
17
+ * Entities support a parent-child hierarchy. `parent` and `children` form a
18
18
  * bidirectional link maintained by {@link setParent}; the children set is
19
19
  * created lazily. Destroying a parent recursively destroys its children.
20
20
  *
21
21
  * ## Deferred semantics
22
22
  *
23
23
  * Inside a system body or `forEach` iteration the world is in **deferred
24
- * mode**: `add` / `set` / `modified` / `remove` / `destroy` / `setParent` only
25
- * enqueue commands. The data layer (the components map and `componentBitmask`)
26
- * is mutated when the world drains its queue. Concretely, while deferred:
24
+ * mode**: `add` / `attach` / `set` / `modified` / `remove` / `destroy` /
25
+ * `setParent` only enqueue commands. The data layer (the components map and
26
+ * `componentBitmask`) is mutated when the world drains its queue. Concretely,
27
+ * while deferred:
27
28
  *
28
29
  * - `entity.get(C)` returns `undefined` after `entity.add(C)` (no instance yet).
30
+ * - `entity.get(C)` returns `undefined` after `entity.attach(instance)` if C was absent.
29
31
  * - `entity.get(C)` returns the previous value after `entity.set(C, props)`.
30
32
  * - `entity.get(C)` still returns the component after `entity.remove(C)`.
31
33
  *
@@ -59,6 +61,14 @@ export class Entity {
59
61
  /** @internal Set to `true` after the world has fully torn down this entity. */
60
62
  this._destroyed = false;
61
63
  }
64
+ /** Fire every `onAdd` hook registered for `meta`. */
65
+ _runOnAddHandlers(meta, component) {
66
+ meta._onAddHandlers?.forEach((handler) => handler(this, component));
67
+ }
68
+ /** Fire every `onSet` hook registered for `meta`. */
69
+ _runOnSetHandlers(meta, component) {
70
+ meta._onSetHandlers?.forEach((handler) => handler(this, component));
71
+ }
62
72
  /**
63
73
  * Re-evaluate every world query for this entity, firing `_enter` / `_exit`
64
74
  * routing whenever membership flipped.
@@ -66,20 +76,14 @@ export class Entity {
66
76
  _updateQueries() {
67
77
  this.world.queries.forEach((q) => {
68
78
  const belongs = q.belongs(this);
69
- const isIn = this._isInQuery(q);
79
+ const isIn = this._queries.has(q);
70
80
  if (belongs !== isIn) {
71
81
  belongs ? q._enter(this) : q._exit(this);
72
82
  }
73
83
  });
74
84
  }
75
- /**
76
- * Construct a fresh component of `type`, apply `props`, store it on this
77
- * entity, fire the `onAdd` hook, and route query updates.
78
- *
79
- * If the component type belongs to an exclusivity group, any conflicting
80
- * component already on this entity is removed first.
81
- */
82
- _new(meta, props) {
85
+ /** Store a component instance and perform the shared add-side bookkeeping. */
86
+ _storeComponent(meta, component, isAdd) {
83
87
  if (meta._exclusive) {
84
88
  for (const exclusiveMeta of meta._exclusive) {
85
89
  if (this._components.has(exclusiveMeta.type)) {
@@ -87,124 +91,55 @@ export class Entity {
87
91
  }
88
92
  }
89
93
  }
90
- const c = new meta.Class();
91
- if (props !== undefined) {
92
- Object.assign(c, props);
93
- }
94
- this._components.set(meta.type, c);
94
+ this._components.set(meta.type, component);
95
95
  this.componentBitmask.addBit(meta.bitPtr);
96
- if (meta._onAddHandlers) {
97
- meta._onAddHandlers.forEach((handler) => handler(this, c));
96
+ if (isAdd) {
97
+ this._runOnAddHandlers(meta, component);
98
98
  }
99
99
  this._updateQueries();
100
- return c;
101
100
  }
102
- /**
103
- * @internal Return `true` when this entity is currently tracked by `q`.
104
- */
105
- _isInQuery(q) {
106
- return this._queries.has(q);
107
- }
108
- /**
109
- * @internal Look up a component instance by numeric type id.
110
- *
111
- * Faster than {@link get} because no class → type id resolution is needed.
112
- */
113
- _get(type) {
114
- return this._components.get(type);
115
- }
116
- /**
117
- * @internal Reparent this entity in place, maintaining the bidirectional
118
- * link. Throws if `newParent` is a descendant of this entity.
119
- *
120
- * Called by the world either inline (outside deferred mode) or while
121
- * routing a queued `SetParent` command.
122
- */
123
- _setParent(newParent) {
124
- if (this._destroyed) {
125
- return;
126
- }
127
- if (newParent !== undefined) {
128
- let ancestor = newParent;
129
- while (ancestor !== undefined) {
130
- if (ancestor === this) {
131
- throw new Error(`Circular parent reference: entity ${this.eid} is already an ancestor of entity ${newParent.eid}`);
132
- }
133
- ancestor = ancestor._parent;
134
- }
135
- }
136
- if (this._parent) {
137
- this._parent._children?.delete(this);
138
- }
139
- this._parent = newParent;
140
- if (newParent) {
141
- (newParent._children ?? (newParent._children = new Set())).add(this);
101
+ /** Perform the shared set-side hook and query update routing. */
102
+ _notifyComponentSet(meta, component, isUpdate) {
103
+ this._runOnSetHandlers(meta, component);
104
+ this._dirtyComponentBitmask.deleteBit(meta.bitPtr);
105
+ if (isUpdate) {
106
+ this._queries.forEach((q) => q._notifyModified(this, meta, component));
142
107
  }
143
108
  }
144
109
  /**
145
- * @internal Apply a `Set` command: create the component if missing, assign
146
- * `props` if provided, fire `onSet`, and route modified events to every
147
- * query that watches the component type.
110
+ * Construct a fresh component of `type`, apply `props`, store it on this
111
+ * entity, fire the `onAdd` hook, and route query updates.
112
+ *
113
+ * If the component type belongs to an exclusivity group, any conflicting
114
+ * component already on this entity is removed first.
148
115
  */
149
- _set(meta, props) {
150
- if (this._destroyed) {
151
- return;
152
- }
153
- const existing = this._components.get(meta.type);
154
- const c = existing ?? this._new(meta, props);
116
+ _new(meta, props) {
117
+ const c = new meta.Class();
155
118
  if (props !== undefined) {
156
- if (existing) {
157
- Object.assign(c, props);
158
- }
159
- const setHandlers = meta._onSetHandlers;
160
- if (setHandlers) {
161
- setHandlers.forEach((handler) => handler(this, c));
162
- }
163
- this._dirtyComponentBitmask.deleteBit(meta.bitPtr);
164
- if (existing) {
165
- this._queries.forEach((q) => q._notifyModified(this, meta, c));
166
- }
119
+ Object.assign(c, props);
167
120
  }
121
+ this._storeComponent(meta, c, true);
122
+ return c;
168
123
  }
169
124
  /**
170
- * @internal Apply a `Modified` command: fire `onSet` and route modified
171
- * events to every query that watches the component type.
125
+ * @internal Record that this entity is now tracked by `q`. Called by
126
+ * `Query._enter`.
172
127
  */
173
- _modified(meta) {
174
- if (this._destroyed) {
175
- return;
176
- }
177
- const c = this._components.get(meta.type);
178
- if (!c) {
179
- return;
180
- }
181
- const setHandlers = meta._onSetHandlers;
182
- if (setHandlers) {
183
- setHandlers.forEach((handler) => handler(this, c));
184
- }
185
- this._dirtyComponentBitmask.deleteBit(meta.bitPtr);
186
- this._queries.forEach((q) => q._notifyModified(this, meta, c));
128
+ _addQueryMembership(q) {
129
+ this._queries.add(q);
187
130
  }
188
131
  /**
189
- * @internal Apply a `Remove` command: clear the type bit, route exits,
190
- * detach the component, and fire `onRemove`.
132
+ * @internal Apply an `Attach` command: store the provided component instance,
133
+ * replacing any previous instance for this type. Events are fired as if the
134
+ * caller had performed a `set` operation.
191
135
  */
192
- _remove(meta) {
136
+ _attach(meta, component) {
193
137
  if (this._destroyed) {
194
138
  return;
195
139
  }
196
- const c = this._components.get(meta.type);
197
- if (!c) {
198
- return;
199
- }
200
- this._dirtyComponentBitmask.deleteBit(meta.bitPtr);
201
- this.componentBitmask.deleteBit(meta.bitPtr);
202
- this._updateQueries();
203
- this._components.delete(meta.type);
204
- const removeHandlers = meta._onRemoveHandlers;
205
- if (removeHandlers) {
206
- removeHandlers.forEach((handler) => handler(this, c));
207
- }
140
+ const existing = this._components.get(meta.type);
141
+ this._storeComponent(meta, component, existing === undefined);
142
+ this._notifyComponentSet(meta, component, existing !== undefined);
208
143
  }
209
144
  /**
210
145
  * @internal Apply a `Destroy` command: fire `_exit` on every query, then
@@ -241,6 +176,34 @@ export class Entity {
241
176
  this._parent = undefined;
242
177
  }
243
178
  }
179
+ /**
180
+ * @internal Look up a component instance by numeric type id.
181
+ *
182
+ * Faster than {@link get} because no class to type id resolution is needed.
183
+ */
184
+ _get(type) {
185
+ return this._components.get(type);
186
+ }
187
+ /**
188
+ * @internal Return `true` when this entity is currently tracked by `q`.
189
+ */
190
+ _isInQuery(q) {
191
+ return this._queries.has(q);
192
+ }
193
+ /**
194
+ * @internal Apply a `Modified` command: fire `onSet` and route modified
195
+ * events to every query that watches the component type.
196
+ */
197
+ _modified(meta) {
198
+ if (this._destroyed) {
199
+ return;
200
+ }
201
+ const c = this._components.get(meta.type);
202
+ if (!c) {
203
+ return;
204
+ }
205
+ this._notifyComponentSet(meta, c, true);
206
+ }
244
207
  /**
245
208
  * @internal Forget query `q` without firing exit callbacks. Called by
246
209
  * {@link World} when a {@link Query.destroy} sweeps every entity.
@@ -249,11 +212,25 @@ export class Entity {
249
212
  this._queries.delete(q);
250
213
  }
251
214
  /**
252
- * @internal Record that this entity is now tracked by `q`. Called by
253
- * `Query._enter`.
215
+ * @internal Apply a `Remove` command: clear the type bit, route exits,
216
+ * detach the component, and fire `onRemove`.
254
217
  */
255
- _addQueryMembership(q) {
256
- this._queries.add(q);
218
+ _remove(meta) {
219
+ if (this._destroyed) {
220
+ return;
221
+ }
222
+ const c = this._components.get(meta.type);
223
+ if (!c) {
224
+ return;
225
+ }
226
+ this._dirtyComponentBitmask.deleteBit(meta.bitPtr);
227
+ this.componentBitmask.deleteBit(meta.bitPtr);
228
+ this._updateQueries();
229
+ this._components.delete(meta.type);
230
+ const removeHandlers = meta._onRemoveHandlers;
231
+ if (removeHandlers) {
232
+ removeHandlers.forEach((handler) => handler(this, c));
233
+ }
257
234
  }
258
235
  /**
259
236
  * @internal Record that this entity is no longer tracked by `q`. Called by
@@ -262,9 +239,51 @@ export class Entity {
262
239
  _removeQueryMembership(q) {
263
240
  this._queries.delete(q);
264
241
  }
265
- /** Parent entity in the scene hierarchy, or `undefined` for a root entity. */
266
- get parent() {
267
- return this._parent;
242
+ /**
243
+ * @internal Apply a `Set` command: create the component if missing, assign
244
+ * `props` if provided, fire `onSet`, and route modified events to every
245
+ * query that watches the component type.
246
+ */
247
+ _set(meta, props) {
248
+ if (this._destroyed) {
249
+ return;
250
+ }
251
+ const existing = this._components.get(meta.type);
252
+ const c = existing ?? this._new(meta, props);
253
+ if (props !== undefined) {
254
+ if (existing) {
255
+ Object.assign(c, props);
256
+ }
257
+ this._notifyComponentSet(meta, c, existing !== undefined);
258
+ }
259
+ }
260
+ /**
261
+ * @internal Reparent this entity in place, maintaining the bidirectional
262
+ * link. Throws if `newParent` is a descendant of this entity.
263
+ *
264
+ * Called by the world either inline (outside deferred mode) or while
265
+ * routing a queued `SetParent` command.
266
+ */
267
+ _setParent(newParent) {
268
+ if (this._destroyed) {
269
+ return;
270
+ }
271
+ if (newParent !== undefined) {
272
+ let ancestor = newParent;
273
+ while (ancestor !== undefined) {
274
+ if (ancestor === this) {
275
+ throw new Error(`Circular parent reference: entity ${this.eid} is already an ancestor of entity ${newParent.eid}`);
276
+ }
277
+ ancestor = ancestor._parent;
278
+ }
279
+ }
280
+ if (this._parent) {
281
+ this._parent._children?.delete(this);
282
+ }
283
+ this._parent = newParent;
284
+ if (newParent) {
285
+ (newParent._children ?? (newParent._children = new Set())).add(this);
286
+ }
268
287
  }
269
288
  /**
270
289
  * Read-only view of direct child entities. The backing set is created lazily
@@ -273,6 +292,25 @@ export class Entity {
273
292
  get children() {
274
293
  return this._children ?? Entity._emptyChildren;
275
294
  }
295
+ /**
296
+ * Read-only view of all components currently attached to this entity, keyed
297
+ * by numeric component type id.
298
+ *
299
+ * The mutating methods (`set`, `delete`, `clear`) are not exposed. Use
300
+ * `entity.add`, `entity.attach`, `entity.set`, and `entity.remove` to change
301
+ * the component set.
302
+ *
303
+ * ```ts
304
+ * entity.components.forEach((c) => console.log(c.constructor.name));
305
+ * ```
306
+ */
307
+ get components() {
308
+ return this._components;
309
+ }
310
+ /** `true` when no components are currently attached to this entity. */
311
+ get empty() {
312
+ return this._components.size == 0;
313
+ }
276
314
  /**
277
315
  * Typed event emitter for entity-level lifecycle events. Currently only the
278
316
  * `"destroy"` event is emitted, just before the entity is fully torn down.
@@ -285,38 +323,72 @@ export class Entity {
285
323
  }
286
324
  return this._events;
287
325
  }
288
- /** `true` when no components are currently attached to this entity. */
289
- get empty() {
290
- return this._components.size == 0;
326
+ /** Parent entity in the scene hierarchy, or `undefined` for a root entity. */
327
+ get parent() {
328
+ return this._parent;
329
+ }
330
+ add(typeOrClass) {
331
+ const meta = this.world.getComponentMeta(typeOrClass);
332
+ if (this.world.deferred) {
333
+ this.world._enqueue({ kind: 1 /* CommandKind.Set */, entity: this, meta, props: undefined });
334
+ }
335
+ else {
336
+ this._set(meta, undefined);
337
+ }
338
+ return this;
291
339
  }
292
340
  /**
293
- * Read-only view of all components currently attached to this entity, keyed
294
- * by numeric component type id.
341
+ * Attach an existing component instance to this entity and store that exact
342
+ * object. If a component of the same registered class already exists, it is
343
+ * replaced rather than assigned into.
295
344
  *
296
- * The mutating methods (`set`, `delete`, `clear`) are not exposed. Use
297
- * `entity.add`, `entity.set`, and `entity.remove` to change the component
298
- * set.
345
+ * `attach` uses the instance constructor to resolve component metadata, so
346
+ * the constructor must already be registered in this world. The operation
347
+ * fires hooks and query updates like a `set` operation.
299
348
  *
300
- * ```ts
301
- * entity.components.forEach((c) => console.log(c.constructor.name));
302
- * ```
349
+ * @param component - Existing component instance to store on the entity.
350
+ * @returns This entity, for chaining.
303
351
  */
304
- get components() {
305
- return this._components;
352
+ attach(component) {
353
+ const meta = this.world.getComponentMeta(component.constructor);
354
+ if (this.world.deferred) {
355
+ this.world._enqueue({ kind: 6 /* CommandKind.Attach */, entity: this, meta, component });
356
+ }
357
+ else {
358
+ this._attach(meta, component);
359
+ }
360
+ return this;
306
361
  }
307
362
  /**
308
- * Reparent this entity. In deferred mode the change is queued; outside
309
- * deferred mode it executes inline.
363
+ * Destroy this entity and recursively destroy its children.
310
364
  *
311
- * @param newParent - New parent, or `undefined` to make this a root entity.
365
+ * Each component fires its `onRemove` hook, the `"destroy"` event is emitted
366
+ * just before teardown, and the entity is unregistered from the world.
367
+ * After destruction the entity must not be used.
312
368
  */
313
- setParent(newParent) {
369
+ destroy() {
314
370
  if (this.world.deferred) {
315
- this.world._enqueue({ kind: 5 /* CommandKind.SetParent */, entity: this, parent: newParent });
371
+ this.world._enqueue({ kind: 4 /* CommandKind.Destroy */, entity: this });
316
372
  }
317
373
  else {
318
- this._setParent(newParent);
374
+ this._destroy();
319
375
  }
376
+ if (this._children) {
377
+ this._children.forEach((child) => {
378
+ child.destroy();
379
+ });
380
+ this._children.clear();
381
+ }
382
+ }
383
+ /**
384
+ * Look up a component on this entity.
385
+ *
386
+ * @param typeOrClass - Component class or numeric type id.
387
+ * @returns The component instance, or `undefined` when it is not attached.
388
+ */
389
+ get(typeOrClass) {
390
+ const type = this.world.getComponentType(typeOrClass);
391
+ return this._get(type);
320
392
  }
321
393
  /**
322
394
  * Mark a component type as having changed, queueing the corresponding `onSet` / `update`
@@ -342,26 +414,6 @@ export class Entity {
342
414
  }
343
415
  return this;
344
416
  }
345
- add(typeOrClass) {
346
- const meta = this.world.getComponentMeta(typeOrClass);
347
- if (this.world.deferred) {
348
- this.world._enqueue({ kind: 1 /* CommandKind.Set */, entity: this, meta, props: undefined });
349
- }
350
- else {
351
- this._set(meta, undefined);
352
- }
353
- return this;
354
- }
355
- set(typeOrClass, props) {
356
- const meta = this.world.getComponentMeta(typeOrClass);
357
- if (this.world.deferred) {
358
- this.world._enqueue({ kind: 1 /* CommandKind.Set */, entity: this, meta, props });
359
- }
360
- else {
361
- this._set(meta, props);
362
- }
363
- return this;
364
- }
365
417
  remove(typeOrClass) {
366
418
  const meta = this.world.getComponentMeta(typeOrClass);
367
419
  if (this.world.deferred) {
@@ -372,35 +424,28 @@ export class Entity {
372
424
  }
373
425
  }
374
426
  /**
375
- * Look up a component on this entity.
376
- *
377
- * @param typeOrClass - Component class or numeric type id.
378
- * @returns The component instance, or `undefined` when it is not attached.
379
- */
380
- get(typeOrClass) {
381
- const type = this.world.getComponentType(typeOrClass);
382
- return this._get(type);
383
- }
384
- /**
385
- * Destroy this entity and recursively destroy its children.
427
+ * Reparent this entity. In deferred mode the change is queued; outside
428
+ * deferred mode it executes inline.
386
429
  *
387
- * Each component fires its `onRemove` hook, the `"destroy"` event is emitted
388
- * just before teardown, and the entity is unregistered from the world.
389
- * After destruction the entity must not be used.
430
+ * @param newParent - New parent, or `undefined` to make this a root entity.
390
431
  */
391
- destroy() {
432
+ setParent(newParent) {
392
433
  if (this.world.deferred) {
393
- this.world._enqueue({ kind: 4 /* CommandKind.Destroy */, entity: this });
434
+ this.world._enqueue({ kind: 5 /* CommandKind.SetParent */, entity: this, parent: newParent });
394
435
  }
395
436
  else {
396
- this._destroy();
437
+ this._setParent(newParent);
397
438
  }
398
- if (this._children) {
399
- this._children.forEach((child) => {
400
- child.destroy();
401
- });
402
- this._children.clear();
439
+ }
440
+ set(typeOrClass, props) {
441
+ const meta = this.world.getComponentMeta(typeOrClass);
442
+ if (this.world.deferred) {
443
+ this.world._enqueue({ kind: 1 /* CommandKind.Set */, entity: this, meta, props });
403
444
  }
445
+ else {
446
+ this._set(meta, props);
447
+ }
448
+ return this;
404
449
  }
405
450
  /** Returns `"EntityN"` where N is the entity id. */
406
451
  toString() {
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAoB,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAO,MAAM;IAkCjB;IACE,mCAAmC;IACnB,KAAY;IAC5B,qDAAqD;IACrC,GAAW;QAFX,UAAK,GAAL,KAAK,CAAO;QAEZ,QAAG,GAAH,GAAG,CAAQ;QArC7B,sEAAsE;QAC9D,gBAAW,GAAG,IAAI,QAAQ,EAAa,CAAC;QAChD,gEAAgE;QAC/C,2BAAsB,GAAG,IAAI,MAAM,EAAE,CAAC;QACvD,iEAAiE;QAChD,aAAQ,GAAG,IAAI,GAAG,EAAS,CAAC;QAU7C;;;W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AAC;YACL,CAAC;iBAAM,CAAC;gBACN,MAAM,KAAK,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC9E,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;oBAChC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;wBACtB,OAAO;oBACT,CAAC;oBACD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5C,QAAS,CAAC,CAAC,EAAE,QAAe,CAAC,CAAC;gBAChC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
package/dist/package.json CHANGED
@@ -1,32 +1,19 @@
1
1
  {
2
2
  "name": "@vworlds/vecs",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
9
- "prepack": "yarn build",
10
- "build": "yarn clean && yarn compile",
11
- "compile": "tsc --build && cp \"./package.json\" ./dist/",
8
+ "clean": "rimraf dist",
9
+ "prepack": "npm run build",
10
+ "build": "npm run clean && npm run compile",
11
+ "compile": "tsc -p tsconfig.build.json && cp \"./package.json\" ./dist/",
12
12
  "test": "vitest run",
13
13
  "test:watch": "vitest",
14
- "lint": "eslint src/ tests/",
14
+ "lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --no-error-on-unmatched-pattern",
15
15
  "typecheck": "tsc --noEmit",
16
- "format:check": "prettier --check \"**/*.{ts,md}\"",
17
- "prepare": "husky"
18
- },
19
- "devDependencies": {
20
- "@types/node": "^20.0.0",
21
- "@typescript-eslint/eslint-plugin": "^8.59.1",
22
- "@typescript-eslint/parser": "^8.59.1",
23
- "eslint": "^10.2.1",
24
- "husky": "^9.1.7",
25
- "lint-staged": "^16.4.0",
26
- "prettier": "^3.8.3",
27
- "rimraf": "^5.0.0",
28
- "typescript": "^4.8.4",
29
- "vitest": "^1.6.0"
16
+ "format:check": "prettier --check \"**/*.{ts,md}\""
30
17
  },
31
18
  "dependencies": {
32
19
  "eventemitter3": "^4.0.7"