New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@knocklabs/client

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knocklabs/client - npm Package Compare versions

Comparing version 0.10.10 to 0.10.11

6

CHANGELOG.md
# Changelog
## 0.10.11
### Patch Changes
- 395f0ca: fix: check type of zustand default import and fix cjs build
## 0.10.10

@@ -4,0 +10,0 @@

2

dist/cjs/clients/feed/store.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("zustand/vanilla"),n=require("../../networkStatus.js"),l=require("./utils.js");function c(e){const t=l.deduplicateItems(e);return l.sortItems(t)}const S={shouldSetPage:!0,shouldAppend:!1},d={items:[],metadata:{total_count:0,unread_count:0,unseen_count:0},pageInfo:{before:null,after:null,page_size:50}};function p(){return i(e=>({...d,networkStatus:n.NetworkStatus.ready,loading:!1,setNetworkStatus:t=>e(()=>({networkStatus:t,loading:t===n.NetworkStatus.loading})),setResult:({entries:t,meta:o,page_info:u},a=S)=>e(r=>({items:a.shouldAppend?c(r.items.concat(t)):t,metadata:o,pageInfo:a.shouldSetPage?u:r.pageInfo,loading:!1,networkStatus:n.NetworkStatus.ready})),setMetadata:t=>e(()=>({metadata:t})),resetStore:(t=d.metadata)=>e(()=>({...d,metadata:t})),setItemAttrs:(t,o)=>{const u=t.reduce((a,r)=>({...a,[r]:o}),{});return e(a=>({items:a.items.map(s=>u[s.id]?{...s,...u[s.id]}:s)}))}}))}exports.default=p;
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("zustand/vanilla"),d=require("../../networkStatus.js"),i=require("./utils.js"),c=typeof u=="function"?u:u.default;function f(e){const t=i.deduplicateItems(e);return i.sortItems(t)}const p={shouldSetPage:!0,shouldAppend:!1},l={items:[],metadata:{total_count:0,unread_count:0,unseen_count:0},pageInfo:{before:null,after:null,page_size:50}};function S(){return c(e=>({...l,networkStatus:d.NetworkStatus.ready,loading:!1,setNetworkStatus:t=>e(()=>({networkStatus:t,loading:t===d.NetworkStatus.loading})),setResult:({entries:t,meta:r,page_info:n},a=p)=>e(s=>({items:a.shouldAppend?f(s.items.concat(t)):t,metadata:r,pageInfo:a.shouldSetPage?n:s.pageInfo,loading:!1,networkStatus:d.NetworkStatus.ready})),setMetadata:t=>e(()=>({metadata:t})),resetStore:(t=l.metadata)=>e(()=>({...l,metadata:t})),setItemAttrs:(t,r)=>{const n=t.reduce((a,s)=>({...a,[s]:r}),{});return e(a=>({items:a.items.map(o=>n[o.id]?{...o,...n[o.id]}:o)}))}}))}exports.default=S;
//# sourceMappingURL=store.js.map
{
"name": "@knocklabs/client",
"version": "0.10.10",
"version": "0.10.11",
"description": "The clientside library for interacting with Knock",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/knocklabs/javascript/tree/main/packages/client",

import { GenericData } from "@knocklabs/types";
import create from "zustand/vanilla";
import zustand from "zustand/vanilla";

@@ -10,2 +10,8 @@ import { NetworkStatus } from "../../networkStatus";

// Get the correct Zustand function. Caused by some issues in v3 exports
// https://github.com/pmndrs/zustand/issues/334
const create: typeof zustand =
// @ts-expect-error workaround for issue above
typeof zustand === "function" ? zustand : zustand.default;
function processItems(items: FeedItem[]) {

@@ -12,0 +18,0 @@ const deduped = deduplicateItems(items);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc