Socket
Socket
Sign inDemoInstall

js-git

Package Overview
Dependencies
4
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.7 to 0.7.8

2

BACKERS.md

@@ -297,3 +297,3 @@ # Kickstarter Backers

- Patrick Collins (pat@burned.com)
- Michael J. Ryan (tracker1)
- Michael J. Ryan ([@tracker1](https://github.com/tracker1))
- technoweenie

@@ -300,0 +300,0 @@ - David Hayes

@@ -81,3 +81,3 @@ # Object Codec

The `message` fiels is mandatory and a simple string.
The `message` field is mandatory and a simple string.

@@ -84,0 +84,0 @@ ```js

@@ -8,3 +8,3 @@

methods.
The implementation for in-mempory storage is `js-git/mixins/mem-db`, and there
The implementation for in-memory storage is `js-git/mixins/mem-db`, and there
are variants for using Github or IndexDB for storage.

@@ -11,0 +11,0 @@

@@ -1,21 +0,28 @@

// Not strict mode because it uses octal literals all over.
module.exports = {
"use strict";
var masks = {
mask: parseInt('100000', 8),
blob: parseInt('140000', 8),
file: parseInt('160000', 8)
};
var modes = module.exports = {
isBlob: function (mode) {
return (mode & 0140000) === 0100000;
return (mode & masks.blob) === masks.mask;
},
isFile: function (mode) {
return (mode & 0160000) === 0100000;
return (mode & masks.file) === masks.mask;
},
toType: function (mode) {
if (mode === 0160000) return "commit";
if (mode === 040000) return "tree";
if ((mode & 0140000) === 0100000) return "blob";
if (mode === modes.commit) return "commit";
if (mode === modes.tree) return "tree";
if ((mode & masks.blob) === masks.mask) return "blob";
return "unknown";
},
tree: 040000,
blob: 0100644,
file: 0100644,
exec: 0100755,
sym: 0120000,
commit: 0160000
tree: parseInt( '40000', 8),
blob: parseInt('100644', 8),
file: parseInt('100644', 8),
exec: parseInt('100755', 8),
sym: parseInt('120000', 8),
commit: parseInt('160000', 8)
};

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

}
if (!person.name || !person.email) {
if (typeof person.name !== "string" || typeof person.email !== "string") {
throw new TypeError("Name and email are required for person fields");

@@ -128,0 +128,0 @@ }

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

if (entry.type === "ref-delta") {
return loadRaw.call(repo, hash, onBase);
return loadRaw.call(repo, entry.ref, onBase);
}

@@ -228,0 +228,0 @@ else if (entry.type === "ofs-delta") {

{
"name": "js-git",
"version": "0.7.7",
"version": "0.7.8",
"description": "Git Implemented in JavaScript",

@@ -5,0 +5,0 @@ "keywords": [

# JS-Git
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/creationix/js-git?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

@@ -6,7 +7,7 @@ This project is a collection of modules that helps in implementing git powered

developer tools for authoring code in restricted environments like ChromeBooks
and tablets. It also enables using git at a database to replace SQL and no-SQL
and tablets. It also enables using git as a database to replace SQL and no-SQL
data stores in many applications.
This project was initially funded by two crowd-sourced fundraisers. See details
in [BACKERS.md](BACKERS.md) and [BACKERS-2.md](BACKERS.md). Thanks to all of
in [BACKERS.md](BACKERS.md) and [BACKERS-2.md](BACKERS-2.md). Thanks to all of
you who made this possible!

@@ -37,7 +38,7 @@

// - loadRaw(hash) => binary
require('../mixins/mem-db')(repo);
require('js-git/mixins/mem-db')(repo);
// This adds a high-level API for creating multiple git objects by path.
// - createTree(entries) => hash
require('../mixins/create-tree')(repo);
require('js-git/mixins/create-tree')(repo);

@@ -48,3 +49,3 @@ // This provides extra methods for dealing with packfile streams.

// - pack(hashes, opts) => packStream
require('../mixins/pack-ops')(repo);
require('js-git/mixins/pack-ops')(repo);

@@ -54,9 +55,9 @@ // This adds in walker algorithms for quickly walking history or a tree.

// - treeWalk(hash) => stream<object>
require('../mixins/walkers')(repo);
require('js-git/mixins/walkers')(repo);
// This combines parallel requests for the same resource for effeciency under load.
require('../mixins/read-combiner')(repo);
require('js-git/mixins/read-combiner')(repo);
// This makes the object interface less strict. See it's docs for details
require('../mixins/formats')(repo);
require('js-git/mixins/formats')(repo);
```

@@ -153,3 +154,3 @@

// We then read the file using the entry hash in the tree.
var file = yield repo.loadAs("blob", tree["greeting.txt"]);
var file = yield repo.loadAs("blob", tree["greeting.txt"].hash);
// file is now a binary buffer.

@@ -156,0 +157,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc