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

convex-selections

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convex-selections - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

5

package.json

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.24",
"version": "0.0.25",
"exports": {

@@ -29,3 +29,3 @@ ".": "./index.js",

"merge": "^2.1.1",
"object-hash": "^3.0.0",
"sha-anything": "^0.0.4",
"pathe": "^1.1.1",

@@ -40,3 +40,2 @@ "sort-keys": "^5.0.0",

"@types/node": "^20.7.1",
"@types/object-hash": "^3.0.4",
"typescript": "^5.2.2",

@@ -43,0 +42,0 @@ "lionconfig": "^3.1.1"

6

utils/hashes.js

@@ -10,3 +10,3 @@ #!/usr/bin/env -S pnpm exec tsx

import json5 from 'json5';
import hash from 'object-hash';
import { sha256 } from 'sha-anything';
import path from 'pathe';

@@ -153,3 +153,3 @@ import sortKeys from 'sort-keys';

for (const selectionObject of selectionObjects) {
selectionHashes[hash.sha1(selectionObject)] = selectionObject;
selectionHashes[await sha256(selectionObject)] = selectionObject;
}

@@ -160,3 +160,3 @@ // Add our complex selections

const selection = selectionDefinition();
selectionHashes[hash.sha1(selection)] = selection;
selectionHashes[await sha256(selection)] = selection;
}

@@ -163,0 +163,0 @@ }

@@ -1,8 +0,8 @@

import hash from 'object-hash';
import { sha256 } from 'sha-anything';
export function createWithSelection({ selectionHashes }) {
return function withSelection(cb, selection) {
const selectionHash = hash.sha1(selection);
return async function withSelection(cb, selection) {
const selectionHash = await sha256(selection);
if (selectionHashes[selectionHash] === undefined) {
// eslint-disable-next-line no-console -- bruh
console.error('Selection not found in selectionHashes', selection);
console.error('Selection not found in selectionHashes', selection, `(hash: ${selectionHash})`);
throw new Error(`Selection hash ${selectionHash} not found in selectionHashes`);

@@ -9,0 +9,0 @@ }

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