@tamagui/use-store 1.66.0 → 1.67.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-store",
3
- "version": "1.66.0",
3
+ "version": "1.67.0",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -14,7 +14,7 @@
14
14
  "watch": "tamagui-build --watch",
15
15
  "test": "vitest --config ../vite-plugin-internal/src/vite.config.ts --run",
16
16
  "lint": "../../node_modules/.bin/biome check src",
17
- "lint:fix": "../../node_modules/.bin/biome check --apply src",
17
+ "lint:fix": "../../node_modules/.bin/biome check --apply-unsafe src",
18
18
  "clean": "tamagui-build clean",
19
19
  "clean:build": "tamagui-build clean:build"
20
20
  },
@@ -27,10 +27,10 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@tamagui/simple-hash": "1.66.0"
30
+ "@tamagui/simple-hash": "1.67.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@tamagui/build": "1.66.0",
33
+ "@tamagui/build": "1.67.0",
34
34
  "@testing-library/react": "^14.0.0",
35
35
  "react": "^18.2.0",
36
36
  "vitest": "^0.34.3"
package/src/observe.tsx CHANGED
@@ -18,7 +18,7 @@ const logUpdate =
18
18
  console.groupCollapsed('trace >')
19
19
  console.trace()
20
20
  console.groupEnd()
21
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
21
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
22
22
  console.log(' next', next)
23
23
  console.groupEnd()
24
24
  }
package/src/useStore.tsx CHANGED
@@ -325,8 +325,8 @@ function useStoreFromInfo(
325
325
  })
326
326
 
327
327
  if (shouldPrintDebug) {
328
- // prettier-ignore
329
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
328
+
329
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
330
330
  console.log('🌑 getSnapshot', { storeState: selectKeys(store, Object.keys(store)), userSelector, info, isUnchanged, component, keys, last, snap, curInternal, nextKeys, lastKeys })
331
331
  }
332
332
 
@@ -361,7 +361,7 @@ function useStoreFromInfo(
361
361
 
362
362
  if (info.stateKeys.has(keyString) || keyString in info.getters) {
363
363
  if (shouldPrintDebug) {
364
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
364
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
365
365
  console.log('tracking', keyString)
366
366
  }
367
367
  curInternal.tracked.add(keyString)
@@ -406,7 +406,7 @@ function createProxiedStore(storeInfo: StoreInfo) {
406
406
  return Reflect.apply(actionFn, proxiedStore, args)
407
407
  }
408
408
  if (process.env.NODE_ENV === 'development' && shouldDebug) {
409
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
409
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
410
410
  console.log('(debug) startAction', key)
411
411
  }
412
412
  res = Reflect.apply(actionFn, proxiedStore, args)
@@ -486,9 +486,9 @@ function createProxiedStore(storeInfo: StoreInfo) {
486
486
  if (head) {
487
487
  console.groupCollapsed(...head)
488
488
  console.groupCollapsed('...')
489
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
489
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
490
490
  console.log('args', args)
491
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
491
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
492
492
  console.log('response', res)
493
493
  console.groupCollapsed('trace')
494
494
  console.trace()
@@ -496,12 +496,12 @@ function createProxiedStore(storeInfo: StoreInfo) {
496
496
  console.groupEnd()
497
497
  for (const [name, ...log] of rest) {
498
498
  console.groupCollapsed(name)
499
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
499
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
500
500
  console.log(...log)
501
501
  console.groupEnd()
502
502
  }
503
503
  } else {
504
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
504
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
505
505
  console.log('Weird log', head, ...rest)
506
506
  }
507
507
  }
@@ -517,7 +517,7 @@ function createProxiedStore(storeInfo: StoreInfo) {
517
517
  logStack.clear()
518
518
  }
519
519
 
520
- // rome-ignore lint/correctness/noUnsafeFinally: ok
520
+ // biome-ignore lint/correctness/noUnsafeFinally: ok
521
521
  return res
522
522
  }
523
523
  },
@@ -540,7 +540,7 @@ function createProxiedStore(storeInfo: StoreInfo) {
540
540
 
541
541
  const finishAction = (val?: any) => {
542
542
  if (process.env.NODE_ENV === 'development' && shouldDebug) {
543
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
543
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
544
544
  console.log('(debug) finishAction', { didSet })
545
545
  }
546
546
  if (didSet) {
@@ -630,12 +630,12 @@ function createProxiedStore(storeInfo: StoreInfo) {
630
630
  if (shouldDebug) {
631
631
  setters.add({ key, value })
632
632
  if (getShouldDebug(storeInfo)) {
633
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
633
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
634
634
  console.log('(debug) SET', res, key, value)
635
635
  }
636
636
  }
637
637
  if (process.env.NODE_ENV === 'development' && shouldDebug) {
638
- // rome-ignore lint/suspicious/noConsoleLog: <explanation>
638
+ // biome-ignore lint/suspicious/noConsoleLog: <explanation>
639
639
  console.log('SET...', { key, value })
640
640
  }
641
641