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.2.0 to 5.2.1

6

dist/provider.js

@@ -339,2 +339,5 @@ 'use strict';

constructor(path, content = undefined, type = Content.TYPE_BLOB, mode = "100644") {
if (path[0] === "/" || path.indexOf("\\") >= 0) {
throw new TypeError(`Paths should not contain leading '/' or any '\\': ${path}`);
}
Object.defineProperties(this, {

@@ -359,2 +362,5 @@ path: {

}
get isBlob() {
return this.type === Content.TYPE_BLOB;
}
equals(other) {

@@ -361,0 +367,0 @@ if (other === undefined || this.path !== other.path || this.type !== other.type || this.mode !== other.mode) {

2

package.json
{
"name": "repository-provider",
"version": "5.2.0",
"version": "5.2.1",
"publishConfig": {

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

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

- [Properties](#properties-6)
- [isDirectory](#isdirectory)
- [isBlob](#isblob)
- [equals](#equals)

@@ -411,2 +413,3 @@ - [Parameters](#parameters-12)

Representation of one file or directory entry
All paths are asolute (no leading '/') and build with '/'

@@ -427,2 +430,10 @@ ### Parameters

### isDirectory
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true is content represents a directory
### isBlob
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true is content represents a blog (plain old file)
### equals

@@ -429,0 +440,0 @@

/**
* Representation of one file or directory entry
* All paths are asolute (no leading '/') and build with '/'
* @property {string} path file name inside of the repository

@@ -27,2 +28,8 @@ * @property {string|Buffer|Stream} content

) {
if (path[0] === "/" || path.indexOf("\\") >= 0) {
throw new TypeError(
`Paths should not contain leading '/' or any '\\': ${path}`
);
}
Object.defineProperties(this, {

@@ -36,2 +43,5 @@ path: { value: path },

/**
* @return {boolean} true is content represents a directory
*/
get isDirectory() {

@@ -42,2 +52,9 @@ return this.type === Content.TYPE_TREE;

/**
* @return {boolean} true is content represents a blog (plain old file)
*/
get isBlob() {
return this.type === Content.TYPE_BLOB;
}
/**
* compare against other content

@@ -61,3 +78,2 @@ * @param {Content} other

}
} else {

@@ -69,3 +85,5 @@ if (this.content === undefined && other.content === undefined) {

console.log(`not implemented: ${typeof this.content} <> ${typeof other.content}`);
console.log(
`not implemented: ${typeof this.content} <> ${typeof other.content}`
);
return false;

@@ -72,0 +90,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