Socket
Socket
Sign inDemoInstall

bencode

Package Overview
Dependencies
Maintainers
11
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bencode - npm Package Compare versions

Comparing version 3.1.1 to 4.0.0

41

CHANGELOG.md

@@ -1,9 +0,28 @@

## [3.0.3](https://github.com/themasch/node-bencode/compare/v3.0.2...v3.0.3) (2023-01-31)
# [4.0.0](https://github.com/webtorrent/node-bencode/compare/v3.1.0...v4.0.0) (2023-08-09)
### chore
* force major release ([#156](https://github.com/webtorrent/node-bencode/issues/156)) ([a075f8a](https://github.com/webtorrent/node-bencode/commit/a075f8a02408eb4bf82350d1bfce9f0488e15e0e))
### BREAKING CHANGES
* update uint8-util
# [3.1.0](https://github.com/webtorrent/node-bencode/compare/v3.0.3...v3.1.0) (2023-07-31)
### Features
* update uint8-util ([#153](https://github.com/webtorrent/node-bencode/issues/153)) ([7941736](https://github.com/webtorrent/node-bencode/commit/79417361876a5e5b6b9b17260a5ede8042cfa3e6))
## [3.0.3](https://github.com/webtorrent/node-bencode/compare/v3.0.2...v3.0.3) (2023-01-31)
### Bug Fixes
* update dependency nanobench to v3 ([#130](https://github.com/themasch/node-bencode/issues/130)) ([f7027c4](https://github.com/themasch/node-bencode/commit/f7027c46f9cf86017f388fa6d811417b13e03e8e))
* update dependency nanobench to v3 ([#130](https://github.com/webtorrent/node-bencode/issues/130)) ([f7027c4](https://github.com/webtorrent/node-bencode/commit/f7027c46f9cf86017f388fa6d811417b13e03e8e))
## [3.0.2](https://github.com/themasch/node-bencode/compare/v3.0.1...v3.0.2) (2023-01-31)
## [3.0.2](https://github.com/webtorrent/node-bencode/compare/v3.0.1...v3.0.2) (2023-01-31)

@@ -13,5 +32,5 @@

* package.json for exporting lib ([#140](https://github.com/themasch/node-bencode/issues/140)) ([f63c09a](https://github.com/themasch/node-bencode/commit/f63c09a8a525e67b00cc0e7619eb84bd159855b2))
* package.json for exporting lib ([#140](https://github.com/webtorrent/node-bencode/issues/140)) ([f63c09a](https://github.com/webtorrent/node-bencode/commit/f63c09a8a525e67b00cc0e7619eb84bd159855b2))
## [3.0.1](https://github.com/themasch/node-bencode/compare/v3.0.0...v3.0.1) (2023-01-31)
## [3.0.1](https://github.com/webtorrent/node-bencode/compare/v3.0.0...v3.0.1) (2023-01-31)

@@ -21,5 +40,5 @@

* imports ([#138](https://github.com/themasch/node-bencode/issues/138)) ([abe29c3](https://github.com/themasch/node-bencode/commit/abe29c32ab327fafb323b05f17eda0aa9ca32478))
* imports ([#138](https://github.com/webtorrent/node-bencode/issues/138)) ([abe29c3](https://github.com/webtorrent/node-bencode/commit/abe29c32ab327fafb323b05f17eda0aa9ca32478))
# [3.0.0](https://github.com/themasch/node-bencode/compare/v2.0.3...v3.0.0) (2022-11-28)
# [3.0.0](https://github.com/webtorrent/node-bencode/compare/v2.0.3...v3.0.0) (2022-11-28)

@@ -29,3 +48,3 @@

* esm ([#131](https://github.com/themasch/node-bencode/issues/131)) ([b111818](https://github.com/themasch/node-bencode/commit/b111818695c8e85e1268fa771fc49c7c6687167f))
* esm ([#131](https://github.com/webtorrent/node-bencode/issues/131)) ([b111818](https://github.com/webtorrent/node-bencode/commit/b111818695c8e85e1268fa771fc49c7c6687167f))

@@ -37,5 +56,5 @@

## [2.0.3](https://github.com/themasch/node-bencode/compare/v2.0.2...v2.0.3) (2022-05-13)
## [2.0.3](https://github.com/webtorrent/node-bencode/compare/v2.0.2...v2.0.3) (2022-05-13)
## [2.0.2](https://github.com/themasch/node-bencode/compare/v2.0.1...v2.0.2) (2021-07-28)
## [2.0.2](https://github.com/webtorrent/node-bencode/compare/v2.0.1...v2.0.2) (2021-07-28)

@@ -45,3 +64,3 @@

* Patch release to drop a dependecy to safe-buffer ([#99](https://github.com/themasch/node-bencode/issues/99)) ([a661715](https://github.com/themasch/node-bencode/commit/a6617150c53c3c00d0cd12c685c5f2ee47db30c0))
* Patch release to drop a dependecy to safe-buffer ([#99](https://github.com/webtorrent/node-bencode/issues/99)) ([a661715](https://github.com/webtorrent/node-bencode/commit/a6617150c53c3c00d0cd12c685c5f2ee47db30c0))

@@ -48,0 +67,0 @@ ## 2.0.1

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

import { arr2text, text2arr } from 'uint8-util'
import { arr2text, text2arr, arr2hex } from 'uint8-util'

@@ -127,3 +127,6 @@ const INTEGER_START = 0x69 // 'i'

while (decode.data[decode.position] !== END_OF_TYPE) {
dict[arr2text(decode.buffer())] = decode.next()
const buffer = decode.buffer()
let key = arr2text(buffer)
if (key.includes('\uFFFD')) key = arr2hex(buffer)
dict[key] = decode.next()
}

@@ -130,0 +133,0 @@

@@ -58,2 +58,4 @@ import { concat, text2arr } from 'uint8-util'

encode.number = function (buffers, data) {
if (Number.isInteger(data)) return buffers.push(text2arr('i' + BigInt(data) + 'e'))
const maxLo = 0x80000000

@@ -60,0 +62,0 @@ const hi = (data / maxLo) << 0

{
"name": "bencode",
"description": "Bencode de/encoder",
"version": "3.1.1",
"version": "4.0.0",
"bugs": {

@@ -22,5 +22,6 @@ "url": "https://github.com/webtorrent/node-bencode/issues"

"devDependencies": {
"@webtorrent/semantic-release-config": "1.0.8",
"@webtorrent/semantic-release-config": "1.0.10",
"bencoding": "latest",
"bncode": "latest",
"browserify": "^17.0.0",
"btparse": "latest",

@@ -30,6 +31,6 @@ "dht-bencode": "latest",

"nanobench": "3.0.0",
"semantic-release": "19.0.5",
"standard": "17.0.0",
"semantic-release": "21.0.7",
"standard": "17.1.0",
"tap-spec": "5.0.0",
"tape": "5.6.3"
"tape": "5.6.6"
},

@@ -56,2 +57,5 @@ "keywords": [

"benchmark": "nanobench benchmark/*.js",
"bundle": "mkdir -p dist && npm run bundle:lib && npm run bundle:test",
"bundle:lib": "browserify lib/index.js -s bencode -o dist/bencode.js",
"bundle:test": "browserify test/*.test.js -o dist/tests.js",
"style": "standard --fix",

@@ -69,4 +73,4 @@ "test": "standard && tape test/*.test.js | tap-spec"

"dependencies": {
"uint8-util": "^2.1.6"
"uint8-util": "^2.2.2"
}
}
# Bencode
[![npm](https://img.shields.io/npm/v/bencode.svg?style=flat-square)](https://npmjs.com/bencode)
[![npm downloads](https://img.shields.io/npm/dm/bencode.svg?style=flat-square)](https://npmjs.com/bencode)
[![tests](https://github.com/webtorrent/node-bencode/actions/workflows/test.yml/badge.svg)](https://github.com/webtorrent/node-bencode/actions/workflows/test.yml)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fthemasch%2Fnode-bencode.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fthemasch%2Fnode-bencode?ref=badge_shield)
[![npm](https://img.shields.io/npm/v/bencode.svg)](https://npmjs.com/bencode)
[![npm downloads](https://img.shields.io/npm/dm/bencode.svg)](https://npmjs.com/bencode)
[![ci](https://github.com/webtorrent/node-bencode/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/webtorrent/node-bencode/actions/workflows/ci.yml)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwebtorrent%2Fnode-bencode.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwebtorrent%2Fnode-bencode?ref=badge_shield)

@@ -7,0 +7,0 @@ A node library for encoding and decoding bencoded data,

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