Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/storage

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/storage - npm Package Compare versions

Comparing version 5.20.3 to 5.20.4

9

build/src/gcs-resumable-upload.js

@@ -26,3 +26,2 @@ "use strict";

const uuid = require("uuid");
const util_1 = require("./util");
const NOT_FOUND_STATUS_CODE = 404;

@@ -32,3 +31,3 @@ const TERMINATED_UPLOAD_STATUS_CODE = 410;

const DEFAULT_API_ENDPOINT_REGEX = /.*\.googleapis\.com/;
const packageJson = util_1.getPackageJSON();
const packageJson = require('../../package.json');
exports.PROTOCOL_REGEX = /^(\w*):\/\//;

@@ -142,3 +141,7 @@ class Upload extends stream_1.Writable {

this.once('uploadFinished', fireFinishEvent);
process.nextTick(() => this.emit('upstreamFinished'));
process.nextTick(() => {
this.emit('upstreamFinished');
// it's possible `_write` may not be called - namely for empty object uploads
this.emit('writing');
});
}

@@ -145,0 +148,0 @@ /**

@@ -30,4 +30,3 @@ "use strict";

const uuid = require("uuid");
const util_1 = require("../util");
const packageJson = util_1.getPackageJSON();
const packageJson = require('../../../package.json');
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -34,0 +33,0 @@ const duplexify = require('duplexify');

@@ -377,3 +377,2 @@ "use strict";

}
const packageJson = util_1.getPackageJSON();
const config = {

@@ -400,3 +399,3 @@ apiEndpoint: options.apiEndpoint,

],
packageJson,
packageJson: require('../../package.json'),
};

@@ -403,0 +402,0 @@ super(config, options);

@@ -67,6 +67,1 @@ /// <reference types="node" />

export declare function formatAsUTCISO(dateTimeToFormat: Date, includeTime?: boolean, dateDelimiter?: string, timeDelimiter?: string): string;
/**
* Attempts to retrieve package.json from either the typescript or build context.
* @returns {object} object representation of package.json
*/
export declare function getPackageJSON(): ReturnType<JSON['parse']>;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getPackageJSON = exports.formatAsUTCISO = exports.convertObjKeysToSnakeCase = exports.unicodeJSONStringify = exports.objectKeyToLowercase = exports.qsStringify = exports.encodeURI = exports.fixedEncodeURIComponent = exports.objectEntries = exports.normalize = void 0;
exports.formatAsUTCISO = exports.convertObjKeysToSnakeCase = exports.unicodeJSONStringify = exports.objectKeyToLowercase = exports.qsStringify = exports.encodeURI = exports.fixedEncodeURIComponent = exports.objectEntries = exports.normalize = void 0;
const querystring = require("querystring");

@@ -148,24 +148,2 @@ function normalize(optionsOrCallback, cb) {

exports.formatAsUTCISO = formatAsUTCISO;
/**
* Attempts to retrieve package.json from either the typescript or build context.
* @returns {object} object representation of package.json
*/
function getPackageJSON() {
let packageJson = undefined;
const possiblePaths = ['../../package.json', '../package.json'];
for (const path of possiblePaths) {
try {
packageJson = require(path);
break;
}
catch (_a) {
packageJson = undefined;
}
}
if (packageJson) {
return packageJson;
}
throw new Error('Unable to find package.json');
}
exports.getPackageJSON = getPackageJSON;
//# sourceMappingURL=util.js.map
{
"name": "@google-cloud/storage",
"description": "Cloud Storage Client Library for Node.js",
"version": "5.20.3",
"version": "5.20.4",
"license": "Apache-2.0",

@@ -29,12 +29,11 @@ "author": "Google Inc.",

],
"mocha": {
"require": "ts-node/register",
"extension": "ts"
},
"scripts": {
"predocs": "npm run compile",
"docs": "jsdoc -c .jsdoc.js",
"system-test": "mocha system-test --timeout 600000 --exit",
"conformance-test": "mocha --parallel --require ts-node/register --require conformance-test/globalHooks.ts conformance-test/",
"test": "c8 mocha test",
"system-test": "mocha build/system-test --timeout 600000 --exit",
"conformance-test": "mocha --parallel build/conformance-test/ --require build/conformance-test/globalHooks.js",
"preconformance-test": "npm run compile",
"presystem-test": "npm run compile",
"test": "c8 mocha build/test",
"pretest": "npm run compile",
"lint": "gts check",

@@ -115,3 +114,2 @@ "samples-test": "npm link && cd samples/ && npm link ../ && npm test && cd ../",

"tmp": "^0.2.0",
"ts-node": "^10.7.0",
"typescript": "~3.9.10",

@@ -118,0 +116,0 @@ "uuid": "^8.0.0",

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

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