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

repository-provider

Package Overview
Dependencies
Maintainers
1
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repository-provider - npm Package Compare versions

Comparing version 5.3.0 to 5.4.0

13

dist/provider.js

@@ -350,3 +350,3 @@ 'use strict';

}
constructor(path, content = undefined, type = Content.TYPE_BLOB, mode = "100644") {
constructor(path, content = undefined, type = Content.TYPE_BLOB, mode = "100644", sha) {
if (path[0] === "/" || path.indexOf("\\") >= 0) {

@@ -367,2 +367,10 @@ throw new TypeError(`Paths should not contain leading '/' or any '\\': ${path}`);

},
sha: {
get() {
return sha;
},
set(value) {
sha = value;
}
},
type: {

@@ -398,3 +406,4 @@ value: type

type: this.type,
mode: this.mode
mode: this.mode,
sha: this.sha
};

@@ -401,0 +410,0 @@ }

2

package.json
{
"name": "repository-provider",
"version": "5.3.0",
"version": "5.4.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -422,2 +422,3 @@ [![npm](https://img.shields.io/npm/v/repository-provider.svg)](https://www.npmjs.com/package/repository-provider)

- `mode` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** file permissions (optional, default `"100644"`)
- `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** sha of the content

@@ -430,2 +431,3 @@ ### Properties

- `mode` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** file permissions
- `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** sha of the content

@@ -432,0 +434,0 @@ ### isDirectory

import toReadableStream from "to-readable-stream";
import { Stream } from 'stream';
import { Stream } from "stream";

@@ -11,2 +11,3 @@ /**

* @property {string} mode file permissions
* @property {string} sha sha of the content
*

@@ -17,2 +18,3 @@ * @param {string} path file name inside of the repository

* @param {string} mode file permissions
* @param {string} sha sha of the content
*/

@@ -31,3 +33,4 @@ export class Content {

type = Content.TYPE_BLOB,
mode = "100644"
mode = "100644",
sha
) {

@@ -50,2 +53,10 @@ if (path[0] === "/" || path.indexOf("\\") >= 0) {

},
sha: {
get() {
return sha;
},
set(value) {
sha = value;
}
},
type: { value: type },

@@ -91,3 +102,5 @@ mode: { value: mode }

toStream() {
return this.content instanceof Stream ? this.content : toReadableStream(this.content);
return this.content instanceof Stream
? this.content
: toReadableStream(this.content);
}

@@ -99,3 +112,4 @@

type: this.type,
mode: this.mode
mode: this.mode,
sha: this.sha
};

@@ -102,0 +116,0 @@ }

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