Socket
Socket
Sign inDemoInstall

@xhmikosr/downloader

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xhmikosr/downloader - npm Package Compare versions

Comparing version 9.0.0 to 10.0.0

10

index.js

@@ -11,3 +11,3 @@ import {promises as fs} from 'node:fs';

import {pEvent} from 'p-event';
import fileType from 'file-type';
import {fileTypeFromBuffer} from 'file-type';
import extName from 'ext-name';

@@ -33,3 +33,3 @@

const getFilename = (res, data) => {
const getFilename = async (res, data) => {
const header = res.headers['content-disposition'];

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

if (!path.extname(filename)) {
const ext = (fileType(data) || {}).ext || getExtFromMime(res);
const ext = (await fileTypeFromBuffer(data) || {}).ext || getExtFromMime(res);

@@ -78,3 +78,3 @@ if (ext) {

return Promise.all([getStream(stream, {encoding}), res]);
}).then(result => {
}).then(async result => {
const [data, res] = result;

@@ -86,3 +86,3 @@

const filename = options.filename || filenamify(getFilename(res, data));
const filename = options.filename || filenamify(await getFilename(res, data));
const outputFilepath = path.join(output, filename);

@@ -89,0 +89,0 @@

{
"name": "@xhmikosr/downloader",
"version": "9.0.0",
"version": "10.0.0",
"description": "Download and extract files",

@@ -13,12 +13,14 @@ "license": "MIT",

"name": "Kevin Mårtensson",
"url": "github.com/kevva"
"url": "https://github.com/kevva"
},
"engines": {
"node": "^12.20.0 || ^14.14.0 || >=16.0.0"
"node": "^14.14.0 || >=16.0.0"
},
"scripts": {
"ava": "ava",
"lint": "xo",
"xo": "xo",
"fix": "xo --fix",
"test": "npm run xo && npm run ava",
"test-ci": "npm run xo && c8 ava"
"test-ci": "c8 ava"
},

@@ -42,2 +44,3 @@ "main": "index.js",

"reporter": [
"html",
"lcovonly",

@@ -48,20 +51,20 @@ "text"

"dependencies": {
"@xhmikosr/decompress": "^5.0.0",
"@xhmikosr/decompress": "^6.0.0",
"archive-type": "^4.0.0",
"content-disposition": "^0.5.4",
"ext-name": "^5.0.0",
"file-type": "^12.4.2",
"file-type": "^18.4.0",
"filenamify": "^5.1.1",
"get-stream": "^6.0.1",
"got": "^11.8.5",
"got": "^11.8.6",
"p-event": "^5.0.1"
},
"devDependencies": {
"ava": "^4.3.0",
"c8": "^7.11.3",
"ava": "^5.3.0",
"c8": "^7.13.0",
"is-zip": "^1.0.0",
"nock": "^13.2.6",
"nock": "^13.3.1",
"path-exists": "^5.0.0",
"random-buffer": "^0.1.0",
"xo": "^0.49.0"
"xo": "^0.54.2"
},

@@ -68,0 +71,0 @@ "xo": {

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

# download [![CI](https://github.com/XhmikosR/download/actions/workflows/ci.yml/badge.svg)](https://github.com/XhmikosR/download/actions/workflows/ci.yml)
# download [![CI](https://github.com/XhmikosR/download/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/XhmikosR/download/actions/workflows/ci.yml)

@@ -3,0 +3,0 @@ > Download and extract files

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