Socket
Socket
Sign inDemoInstall

arweave

Package Overview
Dependencies
Maintainers
5
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arweave - npm Package Compare versions

Comparing version 1.12.2 to 1.12.3

4

node/lib/api.js

@@ -38,3 +38,3 @@ "use strict";

method: this.METHOD_POST,
body: JSON.stringify(body),
body: typeof body !== "string" ? JSON.stringify(body) : body,
headers,

@@ -47,3 +47,3 @@ });

if (endpoint.startsWith("/")) {
endpoint = endpoint.replace("/", "");
endpoint = endpoint.slice(1);
}

@@ -50,0 +50,0 @@ if (this.config.network) {

@@ -50,7 +50,2 @@ "use strict";

function bufferToString(buffer) {
// TextEncoder will be available in browsers, but not in node
if (typeof TextDecoder == "undefined") {
const TextDecoder = require("util").TextDecoder;
return new TextDecoder("utf-8", { fatal: true }).decode(buffer);
}
return new TextDecoder("utf-8", { fatal: true }).decode(buffer);

@@ -60,7 +55,2 @@ }

function stringToBuffer(string) {
// TextEncoder will be available in browsers, but not in node
if (typeof TextEncoder == "undefined") {
const TextEncoder = require("util").TextEncoder;
return new TextEncoder().encode(string);
}
return new TextEncoder().encode(string);

@@ -67,0 +57,0 @@ }

{
"name": "arweave",
"version": "1.12.2",
"version": "1.12.3",
"description": "Arweave JS client library",

@@ -11,11 +11,10 @@ "main": "./node/index.js",

"web",
"bundles",
".npmrc"
"bundles"
],
"scripts": {
"compile:node": "cross-env NODE_OPTIONS='--experimental-fetch' tsc --declaration -project tsconfig.node.json && resolve-tspaths -p tsconfig.node.json",
"compile:node": "tsc --declaration -project tsconfig.node.json && resolve-tspaths -p tsconfig.node.json",
"compile:web": "tsc --declaration -project tsconfig.web.json && resolve-tspaths -p tsconfig.web.json",
"bundle:web": "npx webpack --config-name web",
"bundle:web-prod": "npx webpack --config-name web-prod",
"profile:web": "npx webpack --config-name web --json > ./web.profile.json && npx webpack-bundle-analyzer ./web.profile.json",
"bundle:web": "webpack --config-name web",
"bundle:web-prod": "webpack --config-name web-prod",
"profile:web": "webpack --config-name web --json > ./web.profile.json && webpack-bundle-analyzer ./web.profile.json",
"package": "mkdirp node web && ncp dist/node/common/ dist/node/node/ && ncp dist/node/node/ node && ncp dist/web/common/ dist/web/web/ && ncp dist/web/web/ web && npm run clean:dist",

@@ -28,4 +27,4 @@ "build": "npm run clean && npm run compile:node && npm run compile:web && npm run package && npm run bundle:web && npm run bundle:web-prod",

"prepublishOnly": "npm run clean && npm run build",
"test": "cross-env NODE_OPTIONS='--experimental-fetch' mocha -r ts-node/register -r tsconfig-paths/register test/*.ts && echo \"NOW RUN => 'npm run test:web' <= \" ",
"test:web": "npm run bundle:web && npx webpack --config-name web-tests && opener test/web/web.html",
"test": "mocha -r ts-node/register -r tsconfig-paths/register test/*.ts && echo \"NOW RUN => 'npm run test:web' <= \" ",
"test:web": "npm run bundle:web && webpack --config-name web-tests && opener test/web/web.html",
"prettier:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",

@@ -65,7 +64,6 @@ "prettier:write": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",

"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.38",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"buffer": "^6.0.3",
"chai": "^4.3.6",
"cross-env": "^7.0.3",
"crypto-browserify": "^3.12.0",

@@ -76,3 +74,3 @@ "mkdirp": "^1.0.4",

"opener": "^1.5.2",
"prettier": "2.6.2",
"prettier": "^2.8.1",
"process": "^0.11.10",

@@ -93,3 +91,3 @@ "resolve-tspaths": "^0.6.0",

"chrome": "70",
"node": "12"
"node": "16"
},

@@ -102,7 +100,5 @@ "engines": {

"asn1.js": "^5.4.1",
"axios": "^0.27.2",
"base64-js": "^1.5.1",
"bignumber.js": "^9.0.2",
"util": "^0.12.4"
"bignumber.js": "^9.0.2"
}
}

@@ -35,3 +35,3 @@ "use strict";

headers.append("accept", "application/json, text/plain, */*");
return await this.request(endpoint, Object.assign(Object.assign({}, config), { method: this.METHOD_POST, body: JSON.stringify(body), headers }));
return await this.request(endpoint, Object.assign(Object.assign({}, config), { method: this.METHOD_POST, body: typeof body !== "string" ? JSON.stringify(body) : body, headers }));
}

@@ -42,3 +42,3 @@ async request(endpoint, init) {

if (endpoint.startsWith("/")) {
endpoint = endpoint.replace("/", "");
endpoint = endpoint.slice(1);
}

@@ -45,0 +45,0 @@ if (this.config.network) {

@@ -27,7 +27,2 @@ "use strict";

function bufferToString(buffer) {
// TextEncoder will be available in browsers, but not in node
if (typeof TextDecoder == "undefined") {
const TextDecoder = require("util").TextDecoder;
return new TextDecoder("utf-8", { fatal: true }).decode(buffer);
}
return new TextDecoder("utf-8", { fatal: true }).decode(buffer);

@@ -37,7 +32,2 @@ }

function stringToBuffer(string) {
// TextEncoder will be available in browsers, but not in node
if (typeof TextEncoder == "undefined") {
const TextEncoder = require("util").TextEncoder;
return new TextEncoder().encode(string);
}
return new TextEncoder().encode(string);

@@ -44,0 +34,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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