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

@es-git/checkout-mixin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@es-git/checkout-mixin - npm Package Compare versions

Comparing version 0.8.3 to 0.9.0

es/index.d.ts.map

1

es/index.d.ts

@@ -24,1 +24,2 @@ import { Constructor, IRawRepo, Hash } from '@es-git/core';

export default function checkoutMixin<T extends Constructor<IWalkersRepo & IObjectRepo & IRawRepo>>(repo: T): Constructor<ICheckoutRepo> & T;
//# sourceMappingURL=index.d.ts.map

14

es/index.js
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator];
return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator]();
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};

@@ -13,2 +15,3 @@ import { Type, Mode, isFile, decode } from '@es-git/core';

async checkoutCommit(hash) {
var e_1, _a;
const commit = await super.loadObject(hash);

@@ -21,4 +24,4 @@ if (!commit)

try {
for (var _a = __asyncValues(super.walkTree(commit.body.tree)), _b; _b = await _a.next(), !_b.done;) {
const { path, mode, hash } = await _b.value;
for (var _b = __asyncValues(super.walkTree(commit.body.tree)), _c; _c = await _b.next(), !_c.done;) {
const { path, mode, hash } = await _c.value;
if (isFile(mode)) {

@@ -40,3 +43,3 @@ const file = await super.loadObject(hash);

try {
if (_b && !_b.done && (_c = _a.return)) await _c.call(_a);
if (_c && !_c.done && (_a = _b.return)) await _a.call(_b);
}

@@ -46,3 +49,2 @@ finally { if (e_1) throw e_1.error; }

return result;
var e_1, _c;
}

@@ -49,0 +51,0 @@ async checkout(ref) {

export {};
//# sourceMappingURL=index.test.d.ts.map

@@ -47,2 +47,6 @@ "use strict";

var _promise = require("babel-runtime/core-js/promise");
var _promise2 = _interopRequireDefault(_promise);
var _getIterator2 = require("babel-runtime/core-js/get-iterator");

@@ -64,4 +68,19 @@

if (!_symbol2.default.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[_symbol2.default.asyncIterator];
return m ? m.call(o) : typeof __values === "function" ? __values(o) : (0, _getIterator3.default)(o);
var m = o[_symbol2.default.asyncIterator],
i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : (0, _getIterator3.default)(o), i = {}, verb("next"), verb("throw"), verb("return"), i[_symbol2.default.asyncIterator] = function () {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function (v) {
return new _promise2.default(function (resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
_promise2.default.resolve(v).then(function (v) {
resolve({ value: v, done: d });
}, reject);
}
};

@@ -92,3 +111,3 @@ function checkoutMixin(repo) {

var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(hash) {
var commit, result, _a, _b, _ref3, path, mode, _hash, file, e_1, _c;
var e_1, _a, commit, result, _b, _c, _ref3, path, mode, _hash, file;

@@ -123,12 +142,12 @@ return _regenerator2.default.wrap(function _callee$(_context) {

_context.prev = 8;
_a = __asyncValues((0, _get3.default)(CheckoutRepo.prototype.__proto__ || (0, _getPrototypeOf2.default)(CheckoutRepo.prototype), "walkTree", this).call(this, commit.body.tree));
_b = __asyncValues((0, _get3.default)(CheckoutRepo.prototype.__proto__ || (0, _getPrototypeOf2.default)(CheckoutRepo.prototype), "walkTree", this).call(this, commit.body.tree));
case 10:
_context.next = 12;
return _a.next();
return _b.next();
case 12:
_b = _context.sent;
_c = _context.sent;
if (_b.done) {
if (_c.done) {
_context.next = 34;

@@ -139,3 +158,3 @@ break;

_context.next = 16;
return _b.value;
return _c.value;

@@ -199,3 +218,3 @@ case 16:

if (!(_b && !_b.done && (_c = _a.return))) {
if (!(_c && !_c.done && (_a = _b.return))) {
_context.next = 44;

@@ -206,3 +225,3 @@ break;

_context.next = 44;
return _c.call(_a);
return _a.call(_b);

@@ -209,0 +228,0 @@ case 44:

{
"name": "@es-git/checkout-mixin",
"version": "0.8.3",
"version": "0.9.0",
"description": "",

@@ -42,6 +42,6 @@ "main": "js/index.js",

"dependencies": {
"@es-git/core": "^0.8.3",
"@es-git/object-mixin": "^0.8.3",
"@es-git/walkers-mixin": "^0.8.3"
"@es-git/core": "^0.9.0",
"@es-git/object-mixin": "^0.9.0",
"@es-git/walkers-mixin": "^0.9.0"
}
}
import { Type, Mode, Constructor, IRawRepo, Hash, isFile, decode } from '@es-git/core';
import { IObjectRepo, GitObject, CommitObject, TreeObject } from '@es-git/object-mixin';
import { IWalkersRepo, HashModePath } from '@es-git/walkers-mixin';
import { IObjectRepo } from '@es-git/object-mixin';
import { IWalkersRepo } from '@es-git/walkers-mixin';

@@ -5,0 +5,0 @@ export type Folder = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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