Socket
Socket
Sign inDemoInstall

@electron/get

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/get - npm Package Compare versions

Comparing version 1.14.1 to 2.0.0

8

dist/cjs/GotDownloader.d.ts

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

import * as got from 'got';
import { Progress as GotProgress, Options as GotOptions } from 'got';
import { Downloader } from './Downloader';

@@ -6,7 +6,9 @@ /**

*/
export declare type GotDownloaderOptions = got.GotOptions<string | null> & {
export declare type GotDownloaderOptions = (GotOptions & {
isStream?: true;
}) & {
/**
* if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
*/
getProgressCallback?: (progress: got.Progress) => Promise<void>;
getProgressCallback?: (progress: GotProgress) => Promise<void>;
/**

@@ -13,0 +15,0 @@ * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`

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

const fs = require("fs-extra");
const got = require("got");
const got_1 = require("got");
const path = require("path");

@@ -47,3 +47,3 @@ const ProgressBar = require("progress");

await new Promise((resolve, reject) => {
const downloadStream = got.stream(url, gotOptions);
const downloadStream = got_1.default.stream(url, gotOptions);
downloadStream.on('downloadProgress', async (progress) => {

@@ -59,4 +59,4 @@ progressPercent = progress.percent;

downloadStream.on('error', error => {
if (error.name === 'HTTPError' && error.statusCode === 404) {
error.message += ` for ${error.url}`;
if (error instanceof got_1.HTTPError && error.response.statusCode === 404) {
error.message += ` for ${error.response.url}`;
}

@@ -63,0 +63,0 @@ if (writeStream.destroy) {

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

import * as got from 'got';
import { Progress as GotProgress, Options as GotOptions } from 'got';
import { Downloader } from './Downloader';

@@ -6,7 +6,9 @@ /**

*/
export declare type GotDownloaderOptions = got.GotOptions<string | null> & {
export declare type GotDownloaderOptions = (GotOptions & {
isStream?: true;
}) & {
/**
* if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
*/
getProgressCallback?: (progress: got.Progress) => Promise<void>;
getProgressCallback?: (progress: GotProgress) => Promise<void>;
/**

@@ -13,0 +15,0 @@ * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`

@@ -13,3 +13,3 @@ var __rest = (this && this.__rest) || function (s, e) {

import * as fs from 'fs-extra';
import * as got from 'got';
import got, { HTTPError } from 'got';
import * as path from 'path';

@@ -56,4 +56,4 @@ import * as ProgressBar from 'progress';

downloadStream.on('error', error => {
if (error.name === 'HTTPError' && error.statusCode === 404) {
error.message += ` for ${error.url}`;
if (error instanceof HTTPError && error.response.statusCode === 404) {
error.message += ` for ${error.response.url}`;
}

@@ -60,0 +60,0 @@ if (writeStream.destroy) {

{
"name": "@electron/get",
"version": "1.14.1",
"version": "2.0.0",
"description": "Utility for downloading artifacts from different versions of Electron",

@@ -26,3 +26,3 @@ "main": "dist/cjs/index.js",

"engines": {
"node": ">=8.6"
"node": ">=12"
},

@@ -33,3 +33,3 @@ "dependencies": {

"fs-extra": "^8.1.0",
"got": "^9.6.0",
"got": "^11.8.5",
"progress": "^2.0.3",

@@ -43,5 +43,4 @@ "semver": "^6.2.0",

"@types/fs-extra": "^8.0.0",
"@types/got": "^9.4.4",
"@types/jest": "^24.0.13",
"@types/node": "^12.0.2",
"@types/node": "^12.20.55",
"@types/progress": "^2.0.3",

@@ -48,0 +47,0 @@ "@types/semver": "^6.2.0",

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