From 85e1e46855beb28560886a44ab103cf89aaf1a5b Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sat, 27 Feb 2021 14:26:43 +0100 Subject: [PATCH 1/6] add eslint + prettier --- .eslintignore | 55 + .eslintrc.json | 35 + .jshintrc | 31 - .prettierignore | 62 + .prettierrc | 6 + package-lock.json | 17512 ++++++++++++++++++++++++++++++-------------- package.json | 12 +- 7 files changed, 12110 insertions(+), 5603 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json delete mode 100644 .jshintrc create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..d73482b1d --- /dev/null +++ b/.eslintignore @@ -0,0 +1,55 @@ +/vendor +/.travis +/.github +/build +/include +/generate/templates/templates/ + +# Gitignore +/build/ +/coverage/ +/dist/ +/include/ +/lib/enums.js +/lib/nodegit.js +/node_modules/ +/src/ +/test/coverage/ +/test/home/ +/test/repos/ +/test/test/ + +/generate/output +/generate/**/*.json +!/generate/input/*.json + +/generate/missing-tests.json +/binding.gyp + +# Generated vendor files +/vendor/openssl/ +/vendor/libssh2/Makefile +/vendor/libssh2/config.status +/vendor/libssh2/docs/Makefile +/vendor/libssh2/example/.deps/ +/vendor/libssh2/example/Makefile +/vendor/libssh2/example/libssh2_config.h +/vendor/libssh2/example/stamp-h2 +/vendor/libssh2/libssh2.pc +/vendor/libssh2/libtool +/vendor/libssh2/src/.deps/ +/vendor/libssh2/src/Makefile +/vendor/libssh2/src/libssh2_config.h +/vendor/libssh2/src/stamp-h1 +/vendor/libssh2/tests/.deps/ +/vendor/libssh2/tests/Makefile + +*.log +.DS_STORE +.idea + +.vscode +jsconfig.json + +test/id_rsa +test/nodegit-test-rsa diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..01e24ab40 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,35 @@ +{ + "root": true, + "extends": [ + "eslint:recommended", + "plugin:prettier/recommended", + "plugin:mocha/recommended", + "plugin:node/recommended" + ], + "parserOptions": { + "ecmaVersion": 2020 + }, + "env": { + "es6": true, + "node": true, + "mocha": true + }, + "plugins": ["prettier", "mocha", "node"], + "rules": { + "array-callback-return": "error", + "prettier/prettier": "warn", + "mocha/no-setup-in-describe": "warn", + "no-process-exit": "warn", + "no-shadow": "warn", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "ignoreRestSiblings": true, + "varsIgnorePattern": "^_" + } + ], // allow unused vars starting with _ + "node/no-missing-require": "warn", + "prefer-const": "warn" + } +} diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 437878c8c..000000000 --- a/.jshintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "esversion": 9, - "boss": true, - "curly": true, - "eqnull": true, - "evil": true, - "futurehostile": true, - "globals": { - "after": true, - "afterEach": true, - "before": true, - "beforeEach": true, - "define": true, - "describe": true, - "global": true, - "it": true - }, - "immed": false, - "maxlen": 120, - "node": true, - "predef": [ - "Promise", - "Set" - ], - "proto": true, - "quotmark": "double", - "trailing": true, - "undef": true, - "unused": "vars", - "validthis": true -} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..9781dd6fd --- /dev/null +++ b/.prettierignore @@ -0,0 +1,62 @@ +/vendor +/.travis +/.github +/build +/include + +# Don't interfere with npm +package-lock.json +package.json + +# Autogenerated +/CHANGELOG.md + +# Gitignore +/build/ +/coverage/ +/dist/ +/include/ +/lib/enums.js +/lib/nodegit.js +/node_modules/ +/src/ +/test/coverage/ +/test/home/ +/test/repos/ +/test/test/ + +/generate/output +/generate/templates +/generate/**/*.json +!/generate/input/*.json + +/generate/missing-tests.json +/binding.gyp + +# Generated vendor files +/vendor/openssl/ +/vendor/libssh2/Makefile +/vendor/libssh2/config.status +/vendor/libssh2/docs/Makefile +/vendor/libssh2/example/.deps/ +/vendor/libssh2/example/Makefile +/vendor/libssh2/example/libssh2_config.h +/vendor/libssh2/example/stamp-h2 +/vendor/libssh2/libssh2.pc +/vendor/libssh2/libtool +/vendor/libssh2/src/.deps/ +/vendor/libssh2/src/Makefile +/vendor/libssh2/src/libssh2_config.h +/vendor/libssh2/src/stamp-h1 +/vendor/libssh2/tests/.deps/ +/vendor/libssh2/tests/Makefile + +*.log +.DS_STORE +.idea + +.vscode +jsconfig.json + +test/id_rsa +test/nodegit-test-rsa diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..b5da8d289 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "jsdocUseInlineCommentForASingleTagBlock": true, + "plugins": ["./node_modules/@homer0/prettier-plugin-jsdoc"], + "printWidth": 120, + "singleQuote": false +} diff --git a/package-lock.json b/package-lock.json index a385694c8..60aa9bbee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,16 +21,24 @@ "tar-fs": "^2.1.1" }, "devDependencies": { + "@homer0/prettier-plugin-jsdoc": "^6.0.0", "aws-sdk": "^2.1095.0", + "babel-cli": "^6.7.7", + "babel-preset-es2015": "^6.6.0", "cheerio": "^1.0.0-rc.2", "clean-for-publish": "~1.0.2", "combyne": "~0.8.1", "coveralls": "^3.0.2", + "eslint": "^8.32.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-mocha": "^10.1.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", "istanbul": "^0.4.5", "js-beautify": "~1.5.10", - "jshint": "^2.10.0", "lcov-result-merger": "^3.1.0", "mocha": "^5.2.0", + "prettier": "^2.8.3", "walk": "^2.3.9" }, "engines": { @@ -42,201 +50,254 @@ "resolved": "https://registry.npmjs.org/@axosoft/nan/-/nan-2.18.0-gk.1.tgz", "integrity": "sha512-rBLCaXNfzbM/XakZhvuambkKatlFBHVtAgiMKV/YmNZvcBKWocNGJSyXiDPUDHJ7fCTVgEe1h66vfzdE4vBJTQ==" }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" - }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz", - "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==", + "node_modules/@eslint/eslintrc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "dev": true, "dependencies": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.5", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@npmcli/move-file": { + "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "ms": "2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/move-file/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" + "node": ">=6.0" }, - "engines": { - "node": ">=10" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@sindresorhus/is": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", - "integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg==", + "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { - "defer-to-connect": "^2.0.0" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=10" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, - "node_modules/@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dependencies": { - "@types/node": "*" + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/node": { - "version": "17.0.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", - "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" + "node_modules/@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "node_modules/@homer0/prettier-plugin-jsdoc": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@homer0/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-6.0.0.tgz", + "integrity": "sha512-21ItGUyRghetQjQVDG3PfWq/2Hp8WYVDdHuCnO3Pjn8bfYDM7AM0erCMCIAGWsi9dxUtH2lA0Yis7Fnd5s+1yg==", + "dev": true, "dependencies": { - "@types/node": "*" + "comment-parser": "^1.3.1", + "prettier": "^2.8.1", + "ramda": "0.28.0" + }, + "engines": { + "node": ">=16" } }, - "node_modules/abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + "node_modules/@homer0/prettier-plugin-jsdoc/node_modules/ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, "dependencies": { - "debug": "4" + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" }, "engines": { - "node": ">= 6.0.0" + "node": ">=10.10.0" } }, - "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" + "ms": "2.1.2" }, "engines": { - "node": ">= 8.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "engines": { + "node": ">=12.22" }, "funding": { "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", + "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" } }, - "node_modules/ansi-regex": { + "node_modules/@mapbox/node-pre-gyp/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", @@ -244,24 +305,7 @@ "node": ">=8" } }, - "node_modules/append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, - "dependencies": { - "buffer-equal": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "node_modules/are-we-there-yet": { + "node_modules/@mapbox/node-pre-gyp/node_modules/are-we-there-yet": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", @@ -273,4073 +317,3733 @@ "node": ">=10" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "node_modules/@mapbox/node-pre-gyp/node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" } }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" + "node_modules/@mapbox/node-pre-gyp/node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "engines": { + "node": ">=8" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, + "node_modules/@mapbox/node-pre-gyp/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, "engines": { - "node": ">=0.8" + "node": ">= 8" } }, - "node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "node_modules/aws-sdk": { - "version": "2.1096.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1096.0.tgz", - "integrity": "sha512-q+hotU57U8bGpz1pf5CkO4z630ay0xGJ9HedahKPZ0Xk3/X0GH+QFYPBWJ5IMTtO30bjfPH0zTaL2vJmMXLBrQ==", - "dev": true, + "node_modules/@mapbox/node-pre-gyp/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" + "yallist": "^4.0.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=8" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, + "node_modules/@mapbox/node-pre-gyp/node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, "engines": { - "node": "*" + "node": ">=10" } }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" + "node_modules/@mapbox/node-pre-gyp/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "node_modules/@mapbox/node-pre-gyp/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node_modules/@mapbox/node-pre-gyp/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, + "node_modules/@mapbox/node-pre-gyp/node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true, - "engines": { - "node": ">=0.4.0" + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" } }, - "node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "node_modules/@mapbox/node-pre-gyp/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">= 6" } }, - "node_modules/cacache/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "glob": "^7.1.3" }, - "engines": { - "node": ">=12" + "bin": { + "rimraf": "bin.js" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/node_modules/lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dependencies": { - "brace-expansion": "^2.0.1" + "lru-cache": "^6.0.0" }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cacache/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "bin": { - "mkdirp": "bin/cmd.js" + "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, - "node_modules/cacheable-lookup": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-2.0.1.tgz", - "integrity": "sha512-EMMbsiOTcdngM/K6gV/OxF2x0t07+vMOWxZNSCRQMjO2MY2nhZQ6OYhOOpyQrbhqsgtvKGI7hcq6xjnA92USjg==", + "node_modules/@mapbox/node-pre-gyp/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "@types/keyv": "^3.1.1", - "keyv": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "node_modules/@mapbox/node-pre-gyp/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, + "node_modules/@mapbox/node-pre-gyp/node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" } }, - "node_modules/cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "engines": { + "node": ">= 8" } }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/clean-for-publish": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clean-for-publish/-/clean-for-publish-1.0.4.tgz", - "integrity": "sha1-KZMj50qzSwXSIHBsWd+B3QTKAYo=", - "dev": true, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dependencies": { - "fs-extra": "^0.26.2", - "glob": "~5.0.15", - "yargs": "~3.29.0" + "lru-cache": "^6.0.0" }, "bin": { - "clean-for-publish": "lib/cli.js" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/clean-for-publish/node_modules/fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "dev": true, + "node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/clean-for-publish/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node_modules/@npmcli/move-file/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/clean-for-publish/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, + "node_modules/@npmcli/move-file/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" - } - }, - "node_modules/clean-for-publish/node_modules/rimraf/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/@sindresorhus/is": { + "version": "2.1.0", + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.5", + "license": "MIT", "dependencies": { - "exit": "0.1.2", - "glob": "^7.1.1" + "defer-to-connect": "^2.0.0" }, "engines": { - "node": ">=0.2.5" + "node": ">=10" } }, - "node_modules/cli/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 10" } }, - "node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, + "node_modules/@types/cacheable-request": { + "version": "6.0.1", + "license": "MIT", "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node_modules/@types/http-cache-semantics": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/@types/keyv": { + "version": "3.1.1", + "license": "MIT", + "dependencies": { + "@types/node": "*" } }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "node_modules/@types/node": { + "version": "10.11.0", + "license": "MIT" + }, + "node_modules/@types/responselike": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, + "license": "MIT", "dependencies": { - "number-is-nan": "^1.0.0" + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.0" } }, - "node_modules/cliui/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "debug": "4" }, "engines": { - "node": ">=0.10.0" + "node": ">= 6.0.0" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ansi-regex": "^2.0.0" + "ms": "2.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/clone": { + "node_modules/agent-base/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true, - "engines": { - "node": ">=0.8" - } + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true, + "node_modules/agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, "engines": { - "node": ">= 0.10" + "node": ">= 8.0.0" } }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "node_modules/agentkeepalive/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/clone-response/node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "ms": "2.1.2" + }, "engines": { - "node": ">=4" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true + "node_modules/agentkeepalive/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dependencies": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/cloneable-readable/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/ajv": { + "version": "5.5.2", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, - "node_modules/cloneable-readable/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/cloneable-readable/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/amdefine": { + "version": "1.0.1", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" + "license": "BSD-3-Clause OR MIT", + "optional": true, + "engines": { + "node": ">=0.4.2" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "node_modules/ansi-regex": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" + "node_modules/anymatch": { + "version": "1.3.2", + "dev": true, + "license": "ISC", + "optional": true, + "dependencies": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/append-buffer": { + "version": "1.0.2", "dev": true, + "license": "MIT", "dependencies": { - "delayed-stream": "~1.0.0" + "buffer-equal": "^1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">=0.10.0" } }, - "node_modules/combyne": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/combyne/-/combyne-0.8.1.tgz", - "integrity": "sha1-WJ3kcEXVcVbcHs4YXWTDidzLR9g=", - "dev": true - }, - "node_modules/commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "node_modules/aproba": { + "version": "1.2.0", + "license": "ISC" }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "node_modules/argparse": { + "version": "1.0.10", "dev": true, + "license": "MIT", "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" + "sprintf-js": "~1.0.2" } }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "node_modules/arr-diff": { + "version": "2.0.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "date-now": "^0.1.4" + "arr-flatten": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/console-control-strings": { + "node_modules/arr-flatten": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "node_modules/arr-union": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "node_modules/array-unique": { + "version": "0.2.1", "dev": true, - "dependencies": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" - }, - "bin": { - "coveralls": "bin/coveralls.js" - }, + "license": "MIT", + "optional": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/css-select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", - "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", + "node_modules/asn1": { + "version": "0.2.4", "dev": true, + "license": "MIT", "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^5.1.0", - "domhandler": "^4.3.0", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "safer-buffer": "~2.1.0" } }, - "node_modules/css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", + "node_modules/assert-plus": { + "version": "1.0.0", "dev": true, + "license": "MIT", "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "node": ">=0.8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "node_modules/assign-symbols": { + "version": "1.0.0", "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, + "license": "MIT", + "optional": true, "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true + "node_modules/async": { + "version": "1.5.2", + "dev": true, + "license": "MIT" }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" + "node_modules/async-each": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/atob": { + "version": "2.1.2", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "optional": true, + "bin": { + "atob": "bin/atob.js" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 4.5.0" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/decompress-response": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-5.0.0.tgz", - "integrity": "sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw==", + "node_modules/aws-sdk": { + "version": "2.1302.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1302.0.tgz", + "integrity": "sha512-OeP31meLGCcBJel2Re1yRsrjqDT3FvLFMQwPVtKHkXnws6QpgVg1FPiEjz4emEREUi6NfbqGNVExOGLsKiz0YA==", + "dev": true, "dependencies": { - "mimic-response": "^2.0.0" + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.4.19" }, "engines": { - "node": ">=10" + "node": ">= 10.0.0" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "engines": { - "node": ">=10" + "node_modules/aws-sdk/node_modules/uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "node_modules/aws-sign2": { + "version": "0.7.0", "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, + "license": "Apache-2.0", "engines": { - "node": ">= 0.4" + "node": "*" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "node_modules/aws4": { + "version": "1.8.0", "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "engines": { - "node": ">= 0.6" - } + "license": "MIT" }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "node_modules/babel-cli": { + "version": "6.26.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + }, "bin": { - "detect-libc": "bin/detect-libc.js" + "babel": "bin/babel.js", + "babel-doctor": "bin/babel-doctor.js", + "babel-external-helpers": "bin/babel-external-helpers.js", + "babel-node": "bin/babel-node.js" }, - "engines": { - "node": ">=0.10" + "optionalDependencies": { + "chokidar": "^1.6.1" } }, - "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/babel-code-frame": { + "version": "6.26.0", "dev": true, - "engines": { - "node": ">=0.3.1" + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, - "node_modules/dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "node_modules/babel-core": { + "version": "6.26.3", "dev": true, + "license": "MIT", "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" } }, - "node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "node_modules/babel-core/node_modules/json5": { + "version": "0.5.1", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + } }, - "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "node_modules/babel-generator": { + "version": "6.26.1", "dev": true, + "license": "MIT", "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" } }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "node_modules/babel-helper-call-delegate": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "node_modules/duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "node_modules/babel-helper-define-map": { + "version": "6.26.0", "dev": true, + "license": "MIT", "dependencies": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "node_modules/duplexify/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/babel-helper-function-name": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "node_modules/duplexify/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/duplexify/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/babel-helper-get-function-arity": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "node_modules/babel-helper-hoist-variables": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "optional": true, + "node_modules/babel-helper-optimise-call-expression": { + "version": "6.24.1", + "dev": true, + "license": "MIT", "dependencies": { - "iconv-lite": "^0.6.2" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "node_modules/babel-helper-regex": { + "version": "6.26.0", + "dev": true, + "license": "MIT", "dependencies": { - "once": "^1.4.0" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "node_modules/babel-helper-replace-supers": { + "version": "6.24.1", "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "license": "MIT", + "dependencies": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "engines": { - "node": ">=6" + "node_modules/babel-helpers": { + "version": "6.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "node_modules/err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/babel-messages": { + "version": "6.23.0", "dev": true, - "engines": { - "node": ">=0.8.0" + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" } }, - "node_modules/escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "node_modules/babel-plugin-check-es2015-constants": { + "version": "6.22.0", "dev": true, + "license": "MIT", "dependencies": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.12.0" - }, - "optionalDependencies": { - "source-map": "~0.2.0" + "babel-runtime": "^6.22.0" } }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "node_modules/babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" } }, - "node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "node_modules/babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", "dev": true, - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", "dev": true, - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" } }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "node_modules/babel-plugin-transform-es2015-classes": { + "version": "6.24.1", "dev": true, - "engines": { - "node": ">=0.4.x" + "license": "MIT", + "dependencies": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "node_modules/babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", "dev": true, - "engines": { - "node": ">= 0.8.0" + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "node_modules/babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" + } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "node_modules/babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", "dev": true, - "engines": [ - "node >=0.6.0" - ] + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "node_modules/babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" + } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "node_modules/babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "node_modules/babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-runtime": "^6.22.0" + } }, - "node_modules/flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "node_modules/babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "node_modules/flush-write-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" } }, - "node_modules/flush-write-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } }, - "node_modules/flush-write-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.0" + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" } }, - "node_modules/foreachasync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", - "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=", - "dev": true + "node_modules/babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "node_modules/babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", "dev": true, - "engines": { - "node": "*" + "license": "MIT", + "dependencies": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" } }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "node_modules/babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "node_modules/babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "dev": true, + "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" + "babel-runtime": "^6.22.0" } }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "node_modules/babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "dev": true, + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "node_modules/babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", "dev": true, + "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" + "babel-runtime": "^6.22.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "node_modules/babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "dev": true, + "license": "MIT", "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" + "babel-runtime": "^6.22.0" } }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "node_modules/babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" } }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/babel-plugin-transform-regenerator": { + "version": "6.26.0", + "dev": true, + "license": "MIT", "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "regenerator-transform": "^0.10.0" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "node_modules/babel-plugin-transform-strict-mode": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "assert-plus": "^1.0.0" + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" } }, - "node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "node_modules/babel-polyfill": { + "version": "6.26.0", "dev": true, + "license": "MIT", "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" } }, - "node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "node_modules/babel-polyfill/node_modules/regenerator-runtime": { + "version": "0.10.5", "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } + "license": "MIT" }, - "node_modules/glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "node_modules/babel-preset-es2015": { + "version": "6.24.1", "dev": true, + "license": "MIT", "dependencies": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - }, - "engines": { - "node": ">= 0.10" + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "node_modules/babel-register": { + "version": "6.26.0", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" } }, - "node_modules/glob-stream/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/babel-runtime": { + "version": "6.26.0", "dev": true, + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, - "node_modules/glob-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/babel-template": { + "version": "6.26.0", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, - "node_modules/glob-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/glob-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/babel-traverse": { + "version": "6.26.0", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.0" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, - "node_modules/got": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/got/-/got-10.7.0.tgz", - "integrity": "sha512-aWTDeNw9g+XqEZNcTjMMZSy7B7yE9toWOFYip7ofFTLleJhvZwUxxTxkTpKvF+p1SAA4VHmuEy7PiHTHyq8tJg==", + "node_modules/babel-types": { + "version": "6.26.0", + "dev": true, + "license": "MIT", "dependencies": { - "@sindresorhus/is": "^2.0.0", - "@szmarczak/http-timer": "^4.0.0", - "@types/cacheable-request": "^6.0.1", - "cacheable-lookup": "^2.0.0", - "cacheable-request": "^7.0.1", - "decompress-response": "^5.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^5.0.0", - "lowercase-keys": "^2.0.0", - "mimic-response": "^2.1.0", - "p-cancelable": "^2.0.0", - "p-event": "^4.0.0", - "responselike": "^2.0.0", - "to-readable-stream": "^2.0.0", - "type-fest": "^0.10.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/babylon": { + "version": "6.18.0", "dev": true, - "engines": { - "node": ">=4.x" + "license": "MIT", + "bin": { + "babylon": "bin/babylon.js" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "node_modules/balanced-match": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/base": { + "version": "0.11.2", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "node": ">=0.10.0" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "node_modules/base/node_modules/is-accessor-descriptor": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^6.0.0" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", + "node_modules/base/node_modules/is-data-descriptor": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "kind-of": "^6.0.0" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.2", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "function-bind": "^1.1.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "engines": { - "node": ">= 0.4.0" + "node": ">=0.10.0" } }, - "node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "node_modules/base/node_modules/isobject": { + "version": "3.0.1", "dev": true, + "license": "MIT", + "optional": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/base/node_modules/kind-of": { + "version": "6.0.2", "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "node_modules/he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true, - "bin": { - "he": "bin/he" + "node": ">=0.10.0" } }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } - ], + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" + "tweetnacl": "^0.14.3" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "node_modules/binary-extensions": { + "version": "1.11.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dependencies": { - "agent-base": "6", - "debug": "4" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { "node": ">= 6" } }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "node_modules/boolbase": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", "dependencies": { - "ms": "^2.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/braces": { + "version": "1.8.5", + "dev": true, + "license": "MIT", "optional": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC" }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" + "node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/buffer-equal": { + "version": "1.0.0", + "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.4.0" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/ip": { + "node_modules/cacache/node_modules/chownr": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, + "node_modules/cacache/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "minipass": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "node_modules/cacache/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, + "node_modules/cacache/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/cacache/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, + "node_modules/cacache/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dependencies": { - "is-extglob": "^2.1.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" - }, - "node_modules/is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true, + "node_modules/cacache/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, + "node_modules/cacache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dependencies": { - "is-unc-path": "^1.0.0" + "glob": "^7.1.3" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "node_modules/cacache/node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, + "node_modules/cacache/node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dependencies": { - "unc-path-regex": "^0.1.2" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "node_modules/is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true, + "node_modules/cacache/node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, + "node_modules/cacache/node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "node_modules/istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", - "dev": true, + "node_modules/cacache/node_modules/tar/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "yallist": "^4.0.0" }, - "bin": { - "istanbul": "lib/cli.js" + "engines": { + "node": ">=8" } }, - "node_modules/istanbul/node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "node_modules/cacache/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/cache-base": { + "version": "1.0.1", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "abbrev": "1" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" }, - "bin": { - "nopt": "bin/nopt.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", + "node_modules/cache-base/node_modules/isobject": { + "version": "3.0.1", "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">= 0.6.0" + "node": ">=0.10.0" } }, - "node_modules/js-beautify": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.5.10.tgz", - "integrity": "sha1-TZU3FwJpk0SlFsomv1nwonu3Vxk=", - "dev": true, + "node_modules/cacheable-lookup": { + "version": "2.0.1", + "license": "MIT", "dependencies": { - "config-chain": "~1.1.5", - "mkdirp": "~0.5.0", - "nopt": "~3.0.1" + "@types/keyv": "^3.1.1", + "keyv": "^4.0.0" }, - "bin": { - "css-beautify": "js/bin/css-beautify.js", - "html-beautify": "js/bin/html-beautify.js", - "js-beautify": "js/bin/js-beautify.js" + "engines": { + "node": ">=10" } }, - "node_modules/js-beautify/node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, + "node_modules/cacheable-request": { + "version": "7.0.1", + "license": "MIT", "dependencies": { - "abbrev": "1" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^2.0.0" }, - "bin": { - "nopt": "bin/nopt.js" + "engines": { + "node": ">=8" } }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-yaml/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "node_modules/camelcase": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "dev": true, + "license": "Apache-2.0" }, - "node_modules/jshint": { - "version": "2.13.4", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.4.tgz", - "integrity": "sha512-HO3bosL84b2qWqI0q+kpT/OpRJwo0R4ivgmxaO848+bo10rc50SkPnrtwSFXttW0ym4np8jbJvLwk5NziB7jIw==", + "node_modules/chalk": { + "version": "1.1.3", "dev": true, + "license": "MIT", "dependencies": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" }, - "bin": { - "jshint": "bin/jshint" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jshint/node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "node_modules/cheerio": { + "version": "1.0.0-rc.2", "dev": true, + "license": "MIT", "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash": "^4.15.0", + "parse5": "^3.0.1" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/jshint/node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/jshint/node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "node_modules/cheerio/node_modules/entities": { + "version": "1.1.1", "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/jshint/node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true + "license": "BSD-like" }, - "node_modules/jshint/node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "node_modules/cheerio/node_modules/htmlparser2": { + "version": "3.9.2", "dev": true, + "license": "MIT", "dependencies": { - "domelementtype": "1" + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, - "node_modules/jshint/node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "node_modules/chokidar": { + "version": "1.7.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, + "optionalDependencies": { + "fsevents": "^1.0.0" } }, - "node_modules/jshint/node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true + "node_modules/chownr": { + "version": "1.1.1", + "license": "ISC" }, - "node_modules/jshint/node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "node_modules/class-utils": { + "version": "0.3.6", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jshint/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/jshint/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "brace-expansion": "^1.1.7" + "is-descriptor": "^0.1.0" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/jshint/node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "node_modules/class-utils/node_modules/isobject": { + "version": "3.0.1", "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jshint/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "node_modules/clean-for-publish": { + "version": "1.0.4", + "dev": true, + "license": "MIT", "dependencies": { - "minimist": "^1.2.5" + "fs-extra": "^0.26.2", + "glob": "~5.0.15", + "yargs": "~3.29.0" }, "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" + "clean-for-publish": "lib/cli.js" } }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node_modules/clean-for-publish/node_modules/fs-extra": { + "version": "0.26.7", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/clean-for-publish/node_modules/glob": { + "version": "5.0.15", "dev": true, + "license": "ISC", "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=0.6.0" + "node": "*" } }, - "node_modules/keyv": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.1.1.tgz", - "integrity": "sha512-tGv1yP6snQVDSM4X6yxrv2zzq/EvpW+oYiUz6aueW1u9CtS8RzUQYxxmFwgZlO2jSgCxQbchhxaqXXp2hnKGpQ==", - "dependencies": { - "json-buffer": "3.0.1" + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" } }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "node_modules/cliui": { + "version": "3.2.0", "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.9" + "license": "ISC", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, - "node_modules/lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "node_modules/clone": { + "version": "2.1.2", "dev": true, - "dependencies": { - "readable-stream": "^2.0.5" - }, + "license": "MIT", "engines": { - "node": ">= 0.6.3" + "node": ">=0.8" } }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/clone-buffer": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-response": { + "version": "1.0.2", + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "mimic-response": "^1.0.0" } }, - "node_modules/lazystream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/clone-response/node_modules/mimic-response": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "node_modules/lazystream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/clone-stats": { + "version": "1.0.0", "dev": true, + "license": "MIT" + }, + "node_modules/cloneable-readable": { + "version": "1.1.2", + "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.0" + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" } }, - "node_modules/lcid": { + "node_modules/co": { + "version": "4.6.0", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "invert-kv": "^1.0.0" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", - "dev": true, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "bin": { - "lcov-parse": "bin/cli.js" + "color-support": "bin.js" } }, - "node_modules/lcov-result-merger": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lcov-result-merger/-/lcov-result-merger-3.1.0.tgz", - "integrity": "sha512-vGXaMNGZRr4cYvW+xMVg+rg7qd5DX9SbGXl+0S3k85+gRZVK4K7UvxPWzKb/qiMwe+4bx3EOrW2o4mbdb1WnsA==", + "node_modules/combined-stream": { + "version": "1.0.6", "dev": true, + "license": "MIT", "dependencies": { - "through2": "^2.0.3", - "vinyl": "^2.1.0", - "vinyl-fs": "^3.0.2" - }, - "bin": { - "lcov-result-merger": "bin/lcov-result-merger.js" + "delayed-stream": "~1.0.0" }, "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "node_modules/lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "node_modules/combyne": { + "version": "0.8.1", + "dev": true + }, + "node_modules/commander": { + "version": "2.18.0", + "dev": true, + "license": "MIT" + }, + "node_modules/comment-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", + "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", "dev": true, - "dependencies": { - "flush-write-stream": "^1.0.2" - }, "engines": { - "node": ">= 0.10" + "node": ">= 12.0.0" } }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "node_modules/component-emitter": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/config-chain": { + "version": "1.1.12", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" + "ini": "^1.3.4", + "proto-list": "~1.2.1" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "node_modules/console-control-strings": { + "version": "1.1.0", + "license": "ISC" }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "node_modules/convert-source-map": { + "version": "1.6.0", "dev": true, - "engines": { - "node": ">=0.8.6" + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.1" } }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "node_modules/copy-descriptor": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/core-js": { + "version": "2.5.7", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/coveralls": { + "version": "3.0.2", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "yallist": "^4.0.0" + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.85.0" + }, + "bin": { + "coveralls": "bin/coveralls.js" }, "engines": { - "node": ">=10" + "node": ">=4.0.0" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" + "node_modules/coveralls/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "bin": { - "semver": "bin/semver.js" + "node_modules/coveralls/node_modules/growl": { + "version": "1.10.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" } }, - "node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "node_modules/coveralls/node_modules/js-yaml": { + "version": "3.13.1", + "dev": true, + "license": "MIT", "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "engines": { - "node": ">=12" - } + "node_modules/coveralls/node_modules/minimist": { + "version": "1.2.0", + "dev": true, + "license": "MIT" }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/cross-spawn": { + "version": "7.0.3", "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": ">= 0.6" + "node": ">= 8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", "dev": true, + "license": "ISC", "dependencies": { - "mime-db": "1.52.0" + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" }, "engines": { - "node": ">= 0.6" + "node": ">= 8" } }, - "node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/css-select": { + "version": "1.2.0", + "dev": true, + "license": "BSD-like", + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "node_modules/css-what": { + "version": "2.1.0", + "dev": true, + "license": "BSD-like", "engines": { "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "node_modules/dashdash": { + "version": "1.14.1", + "dev": true, + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "assert-plus": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=0.10" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" + "ms": "2.0.0" } }, - "node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, + "node_modules/decamelize": { + "version": "1.2.0", + "dev": true, + "license": "MIT", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" + "node": ">=0.10.0" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "dependencies": { - "minipass": "^3.0.0" - }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">= 8" + "node": ">=0.10" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "node_modules/decompress-response": { + "version": "5.0.0", + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" + "mimic-response": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "dependencies": { - "minipass": "^3.0.0" - }, + "node_modules/deep-is": { + "version": "0.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/defer-to-connect": { + "version": "2.0.0", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/define-properties": { + "version": "1.1.3", + "dev": true, + "license": "MIT", "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "object-keys": "^1.0.12" }, "engines": { - "node": ">= 8" + "node": ">= 0.4" } }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/define-property": { + "version": "2.0.2", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "minimist": "^1.2.5" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "node_modules/mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "node_modules/define-property/node_modules/is-accessor-descriptor": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "kind-of": "^6.0.0" }, "engines": { - "node": ">= 4.0.0" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "node_modules/define-property/node_modules/is-data-descriptor": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "ms": "2.0.0" + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "node_modules/define-property/node_modules/is-descriptor": { + "version": "1.0.2", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/define-property/node_modules/isobject": { + "version": "3.0.1", "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/define-property/node_modules/kind-of": { + "version": "6.0.2", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "node_modules/delayed-stream": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/mocha/node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "node_modules/delegates": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/detect-indent": { + "version": "4.0.0", "dev": true, + "license": "MIT", "dependencies": { - "minimist": "0.0.8" + "repeating": "^2.0.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "node_modules/diff": { + "version": "3.5.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "node_modules/doctrine": { + "version": "3.0.0", "dev": true, + "license": "Apache-2.0", "dependencies": { - "has-flag": "^3.0.0" + "esutils": "^2.0.2" }, "engines": { - "node": ">=4" + "node": ">=6.0.0" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" + "node_modules/dom-serializer": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" } }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "1.1.3", "dev": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/dom-serializer/node_modules/entities": { + "version": "1.1.1", + "dev": true, + "license": "BSD-like" + }, + "node_modules/domelementtype": { + "version": "1.3.0", + "dev": true + }, + "node_modules/domhandler": { + "version": "2.3.0", + "dev": true, "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "domelementtype": "1" } }, - "node_modules/node-gyp": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.0.tgz", - "integrity": "sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q==", + "node_modules/domutils": { + "version": "1.5.1", + "dev": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": "^12.22 || ^14.13 || >=16" + "dom-serializer": "0", + "domelementtype": "1" } }, - "node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", - "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", + "node_modules/duplexer3": { + "version": "0.1.4", + "license": "BSD-3-Clause" + }, + "node_modules/duplexify": { + "version": "3.6.0", + "dev": true, + "license": "MIT", "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, - "node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", - "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/node-gyp/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "iconv-lite": "^0.6.2" } }, - "node_modules/node-gyp/node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=0.10.0" } }, - "node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "node_modules/end-of-stream": { + "version": "1.4.1", + "license": "MIT", "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", - "set-blocking": "^2.0.0" - }, + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">=6" } }, - "node_modules/node-gyp/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 8" + "node": ">=0.8.0" } }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "node_modules/escodegen": { + "version": "1.8.1", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "abbrev": "1" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" }, "bin": { - "nopt": "bin/nopt.js" + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=6" + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" } }, - "node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "node_modules/escodegen/node_modules/source-map": { + "version": "0.2.0", "dev": true, + "optional": true, "dependencies": { - "remove-trailing-separator": "^1.0.1" + "amdefine": ">=0.0.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.8.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "node_modules/eslint": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", + "integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "node_modules/eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", "dev": true, - "dependencies": { - "once": "^1.3.2" + "bin": { + "eslint-config-prettier": "bin/cli.js" }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "node_modules/eslint-plugin-es": { + "version": "3.0.1", "dev": true, + "license": "MIT", "dependencies": { - "boolbase": "^1.0.0" + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" }, "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "node_modules/eslint-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, + "dependencies": { + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/eslint-plugin-mocha/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, "engines": { - "node": "*" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "node_modules/eslint-plugin-mocha/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/eslint-plugin-node": { + "version": "11.1.0", "dev": true, + "license": "MIT", + "dependencies": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" } }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "node_modules/eslint-plugin-node/node_modules/resolve": { + "version": "1.20.0", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "prettier-linter-helpers": "^1.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { - "readable-stream": "^2.0.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" } }, - "node_modules/ordered-read-streams/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/eslint-utils": { + "version": "2.1.0", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/ordered-read-streams/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } }, - "node_modules/ordered-read-streams/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", "dev": true, + "license": "MIT", "dependencies": { - "lcid": "^1.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=0.10.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", "dependencies": { - "p-timeout": "^3.1.0" + "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "engines": { - "node": ">=4" - } + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.0", + "dev": true, + "license": "MIT", "dependencies": { - "aggregate-error": "^3.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", "dependencies": { - "p-finally": "^1.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "node_modules/eslint/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "parse5": "^6.0.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/eslint/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" } }, - "node_modules/performance-now": { + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">=10" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" + "node_modules/eslint/node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=10" + "node": ">=10.13.0" } }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/eslint/node_modules/globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "dependencies": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "node_modules/pumpify/node_modules/pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/punycode": { + "node_modules/eslint/node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "node_modules/eslint/node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, "engines": { - "node": ">=0.6" + "node": ">=0.10.0" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "engines": { - "node": ">=0.4.x" + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/ramda": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", - "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==" + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">= 6" + "node": ">= 0.8.0" } }, - "node_modules/remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.1", "dev": true, + "license": "MIT", "dependencies": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" }, "engines": { - "node": ">= 0.10" + "node": ">= 0.8.0" } }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", "dev": true, + "license": "MIT", "engines": { - "node": ">= 0.10" + "node": ">= 0.8.0" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "node_modules/resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", "dev": true, + "license": "MIT", "dependencies": { - "value-or-function": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", "dependencies": { - "lowercase-keys": "^2.0.0" - } - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "prelude-ls": "^1.2.1" + }, "engines": { - "node": ">= 4" + "node": ">= 0.8.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "node_modules/espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "*" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://opencollective.com/eslint" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true - }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", - "dev": true - }, - "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "node_modules/esprima": { + "version": "2.7.3", + "dev": true, + "license": "BSD-2-Clause", "bin": { - "semver": "bin/semver.js" + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "node_modules/esquery": { + "version": "1.4.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" + "node": ">=0.10" } }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" + "node": ">=4.0" } }, - "node_modules/socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" + "estraverse": "^5.2.0" }, "engines": { - "node": ">= 10" + "node": ">=4.0" } }, - "node_modules/source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, "engines": { - "node": ">=0.8.0" + "node": ">=4.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "node_modules/estraverse": { + "version": "1.9.3", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "node_modules/esutils": { + "version": "2.0.2", "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "dependencies": { - "minipass": "^3.1.1" - }, + "node_modules/events": { + "version": "1.1.1", + "dev": true, + "license": "MIT", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" + "node": ">=0.4.x" } }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/expand-brackets": { + "version": "0.1.5", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "is-posix-bracket": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/expand-range": { + "version": "1.8.2", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "ansi-regex": "^5.0.1" + "fill-range": "^2.1.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "node_modules/extend": { + "version": "3.0.2", "dev": true, - "bin": { - "strip-json-comments": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - } + "license": "MIT" }, - "node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "node_modules/extend-shallow": { + "version": "3.0.2", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "has-flag": "^1.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { - "node": ">=0.8.0" + "node": ">=0.10.0" } }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" + "is-plain-object": "^2.0.4" }, "engines": { - "node": ">= 10" - } - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" + "node": ">=0.10.0" } }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "node_modules/extglob": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "is-extglob": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/tar/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } + "node_modules/extsprintf": { + "version": "1.3.0", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "node_modules/fast-deep-equal": { + "version": "1.1.0", "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } + "license": "MIT" }, - "node_modules/through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "node_modules/fast-diff": { + "version": "1.2.0", "dev": true, - "dependencies": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } + "license": "Apache-2.0" }, - "node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/fast-json-stable-stringify": { + "version": "2.0.0", "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } + "license": "MIT" }, - "node_modules/through2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" }, - "node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" + "reusify": "^1.0.4" } }, - "node_modules/to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "node_modules/file-entry-cache": { + "version": "6.0.1", "dev": true, + "license": "MIT", "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=0.10.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/to-readable-stream": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-2.1.0.tgz", - "integrity": "sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w==", + "node_modules/filename-regex": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "node_modules/fill-range": { + "version": "2.2.4", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "through2": "^2.0.3" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" }, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=0.8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "node_modules/flat-cache": { + "version": "3.0.4", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "^5.0.1" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": "*" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", "dev": true, + "license": "ISC", "dependencies": { - "prelude-ls": "~1.1.2" + "glob": "^7.1.3" }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.10.0.tgz", - "integrity": "sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw==", - "engines": { - "node": ">=8" + "bin": { + "rimraf": "bin.js" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/uglify-js": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.3.tgz", - "integrity": "sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==", + "node_modules/flatted": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/flush-write-stream": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", "dev": true, + "license": "MIT", "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, "engines": { - "node": ">=0.8.0" + "node": ">=0.10.0" } }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "node_modules/for-own": { + "version": "0.1.5", "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "for-in": "^1.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "dependencies": { - "unique-slug": "^3.0.0" - }, + "node_modules/foreachasync": { + "version": "3.0.0", + "dev": true, + "license": "Apache2" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "*" } }, - "node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "node_modules/form-data": { + "version": "2.3.2", + "dev": true, + "license": "MIT", "dependencies": { - "imurmurhash": "^0.1.4" + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 0.12" } }, - "node_modules/unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "node_modules/fragment-cache": { + "version": "0.2.1", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-extra": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, "engines": { - "node": ">= 4.0.0" + "node": ">=6 <7 || >=8" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" + "node_modules/fs-extra/node_modules/jsonfile": { + "version": "4.0.0", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", "dev": true, + "license": "MIT", "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" } }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "dev": true, + "license": "MIT" }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" }, - "node_modules/uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "node_modules/function-bind": { + "version": "1.1.1", "dev": true, - "bin": { - "uuid": "bin/uuid" - } + "license": "MIT" }, - "node_modules/value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "node_modules/get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "5.1.0", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "engines": [ - "node >=0.6.0" - ], + "node_modules/get-stream/node_modules/pump": { + "version": "3.0.0", + "license": "MIT", "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "node_modules/get-value": { + "version": "2.0.6", "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, + "license": "MIT", + "optional": true, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "node_modules/getpass": { + "version": "0.1.7", "dev": true, + "license": "MIT", "dependencies": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.10" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/vinyl-fs/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/glob-base": { + "version": "0.3.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/vinyl-fs/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/vinyl-fs/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/glob-parent": { + "version": "2.0.0", "dev": true, + "license": "ISC", + "optional": true, "dependencies": { - "safe-buffer": "~5.1.0" + "is-glob": "^2.0.0" } }, - "node_modules/vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "node_modules/glob-stream": { + "version": "6.1.0", "dev": true, + "license": "MIT", "dependencies": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" }, "engines": { "node": ">= 0.10" } }, - "node_modules/walk": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", - "integrity": "sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg==", + "node_modules/glob-stream/node_modules/glob-parent": { + "version": "3.1.0", "dev": true, + "license": "ISC", "dependencies": { - "foreachasync": "^3.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "node_modules/glob-stream/node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/glob-stream/node_modules/is-glob": { + "version": "3.1.0", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "is-extglob": "^2.1.0" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "node_modules/globals": { + "version": "9.18.0", "dev": true, - "bin": { - "window-size": "cli.js" - }, + "license": "MIT", "engines": { - "node": ">= 0.10.0" + "node": ">=0.10.0" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "10.7.0", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^2.0.0", + "@szmarczak/http-timer": "^4.0.0", + "@types/cacheable-request": "^6.0.1", + "cacheable-lookup": "^2.0.0", + "cacheable-request": "^7.0.1", + "decompress-response": "^5.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^5.0.0", + "lowercase-keys": "^2.0.0", + "mimic-response": "^2.1.0", + "p-cancelable": "^2.0.0", + "p-event": "^4.0.0", + "responselike": "^2.0.0", + "to-readable-stream": "^2.0.0", + "type-fest": "^0.10.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "node_modules/growl": { + "version": "1.10.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/handlebars": { + "version": "4.1.2", "dev": true, + "license": "MIT", "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1" + }, + "bin": { + "handlebars": "bin/handlebars" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "node_modules/har-schema": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.0", "dev": true, + "license": "ISC", "dependencies": { - "number-is-nan": "^1.0.0" + "ajv": "^5.3.0", + "har-schema": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "node_modules/has": { + "version": "1.0.3", "dev": true, + "license": "MIT", "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4.0" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "node_modules/has-ansi": { + "version": "2.0.0", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -4347,2794 +4051,9264 @@ "node": ">=0.10.0" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "node_modules/has-flag": { + "version": "1.0.0", "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { - "node": ">=4.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, "engines": { - "node": ">=0.4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "node_modules/has-unicode": { + "version": "2.0.1", + "license": "ISC" }, - "node_modules/yargs": { - "version": "3.29.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.29.0.tgz", - "integrity": "sha1-GquWYOrnnYuPZ1vK7qtu40ws9pw=", + "node_modules/has-value": { + "version": "1.0.0", "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "camelcase": "^1.2.1", - "cliui": "^3.0.3", - "decamelize": "^1.0.0", - "os-locale": "^1.4.0", - "window-size": "^0.1.2", - "y18n": "^3.2.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" } - } - }, - "dependencies": { - "@axosoft/nan": { - "version": "2.18.0-gk.1", - "resolved": "https://registry.npmjs.org/@axosoft/nan/-/nan-2.18.0-gk.1.tgz", - "integrity": "sha512-rBLCaXNfzbM/XakZhvuambkKatlFBHVtAgiMKV/YmNZvcBKWocNGJSyXiDPUDHJ7fCTVgEe1h66vfzdE4vBJTQ==" }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" - }, - "@mapbox/node-pre-gyp": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz", - "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==", - "requires": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.5", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" + "node_modules/has-value/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" } }, - "@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "node_modules/has-values": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - } + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" } }, - "@sindresorhus/is": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz", - "integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg==" + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } }, - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "requires": { - "defer-to-connect": "^2.0.0" + "node_modules/he": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" } }, - "@tootallnate/once": { + "node_modules/home-or-tmp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" - }, - "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" + "dev": true, + "license": "MIT", + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "license": "BSD-2-Clause" }, - "@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "requires": { - "@types/node": "*" + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" } }, - "@types/node": { - "version": "17.0.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", - "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" - }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "requires": { - "@types/node": "*" + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { + "node_modules/http-signature": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", "debug": "4" + }, + "engines": { + "node": ">= 6" } }, - "agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "requires": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" } }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "engines": { + "node": ">= 4" } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "optional": true + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "node_modules/imurmurhash": { + "version": "0.1.4", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } }, - "append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, - "requires": { - "buffer-equal": "^1.0.0" + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" } }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" }, - "are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.5", "dev": true, - "requires": { - "sprintf-js": "~1.0.2" + "license": "ISC", + "engines": { + "node": "*" } }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "node_modules/invariant": { + "version": "2.2.4", "dev": true, - "requires": { - "safer-buffer": "~2.1.0" + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" } }, - "assert-plus": { + "node_modules/invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "aws-sdk": { - "version": "2.1096.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1096.0.tgz", - "integrity": "sha512-q+hotU57U8bGpz1pf5CkO4z630ay0xGJ9HedahKPZ0Xk3/X0GH+QFYPBWJ5IMTtO30bjfPH0zTaL2vJmMXLBrQ==", "dev": true, - "requires": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "node_modules/is-absolute": { + "version": "1.0.0", "dev": true, - "requires": { - "tweetnacl": "^0.14.3" + "license": "MIT", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "dev": true, + "license": "MIT" + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-dotfile": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-equal-shallow": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finite": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-posix-bracket": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-primitive": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/isobject": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/istanbul": { + "version": "0.4.5", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/istanbul/node_modules/abbrev": { + "version": "1.0.9", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul/node_modules/glob": { + "version": "5.0.15", + "dev": true, + "license": "ISC", + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/istanbul/node_modules/supports-color": { + "version": "3.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/js-beautify": { + "version": "1.5.10", + "dev": true, + "license": "MIT", + "dependencies": { + "config-chain": "~1.1.5", + "mkdirp": "~0.5.0", + "nopt": "~3.0.1" + }, + "bin": { + "css-beautify": "js/bin/css-beautify.js", + "html-beautify": "js/bin/html-beautify.js", + "js-beautify": "js/bin/js-beautify.js" + } + }, + "node_modules/js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/js-tokens": { + "version": "3.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/jsesc": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.2.3", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.3.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "jsonify": "~0.0.0" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5/node_modules/minimist": { + "version": "1.2.0", + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "2.4.0", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonify": { + "version": "0.0.0", + "dev": true, + "license": "Public Domain" + }, + "node_modules/jsprim": { + "version": "1.4.1", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/keyv": { + "version": "4.0.0", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "1.3.1", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/lazystream": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lcov-parse": { + "version": "0.0.10", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/lcov-result-merger": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "through2": "^2.0.3", + "vinyl": "^2.1.0", + "vinyl-fs": "^3.0.2" + }, + "bin": { + "lcov-result-merger": "bin/lcov-result-merger.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.14", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/log-driver": { + "version": "1.2.7", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=0.8.6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lru-cache/node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/make-fetch-happen/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/make-fetch-happen/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/map-cache": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/math-random": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/micromatch": { + "version": "2.3.11", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime-db": { + "version": "1.36.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.20", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "~1.36.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "0.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-fetch/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "node_modules/mocha": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/mocha/node_modules/commander": { + "version": "2.15.1", + "dev": true, + "license": "MIT" + }, + "node_modules/mocha/node_modules/debug": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "5.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/arr-diff": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/array-unique": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.1", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/node-gyp/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/node-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-gyp/node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/node-gyp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/nopt": { + "version": "3.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "4.5.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/now-and-later": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/nth-check": { + "version": "1.0.1", + "dev": true, + "license": "BSD", + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.0.12", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.omit": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optimist": { + "version": "0.6.1", + "dev": true, + "license": "MIT/X11", + "dependencies": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "node_modules/optimist/node_modules/wordwrap": { + "version": "0.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/optionator": { + "version": "0.8.2", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/output-file-sync": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.4", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.0" + } + }, + "node_modules/p-cancelable": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/p-event": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "p-timeout": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-glob": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse5": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/preserve": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettier": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", + "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/private": { + "version": "0.1.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "dev": true, + "license": "ISC" + }, + "node_modules/psl": { + "version": "1.1.29", + "dev": true, + "license": "MIT" + }, + "node_modules/pump": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.5.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/rambda": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.4.0.tgz", + "integrity": "sha512-A9hihu7dUTLOUCM+I8E61V4kRXnN4DwYeK0DwCBydC1MqNI1PidyAtbtpsJlBBzK4icSctEcCQ1bGcLpBuETUQ==", + "dev": true + }, + "node_modules/ramda": { + "version": "0.25.0", + "license": "MIT" + }, + "node_modules/randomatic": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/randomatic/node_modules/kind-of": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/readdirp/node_modules/arr-diff": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/array-unique": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regenerate": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-transform": { + "version": "0.10.1", + "dev": true, + "license": "BSD", + "dependencies": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "node_modules/regex-cache": { + "version": "0.4.4", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-equal-shallow": "^0.1.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regexpu-core": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "node_modules/regjsgen": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.1.5", + "dev": true, + "license": "BSD", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "node_modules/repeat-element": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/repeating": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-finite": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/replace-ext": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/request": { + "version": "2.88.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/request/node_modules/safe-buffer": { + "version": "5.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.1.7", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/responselike": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "lowercase-keys": "^2.0.0" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.6.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.1", + "license": "MIT" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "devOptional": true, + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.2.1", + "dev": true, + "license": "ISC" + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/set-value": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/slash": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/kind-of": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.4.18", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/source-map-url": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/split-string": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sshpk": { + "version": "1.14.2", + "dev": true, + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "dashdash": "^1.12.0", + "getpass": "^0.1.1", + "safer-buffer": "^2.0.2" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + }, + "optionalDependencies": { + "bcrypt-pbkdf": "^1.0.0", + "ecc-jsbn": "~0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + } + }, + "node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ssri/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ssri/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/static-extend": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-shift": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/through2": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "node_modules/through2-filter": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-fast-properties": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-readable-stream": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range/node_modules/is-number": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/tough-cookie": { + "version": "2.4.3", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/trim-right": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "dev": true, + "license": "Unlicense", + "optional": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.10.0", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uglify-js": { + "version": "3.5.15", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "dependencies": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uglify-js/node_modules/commander": { + "version": "2.20.0", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/uglify-js/node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/unique-stream": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "json-stable-stringify": "^1.0.0", + "through2-filter": "^2.0.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/url": { + "version": "0.10.3", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/use": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/user-home": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "bin": { + "user-home": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8flags": { + "version": "2.1.1", + "dev": true, + "dependencies": { + "user-home": "^1.1.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vinyl": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/walk": { + "version": "2.3.14", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "foreachasync": "^3.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/window-size": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/xml2js": { + "version": "0.4.19", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "node_modules/xmlbuilder": { + "version": "9.0.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xtend": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "3.2.1", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "3.29.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^1.2.1", + "cliui": "^3.0.3", + "decamelize": "^1.0.0", + "os-locale": "^1.4.0", + "window-size": "^0.1.2", + "y18n": "^3.2.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@axosoft/nan": { + "version": "2.18.0-gk.1", + "resolved": "https://registry.npmjs.org/@axosoft/nan/-/nan-2.18.0-gk.1.tgz", + "integrity": "sha512-rBLCaXNfzbM/XakZhvuambkKatlFBHVtAgiMKV/YmNZvcBKWocNGJSyXiDPUDHJ7fCTVgEe1h66vfzdE4vBJTQ==" + }, + "@eslint/eslintrc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" + }, + "@homer0/prettier-plugin-jsdoc": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@homer0/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-6.0.0.tgz", + "integrity": "sha512-21ItGUyRghetQjQVDG3PfWq/2Hp8WYVDdHuCnO3Pjn8bfYDM7AM0erCMCIAGWsi9dxUtH2lA0Yis7Fnd5s+1yg==", + "dev": true, + "requires": { + "comment-parser": "^1.3.1", + "prettier": "^2.8.1", + "ramda": "0.28.0" + }, + "dependencies": { + "ramda": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.28.0.tgz", + "integrity": "sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==", + "dev": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@mapbox/node-pre-gyp": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", + "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", + "requires": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, + "detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "requires": { + "abbrev": "1" + } + }, + "npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "requires": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "@sindresorhus/is": { + "version": "2.1.0" + }, + "@szmarczak/http-timer": { + "version": "4.0.5", + "requires": { + "defer-to-connect": "^2.0.0" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, + "@types/cacheable-request": { + "version": "6.0.1", + "requires": { + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" + } + }, + "@types/http-cache-semantics": { + "version": "4.0.0" + }, + "@types/keyv": { + "version": "3.1.1", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "10.11.0" + }, + "@types/responselike": { + "version": "1.0.0", + "requires": { + "@types/node": "*" + } + }, + "abbrev": { + "version": "1.1.1" + }, + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "5.5.2", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "amdefine": { + "version": "1.0.1", + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1" + }, + "ansi-styles": { + "version": "2.2.1", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "append-buffer": { + "version": "1.0.2", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "aproba": { + "version": "1.2.0" + }, + "argparse": { + "version": "1.0.10", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "dev": true, + "optional": true + }, + "arr-union": { + "version": "3.1.0", + "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.2.1", + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.4", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "dev": true, + "optional": true + }, + "async": { + "version": "1.5.2", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "dev": true + }, + "atob": { + "version": "2.1.2", + "dev": true, + "optional": true + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, + "aws-sdk": { + "version": "2.1302.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1302.0.tgz", + "integrity": "sha512-OeP31meLGCcBJel2Re1yRsrjqDT3FvLFMQwPVtKHkXnws6QpgVg1FPiEjz4emEREUi6NfbqGNVExOGLsKiz0YA==", + "dev": true, + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.4.19" + }, + "dependencies": { + "uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", + "dev": true + } + } + }, + "aws-sign2": { + "version": "0.7.0", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "dev": true + }, + "babel-cli": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "chokidar": "^1.6.1", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "json5": { + "version": "0.5.1", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "dev": true + } + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "dev": true + }, + "balanced-match": { + "version": "1.0.0" + }, + "base": { + "version": "0.11.2", + "dev": true, + "optional": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "1.11.0", + "dev": true, + "optional": true + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "boolbase": { + "version": "1.0.0", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "browser-stdout": { + "version": "1.3.1", + "dev": true + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-equal": { + "version": "1.0.0", + "dev": true + }, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==" + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "cache-base": { + "version": "1.0.1", + "dev": true, + "optional": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } + } + }, + "cacheable-lookup": { + "version": "2.0.1", + "requires": { + "@types/keyv": "^3.1.1", + "keyv": "^4.0.0" + } + }, + "cacheable-request": { + "version": "7.0.1", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^2.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cheerio": { + "version": "1.0.0-rc.2", + "dev": true, + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash": "^4.15.0", + "parse5": "^3.0.1" + }, + "dependencies": { + "entities": { + "version": "1.1.1", + "dev": true + }, + "htmlparser2": { + "version": "3.9.2", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + } + } + }, + "chokidar": { + "version": "1.7.0", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "chownr": { + "version": "1.1.1" + }, + "class-utils": { + "version": "0.3.6", + "dev": true, + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } + } + }, + "clean-for-publish": { + "version": "1.0.4", + "dev": true, + "requires": { + "fs-extra": "^0.26.2", + "glob": "~5.0.15", + "yargs": "~3.29.0" + }, + "dependencies": { + "fs-extra": { + "version": "0.26.7", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "glob": { + "version": "5.0.15", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, + "cliui": { + "version": "3.2.0", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "2.1.2", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "requires": { + "mimic-response": "^1.0.0" + }, + "dependencies": { + "mimic-response": { + "version": "1.0.1" + } + } + }, + "clone-stats": { + "version": "1.0.0", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "dev": true + }, + "code-point-at": { + "version": "1.1.0" + }, + "collection-visit": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, + "combined-stream": { + "version": "1.0.6", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "combyne": { + "version": "0.8.1", + "dev": true + }, + "commander": { + "version": "2.18.0", + "dev": true + }, + "comment-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", + "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1" + }, + "config-chain": { + "version": "1.1.12", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "console-control-strings": { + "version": "1.1.0" + }, + "convert-source-map": { + "version": "1.6.0", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "dev": true, + "optional": true + }, + "core-js": { + "version": "2.5.7", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "dev": true + }, + "coveralls": { + "version": "3.0.2", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.85.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "dev": true + }, + "growl": { + "version": "1.10.5", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "dev": true + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "css-select": { + "version": "1.2.0", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "dev": true, + "optional": true + }, + "decompress-response": { + "version": "5.0.0", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "deep-is": { + "version": "0.1.3", + "dev": true + }, + "defer-to-connect": { + "version": "2.0.0" + }, + "define-properties": { + "version": "1.1.3", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "dev": true + }, + "delegates": { + "version": "1.0.0" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" + }, + "detect-indent": { + "version": "4.0.0", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "diff": { + "version": "3.5.0", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-serializer": { + "version": "0.1.0", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "dev": true + }, + "entities": { + "version": "1.1.1", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.0", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexer3": { + "version": "0.1.4" + }, + "duplexify": { + "version": "3.6.0", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0" + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "requires": { + "once": "^1.4.0" + } + }, + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" + }, + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.2.0", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "eslint": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", + "integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "dev": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "dev": true + }, + "levn": { + "version": "0.4.1", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "optionator": { + "version": "0.9.1", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "prelude-ls": { + "version": "1.2.1", + "dev": true + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "dev": true, + "requires": {} + }, + "eslint-plugin-es": { + "version": "3.0.1", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + } + }, + "eslint-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", + "dev": true, + "requires": { + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" + }, + "dependencies": { + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "11.1.0", + "dev": true, + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "resolve": { + "version": "1.20.0", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "6.3.0", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "eslint-utils": { + "version": "2.1.0", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esprima": { + "version": "2.7.3", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "1.9.3", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "dev": true + }, + "events": { + "version": "1.1.1", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "dev": true, + "optional": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "dev": true, + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "dev": true + }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "filename-regex": { + "version": "2.0.1", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "2.2.4", + "dev": true, + "optional": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "rimraf": { + "version": "3.0.2", + "dev": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "glob": "^7.1.3" } } } }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "flatted": { + "version": "3.1.1", "dev": true }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "flush-write-stream": { + "version": "1.0.3", + "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "for-in": { + "version": "1.0.2", + "dev": true, + "optional": true + }, + "for-own": { + "version": "0.1.5", + "dev": true, + "optional": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreachasync": { + "version": "3.0.0", "dev": true }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "forever-agent": { + "version": "0.6.1", + "dev": true + }, + "form-data": { + "version": "2.3.2", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" } }, - "buffer-equal": { + "fragment-cache": { + "version": "0.2.1", + "dev": true, + "optional": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-extra": { + "version": "7.0.0", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "dependencies": { + "jsonfile": { + "version": "4.0.0", + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "fs-mkdirp-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", "dev": true }, - "cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "fs.realpath": { + "version": "1.0.0" + }, + "function-bind": { + "version": "1.1.1", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dev": true, "requires": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-stream": { + "version": "5.1.0", + "requires": { + "pump": "^3.0.0" }, "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "pump": { + "version": "3.0.0", "requires": { - "balanced-match": "^1.0.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } - }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + } + } + }, + "get-value": { + "version": "2.0.6", + "dev": true, + "optional": true + }, + "getpass": { + "version": "0.1.7", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "brace-expansion": "^1.1.7" + } + } + } + }, + "glob-base": { + "version": "0.3.0", + "dev": true, + "optional": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "glob-stream": { + "version": "6.1.0", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" } }, - "lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==" + "is-extglob": { + "version": "2.1.1", + "dev": true }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "is-glob": { + "version": "3.1.0", + "dev": true, "requires": { - "brace-expansion": "^2.0.1" + "is-extglob": "^2.1.0" } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" } } }, - "cacheable-lookup": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-2.0.1.tgz", - "integrity": "sha512-EMMbsiOTcdngM/K6gV/OxF2x0t07+vMOWxZNSCRQMjO2MY2nhZQ6OYhOOpyQrbhqsgtvKGI7hcq6xjnA92USjg==", + "globals": { + "version": "9.18.0", + "dev": true + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "got": { + "version": "10.7.0", + "requires": { + "@sindresorhus/is": "^2.0.0", + "@szmarczak/http-timer": "^4.0.0", + "@types/cacheable-request": "^6.0.1", + "cacheable-lookup": "^2.0.0", + "cacheable-request": "^7.0.1", + "decompress-response": "^5.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^5.0.0", + "lowercase-keys": "^2.0.0", + "mimic-response": "^2.1.0", + "p-cancelable": "^2.0.0", + "p-event": "^4.0.0", + "responselike": "^2.0.0", + "to-readable-stream": "^2.0.0", + "type-fest": "^0.10.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "dev": true + }, + "handlebars": { + "version": "4.1.2", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "dev": true, "requires": { - "@types/keyv": "^3.1.1", - "keyv": "^4.0.0" + "ajv": "^5.3.0", + "har-schema": "^2.0.0" } }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "has": { + "version": "1.0.3", + "dev": true, "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" + "function-bind": "^1.1.1" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "has-ansi": { + "version": "2.0.0", "dev": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "ansi-regex": "^2.0.0" } }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "has-flag": { + "version": "1.0.0", "dev": true }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, - "cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "requires": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" + "has-symbols": "^1.0.2" } }, - "cheerio-select": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz", - "integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==", + "has-unicode": { + "version": "2.0.1" + }, + "has-value": { + "version": "1.0.0", "dev": true, + "optional": true, "requires": { - "css-select": "^4.1.3", - "css-what": "^5.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.7.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } } }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "clean-for-publish": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clean-for-publish/-/clean-for-publish-1.0.4.tgz", - "integrity": "sha1-KZMj50qzSwXSIHBsWd+B3QTKAYo=", + "has-values": { + "version": "1.0.0", "dev": true, + "optional": true, "requires": { - "fs-extra": "^0.26.2", - "glob": "~5.0.15", - "yargs": "~3.29.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { - "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "is-number": { + "version": "3.0.0", "dev": true, + "optional": true, "requires": { - "glob": "^7.1.3" + "kind-of": "^3.0.2" }, "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "kind-of": { + "version": "3.2.2", "dev": true, + "optional": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-buffer": "^1.1.5" } } } + }, + "kind-of": { + "version": "4.0.0", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "he": { + "version": "1.1.1", + "dev": true }, - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "home-or-tmp": { + "version": "2.0.0", "dev": true, "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0" + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" }, "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "http-signature": { + "version": "1.2.0", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "ms": "2.1.2" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "requires": { + "ms": "^2.0.0" + } }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "requires": { - "mimic-response": "^1.0.0" - }, - "dependencies": { - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" } }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true + "imurmurhash": { + "version": "0.1.4" }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + }, + "inflight": { + "version": "1.0.6", "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + "once": "^1.3.0", + "wrappy": "1" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + "ini": { + "version": "1.3.5", + "dev": true }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "invariant": { + "version": "2.2.4", "dev": true, "requires": { - "delayed-stream": "~1.0.0" + "loose-envify": "^1.0.0" } }, - "combyne": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/combyne/-/combyne-0.8.1.tgz", - "integrity": "sha1-WJ3kcEXVcVbcHs4YXWTDidzLR9g=", - "dev": true - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "invert-kv": { + "version": "1.0.0", "dev": true }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "is-absolute": { + "version": "1.0.0", "dev": true, "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" } }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "is-accessor-descriptor": { + "version": "0.1.6", "dev": true, + "optional": true, "requires": { - "date-now": "^0.1.4" + "kind-of": "^3.0.2" } }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "is-binary-path": { + "version": "1.0.1", "dev": true, + "optional": true, "requires": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" + "binary-extensions": "^1.0.0" } }, - "css-select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", - "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^5.1.0", - "domhandler": "^4.3.0", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - } + "is-buffer": { + "version": "1.1.6", + "dev": true }, - "css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "is-core-module": { + "version": "2.2.0", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "has": "^1.0.3" } }, - "date-now": { + "is-data-descriptor": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "optional": true, "requires": { - "ms": "2.1.2" + "kind-of": "^3.0.2" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decompress-response": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-5.0.0.tgz", - "integrity": "sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw==", + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "optional": true, "requires": { - "mimic-response": "^2.0.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "dev": true, + "optional": true + } } }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" + "is-dotfile": { + "version": "1.0.3", + "dev": true, + "optional": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "is-equal-shallow": { + "version": "0.1.3", "dev": true, + "optional": true, "requires": { - "object-keys": "^1.0.12" + "is-primitive": "^2.0.0" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "is-extendable": { + "version": "0.1.1", + "dev": true, + "optional": true }, - "delegates": { + "is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" + "dev": true, + "optional": true }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + "is-finite": { + "version": "1.0.2", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "is-fullwidth-code-point": { + "version": "1.0.0", + "requires": { + "number-is-nan": "^1.0.0" + } }, - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" + "has-tostringtag": "^1.0.0" } }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true - }, - "domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "is-glob": { + "version": "2.0.1", "dev": true, + "optional": true, "requires": { - "domelementtype": "^2.2.0" + "is-extglob": "^1.0.0" } }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "is-negated-glob": { + "version": "1.0.0", + "dev": true + }, + "is-number": { + "version": "2.1.0", "dev": true, + "optional": true, "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "kind-of": "^3.0.2" } }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "is-plain-object": { + "version": "2.0.4", "dev": true, + "optional": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "isobject": "^3.0.1" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "isobject": { + "version": "3.0.1", "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } + "optional": true } } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "is-posix-bracket": { + "version": "0.1.1", "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } + "optional": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "is-primitive": { + "version": "2.0.0", + "dev": true, + "optional": true }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "optional": true, + "is-relative": { + "version": "1.0.0", + "dev": true, "requires": { - "iconv-lite": "^0.6.2" + "is-unc-path": "^1.0.0" } }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, "requires": { - "once": "^1.4.0" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" } }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" - }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "is-typedarray": { + "version": "1.0.0", "dev": true }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "is-unc-path": { + "version": "1.0.0", "dev": true, "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "unc-path-regex": "^0.1.2" + } }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "is-utf8": { + "version": "0.2.1", "dev": true }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "is-valid-glob": { + "version": "1.0.0", "dev": true }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "is-windows": { + "version": "1.0.2", "dev": true }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "isarray": { + "version": "1.0.0", "dev": true }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "isexe": { + "version": "2.0.0" }, - "fast-json-stable-stringify": { + "isobject": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "isstream": { + "version": "0.1.2", "dev": true }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "istanbul": { + "version": "0.4.5", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "abbrev": { + "version": "1.0.9", + "dev": true + }, + "glob": { + "version": "5.0.15", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "supports-color": { + "version": "3.2.3", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "has-flag": "^1.0.0" } } } }, - "foreachasync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", - "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", "dev": true }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "js-beautify": { + "version": "1.5.10", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "config-chain": "~1.1.5", + "mkdirp": "~0.5.0", + "nopt": "~3.0.1" } }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + "js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } + "js-tokens": { + "version": "3.0.2", + "dev": true }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "js-yaml": { + "version": "3.13.1", + "dev": true, "requires": { - "minipass": "^3.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "dev": true + } } }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "jsbn": { + "version": "0.1.1", "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - } + "optional": true }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "jsesc": { + "version": "1.3.0", + "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "json-buffer": { + "version": "3.0.1" + }, + "json-schema": { + "version": "0.2.3", "dev": true }, - "gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - } + "json-schema-traverse": { + "version": "0.3.1", + "dev": true }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "json-stable-stringify": { + "version": "1.0.1", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "jsonify": "~0.0.0" } }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "dev": true + }, + "json5": { + "version": "2.1.0", "requires": { - "pump": "^3.0.0" + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0" + } } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "jsonfile": { + "version": "2.4.0", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "graceful-fs": "^4.1.6" } }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "jsonify": { + "version": "0.0.0", + "dev": true + }, + "jsprim": { + "version": "1.4.1", "dev": true, "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, + "keyv": { + "version": "4.0.0", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "json-buffer": "3.0.1" } }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "kind-of": { + "version": "3.2.2", "dev": true, + "optional": true, "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - }, - "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + "is-buffer": "^1.1.5" } }, - "got": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/got/-/got-10.7.0.tgz", - "integrity": "sha512-aWTDeNw9g+XqEZNcTjMMZSy7B7yE9toWOFYip7ofFTLleJhvZwUxxTxkTpKvF+p1SAA4VHmuEy7PiHTHyq8tJg==", + "klaw": { + "version": "1.3.1", + "dev": true, "requires": { - "@sindresorhus/is": "^2.0.0", - "@szmarczak/http-timer": "^4.0.0", - "@types/cacheable-request": "^6.0.1", - "cacheable-lookup": "^2.0.0", - "cacheable-request": "^7.0.1", - "decompress-response": "^5.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^5.0.0", - "lowercase-keys": "^2.0.0", - "mimic-response": "^2.1.0", - "p-cancelable": "^2.0.0", - "p-event": "^4.0.0", - "responselike": "^2.0.0", - "to-readable-stream": "^2.0.0", - "type-fest": "^0.10.0" + "graceful-fs": "^4.1.9" } }, - "graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + "lazystream": { + "version": "1.0.0", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "lcid": { + "version": "1.0.0", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lcov-parse": { + "version": "0.0.10", "dev": true }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "lcov-result-merger": { + "version": "3.1.0", "dev": true, "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "through2": "^2.0.3", + "vinyl": "^2.1.0", + "vinyl-fs": "^3.0.2" } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true + "lead": { + "version": "1.0.0", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "levn": { + "version": "0.3.0", "dev": true, "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "p-locate": "^5.0.0" } }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true + "lodash": { + "version": "4.17.14" }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "log-driver": { + "version": "1.2.7", "dev": true }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "loose-envify": { + "version": "1.4.0", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" + "js-tokens": "^3.0.0 || ^4.0.0" } }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "lowercase-keys": { + "version": "2.0.0" }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "lru-cache": { + "version": "6.0.0", "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0" + } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } } }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", "requires": { - "agent-base": "6", - "debug": "4" + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==" + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "requires": { - "ms": "^2.0.0" - } + "map-cache": { + "version": "0.2.2", + "dev": true, + "optional": true }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "map-visit": { + "version": "1.0.0", + "dev": true, "optional": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "object-visit": "^1.0.0" } }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "math-random": { + "version": "1.0.1", + "dev": true, + "optional": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "micromatch": { + "version": "2.3.11", + "dev": true, + "optional": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "mime-db": { + "version": "1.36.0", "dev": true }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true + "mime-types": { + "version": "2.1.20", + "dev": true, + "requires": { + "mime-db": "~1.36.0" + } }, - "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "mimic-response": { + "version": "2.1.0" }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "minimatch": { + "version": "3.0.4", "dev": true, "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "brace-expansion": "^1.1.7" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "minimist": { + "version": "0.0.8", "dev": true }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "requires": { - "is-extglob": "^2.1.0" + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, - "is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" - }, - "is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "requires": { - "is-unc-path": "^1.0.0" + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "requires": { - "unc-path-regex": "^0.1.2" + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "mixin-deep": { + "version": "1.3.2", "dev": true, + "optional": true, "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "is-extendable": { + "version": "1.0.1", "dev": true, + "optional": true, "requires": { - "abbrev": "1" + "is-plain-object": "^2.0.4" } } } }, - "jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "dev": true + "mkdirp": { + "version": "0.5.1", + "dev": true, + "requires": { + "minimist": "0.0.8" + } }, - "js-beautify": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.5.10.tgz", - "integrity": "sha1-TZU3FwJpk0SlFsomv1nwonu3Vxk=", + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "mocha": { + "version": "5.2.0", "dev": true, "requires": { - "config-chain": "~1.1.5", - "mkdirp": "~0.5.0", - "nopt": "~3.0.1" + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" }, "dependencies": { - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "commander": { + "version": "2.15.1", + "dev": true + }, + "debug": { + "version": "3.1.0", "dev": true, "requires": { - "abbrev": "1" + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "dev": true, + "requires": { + "has-flag": "^3.0.0" } } } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "ms": { + "version": "2.0.0" + }, + "nanomatch": { + "version": "1.2.13", "dev": true, + "optional": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true } } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "natural-compare": { + "version": "1.4.0", "dev": true }, - "jshint": { - "version": "2.13.4", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.4.tgz", - "integrity": "sha512-HO3bosL84b2qWqI0q+kpT/OpRJwo0R4ivgmxaO848+bo10rc50SkPnrtwSFXttW0ym4np8jbJvLwk5NziB7jIw==", - "dev": true, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "neo-async": { + "version": "2.6.1", + "dev": true + }, + "node-fetch": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "node-gyp": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", + "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" }, "dependencies": { - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", - "dev": true - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - } + "abbrev": "^1.0.0" } }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { - "domelementtype": "1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "glob": "^7.1.3" } }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } }, - "minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, + "tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "requires": { - "brace-expansion": "^1.1.7" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" } }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "isexe": "^2.0.0" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "nopt": { + "version": "3.0.6", + "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "abbrev": "1" } }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "normalize-path": { + "version": "2.1.1", "dev": true, "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "remove-trailing-separator": "^1.0.1" } }, - "keyv": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.1.1.tgz", - "integrity": "sha512-tGv1yP6snQVDSM4X6yxrv2zzq/EvpW+oYiUz6aueW1u9CtS8RzUQYxxmFwgZlO2jSgCxQbchhxaqXXp2hnKGpQ==", + "normalize-url": { + "version": "4.5.0" + }, + "now-and-later": { + "version": "2.0.0", + "dev": true, "requires": { - "json-buffer": "3.0.1" + "once": "^1.3.2" } }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "nth-check": { + "version": "1.0.1", "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "boolbase": "~1.0.0" } }, - "lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "number-is-nan": { + "version": "1.0.1" + }, + "oauth-sign": { + "version": "0.9.0", + "dev": true + }, + "object-assign": { + "version": "4.1.1" + }, + "object-copy": { + "version": "0.1.0", "dev": true, + "optional": true, "requires": { - "readable-stream": "^2.0.5" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "define-property": { + "version": "0.2.5", "dev": true, + "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "is-descriptor": "^0.1.0" } } } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "object-keys": { + "version": "1.0.12", + "dev": true + }, + "object-visit": { + "version": "1.0.1", "dev": true, + "optional": true, "requires": { - "invert-kv": "^1.0.0" + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } } }, - "lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", - "dev": true - }, - "lcov-result-merger": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lcov-result-merger/-/lcov-result-merger-3.1.0.tgz", - "integrity": "sha512-vGXaMNGZRr4cYvW+xMVg+rg7qd5DX9SbGXl+0S3k85+gRZVK4K7UvxPWzKb/qiMwe+4bx3EOrW2o4mbdb1WnsA==", + "object.assign": { + "version": "4.1.0", "dev": true, "requires": { - "through2": "^2.0.3", - "vinyl": "^2.1.0", - "vinyl-fs": "^3.0.2" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, - "lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "object.omit": { + "version": "2.0.1", "dev": true, + "optional": true, "requires": { - "flush-write-stream": "^1.0.2" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "object.pick": { + "version": "1.3.0", "dev": true, + "optional": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "once": { + "version": "1.4.0", "requires": { - "yallist": "^4.0.0" + "wrappy": "1" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "optimist": { + "version": "0.6.1", + "dev": true, "requires": { - "semver": "^6.0.0" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "wordwrap": { + "version": "0.0.3", + "dev": true } } }, - "make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "optionator": { + "version": "0.8.2", + "dev": true, "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==" - } + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "ordered-read-streams": { + "version": "1.0.1", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "os-homedir": { + "version": "1.0.2", "dev": true }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "os-locale": { + "version": "1.4.0", "dev": true, "requires": { - "mime-db": "1.52.0" + "lcid": "^1.0.0" } }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + "os-tmpdir": { + "version": "1.0.2", + "dev": true }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "output-file-sync": { + "version": "1.1.2", + "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "graceful-fs": "^4.1.4", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.0" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "p-cancelable": { + "version": "2.0.0" }, - "minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "p-event": { + "version": "4.1.0", "requires": { - "yallist": "^4.0.0" + "p-timeout": "^2.0.1" } }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "requires": { - "minipass": "^3.0.0" - } + "p-finally": { + "version": "1.0.0" }, - "minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "requires": { - "encoding": "^0.1.13", - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "yocto-queue": "^0.1.0" } }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "p-limit": "^3.0.2" } }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "requires": { - "minipass": "^3.0.0" + "aggregate-error": "^3.0.0" } }, - "minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "p-timeout": { + "version": "2.0.1", "requires": { - "minipass": "^3.0.0" + "p-finally": "^1.0.0" } }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "callsites": "^3.0.0" } }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "parse-glob": { + "version": "3.0.4", "dev": true, + "optional": true, "requires": { - "minimist": "^1.2.5" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "parse5": { + "version": "3.0.3", "dev": true, "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@types/node": "*" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "pascalcase": { + "version": "0.1.1", + "dev": true, + "optional": true }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + "path-dirname": { + "version": "1.0.2", + "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } + "path-is-absolute": { + "version": "1.0.1" }, - "node-gyp": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.0.tgz", - "integrity": "sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q==", - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "dependencies": { - "are-we-there-yet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", - "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "gauge": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", - "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "requires": { - "abbrev": "^1.0.0" - } - }, - "npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", - "requires": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", - "set-blocking": "^2.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } + "path-key": { + "version": "3.1.1", + "dev": true }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "requires": { - "abbrev": "1" - } + "path-parse": { + "version": "1.0.6", + "dev": true }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "performance-now": { + "version": "2.1.0", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "dev": true, + "optional": true + }, + "prelude-ls": { + "version": "1.1.2", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "dev": true, + "optional": true + }, + "prettier": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", + "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "fast-diff": "^1.1.2" } }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + "private": { + "version": "0.1.8", + "dev": true }, - "now-and-later": { + "process-nextick-args": { + "version": "2.0.0", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" + }, + "promise-retry": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "requires": { - "once": "^1.3.2" + "err-code": "^2.0.2", + "retry": "^0.12.0" } }, - "npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "proto-list": { + "version": "1.2.4", + "dev": true + }, + "psl": { + "version": "1.1.29", + "dev": true + }, + "pump": { + "version": "2.0.1", + "dev": true, "requires": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "pumpify": { + "version": "1.5.1", "dev": true, "requires": { - "boolbase": "^1.0.0" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "punycode": { + "version": "1.4.1", "dev": true }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "qs": { + "version": "6.5.2", "dev": true }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "querystring": { + "version": "0.2.0", + "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } + "rambda": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.4.0.tgz", + "integrity": "sha512-A9hihu7dUTLOUCM+I8E61V4kRXnN4DwYeK0DwCBydC1MqNI1PidyAtbtpsJlBBzK4icSctEcCQ1bGcLpBuETUQ==", + "dev": true }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "ramda": { + "version": "0.25.0" + }, + "randomatic": { + "version": "3.1.0", + "dev": true, + "optional": true, "requires": { - "wrappy": "1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true + } } }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "readable-stream": { + "version": "2.3.6", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "readdirp": { + "version": "2.2.1", "dev": true, + "optional": true, "requires": { - "readable-stream": "^2.0.1" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "arr-diff": { + "version": "4.0.0", "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "dev": true, + "optional": true + }, + "braces": { + "version": "2.3.2", + "dev": true, + "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "expand-brackets": { + "version": "2.1.4", + "dev": true, + "optional": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "dev": true, + "optional": true + } + } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "extglob": { + "version": "2.0.4", + "dev": true, + "optional": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true + }, + "micromatch": { + "version": "3.1.10", "dev": true, + "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } } } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, - "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "requires": { - "p-timeout": "^3.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } - }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "requires": { - "parse5": "^6.0.1" - } - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "regenerate": { + "version": "1.4.0", "dev": true }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "regenerator-runtime": { + "version": "0.11.1", "dev": true }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" - }, - "promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "regenerator-transform": { + "version": "0.10.1", + "dev": true, "requires": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" } }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "regex-cache": { + "version": "0.4.4", + "dev": true, + "optional": true, "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "is-equal-shallow": "^0.1.3" } }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "regex-not": { + "version": "1.0.2", "dev": true, + "optional": true, "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true + "regexpu-core": { + "version": "2.0.0", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } }, - "querystring": { + "regjsgen": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, - "ramda": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", - "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "regjsparser": { + "version": "0.1.5", + "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "dev": true + } } }, "remove-bom-buffer": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", "dev": true, "requires": { "is-buffer": "^1.1.5", @@ -7143,8 +13317,6 @@ }, "remove-bom-stream": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", "dev": true, "requires": { "remove-bom-buffer": "^3.0.0", @@ -7154,20 +13326,31 @@ }, "remove-trailing-separator": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, + "repeat-element": { + "version": "1.1.3", + "dev": true, + "optional": true + }, + "repeat-string": { + "version": "1.6.1", + "dev": true, + "optional": true + }, + "repeating": { + "version": "2.0.1", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, "replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "version": "1.0.0", "dev": true }, "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "version": "2.88.0", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -7177,7 +13360,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.3", + "har-validator": "~5.1.0", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -7187,102 +13370,242 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "dev": true + } } }, "resolve": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-options": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", "dev": true, "requires": { "value-or-function": "^3.0.0" } }, + "resolve-url": { + "version": "0.2.1", + "dev": true, + "optional": true + }, "responselike": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", "requires": { "lowercase-keys": "^2.0.0" } }, + "ret": { + "version": "0.1.15", + "dev": true, + "optional": true + }, "retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==" }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "version": "2.6.2", + "dev": true, "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "^7.0.5" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" } }, "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "version": "5.1.1" + }, + "safe-regex": { + "version": "1.1.0", + "dev": true, + "optional": true, + "requires": { + "ret": "~0.1.10" + } }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "devOptional": true }, "sax": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", "dev": true }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "set-blocking": { + "version": "2.0.0" + }, + "set-value": { + "version": "2.0.1", + "dev": true, + "optional": true, "requires": { - "lru-cache": "^6.0.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "set-blocking": { + "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "dev": true }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "slash": { + "version": "1.0.0", + "dev": true + }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, + "snapdragon": { + "version": "0.8.2", + "dev": true, + "optional": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "dev": true, + "optional": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "dev": true, + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "dev": true, + "optional": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.2.0" + } + }, "socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", @@ -7300,28 +13623,65 @@ "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "version": "0.5.7", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", "dev": true, "optional": true, "requires": { - "amdefine": ">=0.0.4" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "dev": true, + "optional": true + }, + "split-string": { + "version": "3.1.0", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^3.0.0" } }, "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.14.2", "dev": true, "requires": { "asn1": "~0.2.3", @@ -7340,75 +13700,76 @@ "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "requires": { - "minipass": "^3.1.1" + "minipass": "^3.1.1" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "static-extend": { + "version": "0.1.2", + "dev": true, + "optional": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "dev": true, + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "version": "1.0.0", "dev": true }, "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", "requires": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "1.0.2", "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "3.0.1", "requires": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - } - } + "version": "2.0.0", + "dev": true }, "tar-fs": { "version": "2.1.1", @@ -7421,10 +13782,14 @@ "tar-stream": "^2.1.4" }, "dependencies": { - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } } } }, @@ -7438,54 +13803,34 @@ "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { - "safe-buffer": "~5.1.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } }, + "text-table": { + "version": "0.2.0", + "dev": true + }, + "through2": { + "version": "2.0.3", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, "through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "version": "2.0.0", "dev": true, "requires": { "through2": "~2.0.0", @@ -7494,53 +13839,83 @@ }, "to-absolute-glob": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", "dev": true, "requires": { "is-absolute": "^1.0.0", "is-negated-glob": "^1.0.0" } }, + "to-fast-properties": { + "version": "1.0.3", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, "to-readable-stream": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-2.1.0.tgz", - "integrity": "sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w==" + "version": "2.1.0" + }, + "to-regex": { + "version": "3.0.2", + "dev": true, + "optional": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "dev": true, + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } }, "to-through": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", "dev": true, "requires": { "through2": "^2.0.3" } }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "2.4.3", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.24", + "punycode": "^1.4.1" } }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "trim-right": { + "version": "1.0.1", "dev": true }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -7548,37 +13923,55 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true + "dev": true, + "optional": true }, "type-check": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { "prelude-ls": "~1.1.2" } }, "type-fest": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.10.0.tgz", - "integrity": "sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw==" + "version": "0.10.0" }, "uglify-js": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.3.tgz", - "integrity": "sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==", + "version": "3.5.15", "dev": true, - "optional": true + "optional": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.20.0", + "dev": true, + "optional": true + }, + "source-map": { + "version": "0.6.1", + "dev": true, + "optional": true + } + } }, "unc-path-regex": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, + "union-value": { + "version": "1.0.1", + "dev": true, + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, "unique-filename": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", @@ -7596,33 +13989,77 @@ } }, "unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "version": "2.2.1", "dev": true, "requires": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" + "json-stable-stringify": "^1.0.0", + "through2-filter": "^2.0.0" } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "version": "0.1.2" + }, + "unset-value": { + "version": "1.0.0", + "dev": true, + "optional": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "dev": true, + "optional": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "dev": true, + "optional": true + }, + "isobject": { + "version": "3.0.1", + "dev": true, + "optional": true + } + } }, "uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "dev": true + } } }, + "urix": { + "version": "0.1.0", + "dev": true, + "optional": true + }, "url": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", "dev": true, "requires": { "punycode": "1.3.2", @@ -7631,33 +14068,52 @@ "dependencies": { "punycode": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", "dev": true } } }, + "use": { + "version": "3.1.1", + "dev": true, + "optional": true + }, + "user-home": { + "version": "1.1.1", + "dev": true + }, + "util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "version": "1.0.2" }, "uuid": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, + "v8flags": { + "version": "2.1.1", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, "value-or-function": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -7666,9 +14122,7 @@ } }, "vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "version": "2.2.0", "dev": true, "requires": { "clone": "^2.1.1", @@ -7681,8 +14135,6 @@ }, "vinyl-fs": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", "dev": true, "requires": { "fs-mkdirp-stream": "^1.0.0", @@ -7702,44 +14154,10 @@ "value-or-function": "^3.0.0", "vinyl": "^2.0.0", "vinyl-sourcemap": "^1.1.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "vinyl-sourcemap": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", "dev": true, "requires": { "append-buffer": "^1.0.2", @@ -7752,9 +14170,7 @@ } }, "walk": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", - "integrity": "sha512-4eRTBZljBfIISK1Vnt69Gvr2w/wc3U6Vtrw7qiN5iqYJPH7LElcYh/iU4XWhdCy2dZqv1ToMyYlybDylfG/5Vg==", + "version": "2.3.14", "dev": true, "requires": { "foreachasync": "^3.0.0" @@ -7763,12 +14179,12 @@ "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -7776,13 +14192,25 @@ }, "which": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" } }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, "wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -7793,78 +14221,29 @@ }, "window-size": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", "dev": true }, "word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wordwrap": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } } }, "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "version": "1.0.2" }, "xml2js": { "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "dev": true, "requires": { "sax": ">=0.6.0", @@ -7873,31 +14252,18 @@ }, "xmlbuilder": { "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "dev": true }, "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "version": "4.0.1", "dev": true }, "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "version": "3.2.1", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "yargs": { "version": "3.29.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.29.0.tgz", - "integrity": "sha1-GquWYOrnnYuPZ1vK7qtu40ws9pw=", "dev": true, "requires": { "camelcase": "^1.2.1", @@ -7907,6 +14273,12 @@ "window-size": "^0.1.2", "y18n": "^3.2.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 9aa2cf256..3463ced60 100644 --- a/package.json +++ b/package.json @@ -49,16 +49,24 @@ "tar-fs": "^2.1.1" }, "devDependencies": { + "@homer0/prettier-plugin-jsdoc": "^6.0.0", "aws-sdk": "^2.1095.0", + "babel-cli": "^6.7.7", + "babel-preset-es2015": "^6.6.0", "cheerio": "^1.0.0-rc.2", "clean-for-publish": "~1.0.2", "combyne": "~0.8.1", "coveralls": "^3.0.2", + "eslint": "^8.32.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-mocha": "^10.1.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", "istanbul": "^0.4.5", "js-beautify": "~1.5.10", - "jshint": "^2.10.0", "lcov-result-merger": "^3.1.0", "mocha": "^5.2.0", + "prettier": "^2.8.3", "walk": "^2.3.9" }, "binary": { @@ -76,7 +84,7 @@ "generateNativeCode": "node generate/scripts/generateNativeCode", "install": "node lifecycleScripts/preinstall && node lifecycleScripts/install", "installDebug": "BUILD_DEBUG=true npm install", - "lint": "jshint lib test/tests test/utils lifecycleScripts", + "lint": "eslint --fix . && prettier --write .", "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && ./lcov-1.10/bin/genhtml test/coverage/merged.lcov --output-directory test/coverage/report", "mocha": "mocha --expose-gc test/runner test/tests --timeout 15000", "mochaDebug": "mocha --expose-gc --inspect-brk test/runner test/tests --timeout 15000", From dd162720dfa0aed65a2e5296d598b45bded23247 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sat, 27 Feb 2021 18:20:13 +0100 Subject: [PATCH 2/6] add tsconfig.json to allow TypeScript linting --- .eslintignore | 4 ++++ .eslintrc.json | 3 ++- tsconfig.json | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore index d73482b1d..5f8a4f9c3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ +# auto-generated and third-party code /vendor /.travis /.github @@ -5,6 +6,9 @@ /include /generate/templates/templates/ +# Don't try to check .d.ts files +**/*.ts + # Gitignore /build/ /coverage/ diff --git a/.eslintrc.json b/.eslintrc.json index 01e24ab40..69232bfec 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,12 +23,13 @@ "no-shadow": "warn", "no-unused-vars": [ "error", + // allow unused vars starting with _ { "argsIgnorePattern": "^_", "ignoreRestSiblings": true, "varsIgnorePattern": "^_" } - ], // allow unused vars starting with _ + ], "node/no-missing-require": "warn", "prefer-const": "warn" } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..a64f50c1c --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "resolveJsonModule": true, + "downlevelIteration": true, + "jsx": "preserve", + // Check JS files too + "allowJs": true, + "checkJs": true, + // Used for temp builds + "outDir": "build" + }, + "exclude": [ + "build", + "coverage", + "dist", + "generate", + "include", + "lib/enums.js", + "lib/nodegit.js", + "node_modules", + "src", + "test", + "vendor" + ] +} From b1749d300fc14544a58b118b1009658e7c9a96ec Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 26 Jan 2023 09:31:09 +0100 Subject: [PATCH 3/6] jsdoc: fixes before lint fix --- lib/commit.js | 8 +- lib/convenient_patch.js | 3 +- lib/diff.js | 3 +- lib/index.js | 2 +- lib/remote.js | 27 +- lib/repository.js | 1781 +++++++++++++++++---------------------- lib/tree.js | 2 +- 7 files changed, 812 insertions(+), 1014 deletions(-) diff --git a/lib/commit.js b/lib/commit.js index 8eb561e58..048a98b9b 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -239,7 +239,7 @@ Commit.prototype.date = function() { * and its parent(s). * * @async - * @return {Array} an array of diffs + * @returns {Diff[]} an array of diffs */ Commit.prototype.getDiff = function() { return this.getDiffWithOptions(null); @@ -251,7 +251,7 @@ Commit.prototype.getDiff = function() { * * @async * @param {Object} options - * @return {Array} an array of diffs + * @returns {Diff[]} an array of diffs */ Commit.prototype.getDiffWithOptions = function(options) { var commit = this; @@ -293,7 +293,7 @@ Commit.prototype.getEntry = function(path) { * * @async * @param {number} limit Optional amount of parents to return. - * @return {Array} array of commits + * @returns {Commit[]} array of commits */ Commit.prototype.getParents = function(limit) { var parents = []; @@ -387,7 +387,7 @@ Commit.prototype.history = function() { * * @param {number} the position of the parent, starting from 0 * @async - * @return {Commit} the parent commit at the specified position + * @returns {Commit} the parent commit at the specified position */ Commit.prototype.parent = function (id) { var repository = this.repo; diff --git a/lib/convenient_patch.js b/lib/convenient_patch.js index 1e825382b..2670330ae 100644 --- a/lib/convenient_patch.js +++ b/lib/convenient_patch.js @@ -6,8 +6,7 @@ var hunks = ConvenientPatch.prototype.hunks; /** * The hunks in this patch * @async - * @return {Array} a promise that resolves to an array of - * ConvenientHunks + * @returns {Promise} */ ConvenientPatch.prototype.hunks = hunks; diff --git a/lib/diff.js b/lib/diff.js index 2ae41a62b..c63d99f20 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -59,8 +59,7 @@ Diff.blobToBuffer= function( * Retrieve patches in this difflist * * @async - * @return {Array} a promise that resolves to an array of - * ConvenientPatches + * @return {Promise} */ Diff.prototype.patches = function(idxs) { return Patch.convenientFromDiff(this, idxs); diff --git a/lib/index.js b/lib/index.js index ad37cea78..11774763c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13,7 +13,7 @@ Index.prototype.addAll = function(pathspec, flags, matchedCallback) { /** * Return an array of the entries in this index. - * @return {Array} an array of IndexEntrys + * @return {IndexEntry[]} */ Index.prototype.entries = function() { var size = this.entryCount(); diff --git a/lib/remote.js b/lib/remote.js index c0483ca87..c91776b6e 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -5,24 +5,22 @@ var lookupWrapper = NodeGit.Utils.lookupWrapper; var Remote = NodeGit.Remote; /** - * Retrieves the remote by name + * Retrieves the remote by name. + * + * @param {Repository} repo The repo that the remote lives in. + * @param {string | Remote} name The remote to lookup. + * @param {Function} callback + * @returns {Remote} * @async - * @param {Repository} repo The repo that the remote lives in - * @param {String|Remote} name The remote to lookup - * @param {Function} callback - * @return {Remote} */ Remote.lookup = lookupWrapper(Remote); /** - * Lists advertised references from a remote. You must connect to the remote - * before using referenceList. + * Lists advertised references from a remote. You must connect to the remote before using referenceList. * + * @returns {Promise} A list of the remote heads the remote had available at the last established + * connection. * @async - * @return {Promise>} a list of the remote heads the remote - * had available at the last established - * connection. - * */ Remote.prototype.referenceList = Remote.prototype.referenceList; @@ -30,7 +28,7 @@ NodeGit.Remote.COMPLETION_TYPE = {}; var DEPRECATED_STATES = { COMPLETION_DOWNLOAD: "DOWNLOAD", COMPLETION_INDEXING: "INDEXING", - COMPLETION_ERROR: "ERROR" + COMPLETION_ERROR: "ERROR", }; Object.keys(DEPRECATED_STATES).forEach((key) => { @@ -38,8 +36,7 @@ Object.keys(DEPRECATED_STATES).forEach((key) => { Object.defineProperty(NodeGit.Remote.COMPLETION_TYPE, key, { get: util.deprecate( () => NodeGit.Remote.COMPLETION[newKey], - `Use NodeGit.Remote.COMPLETION.${newKey} instead of ` + - `NodeGit.Remote.COMPLETION_TYPE.${key}.` - ) + `Use NodeGit.Remote.COMPLETION.${newKey} instead of ` + `NodeGit.Remote.COMPLETION_TYPE.${key}.` + ), }); }); diff --git a/lib/repository.js b/lib/repository.js index 64d566dcd..279a606a2 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -24,13 +24,12 @@ var _discover = Repository.discover; var _fetchheadForeach = Repository.prototype.fetchheadForeach; var _mergeheadForeach = Repository.prototype.mergeheadForeach; -function applySelectedLinesToTarget - (originalContent, newLines, pathHunks, isStaged, reverse) { +function applySelectedLinesToTarget(originalContent, newLines, pathHunks, isStaged, reverse) { // 43: ascii code for '+' // 45: ascii code for '-' var lineTypes = { ADDED: !reverse ? 43 : 45, - DELETED: !reverse ? 45 : 43 + DELETED: !reverse ? 45 : 43, }; var newContent = ""; var oldIndex = 0; @@ -44,15 +43,13 @@ function applySelectedLinesToTarget } function lineEqualsFirstNewLine(hunkLine) { - return ((hunkLine.oldLineno() === newLines[0].oldLineno()) && - (hunkLine.newLineno() === newLines[0].newLineno())); + return hunkLine.oldLineno() === newLines[0].oldLineno() && hunkLine.newLineno() === newLines[0].newLineno(); } function processSelectedLine(hunkLine) { // if this hunk line is a selected line find the selected line - var newLine = newLines.filter(function(nLine) { - return ((hunkLine.oldLineno() === nLine.oldLineno()) && - (hunkLine.newLineno() === nLine.newLineno())); + var newLine = newLines.filter(function (nLine) { + return hunkLine.oldLineno() === nLine.oldLineno() && hunkLine.newLineno() === nLine.newLineno(); }); if (hunkLine.content().indexOf("\\ No newline at end of file") !== -1) { @@ -60,17 +57,17 @@ function applySelectedLinesToTarget } // determine what to add to the new content - if ((isStaged && newLine && newLine.length > 0) || - (!isStaged && (!newLine || newLine.length === 0))) { + if ((isStaged && newLine && newLine.length > 0) || (!isStaged && (!newLine || newLine.length === 0))) { if (hunkLine.origin() !== lineTypes.ADDED) { newContent += hunkLine.content(); } - if ((isStaged && hunkLine.origin() !== lineTypes.DELETED) || - (!isStaged && hunkLine.origin() !== lineTypes.ADDED)) { + if ( + (isStaged && hunkLine.origin() !== lineTypes.DELETED) || + (!isStaged && hunkLine.origin() !== lineTypes.ADDED) + ) { oldIndex++; } - } - else { + } else { switch (hunkLine.origin()) { case lineTypes.ADDED: newContent += hunkLine.content(); @@ -94,18 +91,17 @@ function applySelectedLinesToTarget } // find the affected hunk - pathHunks.forEach(function(pathHunk) { + pathHunks.forEach(function (pathHunk) { linesPromises.push(pathHunk.lines()); }); - return Promise.all(linesPromises).then(function(results) { + return Promise.all(linesPromises).then(function (results) { for (var i = 0; i < results.length && newContent.length < 1; i++) { - var hunkStart = isStaged || reverse ? pathHunks[i].newStart() - : pathHunks[i].oldStart(); + var hunkStart = isStaged || reverse ? pathHunks[i].newStart() : pathHunks[i].oldStart(); var lines = results[i]; if (lines.filter(lineEqualsFirstNewLine).length > 0) { // add content that is before the hunk - while (hunkStart > (oldIndex + 1)) { + while (hunkStart > oldIndex + 1) { newContent += oldLines[oldIndex++] + "\n"; } @@ -114,8 +110,7 @@ function applySelectedLinesToTarget // add the rest of the file while (oldLines.length > oldIndex) { - newContent += oldLines[oldIndex++] + - (oldLines.length > oldIndex ? "\n" : ""); + newContent += oldLines[oldIndex++] + (oldLines.length > oldIndex ? "\n" : ""); } } } @@ -125,14 +120,17 @@ function applySelectedLinesToTarget } function getPathHunks(repo, index, filePath, isStaged, additionalDiffOptions) { - var diffOptions = additionalDiffOptions ? { - flags: additionalDiffOptions - } : undefined; + var diffOptions = additionalDiffOptions + ? { + flags: additionalDiffOptions, + } + : undefined; return Promise.resolve() - .then(function() { + .then(function () { if (isStaged) { - return repo.getHeadCommit() + return repo + .getHeadCommit() .then(function getTreeFromCommit(commit) { return commit.getTree(); }) @@ -145,22 +143,19 @@ function getPathHunks(repo, index, filePath, isStaged, additionalDiffOptions) { flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS | - (additionalDiffOptions || 0) + (additionalDiffOptions || 0), }); }) - .then(function(diff) { - return NodeGit.Status.file(repo, filePath) - .then(function(status) { - if (!(status & NodeGit.Status.STATUS.WT_MODIFIED) && - !(status & NodeGit.Status.STATUS.INDEX_MODIFIED)) { - return Promise.reject - ("Selected staging is only available on modified files."); - } - return diff.patches(); - }); + .then(function (diff) { + return NodeGit.Status.file(repo, filePath).then(function (status) { + if (!(status & NodeGit.Status.STATUS.WT_MODIFIED) && !(status & NodeGit.Status.STATUS.INDEX_MODIFIED)) { + return Promise.reject("Selected staging is only available on modified files."); + } + return diff.patches(); + }); }) - .then(function(patches) { - var pathPatch = patches.filter(function(patch) { + .then(function (patches) { + var pathPatch = patches.filter(function (patch) { return patch.newFile().path() === filePath; }); @@ -189,44 +184,29 @@ function getReflogMessageForCommit(commit) { } /** - * Goes through a rebase's rebase operations and commits them if there are - * no merge conflicts + * Goes through a rebase's rebase operations and commits them if there are no merge conflicts. * - * @param {Repository} repository The repository that the rebase is being - * performed in - * @param {Rebase} rebase The current rebase being performed - * @param {Signature} signature Identity of the one performing the rebase - * @param {Function} beforeNextFn Callback to be called before each - * invocation of next(). If the callback - * returns a promise, the next() will be - * called when the promise resolves. - * @param {Function} beforeFinishFn Callback called before the invocation - * of finish(). If the callback returns a - * promise, finish() will be called when the - * promise resolves. This callback will be - * provided a detailed overview of the rebase - * @return {Int|Index} An error code for an unsuccesful rebase or an index for - * a rebase with conflicts + * @param {Repository} repository The repository that the rebase is being performed in. + * @param {Rebase} rebase The current rebase being performed. + * @param {Signature} signature Identity of the one performing the rebase. + * @param {Function} beforeNextFn Callback to be called before each invocation of next(). If the callback returns a + * promise, the next() will be called when the promise resolves. + * @param {Function} beforeFinishFn Callback called before the invocation of finish(). If the callback returns a + * promise, finish() will be called when the promise resolves. This callback will be + * provided a detailed overview of the rebase. + * @returns {number | Index} An error code for an unsuccesful rebase or an index for a rebase with conflicts. */ -function performRebase( - repository, - rebase, - signature, - beforeNextFn, - beforeFinishFn -) { +function performRebase(repository, rebase, signature, beforeNextFn, beforeFinishFn) { var beforeNextFnResult; /* In the case of FF merges and a beforeFinishFn, this will fail * when looking for 'rewritten' so we need to handle that case. */ function readRebaseMetadataFile(fileName, continueOnError) { - return fse.readFile( - path.join(repository.path(), "rebase-merge", fileName), - { encoding: "utf8" } - ) + return fse + .readFile(path.join(repository.path(), "rebase-merge", fileName), { encoding: "utf8" }) .then(fp.trim) - .catch(function(err) { + .catch(function (err) { if (continueOnError) { return null; } @@ -239,78 +219,60 @@ function performRebase( } function getPromise() { - return rebase.next() - .then(function() { + return rebase + .next() + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { + .then(function (index) { if (index.hasConflicts()) { throw index; } return rebase.commit(null, signature); }) - .then(function() { - - return performRebase( - repository, - rebase, - signature, - beforeNextFn, - beforeFinishFn - ); + .then(function () { + return performRebase(repository, rebase, signature, beforeNextFn, beforeFinishFn); }) - .catch(function(error) { + .catch(function (error) { if (error && error.errno === NodeGit.Error.CODE.ITEROVER) { const calcRewritten = fp.cond([ [fp.isEmpty, fp.constant(null)], - [fp.stubTrue, fp.flow([ - fp.split("\n"), - fp.map(fp.split(" ")) - ])] + [fp.stubTrue, fp.flow([fp.split("\n"), fp.map(fp.split(" "))])], ]); - const beforeFinishFnPromise = !beforeFinishFn ? - Promise.resolve() : - Promise.all([ - readRebaseMetadataFile("onto_name"), - readRebaseMetadataFile("onto"), - readRebaseMetadataFile("head-name").then(calcHeadName), - readRebaseMetadataFile("orig-head"), - readRebaseMetadataFile("rewritten", true).then(calcRewritten) - ]) - .then(function([ - ontoName, - ontoSha, - originalHeadName, - originalHeadSha, - rewritten - ]) { + const beforeFinishFnPromise = !beforeFinishFn + ? Promise.resolve() + : Promise.all([ + readRebaseMetadataFile("onto_name"), + readRebaseMetadataFile("onto"), + readRebaseMetadataFile("head-name").then(calcHeadName), + readRebaseMetadataFile("orig-head"), + readRebaseMetadataFile("rewritten", true).then(calcRewritten), + ]).then(function ([ontoName, ontoSha, originalHeadName, originalHeadSha, rewritten]) { return beforeFinishFn({ ontoName, ontoSha, originalHeadName, originalHeadSha, rebase, - rewritten + rewritten, }); }); - return beforeFinishFnPromise - .then(function() { - return rebase.finish(signature); - }); + return beforeFinishFnPromise.then(function () { + return rebase.finish(signature); + }); } else { throw error; } }); } - if(beforeNextFn) { + if (beforeNextFn) { beforeNextFnResult = beforeNextFn(rebase); // if beforeNextFn returns a promise, chain the promise - return Promise.resolve(beforeNextFnResult) - .then(getPromise); + return Promise.resolve(beforeNextFnResult).then(getPromise); } return getPromise(); @@ -319,32 +281,28 @@ function performRebase( /** * Look for a git repository, returning its path. * + * @param {string} startPath The base path where the lookup starts. + * @param {number} acrossFs If non-zero, then the lookup will not stop when a filesystem device change is detected + * while exploring parent directories. + * @param {string} ceilingDirs A list of absolute symbolic link free paths. + * the search will stop if any of these paths are hit. This may be set to null. + * @returns {string} Path of the git repository. * @async - * @param {String} startPath The base path where the lookup starts. - * @param {Number} acrossFs If non-zero, then the lookup will not stop when a - filesystem device change is detected while exploring - parent directories. - * @param {String} ceilingDirs A list of absolute symbolic link free paths. - the search will stop if any of these paths - are hit. This may be set to null - * @return {String} Path of the git repository */ -Repository.discover = function(startPath, acrossFs, ceilingDirs) { - return _discover(startPath, acrossFs, ceilingDirs) - .then(function(foundPath) { - return path.resolve(foundPath); - }); +Repository.discover = function (startPath, acrossFs, ceilingDirs) { + return _discover(startPath, acrossFs, ceilingDirs).then(function (foundPath) { + return path.resolve(foundPath); + }); }; - -Repository.getReferences = function(repo, type, refNamesOnly) { - return repo.getReferences().then(function(refList) { - var filteredRefList = refList.filter(function(reference) { - return type === Reference.TYPE.ALL || reference.type( ) === type; +Repository.getReferences = function (repo, type, refNamesOnly) { + return repo.getReferences().then(function (refList) { + var filteredRefList = refList.filter(function (reference) { + return type === Reference.TYPE.ALL || reference.type() === type; }); if (refNamesOnly) { - return filteredRefList.map(function(reference) { + return filteredRefList.map(function (reference) { return reference.name(); }); } @@ -354,19 +312,17 @@ Repository.getReferences = function(repo, type, refNamesOnly) { }; /** - * This will set the HEAD to point to the local branch and then attempt - * to update the index and working tree to match the content of the - * latest commit on that branch + * This will set the HEAD to point to the local branch and then attempt to update the index and working tree to match + * the content of the latest commit on that branch. * + * @param {string | Reference} branch The branch to checkout. + * @param {Object | CheckoutOptions} opts The options to use for the checkout. * @async - * @param {String|Reference} branch the branch to checkout - * @param {Object|CheckoutOptions} opts the options to use for the checkout */ -Repository.prototype.checkoutBranch = function(branch, opts) { +Repository.prototype.checkoutBranch = function (branch, opts) { var repo = this; - return repo.getReference(branch) - .then(function(ref) { + return repo.getReference(branch).then(function (ref) { if (!ref.isBranch()) { return false; } @@ -375,60 +331,48 @@ Repository.prototype.checkoutBranch = function(branch, opts) { }; /** - * This will set the HEAD to point to the reference and then attempt - * to update the index and working tree to match the content of the - * latest commit on that reference + * This will set the HEAD to point to the reference and then attempt to update the index and working tree to match the + * content of the latest commit on that reference. * + * @param {Reference} reference The reference to checkout. + * @param {Object | CheckoutOptions} opts The options to use for the checkout. * @async - * @param {Reference} reference the reference to checkout - * @param {Object|CheckoutOptions} opts the options to use for the checkout */ -Repository.prototype.checkoutRef = function(reference, opts) { +Repository.prototype.checkoutRef = function (reference, opts) { var repo = this; opts = opts || {}; - opts.checkoutStrategy = opts.checkoutStrategy || - (NodeGit.Checkout.STRATEGY.SAFE | - NodeGit.Checkout.STRATEGY.RECREATE_MISSING); - return repo.getReferenceCommit(reference.name()) - .then(function(commit) { - return commit.getTree(); - }) - .then(function(tree) { - return Checkout.tree(repo, tree, opts); - }) - .then(function() { - var name = reference.name(); - return repo.setHead(name); - }); + opts.checkoutStrategy = + opts.checkoutStrategy || NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING; + return repo + .getReferenceCommit(reference.name()) + .then(function (commit) { + return commit.getTree(); + }) + .then(function (tree) { + return Checkout.tree(repo, tree, opts); + }) + .then(function () { + var name = reference.name(); + return repo.setHead(name); + }); }; /** - * Continues an existing rebase + * Continues an existing rebase. * + * @param {Signature} signature Identity of the one performing the rebase. + * @param {Function} beforeNextFn Callback to be called before each step of the rebase. If the callback returns + * a promise, the rebase will resume when the promise resolves. The rebase object + * is is passed to the callback. + * @param {Function} beforeFinishFn Callback called before the invocation of finish(). If the callback returns a + * promise, finish() will be called when the promise resolves. This callback will + * be provided a detailed overview of the rebase. + * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object with. + * @returns {Oid | Index} A commit id for a succesful merge or an index for a rebase with conflicts. * @async - * @param {Signature} signature Identity of the one performing the rebase - * @param {Function} beforeNextFn Callback to be called before each step - * of the rebase. If the callback returns a - * promise, the rebase will resume when the - * promise resolves. The rebase object is - * is passed to the callback. - * @param {Function} beforeFinishFn Callback called before the invocation - * of finish(). If the callback returns a - * promise, finish() will be called when the - * promise resolves. This callback will be - * provided a detailed overview of the rebase - * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object - * with - * @return {Oid|Index} A commit id for a succesful merge or an index for a - * rebase with conflicts */ -Repository.prototype.continueRebase = function( - signature, - beforeNextFn, - beforeFinishFn, - rebaseOptions -) { +Repository.prototype.continueRebase = function (signature, beforeNextFn, beforeFinishFn, rebaseOptions) { const repo = this; let rebase; @@ -453,28 +397,21 @@ Repository.prototype.continueRebase = function( }) .then((_rebase) => { rebase = _rebase; - return rebase.commit(null, signature) - .catch((e) => { - // If the first commit on continueRebase is a - // "patch already applied" error, - // interpret that as an explicit "skip commit" - // and ignore the error. - const errno = fp.get(["errno"], e); - if (errno === NodeGit.Error.CODE.EAPPLIED) { - return; - } + return rebase.commit(null, signature).catch((e) => { + // If the first commit on continueRebase is a + // "patch already applied" error, + // interpret that as an explicit "skip commit" + // and ignore the error. + const errno = fp.get(["errno"], e); + if (errno === NodeGit.Error.CODE.EAPPLIED) { + return; + } - throw e; - }); + throw e; + }); }) .then(() => { - return performRebase( - repo, - rebase, - signature, - beforeNextFn, - beforeFinishFn - ); + return performRebase(repo, rebase, signature, beforeNextFn, beforeFinishFn); }) .then((error) => { if (error) { @@ -486,61 +423,50 @@ Repository.prototype.continueRebase = function( }; /** - * Creates a branch with the passed in name pointing to the commit + * Creates a branch with the passed in name pointing to the commit. * + * @param {string} name Branch name, e.g. "master". + * @param {Commit | string | Oid} commit The commit the branch will point to. + * @param {boolean} force Overwrite branch if it exists. + * @returns {Reference} * @async - * @param {String} name Branch name, e.g. "master" - * @param {Commit|String|Oid} commit The commit the branch will point to - * @param {Boolean} force Overwrite branch if it exists - * @return {Reference} */ -Repository.prototype.createBranch = function(name, commit, force) { +Repository.prototype.createBranch = function (name, commit, force) { var repo = this; if (commit instanceof Commit) { - return NodeGit.Branch.create( - repo, - name, - commit, - force ? 1 : 0); - } - else { - return repo.getCommit(commit).then(function(commit) { - return NodeGit.Branch.create( - repo, - name, - commit, - force ? 1 : 0); + return NodeGit.Branch.create(repo, name, commit, force ? 1 : 0); + } else { + return repo.getCommit(commit).then(function (commit) { + return NodeGit.Branch.create(repo, name, commit, force ? 1 : 0); }); } }; /** - * Create a blob from a buffer + * Create a blob from a buffer. * - * @async * @param {Buffer} buffer - * @return {Oid} + * @returns {Oid} + * @async */ -Repository.prototype.createBlobFromBuffer = function(buffer) { +Repository.prototype.createBlobFromBuffer = function (buffer) { return Blob.createFromBuffer(this, buffer, buffer.length); }; /** - * Create a commit + * Create a commit. * + * @param {string} updateRef + * @param {Signature} author + * @param {Signature} committer + * @param {string} message + * @param {Oid | string} Tree + * @param {Array} parents + * @returns {Oid} The oid of the commit. * @async - * @param {String} updateRef - * @param {Signature} author - * @param {Signature} committer - * @param {String} message - * @param {Oid|String} Tree - * @param {Array} parents - * @return {Oid} The oid of the commit */ -Repository.prototype.createCommit = function( - updateRef, author, committer, message, tree, parents) { - +Repository.prototype.createCommit = function (updateRef, author, committer, message, tree, parents) { var repo = this; var promises = []; @@ -548,11 +474,11 @@ Repository.prototype.createCommit = function( promises.push(repo.getTree(tree)); - parents.forEach(function(parent) { + parents.forEach(function (parent) { promises.push(repo.getCommit(parent)); }); - return Promise.all(promises).then(function(results) { + return Promise.all(promises).then(function (results) { tree = results[0]; // Get the normalized values for our input into the function @@ -578,56 +504,54 @@ Repository.prototype.createCommit = function( }; /** - * Create a commit + * Create a commit. * + * @param {Signature} author + * @param {Signature} committer + * @param {string} message + * @param {Oid | string} treeOid + * @param {Array} parents + * @returns {Promise} The content of the commit object as a string. * @async - * @param {Signature} author - * @param {Signature} committer - * @param {String} message - * @param {Oid|String} treeOid - * @param {Array} parents - * @return {String} The content of the commit object - * as a string */ -Repository.prototype.createCommitBuffer = function( - author, committer, message, treeOid, parents) { - +Repository.prototype.createCommitBuffer = function (author, committer, message, treeOid, parents) { const repo = this; - const promises = (parents || []) - .reduce(function(acc, parent) { + const promises = (parents || []).reduce( + function (acc, parent) { acc.push(repo.getCommit(parent)); return acc; - }, [repo.getTree(treeOid)]); + }, + [repo.getTree(treeOid)] + ); - return Promise.all(promises) - .then(function([tree, ...parentCommits]) { - return Commit.createBuffer( - repo, - author, - committer, - null /* use default message encoding */, - message, - tree, - parentCommits.length, - parentCommits - ); - }); + return Promise.all(promises).then(function ([tree, ...parentCommits]) { + return Commit.createBuffer( + repo, + author, + committer, + null /* use default message encoding */, + message, + tree, + parentCommits.length, + parentCommits + ); + }); }; /** - * Create a commit that is digitally signed + * Create a commit that is digitally signed. * + * @param {string} updateRef + * @param {Signature} author + * @param {Signature} committer + * @param {string} message + * @param {Tree | Oid | string} tree + * @param {Array} parents + * @param {Function} onSignature Callback to be called with string to be signed. + * @returns {Oid} The oid of the commit. * @async - * @param {String} updateRef - * @param {Signature} author - * @param {Signature} committer - * @param {String} message - * @param {Tree|Oid|String} Tree - * @param {Array} parents - * @param {Function} onSignature Callback to be called with string to be signed - * @return {Oid} The oid of the commit */ -Repository.prototype.createCommitWithSignature = function( +Repository.prototype.createCommitWithSignature = function ( updateRef, author, committer, @@ -636,7 +560,6 @@ Repository.prototype.createCommitWithSignature = function( parents, onSignature ) { - var repo = this; var promises = []; var commitContent; @@ -646,198 +569,175 @@ Repository.prototype.createCommitWithSignature = function( promises.push(repo.getTree(tree)); - parents.forEach(function(parent) { + parents.forEach(function (parent) { promises.push(repo.getCommit(parent)); }); - const createCommitPromise = Promise.all(promises).then(function(results) { - tree = results[0]; + const createCommitPromise = Promise.all(promises) + .then(function (results) { + tree = results[0]; - // Get the normalized values for our input into the function - var parentsLength = parents.length; - parents = []; + // Get the normalized values for our input into the function + var parentsLength = parents.length; + parents = []; - for (var i = 0; i < parentsLength; i++) { - parents.push(results[i + 1]); - } + for (var i = 0; i < parentsLength; i++) { + parents.push(results[i + 1]); + } - return Commit.createBuffer( - repo, - author, - committer, - null /* use default message encoding */, - message, - tree, - parents.length, - parents - ); - }).then(function(commitContentResult) { - commitContent = commitContentResult; - if (!commitContent.endsWith("\n")) { - commitContent += "\n"; - } - return onSignature(commitContent); - }).then(function({ code, field, signedData }) { - switch (code) { - case NodeGit.Error.CODE.OK: - return Commit.createWithSignature( - repo, - commitContent, - signedData, - field - ); - case NodeGit.Error.CODE.PASSTHROUGH: - skippedSigning = true; - return Commit.create( - repo, - updateRef, - author, - committer, - null /* use default message encoding */, - message, - tree, - parents.length, - parents - ); - default: { - const error = new Error( - "Repository.prototype.createCommitWithSignature " + - `threw with error code ${code}` - ); - error.errno = code; - throw error; + return Commit.createBuffer( + repo, + author, + committer, + null /* use default message encoding */, + message, + tree, + parents.length, + parents + ); + }) + .then(function (commitContentResult) { + commitContent = commitContentResult; + if (!commitContent.endsWith("\n")) { + commitContent += "\n"; } - } - }); + return onSignature(commitContent); + }) + .then(function ({ code, field, signedData }) { + switch (code) { + case NodeGit.Error.CODE.OK: + return Commit.createWithSignature(repo, commitContent, signedData, field); + case NodeGit.Error.CODE.PASSTHROUGH: + skippedSigning = true; + return Commit.create( + repo, + updateRef, + author, + committer, + null /* use default message encoding */, + message, + tree, + parents.length, + parents + ); + default: { + const error = new Error("Repository.prototype.createCommitWithSignature " + `threw with error code ${code}`); + error.errno = code; + throw error; + } + } + }); if (!updateRef) { return createCommitPromise; } - return createCommitPromise - .then(function(commitOid) { - if (skippedSigning) { - return commitOid; - } + return createCommitPromise.then(function (commitOid) { + if (skippedSigning) { + return commitOid; + } - return repo.getCommit(commitOid) - .then(function(commitResult) { - return Reference.updateTerminal( - repo, - updateRef, - commitOid, - getReflogMessageForCommit(commitResult), - committer - ); - }) - .then(function() { - return commitOid; - }); + return repo + .getCommit(commitOid) + .then(function (commitResult) { + return Reference.updateTerminal(repo, updateRef, commitOid, getReflogMessageForCommit(commitResult), committer); + }) + .then(function () { + return commitOid; }); + }); }; /** - * Creates a new commit on HEAD from the list of passed in files + * Creates a new commit on HEAD from the list of passed in files. * - * @async - * @param {Array} filesToAdd + * @param {Array} filesToAdd * @param {Signature} author * @param {Signature} committer - * @param {String} message - * @return {Oid} The oid of the new commit + * @param {string} message + * @returns {Oid} The oid of the new commit. + * @async */ -Repository.prototype.createCommitOnHead = function( - filesToAdd, - author, - committer, - message) { - +Repository.prototype.createCommitOnHead = function (filesToAdd, author, committer, message) { var repo = this; - return repo.refreshIndex() - .then(function(index) { + return repo + .refreshIndex() + .then(function (index) { if (!filesToAdd) { filesToAdd = []; } return filesToAdd - .reduce(function(lastFilePromise, filePath) { - return lastFilePromise - .then(function() { - return index.addByPath(filePath); - }); + .reduce(function (lastFilePromise, filePath) { + return lastFilePromise.then(function () { + return index.addByPath(filePath); + }); }, Promise.resolve()) - .then(function() { + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(treeOid) { - return repo.getHeadCommit() - .then(function(parent) { - if (parent !== null) { // To handle a fresh repo with no commits - parent = [parent]; - } - return repo.createCommit( - "HEAD", - author, - committer, - message, - treeOid, - parent - ); - }); + .then(function (treeOid) { + return repo.getHeadCommit().then(function (parent) { + if (parent !== null) { + // To handle a fresh repo with no commits + parent = [parent]; + } + return repo.createCommit("HEAD", author, committer, message, treeOid, parent); + }); }); }; /** - * Creates a new lightweight tag + * Creates a new lightweight tag. * + * @param {string | Oid} oid string sha or Oid. + * @param {string} name The name of the tag. + * @returns {Reference} * @async - * @param {String|Oid} String sha or Oid - * @param {String} name the name of the tag - * @return {Reference} */ -Repository.prototype.createLightweightTag = function(oid, name) { +Repository.prototype.createLightweightTag = function (oid, name) { var repository = this; return Commit.lookup(repository, oid) - .then(function(commit) { + .then(function (commit) { // Final argument is `force` which overwrites any previous tag return Tag.createLightweight(repository, name, commit, 0); }) - .then(function() { + .then(function () { return Reference.lookup(repository, "refs/tags/" + name); }); }; /** * Instantiate a new revision walker for browsing the Repository"s history. - * See also `Commit.prototype.history()` + * See also `Commit.prototype.history()`. * - * @return {Revwalk} + * @returns {Revwalk} */ -Repository.prototype.createRevWalk = function() { +Repository.prototype.createRevWalk = function () { return Revwalk.create(this); }; /** - * Creates a new annotated tag + * Creates a new annotated tag. * + * @param {string | Oid} oid string sha or Oid. + * @param {string} name The name of the tag. + * @param {string} message The description that will be attached to the annotated tag. + * @returns {Tag} * @async - * @param {String|Oid} String sha or Oid - * @param {String} name the name of the tag - * @param {String} message the description that will be attached to the - * annotated tag - * @return {Tag} */ -Repository.prototype.createTag = function(oid, name, message) { +Repository.prototype.createTag = function (oid, name, message) { const repository = this; let signature = null; - return repository.defaultSignature() + return repository + .defaultSignature() .then((signatureResult) => { signature = signatureResult; return Commit.lookup(repository, oid); @@ -852,12 +752,12 @@ Repository.prototype.createTag = function(oid, name, message) { }; /** - * Gets the default signature for the default user and now timestamp + * Gets the default signature for the default user and now timestamp. * + * @returns {Signature} * @async - * @return {Signature} */ -Repository.prototype.defaultSignature = function() { +Repository.prototype.defaultSignature = function () { return NodeGit.Signature.default(this) .then((result) => { if (!result || !result.name()) { @@ -873,10 +773,10 @@ Repository.prototype.defaultSignature = function() { /** * Deletes a tag from a repository by the tag name. * + * @param {string} name short or full tag name. * @async - * @param {String} Short or full tag name */ -Repository.prototype.deleteTagByName = function(name) { +Repository.prototype.deleteTagByName = function (name) { var repository = this; name = ~name.indexOf("refs/tags/") ? name.substr(10) : name; @@ -888,32 +788,25 @@ Repository.prototype.deleteTagByName = function(name) { * Discard line selection of a specified file. * Assumes selected lines are unstaged. * + * @param {string} filePath The relative path of this file in the repo. + * @param {Array} selectedLines The array of DiffLine objects selected for discarding. + * @returns {number} 0 or an error code. * @async - * @param {String} filePath The relative path of this file in the repo - * @param {Array} selectedLines The array of DiffLine objects - * selected for discarding - * @return {Number} 0 or an error code */ -Repository.prototype.discardLines = - function(filePath, selectedLines, additionalDiffOptions) { +Repository.prototype.discardLines = function (filePath, selectedLines, additionalDiffOptions) { var repo = this; var fullFilePath = path.join(repo.workdir(), filePath); var index; var originalContent; var filterList; - return repo.refreshIndex() - .then(function(indexResult) { + return repo + .refreshIndex() + .then(function (indexResult) { index = indexResult; - return FilterList.load( - repo, - null, - filePath, - Filter.MODE.CLEAN, - Filter.FLAG.DEFAULT - ); + return FilterList.load(repo, null, filePath, Filter.MODE.CLEAN, Filter.FLAG.DEFAULT); }) - .then(function(_filterList) { + .then(function (_filterList) { filterList = _filterList; if (filterList) { @@ -922,77 +815,63 @@ Repository.prototype.discardLines = return fse.readFile(fullFilePath, "utf8"); }) - .then(function(content) { + .then(function (content) { originalContent = content; return getPathHunks(repo, index, filePath, false, additionalDiffOptions); }) - .then(function(hunks) { - return applySelectedLinesToTarget( - originalContent, selectedLines, hunks, false, true - ); + .then(function (hunks) { + return applySelectedLinesToTarget(originalContent, selectedLines, hunks, false, true); }) - .then(function(newContent) { - return FilterList.load( - repo, - null, - filePath, - Filter.MODE.SMUDGE, - Filter.FLAG.DEFAULT - ) - .then(function(_filterList) { - filterList = _filterList; - if (filterList) { - /* jshint ignore:start */ - // We need the constructor for the check in NodeGit's C++ layer - // to accept an object, and this seems to be a nice way to do it - return filterList.applyToData(new String(newContent)); - /* jshint ignore:end */ - } + .then(function (newContent) { + return FilterList.load(repo, null, filePath, Filter.MODE.SMUDGE, Filter.FLAG.DEFAULT).then(function ( + _filterList + ) { + filterList = _filterList; + if (filterList) { + /* jshint ignore:start */ + // We need the constructor for the check in NodeGit's C++ layer + // to accept an object, and this seems to be a nice way to do it + return filterList.applyToData(new String(newContent)); + /* jshint ignore:end */ + } - return newContent; - }); + return newContent; + }); }) - .then(function(filteredContent) { + .then(function (filteredContent) { return fse.writeFile(fullFilePath, filteredContent); }); }; /** - * Fetches from a remote + * Fetches from a remote. * + * @param {string | Remote} remote + * @param {Object | FetchOptions} fetchOptions Options for the fetch, includes callbacks for fetching. * @async - * @param {String|Remote} remote - * @param {Object|FetchOptions} fetchOptions Options for the fetch, includes - * callbacks for fetching */ -Repository.prototype.fetch = function( - remote, - fetchOptions) -{ +Repository.prototype.fetch = function (remote, fetchOptions) { var repo = this; - return repo.getRemote(remote) - .then(function(remote) { - return remote.fetch(null, fetchOptions, "Fetch from " + remote) - .then(function() { - return remote.disconnect(); - }); + return repo.getRemote(remote).then(function (remote) { + return remote.fetch(null, fetchOptions, "Fetch from " + remote).then(function () { + return remote.disconnect(); }); + }); }; /** - * Fetches from all remotes. This is done in series due to deadlocking issues - * with fetching from many remotes that can happen. + * Fetches from all remotes. This is done in series due to deadlocking issues with fetching from many remotes that can + * happen. * + * @param {Object | FetchOptions} fetchOptions Options for the fetch, includes callbacks for fetching. * @async - * @param {Object|FetchOptions} fetchOptions Options for the fetch, includes - * callbacks for fetching */ -Repository.prototype.fetchAll = function(fetchOptions) { +Repository.prototype.fetchAll = function (fetchOptions) { var repo = this; function createCallbackWrapper(fn, remote) { - return function() { + return function () { var args = Array.prototype.slice.call(arguments); args.push(remote); @@ -1008,123 +887,117 @@ Repository.prototype.fetchAll = function(fetchOptions) { var certificateCheck = remoteCallbacks.certificateCheck; var transferProgress = remoteCallbacks.transferProgress; - return repo.getRemoteNames() - .then(function(remotes) { - return remotes.reduce(function(fetchPromise, remote) { - var wrappedFetchOptions = shallowClone(fetchOptions); - var wrappedRemoteCallbacks = shallowClone(remoteCallbacks); + return repo.getRemoteNames().then(function (remotes) { + return remotes.reduce(function (fetchPromise, remote) { + var wrappedFetchOptions = shallowClone(fetchOptions); + var wrappedRemoteCallbacks = shallowClone(remoteCallbacks); - if (credentials) { - wrappedRemoteCallbacks.credentials = - createCallbackWrapper(credentials, remote); - } + if (credentials) { + wrappedRemoteCallbacks.credentials = createCallbackWrapper(credentials, remote); + } - if (certificateCheck) { - wrappedRemoteCallbacks.certificateCheck = - createCallbackWrapper(certificateCheck, remote); - } + if (certificateCheck) { + wrappedRemoteCallbacks.certificateCheck = createCallbackWrapper(certificateCheck, remote); + } - if (transferProgress) { - wrappedRemoteCallbacks.transferProgress = - createCallbackWrapper(transferProgress, remote); - } + if (transferProgress) { + wrappedRemoteCallbacks.transferProgress = createCallbackWrapper(transferProgress, remote); + } - wrappedFetchOptions.callbacks = wrappedRemoteCallbacks; + wrappedFetchOptions.callbacks = wrappedRemoteCallbacks; - return fetchPromise.then(function() { - return repo.fetch(remote, wrappedFetchOptions); - }); - }, Promise.resolve()); - }); + return fetchPromise.then(function () { + return repo.fetch(remote, wrappedFetchOptions); + }); + }, Promise.resolve()); + }); }; /** + * @param {FetchheadForeachCb} callback The callback function to be called on each entry. * @async - * @param {FetchheadForeachCb} callback The callback function to be called on - * each entry */ -Repository.prototype.fetchheadForeach = function(callback) { +Repository.prototype.fetchheadForeach = function (callback) { return _fetchheadForeach.call(this, callback, null); }; /** * Retrieve the blob represented by the oid. * + * @param {string | Oid} oid string sha or Oid. + * @returns {Blob} * @async - * @param {String|Oid} String sha or Oid - * @return {Blob} */ -Repository.prototype.getBlob = function(oid) { +Repository.prototype.getBlob = function (oid) { var repository = this; - return Blob.lookup(repository, oid).then(function(blob) { + return Blob.lookup(repository, oid).then(function (blob) { blob.repo = repository; return blob; }); }; /** -* Look up a branch. Alias for `getReference` -* -* @async -* @param {String|Reference} name Ref name, e.g. "master", "refs/heads/master" -* or Branch Ref -* @return {Reference} -*/ -Repository.prototype.getBranch = function(name) { + * Look up a branch. Alias for `getReference`. + * + * @param {string | Reference} name Ref name, e.g. "master", "refs/heads/master" + * or Branch Ref. + * @returns {Reference} + * @async + */ +Repository.prototype.getBranch = function (name) { return this.getReference(name); }; /** -* Look up a branch's most recent commit. Alias to `getReferenceCommit` -* -* @async -* @param {String|Reference} name Ref name, e.g. "master", "refs/heads/master" -* or Branch Ref -* @return {Commit} -*/ -Repository.prototype.getBranchCommit = function(name) { + * Look up a branch's most recent commit. Alias to `getReferenceCommit`. + * + * @param {string | Reference} name Ref name, e.g. "master", "refs/heads/master" + * or Branch Ref. + * @returns {Commit} + * @async + */ +Repository.prototype.getBranchCommit = function (name) { return this.getReferenceCommit(name); }; /** * Retrieve the commit identified by oid. * + * @param {string | Oid} oid string sha or Oid. + * @returns {Commit} * @async - * @param {String|Oid} String sha or Oid - * @return {Commit} */ -Repository.prototype.getCommit = function(oid) { +Repository.prototype.getCommit = function (oid) { var repository = this; return Commit.lookup(repository, oid); }; /** - * Gets the branch that HEAD currently points to - * Is an alias to head() + * Gets the branch that HEAD currently points to Is an alias to head(). * + * @returns {Reference} * @async - * @return {Reference} */ -Repository.prototype.getCurrentBranch = function() { +Repository.prototype.getCurrentBranch = function () { return this.head(); }; /** - * Retrieve the commit that HEAD is currently pointing to + * Retrieve the commit that HEAD is currently pointing to. * + * @returns {Commit} * @async - * @return {Commit} */ -Repository.prototype.getHeadCommit = function() { +Repository.prototype.getHeadCommit = function () { var repo = this; return Reference.nameToId(repo, "HEAD") - .then(function(head) { + .then(function (head) { return repo.getCommit(head); }) - .catch(function() { + .catch(function () { return null; }); }; @@ -1132,27 +1005,27 @@ Repository.prototype.getHeadCommit = function() { /** * Retrieve the master branch commit. * + * @returns {Commit} * @async - * @return {Commit} */ -Repository.prototype.getMasterCommit = function() { +Repository.prototype.getMasterCommit = function () { return this.getBranchCommit("master"); }; /** * Lookup the reference with the given name. * + * @param {string | Reference} name Ref name, e.g. "master", "refs/heads/master" + * or Branch Ref. + * @returns {Reference} * @async - * @param {String|Reference} name Ref name, e.g. "master", "refs/heads/master" - * or Branch Ref - * @return {Reference} */ -Repository.prototype.getReference = function(name) { +Repository.prototype.getReference = function (name) { var repository = this; - return Reference.dwim(this, name).then(function(reference) { + return Reference.dwim(this, name).then(function (reference) { if (reference.isSymbolic()) { - return reference.resolve().then(function(reference) { + return reference.resolve().then(function (reference) { reference.repo = repository; return reference; }); @@ -1166,15 +1039,15 @@ Repository.prototype.getReference = function(name) { /** * Look up a refs's commit. * + * @param {string | Reference} name Ref name, e.g. "master", "refs/heads/master" + * or Branch Ref. + * @returns {Commit} * @async - * @param {String|Reference} name Ref name, e.g. "master", "refs/heads/master" - * or Branch Ref - * @return {Commit} */ -Repository.prototype.getReferenceCommit = function(name) { +Repository.prototype.getReferenceCommit = function (name) { var repository = this; - return this.getReference(name).then(function(reference) { + return this.getReference(name).then(function (reference) { return repository.getCommit(reference.target()); }); }; @@ -1182,30 +1055,30 @@ Repository.prototype.getReferenceCommit = function(name) { /** * Lookup reference names for a repository. * + * @param {Reference.TYPE} type Type of reference to look up. + * @returns {string[]} * @async - * @param {Reference.TYPE} type Type of reference to look up - * @return {Array} */ -Repository.prototype.getReferenceNames = function(type) { +Repository.prototype.getReferenceNames = function (type) { return Repository.getReferences(this, type, true); }; /** * Lookup references for a repository. * + * @param {Reference.TYPE} type Type of reference to look up. + * @returns {Reference[]} * @async - * @param {Reference.TYPE} type Type of reference to look up - * @return {Array} */ /** - * Gets a remote from the repo + * Gets a remote from the repo. * + * @param {string | Remote} remote + * @returns {Promise} The remote object. * @async - * @param {String|Remote} remote - * @return {Remote} The remote object */ -Repository.prototype.getRemote = function(remote) { +Repository.prototype.getRemote = function (remote) { if (remote instanceof NodeGit.Remote) { return Promise.resolve(remote); } @@ -1214,85 +1087,84 @@ Repository.prototype.getRemote = function(remote) { }; /** -* Lists out the remotes in the given repository. -* -* @async -* @return {Object} Promise object. -*/ -Repository.prototype.getRemoteNames = function() { + * Lists out the remotes in the given repository. + * + * @returns {Promise} Promise object. + * @async + */ +Repository.prototype.getRemoteNames = function () { return Remote.list(this); }; /** - * Get the status of a repo to it's working directory + * Get the status of a repo to it's working directory. * - * @async * @param {obj} opts - * @return {Array} + * @returns {Promise} + * @async */ -Repository.prototype.getStatus = function(opts) { +Repository.prototype.getStatus = function (opts) { var statuses = []; - var statusCallback = function(path, status) { - statuses.push(new StatusFile({path: path, status: status})); + var statusCallback = function (path, status) { + statuses.push(new StatusFile({ path: path, status: status })); }; if (!opts) { opts = { - flags: Status.OPT.INCLUDE_UNTRACKED | - Status.OPT.RECURSE_UNTRACKED_DIRS + flags: Status.OPT.INCLUDE_UNTRACKED | Status.OPT.RECURSE_UNTRACKED_DIRS, }; } - return Status.foreachExt(this, opts, statusCallback).then(function() { + return Status.foreachExt(this, opts, statusCallback).then(function () { return statuses; }); }; /** - * Get extended statuses of a repo to it's working directory. Status entries - * have `status`, `headToIndex` delta, and `indexToWorkdir` deltas + * Get extended statuses of a repo to it's working directory. Status entries have `status`, `headToIndex` delta, and + * `indexToWorkdir` deltas. * - * @async * @param {obj} opts - * @return {Array} + * @returns {Promise} + * @async */ -Repository.prototype.getStatusExt = function(opts) { +Repository.prototype.getStatusExt = function (opts) { var statuses = []; if (!opts) { opts = { - flags: Status.OPT.INCLUDE_UNTRACKED | - Status.OPT.RECURSE_UNTRACKED_DIRS | - Status.OPT.RENAMES_INDEX_TO_WORKDIR | - Status.OPT.RENAMES_HEAD_TO_INDEX | - Status.OPT.RENAMES_FROM_REWRITES + flags: + Status.OPT.INCLUDE_UNTRACKED | + Status.OPT.RECURSE_UNTRACKED_DIRS | + Status.OPT.RENAMES_INDEX_TO_WORKDIR | + Status.OPT.RENAMES_HEAD_TO_INDEX | + Status.OPT.RENAMES_FROM_REWRITES, }; } - return StatusList.create(this, opts) - .then(function(list) { - for (var i = 0; i < list.entrycount(); i++) { - var entry = Status.byIndex(list, i); - statuses.push(new StatusFile({entry: entry})); - } + return StatusList.create(this, opts).then(function (list) { + for (var i = 0; i < list.entrycount(); i++) { + var entry = Status.byIndex(list, i); + statuses.push(new StatusFile({ entry: entry })); + } - return statuses; - }); + return statuses; + }); }; /** * Get the names of the submodules in the repository. * + * @returns {Promise} * @async - * @return {Array} */ -Repository.prototype.getSubmoduleNames = function() { +Repository.prototype.getSubmoduleNames = function () { var names = []; - var submoduleCallback = function(submodule, name, payload) { + var submoduleCallback = function (submodule, name, payload) { names.push(name); }; - return Submodule.foreach(this, submoduleCallback).then(function() { + return Submodule.foreach(this, submoduleCallback).then(function () { return names; }); }; @@ -1300,14 +1172,14 @@ Repository.prototype.getSubmoduleNames = function() { /** * Retrieve the tag represented by the oid. * + * @param {string | Oid} String Sha or Oid. + * @returns {Tag} * @async - * @param {String|Oid} String sha or Oid - * @return {Tag} */ -Repository.prototype.getTag = function(oid) { +Repository.prototype.getTag = function (oid) { var repository = this; - return Tag.lookup(repository, oid).then(function(reference) { + return Tag.lookup(repository, oid).then(function (reference) { reference.repo = repository; return reference; }); @@ -1316,19 +1188,20 @@ Repository.prototype.getTag = function(oid) { /** * Retrieve the tag represented by the tag name. * + * @param {string} name Short or full tag name. + * @returns {Tag} * @async - * @param {String} Short or full tag name - * @return {Tag} */ -Repository.prototype.getTagByName = function(name) { +Repository.prototype.getTagByName = function (name) { var repo = this; name = ~name.indexOf("refs/tags/") ? name : "refs/tags/" + name; return Reference.nameToId(repo, name) - .then(function(oid) { + .then(function (oid) { return Tag.lookup(repo, oid); - }).then(function(reference) { + }) + .then(function (reference) { reference.repo = repo; return reference; }); @@ -1337,106 +1210,106 @@ Repository.prototype.getTagByName = function(name) { /** * Retrieve the tree represented by the oid. * + * @param {string | Oid} oid string sha or Oid. + * @returns {Tree} * @async - * @param {String|Oid} String sha or Oid - * @return {Tree} */ -Repository.prototype.getTree = function(oid) { +Repository.prototype.getTree = function (oid) { var repository = this; - return Tree.lookup(repository, oid).then(function(tree) { + return Tree.lookup(repository, oid).then(function (tree) { tree.repo = repository; return tree; }); }; /** - * Returns true if the repository is in the APPLY_MAILBOX or - * APPLY_MAILBOX_OR_REBASE state. - * @return {Boolean} + * Returns true if the repository is in the APPLY_MAILBOX or APPLY_MAILBOX_OR_REBASE state. + * + * @returns {boolean} */ -Repository.prototype.isApplyingMailbox = function() { +Repository.prototype.isApplyingMailbox = function () { var state = this.state(); - return state === NodeGit.Repository.STATE.APPLY_MAILBOX || - state === NodeGit.Repository.STATE.APPLY_MAILBOX_OR_REBASE; + return state === NodeGit.Repository.STATE.APPLY_MAILBOX || state === NodeGit.Repository.STATE.APPLY_MAILBOX_OR_REBASE; }; /** * Returns true if the repository is in the BISECT state. - * @return {Boolean} + * + * @returns {boolean} */ -Repository.prototype.isBisecting = function() { +Repository.prototype.isBisecting = function () { return this.state() === NodeGit.Repository.STATE.BISECT; }; /** * Returns true if the repository is in the CHERRYPICK state. - * @return {Boolean} + * + * @returns {boolean} */ -Repository.prototype.isCherrypicking = function() { +Repository.prototype.isCherrypicking = function () { return this.state() === NodeGit.Repository.STATE.CHERRYPICK; }; /** * Returns true if the repository is in the default NONE state. - * @return {Boolean} + * + * @returns {boolean} */ -Repository.prototype.isDefaultState = function() { +Repository.prototype.isDefaultState = function () { return this.state() === NodeGit.Repository.STATE.NONE; }; /** * Returns true if the repository is in the MERGE state. - * @return {Boolean} + * + * @returns {boolean} */ -Repository.prototype.isMerging = function() { +Repository.prototype.isMerging = function () { return this.state() === NodeGit.Repository.STATE.MERGE; }; /** - * Returns true if the repository is in the REBASE, REBASE_INTERACTIVE, or - * REBASE_MERGE state. - * @return {Boolean} + * Returns true if the repository is in the REBASE, REBASE_INTERACTIVE, or REBASE_MERGE state. + * + * @returns {boolean} */ -Repository.prototype.isRebasing = function() { +Repository.prototype.isRebasing = function () { var state = this.state(); - return state === NodeGit.Repository.STATE.REBASE || - state === NodeGit.Repository.STATE.REBASE_INTERACTIVE || - state === NodeGit.Repository.STATE.REBASE_MERGE; + return ( + state === NodeGit.Repository.STATE.REBASE || + state === NodeGit.Repository.STATE.REBASE_INTERACTIVE || + state === NodeGit.Repository.STATE.REBASE_MERGE + ); }; /** * Returns true if the repository is in the REVERT state. - * @return {Boolean} + * + * @returns {boolean} */ -Repository.prototype.isReverting = function() { +Repository.prototype.isReverting = function () { return this.state() === NodeGit.Repository.STATE.REVERT; }; /** - * Rebases a branch onto another branch + * Rebases a branch onto another branch. * + * @param {string} branch + * @param {string} upstream + * @param {string} onto + * @param {Signature} signature Identity of the one performing the rebase. + * @param {Function} beforeNextFn Callback to be called before each step of the rebase. If the callback returns + * a promise, the rebase will resume when the promise resolves. The rebase object + * is is passed to the callback. + * @param {Function} beforeFinishFn Callback called before the invocation of finish(). If the callback returns a + * promise, finish() will be called when the promise resolves. This callback will + * be provided a detailed overview of the rebase. + * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object with. + * @returns {Oid | Index} A commit id for a succesful merge or an index for a rebase with conflicts. * @async - * @param {String} branch - * @param {String} upstream - * @param {String} onto - * @param {Signature} signature Identity of the one performing the rebase - * @param {Function} beforeNextFn Callback to be called before each step - * of the rebase. If the callback returns a - * promise, the rebase will resume when the - * promise resolves. The rebase object is - * is passed to the callback. - * @param {Function} beforeFinishFn Callback called before the invocation - * of finish(). If the callback returns a - * promise, finish() will be called when the - * promise resolves. This callback will be - * provided a detailed overview of the rebase - * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object - * with - * @return {Oid|Index} A commit id for a succesful merge or an index for a - * rebase with conflicts */ -Repository.prototype.rebaseBranches = function( +Repository.prototype.rebaseBranches = function ( branch, upstream, onto, @@ -1444,8 +1317,7 @@ Repository.prototype.rebaseBranches = function( beforeNextFn, beforeFinishFn, rebaseOptions -) -{ +) { const repo = this; let branchCommit; let upstreamCommit; @@ -1465,71 +1337,57 @@ Repository.prototype.rebaseBranches = function( return Promise.all([ repo.getReference(branch), upstream ? repo.getReference(upstream) : null, - onto ? repo.getReference(onto) : null + onto ? repo.getReference(onto) : null, ]) - .then(function(refs) { - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repo, refs[0]), - upstream ? NodeGit.AnnotatedCommit.fromRef(repo, refs[1]) : null, - onto ? NodeGit.AnnotatedCommit.fromRef(repo, refs[2]) : null - ]); - }) - .then(function(annotatedCommits) { - branchCommit = annotatedCommits[0]; - upstreamCommit = annotatedCommits[1]; - ontoCommit = annotatedCommits[2]; - - return NodeGit.Merge.base(repo, branchCommit.id(), upstreamCommit.id()); - }) - .then(function(oid) { - if (oid.toString() === branchCommit.id().toString()) { - // we just need to fast-forward - return repo.mergeBranches(branch, upstream, null, null, mergeOptions) - .then(function() { + .then(function (refs) { + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repo, refs[0]), + upstream ? NodeGit.AnnotatedCommit.fromRef(repo, refs[1]) : null, + onto ? NodeGit.AnnotatedCommit.fromRef(repo, refs[2]) : null, + ]); + }) + .then(function (annotatedCommits) { + branchCommit = annotatedCommits[0]; + upstreamCommit = annotatedCommits[1]; + ontoCommit = annotatedCommits[2]; + + return NodeGit.Merge.base(repo, branchCommit.id(), upstreamCommit.id()); + }) + .then(function (oid) { + if (oid.toString() === branchCommit.id().toString()) { + // we just need to fast-forward + return repo.mergeBranches(branch, upstream, null, null, mergeOptions).then(function () { // checkout 'branch' to match the behavior of rebase return repo.checkoutBranch(branch); }); - } else if (oid.toString() === upstreamCommit.id().toString()) { - // 'branch' is already on top of 'upstream' - // checkout 'branch' to match the behavior of rebase - return repo.checkoutBranch(branch); - } + } else if (oid.toString() === upstreamCommit.id().toString()) { + // 'branch' is already on top of 'upstream' + // checkout 'branch' to match the behavior of rebase + return repo.checkoutBranch(branch); + } - return NodeGit.Rebase.init( - repo, - branchCommit, - upstreamCommit, - ontoCommit, - rebaseOptions - ) - .then(function(rebase) { - return performRebase( - repo, - rebase, - signature, - beforeNextFn, - beforeFinishFn - ); - }) - .then(function(error) { - if (error) { - throw error; - } - }); - }) - .then(function() { - return repo.getBranchCommit("HEAD"); - }); + return NodeGit.Rebase.init(repo, branchCommit, upstreamCommit, ontoCommit, rebaseOptions) + .then(function (rebase) { + return performRebase(repo, rebase, signature, beforeNextFn, beforeFinishFn); + }) + .then(function (error) { + if (error) { + throw error; + } + }); + }) + .then(function () { + return repo.getBranchCommit("HEAD"); + }); }; /** - * Grabs a fresh copy of the index from the repository. Invalidates - * all previously grabbed indexes + * Grabs a fresh copy of the index from the repository. Invalidates all previously grabbed indexes. * + * @returns {Index} * @async - * @return {Index} */ -Repository.prototype.refreshIndex = function() { +Repository.prototype.refreshIndex = function () { var repo = this; repo.setIndex(); // clear the index @@ -1538,40 +1396,34 @@ Repository.prototype.refreshIndex = function() { }; /** - * Merge a branch onto another branch + * Merge a branch onto another branch. * - * @async - * @param {String|Reference} to - * @param {String|Reference} from - * @param {Signature} signature - * @param {Merge.PREFERENCE} mergePreference - * @param {MergeOptions} mergeOptions + * @param {string | Reference} to + * @param {string | Reference} from + * @param {Signature} signature + * @param {Merge.PREFERENCE} mergePreference + * @param {MergeOptions} mergeOptions * @param {MergeBranchOptions} mergeBranchOptions - * @return {Oid|Index} A commit id for a succesful merge or an index for a - * merge with conflicts + * @returns {Oid | Index} A commit id for a succesful merge or an index for a merge with conflicts. + * @async */ -Repository.prototype.mergeBranches = function( - to, - from, - signature, - mergePreference, - mergeOptions, - mergeBranchOptions -) { +Repository.prototype.mergeBranches = function (to, from, signature, mergePreference, mergeOptions, mergeBranchOptions) { const repo = this; let fromBranch; let toBranch; // Support old parameter `processMergeMessageCallback` const isOldOptionParameter = typeof mergeBranchOptions === "function"; if (isOldOptionParameter) { - console.error("DeprecationWarning: Repository#mergeBranches parameter " + - "processMergeMessageCallback, use MergeBranchOptions"); + console.error( + "DeprecationWarning: Repository#mergeBranches parameter " + "processMergeMessageCallback, use MergeBranchOptions" + ); } - const processMergeMessageCallback = mergeBranchOptions && - (isOldOptionParameter ? - mergeBranchOptions : - mergeBranchOptions.processMergeMessageCallback) || - function (message) { return message; }; + const processMergeMessageCallback = + (mergeBranchOptions && + (isOldOptionParameter ? mergeBranchOptions : mergeBranchOptions.processMergeMessageCallback)) || + function (message) { + return message; + }; const signingCallback = mergeBranchOptions && mergeBranchOptions.signingCb; mergePreference = mergePreference || NodeGit.Merge.PREFERENCE.NONE; @@ -1586,289 +1438,249 @@ Repository.prototype.mergeBranches = function( }); } - return promiseChain.then(() => Promise.all([ - repo.getBranch(to), - repo.getBranch(from) - ])) - .then((objects) => { - toBranch = objects[0]; - fromBranch = objects[1]; - - return Promise.all([ - repo.getBranchCommit(toBranch), - repo.getBranchCommit(fromBranch) - ]); - }) - .then((branchCommits) => { - var toCommitOid = branchCommits[0].toString(); - var fromCommitOid = branchCommits[1].toString(); - - return NodeGit.Merge.base(repo, toCommitOid, fromCommitOid) - .then((baseCommit) => { - if (baseCommit.toString() == fromCommitOid) { - // The commit we're merging to is already in our history. - // nothing to do so just return the commit the branch is on - return toCommitOid; - } - else if (baseCommit.toString() == toCommitOid && - mergePreference !== NodeGit.Merge.PREFERENCE.NO_FASTFORWARD) { - // fast forward - var message = - "Fast forward branch " + - toBranch.shorthand() + - " to branch " + - fromBranch.shorthand(); - - return branchCommits[1].getTree() - .then((tree) => { - if (toBranch.isHead()) { - // Checkout the tree if we're on the branch - var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | - NodeGit.Checkout.STRATEGY.RECREATE_MISSING - }; - return NodeGit.Checkout.tree(repo, tree, opts); - } - }) - .then(() => { - return toBranch.setTarget( - fromCommitOid, - message) - .then(() => { - return fromCommitOid; - }); - }); - } - else if (mergePreference !== NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY) { - var updateHead; - // We have to merge. Lets do it! - return NodeGit.Reference.lookup(repo, "HEAD") - .then((headRef) => { - return headRef.resolve(); - }) - .then((headRef) => { - updateHead = !!headRef && (headRef.name() === toBranch.name()); - return NodeGit.Merge.commits( - repo, - toCommitOid, - fromCommitOid, - mergeOptions - ); - }) - .then((index) => { - // if we have conflicts then throw the index - if (index.hasConflicts()) { - throw index; - } - - // No conflicts so just go ahead with the merge - return index.writeTreeTo(repo); - }) - .then((oid) => { - var mergeDecorator; - if (fromBranch.isTag()) { - mergeDecorator = "tag"; - } else if (fromBranch.isRemote()) { - mergeDecorator = "remote-tracking branch"; - } else { - mergeDecorator = "branch"; - } - - var message = - "Merge " + - mergeDecorator + - " '" + - fromBranch.shorthand() + - "'"; - - // https://github.com/git/git/blob/master/builtin/fmt-merge-msg.c#L456-L459 - if (toBranch.shorthand() !== "master") { - message += " into " + toBranch.shorthand(); - } + return promiseChain + .then(() => Promise.all([repo.getBranch(to), repo.getBranch(from)])) + .then((objects) => { + toBranch = objects[0]; + fromBranch = objects[1]; - return Promise.all([oid, processMergeMessageCallback(message)]); - }) - .then(([oid, message]) => { - if (signingCallback) { - return repo.createCommitWithSignature( - toBranch.name(), - signature, - signature, - message, - oid, - [toCommitOid, fromCommitOid], - signingCallback - ); - } - return repo.createCommit( - toBranch.name(), - signature, - signature, - message, - oid, - [toCommitOid, fromCommitOid] - ); - }) - .then((commit) => { - // we've updated the checked out branch, so make sure we update - // head so that our index isn't messed up - if (updateHead) { - return repo.getBranch(to) - .then((branch) => { - return repo.getBranchCommit(branch); - }) - .then((branchCommit) => { - return branchCommit.getTree(); - }) + return Promise.all([repo.getBranchCommit(toBranch), repo.getBranchCommit(fromBranch)]); + }) + .then((branchCommits) => { + var toCommitOid = branchCommits[0].toString(); + var fromCommitOid = branchCommits[1].toString(); + + return NodeGit.Merge.base(repo, toCommitOid, fromCommitOid).then((baseCommit) => { + if (baseCommit.toString() == fromCommitOid) { + // The commit we're merging to is already in our history. + // nothing to do so just return the commit the branch is on + return toCommitOid; + } else if ( + baseCommit.toString() == toCommitOid && + mergePreference !== NodeGit.Merge.PREFERENCE.NO_FASTFORWARD + ) { + // fast forward + var message = "Fast forward branch " + toBranch.shorthand() + " to branch " + fromBranch.shorthand(); + + return branchCommits[1] + .getTree() .then((tree) => { - var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | - NodeGit.Checkout.STRATEGY.RECREATE_MISSING - }; - return NodeGit.Checkout.tree(repo, tree, opts); + if (toBranch.isHead()) { + // Checkout the tree if we're on the branch + var opts = { + checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING, + }; + return NodeGit.Checkout.tree(repo, tree, opts); + } }) .then(() => { - return commit; + return toBranch.setTarget(fromCommitOid, message).then(() => { + return fromCommitOid; + }); }); - } - else { - return commit; - } - }); - } - else { - // A non fast-forwardable merge with ff-only - return toCommitOid; - } + } else if (mergePreference !== NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY) { + var updateHead; + // We have to merge. Lets do it! + return NodeGit.Reference.lookup(repo, "HEAD") + .then((headRef) => { + return headRef.resolve(); + }) + .then((headRef) => { + updateHead = !!headRef && headRef.name() === toBranch.name(); + return NodeGit.Merge.commits(repo, toCommitOid, fromCommitOid, mergeOptions); + }) + .then((index) => { + // if we have conflicts then throw the index + if (index.hasConflicts()) { + throw index; + } + + // No conflicts so just go ahead with the merge + return index.writeTreeTo(repo); + }) + .then((oid) => { + var mergeDecorator; + if (fromBranch.isTag()) { + mergeDecorator = "tag"; + } else if (fromBranch.isRemote()) { + mergeDecorator = "remote-tracking branch"; + } else { + mergeDecorator = "branch"; + } + + var message = "Merge " + mergeDecorator + " '" + fromBranch.shorthand() + "'"; + + // https://github.com/git/git/blob/master/builtin/fmt-merge-msg.c#L456-L459 + if (toBranch.shorthand() !== "master") { + message += " into " + toBranch.shorthand(); + } + + return Promise.all([oid, processMergeMessageCallback(message)]); + }) + .then(([oid, message]) => { + if (signingCallback) { + return repo.createCommitWithSignature( + toBranch.name(), + signature, + signature, + message, + oid, + [toCommitOid, fromCommitOid], + signingCallback + ); + } + return repo.createCommit(toBranch.name(), signature, signature, message, oid, [ + toCommitOid, + fromCommitOid, + ]); + }) + .then((commit) => { + // we've updated the checked out branch, so make sure we update + // head so that our index isn't messed up + if (updateHead) { + return repo + .getBranch(to) + .then((branch) => { + return repo.getBranchCommit(branch); + }) + .then((branchCommit) => { + return branchCommit.getTree(); + }) + .then((tree) => { + var opts = { + checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING, + }; + return NodeGit.Checkout.tree(repo, tree, opts); + }) + .then(() => { + return commit; + }); + } else { + return commit; + } + }); + } else { + // A non fast-forwardable merge with ff-only + return toCommitOid; + } + }); }); - }); }; /** + * @param {MergeheadForeachCb} callback The callback function to be called on each entry. * @async - * @param {MergeheadForeachCb} callback The callback function to be called on - * each entry */ -Repository.prototype.mergeheadForeach = function(callback) { +Repository.prototype.mergeheadForeach = function (callback) { return _mergeheadForeach.call(this, callback, null); }; /** - * Stages or unstages line selection of a specified file + * Stages or unstages line selection of a specified file. * + * @param {string | Array} filePath The relative path of this file in the repo. + * @param {boolean} stageNew Set to stage new filemode. Unset to unstage. + * @returns {number} 0 or an error code. * @async - * @param {String|Array} filePath The relative path of this file in the repo - * @param {Boolean} stageNew Set to stage new filemode. Unset to unstage. - * @return {Number} 0 or an error code */ -Repository.prototype.stageFilemode = - function(filePath, stageNew, additionalDiffOptions) { +Repository.prototype.stageFilemode = function (filePath, stageNew, additionalDiffOptions) { var repo = this; var index; - var diffOptions = additionalDiffOptions ? { - flags: additionalDiffOptions - } : undefined; - var diffPromise = stageNew ? - NodeGit.Diff.indexToWorkdir(repo, index, { + var diffOptions = additionalDiffOptions + ? { + flags: additionalDiffOptions, + } + : undefined; + var diffPromise = stageNew + ? NodeGit.Diff.indexToWorkdir(repo, index, { flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS | - (additionalDiffOptions || 0) - }) - : - repo.getHeadCommit() - .then(function getTreeFromCommit(commit) { - return commit.getTree(); + (additionalDiffOptions || 0), }) - .then(function getDiffFromTree(tree) { - return NodeGit.Diff.treeToIndex(repo, tree, index, diffOptions); - }); - var filePaths = (filePath instanceof Array) ? filePath : [filePath]; + : repo + .getHeadCommit() + .then(function getTreeFromCommit(commit) { + return commit.getTree(); + }) + .then(function getDiffFromTree(tree) { + return NodeGit.Diff.treeToIndex(repo, tree, index, diffOptions); + }); + var filePaths = filePath instanceof Array ? filePath : [filePath]; var indexLock = repo.path().replace(".git/", "") + ".git/index.lock"; - return fse.remove(indexLock) - .then(function() { + return fse + .remove(indexLock) + .then(function () { return repo.refreshIndex(); }) - .then(function(indexResult) { + .then(function (indexResult) { index = indexResult; }) - .then(function() { + .then(function () { return diffPromise; }) - .then(function(diff) { + .then(function (diff) { var origLength = filePaths.length; - var fileFilterPromises = fp.map(function(p) { - return NodeGit.Status.file(repo, p) - .then(function(status) { - return { - path: p, - filter: ( - (status & NodeGit.Status.STATUS.WT_MODIFIED) || - (status & NodeGit.Status.STATUS.INDEX_MODIFIED) - ) - }; - }); + var fileFilterPromises = fp.map(function (p) { + return NodeGit.Status.file(repo, p).then(function (status) { + return { + path: p, + filter: status & NodeGit.Status.STATUS.WT_MODIFIED || status & NodeGit.Status.STATUS.INDEX_MODIFIED, + }; + }); }, filePaths); - return Promise.all(fileFilterPromises) - .then(function(results) { - filePaths = fp.flow([ - fp.filter(function(filterResult) { - return filterResult.filter; - }), - fp.map(function(filterResult) { - return filterResult.path; - }) - ])(results); - - if (filePaths.length === 0 && origLength > 0) { - return Promise.reject - ("Selected staging is only available on modified files."); - } - return diff.patches(); - }); + return Promise.all(fileFilterPromises).then(function (results) { + filePaths = fp.flow([ + fp.filter(function (filterResult) { + return filterResult.filter; + }), + fp.map(function (filterResult) { + return filterResult.path; + }), + ])(results); + + if (filePaths.length === 0 && origLength > 0) { + return Promise.reject("Selected staging is only available on modified files."); + } + return diff.patches(); + }); }) - .then(function(patches) { - var pathPatches = patches.filter(function(patch) { + .then(function (patches) { + var pathPatches = patches.filter(function (patch) { return ~filePaths.indexOf(patch.newFile().path()); }); if (pathPatches.length === 0) { return Promise.reject("No differences found for this file."); } - return pathPatches - .reduce(function(lastIndexAddPromise, pathPatch) { - var entry = index.getByPath(pathPatch.newFile().path(), 0); + return pathPatches.reduce(function (lastIndexAddPromise, pathPatch) { + var entry = index.getByPath(pathPatch.newFile().path(), 0); - entry.mode = stageNew ? - pathPatch.newFile().mode() : pathPatch.oldFile().mode(); + entry.mode = stageNew ? pathPatch.newFile().mode() : pathPatch.oldFile().mode(); - return lastIndexAddPromise - .then(function() { - return index.add(entry); - }); - }, Promise.resolve()); + return lastIndexAddPromise.then(function () { + return index.add(entry); + }); + }, Promise.resolve()); }) - .then(function() { + .then(function () { return index.write(); }); }; /** - * Stages or unstages line selection of a specified file + * Stages or unstages line selection of a specified file. * + * @param {string} filePath The relative path of this file in the repo. + * @param {Array} selectedLines The array of DiffLine objects selected for staging or unstaging. + * @param {boolean} isSelectionStaged Are the selected lines currently staged. + * @returns {number} 0 or an error code. * @async - * @param {String} filePath The relative path of this file in the repo - * @param {Array} selectedLines The array of DiffLine objects - * selected for staging or unstaging - * @param {Boolean} isStaged Are the selected lines currently staged - * @return {Number} 0 or an error code */ -Repository.prototype.stageLines = - function(filePath, selectedLines, isSelectionStaged, additionalDiffOptions) { - +Repository.prototype.stageLines = function (filePath, selectedLines, isSelectionStaged, additionalDiffOptions) { var repo = this; var index; var originalBlob; @@ -1882,63 +1694,56 @@ Repository.prototype.stageLines = flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS | - (additionalDiffOptions || 0) + (additionalDiffOptions || 0), }) - .then(function(diff) { - return diff.patches(); - }) - .then(function(patches) { - var pathPatch = patches.filter(function(patch) { - return patch.newFile().path() === filePath; - }); - var emptyPatch = false; - if (pathPatch.length > 0) { - // No hunks, unchanged file mode, and no type changes. - emptyPatch = pathPatch[0].size() === 0 && - pathPatch[0].oldFile().mode() === pathPatch[0].newFile().mode() && - !pathPatch[0].isTypeChange(); - } - if (emptyPatch) { - return index.addByPath(filePath) - .then(function() { + .then(function (diff) { + return diff.patches(); + }) + .then(function (patches) { + var pathPatch = patches.filter(function (patch) { + return patch.newFile().path() === filePath; + }); + var emptyPatch = false; + if (pathPatch.length > 0) { + // No hunks, unchanged file mode, and no type changes. + emptyPatch = + pathPatch[0].size() === 0 && + pathPatch[0].oldFile().mode() === pathPatch[0].newFile().mode() && + !pathPatch[0].isTypeChange(); + } + if (emptyPatch) { + return index.addByPath(filePath).then(function () { return index.write(); }); - } + } - return result; - }); + return result; + }); }; - return repo.refreshIndex() - .then(function(indexResult) { + return repo + .refreshIndex() + .then(function (indexResult) { index = indexResult; var pathOid = index.getByPath(filePath).id; return repo.getBlob(pathOid); }) - .then(function(blob) { + .then(function (blob) { originalBlob = blob; - return getPathHunks( - repo, - index, - filePath, - isSelectionStaged, - additionalDiffOptions - ); + return getPathHunks(repo, index, filePath, isSelectionStaged, additionalDiffOptions); }) - .then(function(hunks) { - return applySelectedLinesToTarget( - originalBlob, selectedLines, hunks, isSelectionStaged - ); + .then(function (hunks) { + return applySelectedLinesToTarget(originalBlob, selectedLines, hunks, isSelectionStaged); }) - .then(function(newContent) { + .then(function (newContent) { var newContentBuffer = Buffer.from(newContent); return repo.createBlobFromBuffer(newContentBuffer); }) - .then(newOid => repo.getBlob(newOid)) - .then(function(newBlob) { + .then((newOid) => repo.getBlob(newOid)) + .then(function (newBlob) { var entry = index.getByPath(filePath, 0); entry.id = newBlob.id(); entry.path = filePath; @@ -1946,10 +1751,10 @@ Repository.prototype.stageLines = return index.add(entry); }) - .then(function() { + .then(function () { return index.write(); }) - .then(function(result) { + .then(function (result) { if (isSelectionStaged) { return result; } @@ -1960,10 +1765,8 @@ Repository.prototype.stageLines = /** * Create a new tree builder. - * - * @param {Tree} tree */ -Repository.prototype.treeBuilder = function() { +Repository.prototype.treeBuilder = function () { var builder = TreeBuilder.create(null); builder.root = builder; diff --git a/lib/tree.js b/lib/tree.js index 1067fa3f2..e38145464 100644 --- a/lib/tree.js +++ b/lib/tree.js @@ -51,7 +51,7 @@ Tree.prototype.diffWithOptions = function(tree, options) { /** * Return an array of the entries in this tree (excluding its children). - * @return {Array} an array of TreeEntrys + * @returns {TreeEntry[]} */ Tree.prototype.entries = function() { var size = this.entryCount(); From cfa5cd7cd77fc558fd1cb2c4a3288d59c0e16636 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sun, 7 Mar 2021 22:43:20 +0100 Subject: [PATCH 4/6] lint fixes --- examples/apps/git_profanity_check.js | 1 + examples/index-add-and-remove.js | 4 +- generate/scripts/generateJson.js | 1 + generate/scripts/generateMissingTests.js | 2 +- generate/scripts/helpers.js | 9 +- generate/scripts/utils.js | 2 +- generate/templates/filters/title_case.js | 2 +- guides/repositories/index.js | 8 +- guides/repositories/initializing/index.js | 4 +- lib/remote.js | 1 + lib/repository.js | 16 +- lib/tree.js | 4 +- lifecycleScripts/clean.js | 1 + lifecycleScripts/install.js | 1 + lifecycleScripts/preinstall.js | 1 + test/runner.js | 1 + test/tests/blob.js | 8 +- test/tests/branch.js | 8 +- test/tests/checkout.js | 6 +- test/tests/clone.js | 247 ++++++++++---------- test/tests/commit.js | 13 +- test/tests/config.js | 2 +- test/tests/diff.js | 4 +- test/tests/filter.js | 40 ++-- test/tests/index.js | 6 +- test/tests/merge.js | 1 + test/tests/note.js | 2 +- test/tests/rebase.js | 10 +- test/tests/remote.js | 8 +- test/tests/repository.js | 2 +- test/tests/revwalk.js | 15 +- test/tests/signature.js | 1 + test/tests/stage.js | 1 + test/tests/stash.js | 4 + test/tests/submodule.js | 4 +- test/tests/tag.js | 2 +- test/tests/worker.js | 4 +- test/utils/index_setup.js | 2 +- test/utils/loop_checkout.js | 3 +- test/utils/worker_checkout.js | 2 +- test/utils/worker_context_aware.js | 6 +- test/utils/worker_context_aware_checkout.js | 2 +- utils/acquireOpenSSL.js | 23 +- utils/isBuildingForElectron.js | 4 +- 44 files changed, 254 insertions(+), 234 deletions(-) mode change 100644 => 100755 examples/apps/git_profanity_check.js diff --git a/examples/apps/git_profanity_check.js b/examples/apps/git_profanity_check.js old mode 100644 new mode 100755 index c4a839636..ee448ebbf --- a/examples/apps/git_profanity_check.js +++ b/examples/apps/git_profanity_check.js @@ -10,6 +10,7 @@ // // node git_profanity_check some/repo/.git // +// eslint-disable-next-line node/shebang var git = require("../../"); var curses = ["put", "curse", "words", "here"]; diff --git a/examples/index-add-and-remove.js b/examples/index-add-and-remove.js index 74354ed5d..1b274e8b2 100644 --- a/examples/index-add-and-remove.js +++ b/examples/index-add-and-remove.js @@ -13,7 +13,7 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) var fileNames = Object.keys(fileContent); return Promise.all(fileNames.map(function(fileName) { - fse.writeFile( + return fse.writeFile( path.join(repo.workdir(), fileName), fileContent[fileName]); })) @@ -87,7 +87,7 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) return index.addAll( "newFile*", nodegit.Index.ADD_OPTION.ADD_CHECK_PATHSPEC, - function(path, matchedPattern) { + function(path, _matchedPattern) { if (path == "newFile1") { return 0; // add the file } diff --git a/generate/scripts/generateJson.js b/generate/scripts/generateJson.js index 49a2795c2..40e869c90 100644 --- a/generate/scripts/generateJson.js +++ b/generate/scripts/generateJson.js @@ -201,6 +201,7 @@ module.exports = function generateJson() { else if (enumerable.owner) { return true; } + return false; }); var override = descriptor.enums[enumerable.typeName] || {}; diff --git a/generate/scripts/generateMissingTests.js b/generate/scripts/generateMissingTests.js index 29b6474b3..4b06afeef 100644 --- a/generate/scripts/generateMissingTests.js +++ b/generate/scripts/generateMissingTests.js @@ -8,7 +8,7 @@ module.exports = function generateMissingTests() { var output = {}; function findMissingTest(idef) { - return new Promise(function(resolve, reject) { + return new Promise(function(resolve) { var testFilePath = path.join(testFilesPath, idef.filename + ".js"); var result = {}; diff --git a/generate/scripts/helpers.js b/generate/scripts/helpers.js index 15790983f..c5107b266 100644 --- a/generate/scripts/helpers.js +++ b/generate/scripts/helpers.js @@ -11,7 +11,7 @@ var callbackDefs = require("../input/callbacks.json"); var descriptor = require("../input/descriptor.json"); var libgit2 = require("../input/libgit2-docs.json"); -var cTypes = libgit2.groups.map(function(group) { return group[0];}); +// var cTypes = libgit2.groups.map(function(group) { return group[0];}); var cTypeMappings = { "char": "String", @@ -82,6 +82,7 @@ var Helpers = { hasConstructor: function(type, normalizedType) { if (normalizedType && descriptor.types[normalizedType.substr(4)]) { var descriptorEntry = descriptor.types[normalizedType.substr(4)]; + // eslint-disable-next-line no-prototype-builtins if (descriptorEntry.hasOwnProperty('hasConstructor')) { return descriptorEntry.hasConstructor; } @@ -116,6 +117,7 @@ var Helpers = { libgitType = type[1]; return true; } + return false; }); return libgitType; @@ -149,6 +151,7 @@ var Helpers = { cbFieldName = cbField.name; return true; } + return false; }); if (cbFieldName) { @@ -223,7 +226,7 @@ var Helpers = { return fnDef; }); - var typeDefOverrides = descriptor.types[typeDef.typeName] || {}; + typeDefOverrides = descriptor.types[typeDef.typeName] || {}; var functionOverrides = typeDefOverrides.functions || {}; typeDef.functions.forEach(function(fnDef) { Helpers.decorateFunction(fnDef, typeDef, functionOverrides[fnDef.cFunctionName] || {}, enums); @@ -233,7 +236,7 @@ var Helpers = { }, decorateField: function(field, allFields, fieldOverrides, enums) { - var normalizeType = Helpers.normalizeCtype(field.type); + // var normalizeType = Helpers.normalizeCtype(field.type); field.cType = field.type; field.cppFunctionName = utils.titleCase(field.name); diff --git a/generate/scripts/utils.js b/generate/scripts/utils.js index c6e843134..e755a4512 100644 --- a/generate/scripts/utils.js +++ b/generate/scripts/utils.js @@ -55,7 +55,7 @@ var util = { }, titleCase: function(str) { - return str.split(/_|\//).map(function(val, index) { + return str.split(/_|\//).map(function(val) { if (val.length) { return val[0].toUpperCase() + val.slice(1); } diff --git a/generate/templates/filters/title_case.js b/generate/templates/filters/title_case.js index 8c22b32bb..8669c04fb 100644 --- a/generate/templates/filters/title_case.js +++ b/generate/templates/filters/title_case.js @@ -1,5 +1,5 @@ module.exports = function(str) { - return str.split(/_|\//).map(function(val, index) { + return str.split(/_|\//).map(function(val) { if (val.length) { return val[0].toUpperCase() + val.slice(1); } diff --git a/guides/repositories/index.js b/guides/repositories/index.js index 4c018f8f7..db7ed64b5 100644 --- a/guides/repositories/index.js +++ b/guides/repositories/index.js @@ -11,7 +11,7 @@ var pathToRepo = require("path").resolve("../my-git-projects/my-project"); // In NodeGit we use Promises to make callbacks easier to deal with. // // For more information visit https://www.promisejs.org/ -NodeGit.Repository.open(pathToRepo).then(function (repo) { +NodeGit.Repository.open(pathToRepo).then(function (_repo) { // In this function we have a repo object that we can perform git operations // on. // NOTE: Many NodeGit objects will appear as empty objects if inspected in @@ -21,14 +21,14 @@ NodeGit.Repository.open(pathToRepo).then(function (repo) { // Promises will swallow errors and not report them unless you have supplied // a second function to the `.then` or end the chain with either a `.catch` or // a `.done` -.then(function (successfulResult) { +.then(function (_successfulResult) { // This is the first function of the then which contains the successfully // calculated result of the promise -}, function (reasonForFailure) { +}, function (_reasonForFailure) { // This is the second function of the then which contains the reason the // promise failed }) -.catch(function (reasonForFailure) { +.catch(function (_reasonForFailure) { // You can also provide a catch function which will contain the reason why // any above promises that weren't handled have failed }) diff --git a/guides/repositories/initializing/index.js b/guides/repositories/initializing/index.js index 67470ca19..6a3e26ffa 100644 --- a/guides/repositories/initializing/index.js +++ b/guides/repositories/initializing/index.js @@ -16,14 +16,14 @@ var isBare = 0; // In NodeGit we use Promises to make callbacks easier to deal with. // // For more information visit https://www.promisejs.org/ -NodeGit.Repository.init(pathToRepo, isBare).then(function (repo) { +NodeGit.Repository.init(pathToRepo, isBare).then(function (_repo) { // In this function we have a repo object that we can perform git operations // on. // Note that with a new repository many functions will fail until there is // an initial commit. }) -.catch(function (reasonForFailure) { +.catch(function (_reasonForFailure) { // If the repo cannot be created for any reason we can handle that case here. // NodeGit won't init a repo over a pre-existing repo. }); diff --git a/lib/remote.js b/lib/remote.js index c91776b6e..6c5aa7690 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -22,6 +22,7 @@ Remote.lookup = lookupWrapper(Remote); * connection. * @async */ +// eslint-disable-next-line no-self-assign Remote.prototype.referenceList = Remote.prototype.referenceList; NodeGit.Remote.COMPLETION_TYPE = {}; diff --git a/lib/repository.js b/lib/repository.js index 279a606a2..0aa1cac56 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -1160,7 +1160,7 @@ Repository.prototype.getStatusExt = function (opts) { */ Repository.prototype.getSubmoduleNames = function () { var names = []; - var submoduleCallback = function (submodule, name, payload) { + var submoduleCallback = function (_submodule, name, _payload) { names.push(name); }; @@ -1334,11 +1334,12 @@ Repository.prototype.rebaseBranches = function ( }); } - return Promise.all([ - repo.getReference(branch), - upstream ? repo.getReference(upstream) : null, - onto ? repo.getReference(onto) : null, - ]) + return promiseChain.then(() => + Promise.all([ + repo.getReference(branch), + upstream ? repo.getReference(upstream) : null, + onto ? repo.getReference(onto) : null, + ]) .then(function (refs) { return Promise.all([ NodeGit.AnnotatedCommit.fromRef(repo, refs[0]), @@ -1378,7 +1379,8 @@ Repository.prototype.rebaseBranches = function ( }) .then(function () { return repo.getBranchCommit("HEAD"); - }); + }) + ); }; /** diff --git a/lib/tree.js b/lib/tree.js index e38145464..b07d96c48 100644 --- a/lib/tree.js +++ b/lib/tree.js @@ -109,7 +109,7 @@ Tree.prototype.getEntry = function(filePath) { * Return the path of this tree, like `/lib/foo/bar` * @return {String} */ -Tree.prototype.path = function(blobsOnly) { +Tree.prototype.path = function(_blobsOnly) { return this.entry ? this.entry.path() : ""; }; @@ -145,7 +145,7 @@ Tree.prototype.walk = function(blobsOnly) { return event.emit("error", error); } - tree.entries().forEach(function (entry, entryIndex) { + tree.entries().forEach(function (entry, _entryIndex) { if (!blobsOnly || entry.isFile() && !entries.has(entry)) { event.emit("entry", entry); entries.add(entry); diff --git a/lifecycleScripts/clean.js b/lifecycleScripts/clean.js index a0f7076b3..0c668a26c 100644 --- a/lifecycleScripts/clean.js +++ b/lifecycleScripts/clean.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line node/no-unpublished-require var cleanForPublish = require("clean-for-publish"); var path = require("path"); diff --git a/lifecycleScripts/install.js b/lifecycleScripts/install.js index dc44c836b..a40877895 100755 --- a/lifecycleScripts/install.js +++ b/lifecycleScripts/install.js @@ -1,3 +1,4 @@ +/* eslint-disable no-process-exit */ var buildFlags = require("../utils/buildFlags"); var spawn = require("child_process").spawn; var path = require("path"); diff --git a/lifecycleScripts/preinstall.js b/lifecycleScripts/preinstall.js index 870cf1558..8e9417382 100755 --- a/lifecycleScripts/preinstall.js +++ b/lifecycleScripts/preinstall.js @@ -1,3 +1,4 @@ +/* eslint-disable no-process-exit */ var path = require("path"); var local = path.join.bind(path, __dirname); diff --git a/test/runner.js b/test/runner.js index 3ca48486b..3d6b25431 100644 --- a/test/runner.js +++ b/test/runner.js @@ -3,6 +3,7 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var exec = require('../utils/execPromise'); +// eslint-disable-next-line no-unused-vars var NodeGit = require('..'); var workdirPath = local("repos/workdir"); diff --git a/test/tests/blob.js b/test/tests/blob.js index 2d6512c86..0c7c524a1 100644 --- a/test/tests/blob.js +++ b/test/tests/blob.js @@ -290,7 +290,7 @@ describe("Blob", function() { return commitFile( test.repository, newFileName, - "this\nis\nfun\guys", + "this\nis\nfunguys", "added LF ending file" ); }) @@ -334,7 +334,7 @@ describe("Blob", function() { return commitFile( test.repository, newFileName, - "this\nis\nfun\guys", + "this\nis\nfunguys", "added LF ending file" ); }) @@ -498,7 +498,7 @@ describe("Blob", function() { return commitFile( test.repository, newFileName, - "this\nis\nfun\guys", + "this\nis\nfunguys", "added LF ending file" ); }) @@ -538,7 +538,7 @@ describe("Blob", function() { return commitFile( test.repository, newFileName, - "this\nis\nfun\guys", + "this\nis\nfunguys", "added LF ending file" ); }) diff --git a/test/tests/branch.js b/test/tests/branch.js index 3900e4242..2584f75a0 100644 --- a/test/tests/branch.js +++ b/test/tests/branch.js @@ -112,10 +112,10 @@ describe("Branch", function() { // don't force the move return Branch.move(branch, branchName2, 0) - .then(function(branch) { + .then(function(_branch) { return Promise.reject(new Error( "should not be able to rename the branch")); - }, function(error) { + }, function(_error) { return Promise.resolve() .then(function() { // force the move @@ -150,10 +150,10 @@ describe("Branch", function() { return Branch.createFromAnnotated( repo, branchName, annotatedCommit, 0); }) - .then(function(branch) { + .then(function(_branch) { return Promise.reject(new Error( "should not be able to create the branch")); - }, function(error) { + }, function(_error) { return Promise.resolve() .then(function() { // force the branch creation diff --git a/test/tests/checkout.js b/test/tests/checkout.js index c10d50d3a..5edad16a2 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -29,7 +29,7 @@ describe("Checkout", function() { var test = this; return Checkout.head(test.repository) - .then(function(blob) { + .then(function(_blob) { var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); assert.ok(~packageContent.indexOf("\"ejs\": \"~1.0.0\",")); @@ -175,7 +175,7 @@ describe("Checkout", function() { .then(() => { return test.repository.checkoutBranch(testBranchName); }) - .then((branch) => { + .then((_branch) => { fse.writeFileSync(packageJsonPath, "\n"); return test.repository.refreshIndex() @@ -196,7 +196,7 @@ describe("Checkout", function() { return test.repository.createCommit("refs/heads/" + testBranchName, signature, signature, "we made breaking changes", oid, [ourCommit]); }) - .then((commit) => { + .then((_commit) => { return Promise.all([ test.repository.getBranchCommit(testBranchName), test.repository.getBranchCommit("master") diff --git a/test/tests/clone.js b/test/tests/clone.js index 4f2b58d27..a43fbe32a 100644 --- a/test/tests/clone.js +++ b/test/tests/clone.js @@ -6,14 +6,13 @@ var _ = require("lodash"); const util = require("util"); const exec = util.promisify(require("child_process").exec); - const generatePathWithLength = (base, length) => { let path = `${base}/`; const baseLength = path.length; const remaining = length - baseLength; for (let i = 0; i < remaining; ++i) { - // add a slash every 240 characters, but not as first or last character + // add a slash every 240 characters, but not as first or last character if (i % 239 == 0 && i != remaining - 1 && i != 0) { path += "/"; } else { @@ -26,7 +25,7 @@ const generatePathWithLength = (base, length) => { return path; }; -describe("Clone", function() { +describe("Clone", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Clone = NodeGit.Clone; @@ -42,69 +41,70 @@ describe("Clone", function() { // Set a reasonable timeout here now that our repository has grown. this.timeout(30000); - beforeEach(function() { - return fse.remove(clonePath) - .then(function() { + beforeEach(function () { + return fse + .remove(clonePath) + .then(function () { return fse.remove(longClonePath); }) - .catch(function(err) { + .catch(function (err) { console.log(err); throw err; }); }); - it.skip("can clone with http", function() { + it.skip("can clone with http", function () { var test = this; var url = "http://git.tbranyen.com/smart/site-content"; - return Clone(url, clonePath).then(function(repo) { + return Clone(url, clonePath).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); - it("can clone with https", function() { + it("can clone with https", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var opts = { - fetchOpts: { - callbacks: { - certificateCheck: () => 0 - } - } + fetchOpts: { + callbacks: { + certificateCheck: () => 0, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); - it("can clone twice with https using same config object", function() { + it("can clone twice with https using same config object", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var progressCount = 0; var opts = { fetchOpts: { callbacks: { - transferProgress: function(progress) { + transferProgress: function (_progress) { progressCount++; - } - } - } + }, + }, + }, }; return Clone(url, clonePath, opts) - .then(function(repo) { + .then(function (repo) { assert.ok(repo instanceof Repository); assert.notEqual(progressCount, 0); return fse.remove(clonePath); }) - .then(function() { + .then(function () { progressCount = 0; return Clone(url, clonePath, opts); }) - .then(function(repo) { + .then(function (repo) { assert.ok(repo instanceof Repository); assert.notEqual(progressCount, 0); test.repository = repo; @@ -119,127 +119,117 @@ describe("Clone", function() { return now; } - it("can clone with https and default throttled progress", function() { + it("can clone with https and default throttled progress", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var progressCount = 0; var lastInvocation; var progressIntervals = []; var opts = { - fetchOpts: { - callbacks: { - transferProgress: function(progress) { - lastInvocation = updateProgressIntervals(progressIntervals, - lastInvocation); - progressCount++; - } - } - } + fetchOpts: { + callbacks: { + transferProgress: function (_progress) { + lastInvocation = updateProgressIntervals(progressIntervals, lastInvocation); + progressCount++; + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); assert.notEqual(progressCount, 0); - var averageProgressInterval = _.sum(progressIntervals) / - progressIntervals.length; + var averageProgressInterval = _.sum(progressIntervals) / progressIntervals.length; // even though we are specifying a throttle period of 100, // the throttle is applied on the scheduling side, // and actual execution is at the mercy of the main js thread // so the actual throttle intervals could be less than the specified // throttle period if (!averageProgressInterval || averageProgressInterval < 75) { - assert.fail(averageProgressInterval, 75, - "unexpected average time between callbacks", "<"); + assert.fail(averageProgressInterval, 75, "unexpected average time between callbacks", "<"); } test.repository = repo; }); }); - it("can clone with https and explicitly throttled progress", function() { + it("can clone with https and explicitly throttled progress", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var progressCount = 0; var lastInvocation; var progressIntervals = []; var opts = { - fetchOpts: { - callbacks: { - transferProgress: { - throttle: 50, - callback: function(progress) { - lastInvocation = updateProgressIntervals(progressIntervals, - lastInvocation); - progressCount++; - } - } - } - } + fetchOpts: { + callbacks: { + transferProgress: { + throttle: 50, + callback: function (_progress) { + lastInvocation = updateProgressIntervals(progressIntervals, lastInvocation); + progressCount++; + }, + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); assert.notEqual(progressCount, 0); - var averageProgressInterval = _.sum(progressIntervals) / - progressIntervals.length; + var averageProgressInterval = _.sum(progressIntervals) / progressIntervals.length; if (!averageProgressInterval || averageProgressInterval < 35) { - assert.fail(averageProgressInterval, 35, - "unexpected average time between callbacks", "<"); + assert.fail(averageProgressInterval, 35, "unexpected average time between callbacks", "<"); } test.repository = repo; }); }); - it("can clone without waiting for callback results", function() { + it("can clone without waiting for callback results", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var lastReceivedObjects = 0; var cloneFinished = false; var opts = { - fetchOpts: { - callbacks: { - transferProgress: { - waitForResult: false, - callback: function(progress) { - var receivedObjects = progress.receivedObjects(); - assert.false( - cloneFinished, - "callback running after clone completion" - ); - assert.gt(receivedObjects, lastReceivedObjects); - lastReceivedObjects = receivedObjects; - } - } - } - } + fetchOpts: { + callbacks: { + transferProgress: { + waitForResult: false, + callback: function (progress) { + var receivedObjects = progress.receivedObjects(); + assert.false(cloneFinished, "callback running after clone completion"); + assert.gt(receivedObjects, lastReceivedObjects); + lastReceivedObjects = receivedObjects; + }, + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); cloneFinished = true; test.repository = repo; }); }); - it("can clone using nested function", function() { + it("can clone using nested function", function () { var test = this; var url = "https://github.com/nodegit/test.git"; var opts = { fetchOpts: { callbacks: { - certificateCheck: () => 0 - } - } + certificateCheck: () => 0, + }, + }, }; - return Clone.clone(url, clonePath, opts).then(function(repo) { + return Clone.clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); if (process.platform === "win32") { - it("can clone with ssh using old agent with sha1 signing support only", - async function () { + it("can clone with ssh using old agent with sha1 signing support only", async function () { var pageant = local("../../vendor/pageant.exe"); var old_pageant = local("../../vendor/pageant_sha1.exe"); var privateKey = local("../../vendor/private.ppk"); @@ -249,11 +239,11 @@ describe("Clone", function() { fetchOpts: { callbacks: { certificateCheck: () => 0, - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); - } - } - } + }, + }, + }, }; try { @@ -261,27 +251,33 @@ describe("Clone", function() { } catch (e) { try { await exec("taskkill /im pageant_sha1.exe /f /t"); - } catch(e) {} + } catch (e) { + // ignore + } } try { await exec(`powershell -command "Start-Process ${old_pageant} ${privateKey}`); } catch (e) { try { await exec(`powershell -command "Start-Process ${pageant} ${privateKey}`); - } catch (e) {} + } catch (e) { + // ignore + } return assert.fail("Cannot run old pageant"); } try { const repo = await Clone(url, clonePath, opts); test.repository = repo; - } catch(e) { + } catch (e) { return assert.fail("Clone error: " + e.message); } try { await exec("taskkill /im pageant_sha1.exe /f /t"); - } catch(e) {} + } catch (e) { + // ignore + } try { await exec(`powershell -command "Start-Process ${pageant} ${privateKey}`); @@ -293,70 +289,66 @@ describe("Clone", function() { }); } - it("can clone with ssh", function() { + it("can clone with ssh", function () { var test = this; var url = "git@github.com:nodegit/test.git"; var opts = { fetchOpts: { callbacks: { certificateCheck: () => 0, - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); - } - } - } + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); - it("can clone with ssh while manually loading a key", function() { + it("can clone with ssh while manually loading a key", function () { var test = this; var url = "git@github.com:nodegit/test.git"; var opts = { fetchOpts: { callbacks: { certificateCheck: () => 0, - credentials: function(url, userName) { - return NodeGit.Credential.sshKeyNew( - userName, - sshPublicKeyPath, - sshPrivateKeyPath, - ""); - } - } - } + credentials: function (url, userName) { + return NodeGit.Credential.sshKeyNew(userName, sshPublicKeyPath, sshPrivateKeyPath, ""); + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); - it("can clone with ssh while manually loading an encrypted key", function() { + it("can clone with ssh while manually loading an encrypted key", function () { var test = this; var url = "git@github.com:nodegit/test.git"; var opts = { fetchOpts: { callbacks: { certificateCheck: () => 0, - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyNew( userName, sshEncryptedPublicKeyPath, sshEncryptedPrivateKeyPath, "test-password" ); - } - } - } + }, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); @@ -364,35 +356,35 @@ describe("Clone", function() { // Since 15 March the unauthenticated git protocol on port 9418 is no longer supported in Github. // https://github.blog/2021-09-01-improving-git-protocol-security-github/ - it.skip("can clone with git", function() { + it.skip("can clone with git", function () { var test = this; var url = "git://github.com/nodegit/test.git"; var opts = { fetchOpts: { callbacks: { - certificateCheck: () => 0 - } - } + certificateCheck: () => 0, + }, + }, }; - return Clone(url, clonePath, opts).then(function(repo) { + return Clone(url, clonePath, opts).then(function (repo) { test.repository = repo; assert.ok(repo instanceof Repository); }); }); - it("can clone with filesystem", function() { + it("can clone with filesystem", function () { var test = this; var prefix = process.platform === "win32" ? "" : "file://"; var url = prefix + local("../repos/empty"); - return Clone(url, clonePath).then(function(repo) { + return Clone(url, clonePath).then(function (repo) { assert.ok(repo instanceof Repository); test.repository = repo; }); }); - it("will not segfault when accessing a url without username", function() { + it("will not segfault when accessing a url without username", function () { var url = "https://github.com/nodegit/private"; var firstPass = true; @@ -401,17 +393,16 @@ describe("Clone", function() { fetchOpts: { callbacks: { certificateCheck: () => 0, - credentials: function() { + credentials: function () { if (firstPass) { firstPass = false; - return NodeGit.Credential.userpassPlaintextNew("fake-token", - "x-oauth-basic"); + return NodeGit.Credential.userpassPlaintextNew("fake-token", "x-oauth-basic"); } else { return NodeGit.Credential.defaultNew(); } - } - } - } - }).catch(function(reason) { }); + }, + }, + }, + }).catch(function (_reason) {}); }); }); diff --git a/test/tests/commit.js b/test/tests/commit.js index 69868333c..0bd31671b 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -32,7 +32,7 @@ describe("Commit", function() { }); } - function commitFile(repo, fileName, fileContent, commitMessage) { + function commitFile(repo, fileName, fileContent, _commitMessage) { var index; var treeOid; var parent; @@ -662,7 +662,7 @@ describe("Commit", function() { throw error; }); }) - .then(function(signatureInfo) { + .then(function(_signatureInfo) { assert.equal(commit.message(), message); assert.deepEqual(commit.parents(), parents); }); @@ -710,7 +710,7 @@ describe("Commit", function() { var history = this.commit.history(); - history.on("commit", function(commit) { + history.on("commit", function(_commit) { historyCount++; }); @@ -721,7 +721,7 @@ describe("Commit", function() { done(); }); - history.on("error", function(err) { + history.on("error", function(_err) { assert.ok(false); }); @@ -793,7 +793,7 @@ describe("Commit", function() { var treeWalker = tree.walk(); - treeWalker.on("entry", function(entry) { + treeWalker.on("entry", function(_entry) { commitTreeEntryCount++; }); @@ -801,7 +801,7 @@ describe("Commit", function() { fail(error); }); - treeWalker.on("end", function(entries) { + treeWalker.on("end", function(_entries) { try { assert.equal(commitTreeEntryCount, expectedCommitTreeEntryCount); resolve(); @@ -1042,6 +1042,7 @@ describe("Commit", function() { assert.equal(startSelfFreeingCount + 1, endSelfFreeingCount); assert.equal(startNonSelfFreeingCount, endNonSelfFreeingCount); + // eslint-disable-next-line no-unused-vars signature = null; garbageCollect(); endSelfFreeingCount = Signature.getSelfFreeingInstanceCount(); diff --git a/test/tests/config.js b/test/tests/config.js index bc4b802f3..8653fcc16 100644 --- a/test/tests/config.js +++ b/test/tests/config.js @@ -143,7 +143,7 @@ describe("Config", function() { .then(function(config) { return config.getString("user.fakevalue"); }) - .catch(function (e) { + .catch(function (_e) { return true; }); }); diff --git a/test/tests/diff.js b/test/tests/diff.js index 9fd483c38..a29e9e487 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -229,7 +229,7 @@ describe("Diff", function() { null, null, null, - function(delta, hunk, payload) { + function(delta, hunk, _payload) { assert.equal(hunk.oldStart(), 1); assert.equal(hunk.oldLines(), 19); assert.equal(hunk.newStart(), 1); @@ -262,7 +262,7 @@ describe("Diff", function() { null, null, null, - function(delta, hunk, payload) { + function(_delta, _hunk, _payload) { assert.fail( "There aren't any changes so this shouldn't be called."); done(); diff --git a/test/tests/filter.js b/test/tests/filter.js index 06e138ba5..5bd67d271 100644 --- a/test/tests/filter.js +++ b/test/tests/filter.js @@ -158,7 +158,7 @@ describe("Filter", function() { assert.strictEqual(result, NodeGit.Error.CODE.OK); return Registry.unregister(filterName); }) - .then(function(result) { + .then(function(_result) { assert.fail("Should not have unregistered successfully"); }) .catch(function(error) { @@ -254,7 +254,7 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.PASSTHROUGH; }, @@ -298,11 +298,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) @@ -418,11 +418,11 @@ describe("Filter", function() { var largeBuffer = Buffer.alloc(largeBufferSize, "a"); return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(largeBuffer, largeBufferSize); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) @@ -474,11 +474,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) @@ -514,11 +514,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(src, _attr) { return src.path() === "README.md" ? 0 : NodeGit.Error.CODE.PASSTHROUGH; } @@ -539,7 +539,7 @@ describe("Filter", function() { "test commit" ); }) - .then(function(oid) { + .then(function(_oid) { return test.repository.getHeadCommit(); }) .then(function(commit) { @@ -568,11 +568,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(src, _attr) { return src.path() === "README.md" ? 0 : NodeGit.Error.CODE.PASSTHROUGH; } @@ -594,7 +594,7 @@ describe("Filter", function() { "test commit" ); }) - .then(function(oid) { + .then(function(_oid) { garbageCollect(); return test.repository.getHeadCommit(); }) @@ -649,11 +649,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) @@ -688,11 +688,11 @@ describe("Filter", function() { var test = this; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) @@ -730,11 +730,11 @@ describe("Filter", function() { var list; return Registry.register(filterName, { - apply: function(to, from, source) { + apply: function(to, _from, _source) { to.set(tempBuffer, length); return NodeGit.Error.CODE.OK; }, - check: function(src, attr) { + check: function(_src, _attr) { return NodeGit.Error.CODE.OK; } }, 0) diff --git a/test/tests/index.js b/test/tests/index.js index f3d29e7f7..283f64d69 100644 --- a/test/tests/index.js +++ b/test/tests/index.js @@ -369,7 +369,7 @@ describe("Index", function() { var test = this; return test.index.find("src/thisisfake.cc") - .then(function(position) { + .then(function(_position) { assert.fail("the item should not be found"); }) .catch(function(error) { @@ -381,7 +381,7 @@ describe("Index", function() { var test = this; return test.index.find("src") - .then(function(position) { + .then(function(_position) { assert.fail("the item should not be found"); }) .catch(function(error) { @@ -402,7 +402,7 @@ describe("Index", function() { var test = this; return test.index.find("testing123/") - .then(function(position) { + .then(function(_position) { assert.fail("the item should not be found"); }) .catch(function(error) { diff --git a/test/tests/merge.js b/test/tests/merge.js index 00387da82..d77d08655 100644 --- a/test/tests/merge.js +++ b/test/tests/merge.js @@ -1,3 +1,4 @@ +/* eslint-disable no-unused-vars -- there's too many */ var assert = require("assert"); var path = require("path"); var fse = require("fs-extra"); diff --git a/test/tests/note.js b/test/tests/note.js index 9622c667d..ea9d5d190 100644 --- a/test/tests/note.js +++ b/test/tests/note.js @@ -59,7 +59,7 @@ describe("Note", function() { var sig = Signature.create("John", "john@doe.com", Date.now(), 0); Note.create(this.repository, noteRef, sig, sig, sha, "Testing!", 1) - .then((noteSha) => Note.remove(this.repository, noteRef, sig, sig, sha)) + .then((_noteSha) => Note.remove(this.repository, noteRef, sig, sig, sha)) .then(function() { return Note.read(test.repository, noteRef, sha).catch(function(ex) { assert.equal(ex.message, "note could not be found"); diff --git a/test/tests/rebase.js b/test/tests/rebase.js index d9aae1fbc..1ee3d04cc 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -79,7 +79,7 @@ describe("Rebase", function() { ourCommit = commit; }).then(function() { return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function(_branch) { return repository.createBranch(theirBranchName, commitOid); }); }); @@ -659,7 +659,7 @@ describe("Rebase", function() { .then(function() { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { + .then(function(_oid) { return repository.refreshIndex() .then(function(index) { assert.ok(!index.hasConflicts()); @@ -911,7 +911,7 @@ describe("Rebase", function() { ourCommit = commit; }).then(function() { return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function(_branch) { return repository.createBranch(theirBranchName, commitOid); }); }); @@ -1686,7 +1686,7 @@ describe("Rebase", function() { .then(function() { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { + .then(function(_oid) { return repository.refreshIndex() .then(function(index) { assert.ok(!index.hasConflicts()); @@ -1845,7 +1845,7 @@ describe("Rebase", function() { return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { - signingCb: (commitContent) => ({ + signingCb: (_commitContent) => ({ code: NodeGit.Error.CODE.OK, field: "moose-sig", signedData: "A moose was here." diff --git a/test/tests/remote.js b/test/tests/remote.js index c9bf8192c..bcb56a8ad 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -177,7 +177,7 @@ describe("Remote", function() { var refs = [ref + ":" + ref]; return remote.push(refs, fetchOpts) - .then(function(res) { + .then(function(_res) { assert.ok(wasCalled); }); }); @@ -205,7 +205,7 @@ describe("Remote", function() { var refs = [ref + ":" + ref]; return remote.push(refs, fetchOpts) - .then(function(res) { + .then(function(_res) { assert.ok(wasCalled); }); }); @@ -354,7 +354,7 @@ describe("Remote", function() { var refs = [ref + ":" + ref]; var options = { callbacks: { - credentials: function(url, userName) { + credentials: function(_url, _userName) { var test = Promise.resolve("test") .then(function() { return; }) .then(function() { return; }) @@ -388,7 +388,7 @@ describe("Remote", function() { var refs = [ref + ":" + ref]; var options = { callbacks: { - credentials: function(url, userName) { + credentials: function(_url, _userName) { var test = Promise.resolve() .then(Promise.resolve.bind(Promise)) .then(Promise.resolve.bind(Promise)) diff --git a/test/tests/repository.js b/test/tests/repository.js index 29f207509..3332fffd4 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -67,7 +67,7 @@ describe("Repository", function() { it("can initialize a repository into a folder", function() { return Repository.init(newRepoPath, 1) - .then(function(path, isBare) { + .then(function(_path, _isBare) { return Repository.open(newRepoPath); }); }); diff --git a/test/tests/revwalk.js b/test/tests/revwalk.js index bb1cd06ee..eb7a079d8 100644 --- a/test/tests/revwalk.js +++ b/test/tests/revwalk.js @@ -26,15 +26,14 @@ describe("Revwalk", function() { }) .then(function(commit) { test.commit = commit; + }) + .then(function() { + this.walker = this.repository.createRevWalk(); + this.walker.sorting(NodeGit.Revwalk.SORT.TIME); + this.walker.push(this.commit.id()); }); }); - beforeEach(function() { - this.walker = this.repository.createRevWalk(); - this.walker.sorting(NodeGit.Revwalk.SORT.TIME); - this.walker.push(this.commit.id()); - }); - it("can create a walker", function() { assert.ok(this.walker instanceof Revwalk); }); @@ -107,11 +106,11 @@ describe("Revwalk", function() { it("can get the largest number of commits within a specified range", function() { var test = this; - var storedCommits; + var _storedCommits; return test.walker.getCommits(991) .then(function(commits) { assert.equal(commits.length, 990); - storedCommits = commits; + _storedCommits = commits; test.walker = test.repository.createRevWalk(); test.walker.push(test.commit.id()); }); diff --git a/test/tests/signature.js b/test/tests/signature.js index e0387c3d3..b785fcfee 100644 --- a/test/tests/signature.js +++ b/test/tests/signature.js @@ -100,6 +100,7 @@ describe("Signature", function() { assert.equal(startSelfFreeingCount + 1, endSelfFreeingCount); assert.equal(startNonSelfFreeingCount, endNonSelfFreeingCount); + // eslint-disable-next-line no-unused-vars time = null; garbageCollect(); endSelfFreeingCount = Time.getSelfFreeingInstanceCount(); diff --git a/test/tests/stage.js b/test/tests/stage.js index 34de76630..99dd7b0e5 100644 --- a/test/tests/stage.js +++ b/test/tests/stage.js @@ -1,3 +1,4 @@ +/* eslint-disable no-octal */ var assert = require("assert"); var path = require("path"); var fse = require("fs-extra"); diff --git a/test/tests/stash.js b/test/tests/stash.js index 811a0c509..7bfa7e9a4 100644 --- a/test/tests/stash.js +++ b/test/tests/stash.js @@ -149,11 +149,13 @@ describe("Stash", function() { const fileContent2 = "Somewhere over the repo, changes were made."; const repo = this.repository; const filePath = path.join(repo.workdir(), fileName); + // eslint-disable-next-line no-unused-vars let oldContent; const stashMessage = "stash test"; return fse.readFile(filePath) .then((content) => { + // eslint-disable-next-line no-unused-vars oldContent = content; return fse.writeFile(filePath, fileContent); }) @@ -181,11 +183,13 @@ describe("Stash", function() { const fileContent = "Cha-cha-cha-chaaaaaangessssss"; const repo = this.repository; const filePath = path.join(repo.workdir(), fileName); + // eslint-disable-next-line no-unused-vars let oldContent; const stashMessage = "stash test"; return fse.readFile(filePath) .then((content) => { + // eslint-disable-next-line no-unused-vars oldContent = content; return fse.writeFile(filePath, fileContent); }) diff --git a/test/tests/submodule.js b/test/tests/submodule.js index 2323fa56c..107b14095 100644 --- a/test/tests/submodule.js +++ b/test/tests/submodule.js @@ -161,7 +161,7 @@ describe("Submodule", function() { it("can run sync callback without deadlocking", function() { var repo = this.workdirRepository; var submodules = []; - var submoduleCallback = function(submodule, name, payload) { + var submoduleCallback = function(submodule, name, _payload) { var submoduleName = submodule.name(); assert.equal(submoduleName, name); submodules.push(name); @@ -177,7 +177,7 @@ describe("Submodule", function() { it("can run async callback without deadlocking", function() { var repo = this.workdirRepository; var submodules = []; - var submoduleCallback = function(submodule, name, payload) { + var submoduleCallback = function(submodule, name, _payload) { var owner = submodule.owner(); return Submodule.lookup(owner, name) diff --git a/test/tests/tag.js b/test/tests/tag.js index 21acdcc1b..0478aa491 100644 --- a/test/tests/tag.js +++ b/test/tests/tag.js @@ -350,7 +350,7 @@ describe("Tag", function() { "-----END PGP SIGNATURE-----" ]; const message = "I'm a teapot"; - const signingCallback = (message) => ({ + const signingCallback = (_message) => ({ code: NodeGit.Error.CODE.OK, signedData: signatureLines.join("\n") }); diff --git a/test/tests/worker.js b/test/tests/worker.js index 5fbfeacee..1d1b14993 100644 --- a/test/tests/worker.js +++ b/test/tests/worker.js @@ -9,7 +9,9 @@ let Worker; try { Worker = require("worker_threads").Worker; -} catch (e) {} +} catch (e) { + // ignore +} if (Worker) { describe("Worker", function() { diff --git a/test/utils/index_setup.js b/test/utils/index_setup.js index ab5a75336..7dc3748e8 100644 --- a/test/utils/index_setup.js +++ b/test/utils/index_setup.js @@ -62,7 +62,7 @@ var IndexSetup = { return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ourCommit]); }) - .then(function(commitOid) { + .then(function(_commitOid) { return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) diff --git a/test/utils/loop_checkout.js b/test/utils/loop_checkout.js index f6e6c0736..b05fb1f8d 100644 --- a/test/utils/loop_checkout.js +++ b/test/utils/loop_checkout.js @@ -60,7 +60,7 @@ const changeDirExtFiles = function (dir, ext, newText) { }); return filesChanged; }) - .catch(function(err) { + .catch(function() { throw new Error("Error getting files with extension .".concat(ext)); }); }; @@ -72,6 +72,7 @@ const loopingCheckoutHead = async function(repoPath, repo, times) { const text1 = "Text1: changing content to trigger checkout"; let iteration = 0; + // eslint-disable-next-line no-constant-condition for (let i = 0; true; i = ++i%2) { const newText = (i == 0) ? text0 : text1; const jsRelativeFilePahts = await changeDirExtFiles(repoPath, "js", newText); // jshint ignore:line diff --git a/test/utils/worker_checkout.js b/test/utils/worker_checkout.js index adfb7aa7c..661bd3dca 100644 --- a/test/utils/worker_checkout.js +++ b/test/utils/worker_checkout.js @@ -46,6 +46,6 @@ return NodeGit.Clone(url, clonePath, cloneOpts) assert.strictEqual(applyCallbackResult, 0); parentPort.postMessage("success"); }) -.catch((err) => { +.catch(() => { parentPort.postMessage("failure"); }); \ No newline at end of file diff --git a/test/utils/worker_context_aware.js b/test/utils/worker_context_aware.js index b7784fdae..a255267f3 100644 --- a/test/utils/worker_context_aware.js +++ b/test/utils/worker_context_aware.js @@ -34,7 +34,7 @@ return NodeGit.Clone(url, clonePath, opts) var historyCount = 0; var history = commit.history(); - history.on("commit", function(commit) { + history.on("commit", function(_commit) { // Number of commits is known to be higher than 200 if (++historyCount == 200) { // Tracked objects must work too when the Garbage Collector is triggered @@ -59,12 +59,12 @@ return NodeGit.Clone(url, clonePath, opts) } }); - history.on("end", function(commits) { + history.on("end", function(_commits) { // Test should not get this far parentPort.postMessage("failure"); }); - history.on("error", function(err) { + history.on("error", function(_end) { assert.ok(false); }); diff --git a/test/utils/worker_context_aware_checkout.js b/test/utils/worker_context_aware_checkout.js index 6562915a4..1b252876b 100644 --- a/test/utils/worker_context_aware_checkout.js +++ b/test/utils/worker_context_aware_checkout.js @@ -63,4 +63,4 @@ return NodeGit.Clone(url, clonePath, cloneOpts) parentPort.postMessage("numbersDoNotMatch"); } return promisify(setTimeout)(50000); -}).catch((err) => parentPort.postMessage("failure")); \ No newline at end of file +}).catch(() => parentPort.postMessage("failure")); \ No newline at end of file diff --git a/utils/acquireOpenSSL.js b/utils/acquireOpenSSL.js index 6f8280ca2..7969b29ce 100644 --- a/utils/acquireOpenSSL.js +++ b/utils/acquireOpenSSL.js @@ -78,7 +78,7 @@ const buildDarwin = async (buildCwd, macOsDeploymentTarget) => { throw new Error("Expected macOsDeploymentTarget to be specified"); } - const arguments = [ + const buildArgs = [ process.arch === "x64" ? "darwin64-x86_64-cc" : "darwin64-arm64-cc", // speed up ecdh on little-endian platforms with 128bit int support "enable-ec_nistp_64_gcc_128", @@ -95,7 +95,7 @@ const buildDarwin = async (buildCwd, macOsDeploymentTarget) => { `-mmacosx-version-min=${macOsDeploymentTarget}` ]; - await execPromise(`./Configure ${arguments.join(" ")}`, { + await execPromise(`./Configure ${buildArgs.join(" ")}`, { cwd: buildCwd }, { pipeOutput: true }); @@ -117,7 +117,7 @@ const buildDarwin = async (buildCwd, macOsDeploymentTarget) => { }; const buildLinux = async (buildCwd) => { - const arguments = [ + const buildArgs = [ "linux-x86_64", // Electron(at least on centos7) imports the libcups library at runtime, which has a // dependency on the system libssl/libcrypto which causes symbol conflicts and segfaults. @@ -134,7 +134,7 @@ const buildLinux = async (buildCwd) => { `--prefix="${extractPath}"`, `--openssldir="${extractPath}"` ]; - await execPromise(`./Configure ${arguments.join(" ")}`, { + await execPromise(`./Configure ${buildArgs.join(" ")}`, { cwd: buildCwd }, { pipeOutput: true }); @@ -256,7 +256,9 @@ const buildOpenSSLIfNecessary = async ({ await fs.stat(extractPath); console.log("Skipping OpenSSL build, dir exists"); return; - } catch {} + } catch { + // ignore + } const openSSLUrl = getOpenSSLSourceUrl(openSSLVersion); const openSSLSha256Url = getOpenSSLSourceSha256Url(openSSLVersion); @@ -309,7 +311,9 @@ const downloadOpenSSLIfNecessary = async ({ await fs.stat(extractPath); console.log("Skipping OpenSSL download, dir exists"); return; - } catch {} + } catch { + // ignore + } if (maybeDownloadSha256Url) { maybeDownloadSha256 = (await got(maybeDownloadSha256Url)).body.trim(); @@ -348,10 +352,9 @@ const getOpenSSLPackageName = () => { const getOpenSSLPackageUrl = () => `${packageJson.binary.host}${getOpenSSLPackageName()}`; const buildPackage = async () => { - let resolve, reject; - const promise = new Promise((_resolve, _reject) => { + let resolve; + const promise = new Promise((_resolve) => { resolve = _resolve; - reject = _reject; }); await pipeline( tar.pack(extractPath, { @@ -361,7 +364,9 @@ const buildPackage = async () => { return path.extname(name) === ".pc" || path.basename(name) === "pkgconfig"; }, + // eslint-disable-next-line no-octal dmode: 0755, + // eslint-disable-next-line no-octal fmode: 0644 }), zlib.createGzip(), diff --git a/utils/isBuildingForElectron.js b/utils/isBuildingForElectron.js index 295f6ab1f..b395ef55b 100644 --- a/utils/isBuildingForElectron.js +++ b/utils/isBuildingForElectron.js @@ -24,7 +24,9 @@ if (!isElectron) { if (built_with_electron) { isElectron = true; } - } catch (e) {} + } catch (e) { + // ignore + } } process.stdout.write(isElectron ? "1" : "0"); From 4f78356efdf8f0b7954db891130a05f620912f35 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sun, 7 Mar 2021 22:48:25 +0100 Subject: [PATCH 5/6] lint++ --- generate/scripts/generateJson.js | 7 +++---- generate/scripts/helpers.js | 28 +++++++--------------------- test/tests/revwalk.js | 8 ++++---- 3 files changed, 14 insertions(+), 29 deletions(-) diff --git a/generate/scripts/generateJson.js b/generate/scripts/generateJson.js index 40e869c90..68d149e90 100644 --- a/generate/scripts/generateJson.js +++ b/generate/scripts/generateJson.js @@ -194,15 +194,14 @@ module.exports = function generateJson() { }); // Process enums _(enums).forEach(function(enumerable) { - output.some(function(obj) { + for (const obj of output) { if (enumerable.typeName.indexOf(obj.typeName) == 0) { enumerable.owner = obj.jsClassName; } else if (enumerable.owner) { - return true; + break; } - return false; - }); + } var override = descriptor.enums[enumerable.typeName] || {}; diff --git a/generate/scripts/helpers.js b/generate/scripts/helpers.js index c5107b266..70ce02879 100644 --- a/generate/scripts/helpers.js +++ b/generate/scripts/helpers.js @@ -110,17 +110,11 @@ var Helpers = { }, getLibgitType: function(normalizedType, types) { - var libgitType; - - types.some(function (type) { + for (const type of types) { if (type[0] === normalizedType) { - libgitType = type[1]; - return true; + return type[1]; } - return false; - }); - - return libgitType; + } }, processCallback: function(field) { @@ -144,19 +138,12 @@ var Helpers = { field.isOptional = true; } else { - var cbFieldName; - - allFields.some(function (cbField) { + for (const cbField of allFields) { if (Helpers.isPayloadFor(cbField, field.name)) { - cbFieldName = cbField.name; - return true; + field.payloadFor = cbField.name; + field.isOptional = true; + break; } - return false; - }); - - if (cbFieldName) { - field.payloadFor = cbFieldName; - field.isOptional = true; } } }, @@ -226,7 +213,6 @@ var Helpers = { return fnDef; }); - typeDefOverrides = descriptor.types[typeDef.typeName] || {}; var functionOverrides = typeDefOverrides.functions || {}; typeDef.functions.forEach(function(fnDef) { Helpers.decorateFunction(fnDef, typeDef, functionOverrides[fnDef.cFunctionName] || {}, enums); diff --git a/test/tests/revwalk.js b/test/tests/revwalk.js index eb7a079d8..79b830248 100644 --- a/test/tests/revwalk.js +++ b/test/tests/revwalk.js @@ -27,10 +27,10 @@ describe("Revwalk", function() { .then(function(commit) { test.commit = commit; }) - .then(function() { - this.walker = this.repository.createRevWalk(); - this.walker.sorting(NodeGit.Revwalk.SORT.TIME); - this.walker.push(this.commit.id()); + .then(function () { + test.walker = test.repository.createRevWalk(); + test.walker.sorting(NodeGit.Revwalk.SORT.TIME); + test.walker.push(test.commit.id()); }); }); From 90fc7227721cab96f60a0b6a0fbe7c63f4a0bf14 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Sat, 27 Feb 2021 18:15:08 +0100 Subject: [PATCH 6/6] npm run lint --- CONTRIBUTING.md | 14 +- FAQ.md | 7 +- HISTORY.md | 15 +- README.md | 85 +- TESTING.md | 21 +- examples/README.md | 3 +- examples/add-and-commit.js | 26 +- examples/apps/git_profanity_check.js | 44 +- examples/checkout-remote-branch.js | 17 +- examples/clone.js | 50 +- examples/cloneFromGithubWith2Factor.js | 28 +- examples/create-branch.js | 13 +- examples/create-new-repo.js | 13 +- examples/details-for-tree-entry.js | 7 +- examples/diff-commits.js | 18 +- examples/fetch.js | 11 +- examples/general.js | 42 +- examples/index-add-and-remove.js | 227 +- examples/merge-cleanly.js | 198 +- examples/merge-with-conflicts.js | 287 +- examples/pull.js | 14 +- examples/push.js | 94 +- examples/read-file.js | 3 +- examples/remove-and-commit.js | 33 +- examples/status.js | 41 +- examples/walk-history-for-file.js | 33 +- examples/walk-history.js | 11 +- examples/walk-tree.js | 12 +- generate/README.md | 14 +- generate/index.js | 17 +- generate/input/README.md | 26 +- generate/input/callbacks.json | 4 +- generate/input/descriptor.json | 191 +- generate/input/ignored-missing-tests.json | 27 +- generate/input/libgit2-docs.json | 2541 +++--------- generate/input/libgit2-supplement.json | 185 +- generate/scripts/generateJson.js | 96 +- generate/scripts/generateMissingTests.js | 32 +- generate/scripts/generateNativeCode.js | 145 +- generate/scripts/helpers.js | 168 +- generate/scripts/utils.js | 107 +- generate/templates/README.md | 30 +- generate/templates/filters/and.js | 2 +- generate/templates/filters/args_info.js | 26 +- .../filters/array_type_to_plain_type.js | 2 +- .../templates/filters/as_element_pointer.js | 6 +- .../templates/filters/callback_args_count.js | 17 +- .../templates/filters/callback_args_info.js | 27 +- generate/templates/filters/cpp_to_v8.js | 4 +- generate/templates/filters/default_value.js | 2 +- generate/templates/filters/fields_info.js | 18 +- .../get_cpp_function_for_root_proto.js | 6 +- .../filters/has_function_on_root_proto.js | 6 +- generate/templates/filters/has_return_type.js | 2 +- .../templates/filters/has_return_value.js | 8 +- generate/templates/filters/is_array_type.js | 2 +- .../templates/filters/is_double_pointer.js | 2 +- .../filters/is_fixed_length_string.js | 2 +- generate/templates/filters/is_oid.js | 2 +- generate/templates/filters/is_payload.js | 4 +- generate/templates/filters/is_pointer.js | 2 +- generate/templates/filters/is_v8_value.js | 13 +- generate/templates/filters/js_args_count.js | 7 +- generate/templates/filters/or.js | 2 +- generate/templates/filters/payload_for.js | 5 +- generate/templates/filters/replace.js | 2 +- generate/templates/filters/returns_count.js | 7 +- generate/templates/filters/returns_info.js | 34 +- generate/templates/filters/subtract.js | 2 +- generate/templates/filters/this_info.js | 4 +- generate/templates/filters/title_case.js | 17 +- generate/templates/filters/to_bool.js | 2 +- .../templates/filters/to_size_of_array.js | 2 +- generate/templates/filters/un_pointer.js | 2 +- generate/templates/filters/unsigned.js | 2 +- generate/templates/filters/upper.js | 2 +- guides/README.md | 4 +- guides/cloning/README.md | 52 +- guides/cloning/gh-two-factor/README.md | 76 +- guides/cloning/gh-two-factor/index.js | 21 +- guides/cloning/index.js | 17 +- guides/cloning/ssh-with-agent/README.md | 70 +- guides/cloning/ssh-with-agent/index.js | 21 +- guides/install/README.md | 10 +- guides/install/electron/README.md | 8 +- guides/install/from-source/README.md | 31 +- guides/repositories/README.md | 76 +- guides/repositories/index.js | 56 +- guides/repositories/initializing/README.md | 16 +- guides/repositories/initializing/index.js | 22 +- lib/README.md | 2 +- lib/attr.js | 4 +- lib/blob.js | 28 +- lib/branch.js | 17 +- lib/buf.js | 32 +- lib/commit.js | 446 +-- lib/config.js | 31 +- lib/convenient_hunks.js | 45 +- lib/convenient_patch.js | 67 +- lib/credential.js | 20 +- lib/deprecated/structs/ApplyOptions.js | 2 +- lib/deprecated/structs/BlameOptions.js | 2 +- lib/deprecated/structs/BlobFilterOptions.js | 2 +- lib/deprecated/structs/CheckoutOptions.js | 2 +- lib/deprecated/structs/CherrypickOptions.js | 2 +- lib/deprecated/structs/CloneOptions.js | 2 +- .../structs/DescribeFormatOptions.js | 2 +- lib/deprecated/structs/DescribeOptions.js | 2 +- lib/deprecated/structs/DiffFindOptions.js | 2 +- lib/deprecated/structs/DiffOptions.js | 2 +- lib/deprecated/structs/FetchOptions.js | 2 +- lib/deprecated/structs/MergeFileInput.js | 2 +- lib/deprecated/structs/MergeFileOptions.js | 2 +- lib/deprecated/structs/MergeOptions.js | 2 +- lib/deprecated/structs/ProxyOptions.js | 2 +- lib/deprecated/structs/PushOptions.js | 2 +- lib/deprecated/structs/RebaseOptions.js | 2 +- lib/deprecated/structs/RemoteCreateOptions.js | 2 +- .../structs/RepositoryInitOptions.js | 2 +- lib/deprecated/structs/RevertOptions.js | 2 +- lib/deprecated/structs/StashApplyOptions.js | 2 +- lib/deprecated/structs/StatusOptions.js | 2 +- .../structs/SubmoduleUpdateOptions.js | 2 +- lib/diff.js | 55 +- lib/diff_file.js | 25 +- lib/diff_line.js | 22 +- lib/error.js | 5 +- lib/filter_registry.js | 6 +- lib/graph.js | 9 +- lib/index.js | 38 +- lib/merge.js | 32 +- lib/note.js | 2 +- lib/object.js | 25 +- lib/odb_object.js | 2 +- lib/oid.js | 14 +- lib/rebase.js | 83 +- lib/reference.js | 145 +- lib/repository.js | 96 +- lib/reset.js | 41 +- lib/revparse.js | 5 +- lib/revwalk.js | 111 +- lib/signature.js | 9 +- lib/stash.js | 2 +- lib/status.js | 4 +- lib/status_file.js | 77 +- lib/submodule.js | 2 +- lib/tag.js | 132 +- lib/tree.js | 95 +- lib/tree_entry.js | 57 +- lib/utils/lookup_wrapper.js | 20 +- lib/utils/shallow_clone.js | 4 +- lifecycleScripts/README.md | 4 +- lifecycleScripts/install.js | 38 +- lifecycleScripts/postinstall.js | 43 +- lifecycleScripts/preinstall.js | 28 +- lifecycleScripts/submodules/getStatus.js | 35 +- lifecycleScripts/submodules/index.js | 60 +- test/README.md | 8 +- test/index.js | 26 +- test/runner.js | 83 +- test/tests/annotated_commit.js | 49 +- test/tests/attr.js | 17 +- test/tests/blame.js | 26 +- test/tests/blob.js | 575 ++- test/tests/branch.js | 126 +- test/tests/checkout.js | 265 +- test/tests/cherrypick.js | 98 +- test/tests/commit.js | 1996 +++++---- test/tests/config.js | 150 +- test/tests/convenient_line.js | 35 +- test/tests/cred.js | 56 +- test/tests/diff.js | 517 ++- test/tests/filter.js | 799 ++-- test/tests/graph.js | 63 +- test/tests/ignore.js | 17 +- test/tests/index.js | 415 +- test/tests/merge.js | 2473 ++++++------ test/tests/note.js | 33 +- test/tests/odb.js | 52 +- test/tests/oid.js | 44 +- test/tests/packbuilder.js | 8 +- test/tests/patch.js | 93 +- test/tests/pathspec.js | 12 +- test/tests/rebase.js | 3566 ++++++++--------- test/tests/refs.js | 74 +- test/tests/remote.js | 570 ++- test/tests/repository.js | 318 +- test/tests/reset.js | 330 +- test/tests/revert.js | 64 +- test/tests/revparse.js | 44 +- test/tests/revwalk.js | 249 +- test/tests/signature.js | 100 +- test/tests/stage.js | 663 ++- test/tests/stash.js | 208 +- test/tests/status.js | 109 +- test/tests/status_file.js | 35 +- test/tests/status_list.js | 36 +- test/tests/submodule.js | 95 +- test/tests/tag.js | 747 ++-- test/tests/tree.js | 58 +- test/tests/tree_entry.js | 164 +- test/tests/treebuilder.js | 168 +- test/tests/worker.js | 70 +- test/utils/garbage_collect.js | 2 +- test/utils/index_setup.js | 88 +- test/utils/leak_test.js | 36 +- test/utils/loop_checkout.js | 52 +- test/utils/repository_setup.js | 365 +- test/utils/worker.js | 49 +- test/utils/worker_checkout.js | 67 +- test/utils/worker_context_aware.js | 97 +- test/utils/worker_context_aware_checkout.js | 91 +- utils/README.md | 12 +- utils/acquireOpenSSL.js | 197 +- utils/buildFlags.js | 2 +- utils/configureLibssh2.js | 18 +- utils/defaultCxxStandard.js | 8 +- utils/execPromise.js | 11 +- utils/getElectronOpenSSLRoot.js | 2 +- utils/gitExecutableLocation.js | 10 +- utils/isBuildingForElectron.js | 13 +- utils/retry.js | 18 +- 222 files changed, 10884 insertions(+), 13695 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 337971a43..d31ea4193 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,6 @@ -Contribution Guidelines ------------------------ +## Contribution Guidelines -### A Note on Issues and Support ## +### A Note on Issues and Support We try to be available pretty often to help when problems come up. We like to split incoming questions into two categories: potential bugs/features, and questions. If you want a feature added, or think you've found a bug @@ -9,14 +8,15 @@ in the code (or in the examples), search the [issue tracker](https://github.com/ find anything, file a new issue. If you just have questions, instead of using issues, [sign up](http://slack.libgit2.org/) to libgit2's Slack instance and then contact us in the [#nodegit channel](https://libgit2.slack.com/messages/nodegit/). -## How to Help ## +## How to Help NodeGit is iterating pretty quickly, but it can always go faster. We welcome help with the deeper darker parts, like the templates and binding and more, but there are plenty of smaller things to do as well. Things that are always needed: - - Filing issues (see above). - - Writing tests (See [here](https://github.com/nodegit/nodegit/blob/master/TESTING.md)). - - Writing examples. + +- Filing issues (see above). +- Writing tests (See [here](https://github.com/nodegit/nodegit/blob/master/TESTING.md)). +- Writing examples. These are all good easy ways to start getting involved with the project. You can also look through the issue tracker and see if you can help with any existing issues. Please comment with your intention and any questions before getting diff --git a/FAQ.md b/FAQ.md index 6d136b820..67e313e53 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,13 +1,14 @@ -NodeGit FAQ ------------ +## NodeGit FAQ Feel free to add common problems with their solutions here, or just anything that wasn't clear at first. -#### Error: callback returned unsupported credentials type #### +#### Error: callback returned unsupported credentials type As seen in nodegit/#959 -- some golang hackers have started to use the following stanza in .gitconfig to allow `go get` to work with private repos: + ``` [url "git@github.com:"] insteadOf = https://github.com/ ``` + But if you do this, code can call `NodeGit.Clone.clone(url: 'https://foo')` and have the `authentication` callback be asked for **SSH** credentials instead of HTTPS ones, which might not be what your application expected. diff --git a/HISTORY.md b/HISTORY.md index 20061a36e..e074ee5b6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,9 +1,8 @@ -0.2.0 / 2014-11-24 -=================== +# 0.2.0 / 2014-11-24 - * Shifted to promises; asynchronous methods now provide promises. - * Lots of new methods exposed for merging, pushing, blaming and more. - * SSH transport now works. - * Switched generation of native module code from ejsg to Combyne. - * Added continuous integration with Linux, OSX, and Windows. - * Many method and property names have changed. +- Shifted to promises; asynchronous methods now provide promises. +- Lots of new methods exposed for merging, pushing, blaming and more. +- SSH transport now works. +- Switched generation of native module code from ejsg to Combyne. +- Added continuous integration with Linux, OSX, and Windows. +- Many method and property names have changed. diff --git a/README.md b/README.md index 72442d791..eef8ce0c5 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,17 @@ **Stable (libgit2@v0.28.3): 0.28.3** -## Have a problem? Come chat with us! ## +## Have a problem? Come chat with us! Visit [slack.libgit2.org](http://slack.libgit2.org/) to sign up, then join us in #nodegit. -## Maintained by ## +## Maintained by + Tyler Ang-Wanek [@twwanek](http://twitter.com/twwanek) with help from tons of [awesome contributors](https://github.com/nodegit/nodegit/contributors)! -### Alumni Maintainers ### +### Alumni Maintainers + Tim Branyen [@tbranyen](http://twitter.com/tbranyen), John Haley [@johnhaley81](http://twitter.com/johnhaley81), Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp), @@ -22,16 +24,16 @@ Steve Smith [@orderedlist](https://twitter.com/orderedlist), Michael Robinson [@codeofinterest](http://twitter.com/codeofinterest), and Nick Kallen [@nk](http://twitter.com/nk) -## API Documentation. ## +## API Documentation. [http://www.nodegit.org/](http://www.nodegit.org/) -## Getting started. ## +## Getting started. NodeGit will work on most systems out-of-the-box without any native dependencies. -``` bash +```bash npm install nodegit ``` @@ -41,7 +43,7 @@ libstdc++-4.9. In Ubuntu: -``` sh +```sh sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install libstdc++-4.9-dev @@ -49,7 +51,7 @@ sudo apt-get install libstdc++-4.9-dev In Travis: -``` yaml +```yaml addons: apt: sources: @@ -60,64 +62,66 @@ addons: In CircleCI: -``` yaml - dependencies: - pre: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update - - sudo apt-get install -y libstdc++-4.9-dev +```yaml +dependencies: + pre: + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get update + - sudo apt-get install -y libstdc++-4.9-dev ``` -If you receive errors about *lifecycleScripts* preinstall/install you probably miss *libssl-dev* +If you receive errors about _lifecycleScripts_ preinstall/install you probably miss _libssl-dev_ In Ubuntu: + ``` sudo apt-get install libssl-dev ``` You will need the following libraries installed on your linux machine: - - libpcre - - libpcreposix - - libkrb5 - - libk5crypto - - libcom_err + +- libpcre +- libpcreposix +- libkrb5 +- libk5crypto +- libcom_err When building locally, you will also need development packages for kerberos and pcre, so both of these utilities must be present on your machine: - - pcre-config - - krb5-config +- pcre-config +- krb5-config If you are still encountering problems while installing, you should try the [Building from source](http://www.nodegit.org/guides/install/from-source/) instructions. -## API examples. ## +## API examples. -### Cloning a repository and reading a file: ### +### Cloning a repository and reading a file: -``` javascript +```javascript var Git = require("nodegit"); // Clone a given repository into the `./tmp` folder. Git.Clone("https://github.com/nodegit/nodegit", "./tmp") // Look up this known commit. - .then(function(repo) { + .then(function (repo) { // Use a known commit sha from this repository. return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); }) // Look up a specific file within that commit. - .then(function(commit) { + .then(function (commit) { return commit.getEntry("README.md"); }) // Get the blob contents from the file. - .then(function(entry) { + .then(function (entry) { // Patch the blob to contain a reference to the entry. - return entry.getBlob().then(function(blob) { + return entry.getBlob().then(function (blob) { blob.entry = entry; return blob; }); }) // Display information about the blob. - .then(function(blob) { + .then(function (blob) { // Show the path, sha, and filesize in bytes. console.log(blob.entry.path() + blob.entry.sha() + blob.rawsize() + "b"); @@ -127,23 +131,24 @@ Git.Clone("https://github.com/nodegit/nodegit", "./tmp") // Show the entire file. console.log(String(blob)); }) - .catch(function(err) { console.log(err); }); - + .catch(function (err) { + console.log(err); + }); ``` -### Emulating git log: ### +### Emulating git log: -``` javascript +```javascript var Git = require("nodegit"); // Open the repository directory. Git.Repository.open("tmp") // Open the master branch. - .then(function(repo) { + .then(function (repo) { return repo.getMasterCommit(); }) // Display information about commits on master. - .then(function(firstCommitOnMaster) { + .then(function (firstCommitOnMaster) { // Create a new history event emitter. var history = firstCommitOnMaster.history(); @@ -151,7 +156,7 @@ Git.Repository.open("tmp") var count = 0; // Listen for commit events from the history. - history.on("commit", function(commit) { + history.on("commit", function (commit) { // Disregard commits past 9. if (++count >= 9) { return; @@ -180,10 +185,10 @@ Git.Repository.open("tmp") For more examples, check the `examples/` folder. -## Unit tests. ## +## Unit tests. -You will need to build locally before running the tests. See above. +You will need to build locally before running the tests. See above. -``` bash +```bash npm test ``` diff --git a/TESTING.md b/TESTING.md index c149c6b5b..4b06ccbe7 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,24 +1,23 @@ -Test Contribution Guidelines ----------------------------- +## Test Contribution Guidelines This is a guide on how to contribute test cases to help with coverage testing for NodeGit. -## Getting Started ## +## Getting Started Currently there are a number of fields and functions in NodeGit that have no tests at all. A list of which files are missing and what fields and functions need tests can be generated by running -``` bash +```bash npm run generateMissingTests ``` ->You should have run already `npm install .` or it will complain about +> You should have run already `npm install .` or it will complain about > missing `nodegit-promise` or suchlike This will make the file `generate/output/missing-tests.json` which will contain info for tests or files that are currently missing. From this file you can find fields and functions that don't have any tests yet and pick one to work on. -## Adding a test ## +## Adding a test After you find a test that's missing the next step is to find or add the file that you need to add it into. You can always use other tests in the directory as a guide for writing more. All new files will be automatically added during a test run. @@ -26,7 +25,7 @@ In the `missing-tests.json` file you'll see it formatted like so: ```json { - "{className}":{ + "{className}": { "fields": [], "functions": [] } @@ -48,19 +47,19 @@ You can mark something to be ignored inside of the `/generate/missing-tests-igno After you write your test make sure to run `npm run generateMissingTests` again to confirm that the field/function that a test was written for no longer shows up. -## Test results ## +## Test results -### The test passes ### +### The test passes Excellent!! Make sure that the test is working correctly and testing what you're expecting it to test and then move onto the [next section](#making-a-pull-request). -### The test fails ### +### The test fails This is also great! You just found something that wasn't properly covered in our generate scripts for wrapping libgit2. We'll have to further analyze what's going on and figure out how to fix it. For bonus points you could also include a fix in your pull request but that step is optional. -## Making a pull request ## +## Making a pull request So you made your self a new test for NodeGit and now you want to add it to the main repo? That's great! We'll try and make the process as simple and easy as possible for you. diff --git a/examples/README.md b/examples/README.md index 1b1fc2b32..11300e6af 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,3 @@ ## /examples - List of examples of using NodeGit to implement common git core operations. - +List of examples of using NodeGit to implement common git core operations. diff --git a/examples/add-and-commit.js b/examples/add-and-commit.js index 42215257b..b24bf3862 100644 --- a/examples/add-and-commit.js +++ b/examples/add-and-commit.js @@ -9,38 +9,32 @@ const directoryName = "salad/toast/strangerinastrangeland/theresnowaythisexists" * This example creates a certain file `newfile.txt`, adds it to the git * index and commits it to head. Similar to a `git add newfile.txt` * followed by a `git commit` -**/ - + **/ (async () => { const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); - + await fs.promises.mkdir(path.join(repo.workdir(), directoryName), { recursive: true, }); - + await fs.promises.writeFile(path.join(repo.workdir(), fileName), fileContent); - await fs.promises.writeFile( - path.join(repo.workdir(), directoryName, fileName), - fileContent - ); - + await fs.promises.writeFile(path.join(repo.workdir(), directoryName, fileName), fileContent); + const index = await repo.refreshIndex(); - + // this file is in the root of the directory and doesn't need a full path await index.addByPath(fileName); // this file is in a subdirectory and can use a relative path await index.addByPath(path.posix.join(directoryName, fileName)); // this will write both files to the index await index.write(); - + const oid = await index.writeTree(); - + const parent = await repo.getHeadCommit(); - const author = nodegit.Signature.now("Scott Chacon", - "schacon@gmail.com"); - const committer = nodegit.Signature.now("Scott A Chacon", - "scott@github.com"); + const author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); + const committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); const commitId = await repo.createCommit("HEAD", author, committer, "message", oid, [parent]); diff --git a/examples/apps/git_profanity_check.js b/examples/apps/git_profanity_check.js index ee448ebbf..2ed5a50b7 100755 --- a/examples/apps/git_profanity_check.js +++ b/examples/apps/git_profanity_check.js @@ -29,32 +29,32 @@ else { // Set repo branch if (process.argv.length < 4) { console.log("No branch passed as argument, defaulting to master."); - } - else { + } else { branch = process.argv[3]; } } // Open repository. git.Repo.open(path) -.then(function(repo) { - // Open branch, default to master. - return repo.getBranchCommit(branch); -}).then(function(firstCommit) { - // Iterate history - var history = firstCommit.history(); - - // Iterate over every commit message and test for words. - history.on("commit", function(commit) { - var message = commit.message(); - - if (reCurse.test(message)) { - console.log("Curse detected in commit", commit.sha()); - console.log("=> ", message); - return; - } + .then(function (repo) { + // Open branch, default to master. + return repo.getBranchCommit(branch); + }) + .then(function (firstCommit) { + // Iterate history + var history = firstCommit.history(); + + // Iterate over every commit message and test for words. + history.on("commit", function (commit) { + var message = commit.message(); + + if (reCurse.test(message)) { + console.log("Curse detected in commit", commit.sha()); + console.log("=> ", message); + return; + } + }); + + // Start history iteration. + history.start(); }); - - // Start history iteration. - history.start(); -}); diff --git a/examples/checkout-remote-branch.js b/examples/checkout-remote-branch.js index 4ebf9050b..514695f51 100644 --- a/examples/checkout-remote-branch.js +++ b/examples/checkout-remote-branch.js @@ -4,9 +4,9 @@ var path = require("path"); var remoteBranchName = "REMOTE-BRANCH-NAME"; nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { - - return repo.getHeadCommit() + .then(function (repo) { + return repo + .getHeadCommit() .then(function (targetCommit) { return repo.createBranch(remoteBranchName, targetCommit, false); }) @@ -14,13 +14,12 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) return repo.checkoutBranch(reference, {}); }) .then(function () { - return repo.getReferenceCommit( - "refs/remotes/origin/" + remoteBranchName); + return repo.getReferenceCommit("refs/remotes/origin/" + remoteBranchName); }) .then(function (commit) { nodegit.Reset.reset(repo, commit, 3, {}); }); - - }).done(function() { - console.log("All done!"); -}); + }) + .done(function () { + console.log("All done!"); + }); diff --git a/examples/clone.js b/examples/clone.js index 459713d94..2d4efa8e9 100644 --- a/examples/clone.js +++ b/examples/clone.js @@ -2,38 +2,36 @@ var nodegit = require("../"); var fse = require("fs-extra"); var path = "/tmp/nodegit-clone-demo"; -fse.remove(path).then(function() { +fse.remove(path).then(function () { var entry; - nodegit.Clone( - "https://github.com/nodegit/nodegit.git", - path, - { + nodegit + .Clone("https://github.com/nodegit/nodegit.git", path, { fetchOpts: { callbacks: { - certificateCheck: function() { + certificateCheck: function () { // github will fail cert check on some OSX machines // this overrides that check return 0; - } - } - } + }, + }, + }, }) - .then(function(repo) { - return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); - }) - .then(function(commit) { - return commit.getEntry("README.md"); - }) - .then(function(entryResult) { - entry = entryResult; - return entry.getBlob(); - }) - .done(function(blob) { - console.log(entry.name(), entry.sha(), blob.rawsize() + "b"); - console.log("========================================================\n\n"); - var firstTenLines = blob.toString().split("\n").slice(0, 10).join("\n"); - console.log(firstTenLines); - console.log("..."); - }); + .then(function (repo) { + return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); + }) + .then(function (commit) { + return commit.getEntry("README.md"); + }) + .then(function (entryResult) { + entry = entryResult; + return entry.getBlob(); + }) + .done(function (blob) { + console.log(entry.name(), entry.sha(), blob.rawsize() + "b"); + console.log("========================================================\n\n"); + var firstTenLines = blob.toString().split("\n").slice(0, 10).join("\n"); + console.log(firstTenLines); + console.log("..."); + }); }); diff --git a/examples/cloneFromGithubWith2Factor.js b/examples/cloneFromGithubWith2Factor.js index 62e0df807..9744e51d1 100644 --- a/examples/cloneFromGithubWith2Factor.js +++ b/examples/cloneFromGithubWith2Factor.js @@ -16,24 +16,22 @@ var repoUrl = "https://github.com/" + repoOwner + "/" + repoName + ".git"; var opts = { fetchOpts: { callbacks: { - credentials: function() { + credentials: function () { return nodegit.Cred.userpassPlaintextNew(token, "x-oauth-basic"); }, - certificateCheck: function() { + certificateCheck: function () { return 0; - } - } - } + }, + }, + }, }; -fse.remove(path).then(function() { - nodegit.Clone(repoUrl, path, opts) - .done(function(repo) { - if (repo instanceof nodegit.Repository) { - console.info("We cloned the repo!"); - } - else { - console.error("Something borked :("); - } - }); +fse.remove(path).then(function () { + nodegit.Clone(repoUrl, path, opts).done(function (repo) { + if (repo instanceof nodegit.Repository) { + console.info("We cloned the repo!"); + } else { + console.error("Something borked :("); + } + }); }); diff --git a/examples/create-branch.js b/examples/create-branch.js index 7374de053..cb64fb09d 100644 --- a/examples/create-branch.js +++ b/examples/create-branch.js @@ -2,15 +2,12 @@ var nodegit = require("../"); var path = require("path"); nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { + .then(function (repo) { // Create a new branch on head - return repo.getHeadCommit() - .then(function(commit) { - return repo.createBranch( - "new-branch", - commit, - 0); + return repo.getHeadCommit().then(function (commit) { + return repo.createBranch("new-branch", commit, 0); }); - }).done(function() { + }) + .done(function () { console.log("All done!"); }); diff --git a/examples/create-new-repo.js b/examples/create-new-repo.js index 1df93fbbc..35d2abc20 100644 --- a/examples/create-new-repo.js +++ b/examples/create-new-repo.js @@ -5,7 +5,6 @@ const fileName = "newfile.txt"; const fileContent = "hello world"; const repoDir = "../newRepo"; - (async () => { await fs.promises.mkdir(path.resolve(__dirname, repoDir), { recursive: true, @@ -15,18 +14,14 @@ const repoDir = "../newRepo"; const index = await repo.refreshIndex(); await index.addByPath(fileName); await index.write(); - + const oid = await index.writeTree(); - - const author = nodegit.Signature.now("Scott Chacon", - "schacon@gmail.com"); - const committer = nodegit.Signature.now("Scott A Chacon", - "scott@github.com"); + + const author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); + const committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); // Since we're creating an initial commit, it has no parents. Note that unlike // normal we don't get the head either, because there isn't one yet. const commitId = await repo.createCommit("HEAD", author, committer, "message", oid, []); console.log("New Commit: ", commitId); })(); - - diff --git a/examples/details-for-tree-entry.js b/examples/details-for-tree-entry.js index 13dcd4e21..fcea5916c 100644 --- a/examples/details-for-tree-entry.js +++ b/examples/details-for-tree-entry.js @@ -3,13 +3,13 @@ const path = require("path"); /** * This shows how to get details from a tree entry or a blob -**/ + **/ (async () => { const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); const tree = await repo.getTree("e1b0c7ea57bfc5e30ec279402a98168a27838ac9"); const treeEntry = tree.entryByIndex(0); - + // Tree entry doesn't have any data associated with the actual entry // To get that we need to get the index entry that this points to const index = await repo.refreshIndex(); @@ -20,7 +20,6 @@ const path = require("path"); console.log("Entry time in seconds: " + indexEntry.mtime.seconds()); console.log("Entry oid: " + indexEntry.id.toString()); console.log("Entry size: " + indexEntry.fileSize); - + console.log("Done!"); })(); - diff --git a/examples/diff-commits.js b/examples/diff-commits.js index b3d6d7510..8c9ccd408 100644 --- a/examples/diff-commits.js +++ b/examples/diff-commits.js @@ -6,13 +6,10 @@ const path = require("path"); // similar to doing `git show`. (async () => { - const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")) + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); const commit = await repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); console.log("commit " + commit.sha()); - console.log( - "Author:", commit.author().name() + - " <" + commit.author().email() + ">" - ); + console.log("Author:", commit.author().name() + " <" + commit.author().email() + ">"); console.log("Date:", commit.date()); console.log("\n " + commit.message()); @@ -23,17 +20,10 @@ const path = require("path"); const hunks = await patch.hunks(); for (const hunk of hunks) { const lines = await hunk.lines(); - console.log( - "diff", - patch.oldFile().path(), - patch.newFile().path() - ); + console.log("diff", patch.oldFile().path(), patch.newFile().path()); console.log(hunk.header().trim()); for (const line of lines) { - console.log( - String.fromCharCode(line.origin()) + - line.content().trim() - ); + console.log(String.fromCharCode(line.origin()) + line.content().trim()); } } } diff --git a/examples/fetch.js b/examples/fetch.js index ffde30ee1..b8673618f 100644 --- a/examples/fetch.js +++ b/examples/fetch.js @@ -2,14 +2,15 @@ var nodegit = require("../"); var path = require("path"); nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { + .then(function (repo) { return repo.fetch("origin", { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return nodegit.Cred.sshKeyFromAgent(userName); - } - } + }, + }, }); - }).done(function() { + }) + .done(function () { console.log("It worked!"); }); diff --git a/examples/general.js b/examples/general.js index b06c4d795..ffc84b903 100644 --- a/examples/general.js +++ b/examples/general.js @@ -1,7 +1,6 @@ const nodegit = require("../"); const path = require("path"); - // **nodegit** is a javascript library for node.js that wraps libgit2, a // pure C implementation of the Git core. It provides an asynchronous // interface around any functions that do I/O, and a synchronous interface @@ -73,7 +72,7 @@ const path = require("path"); // Now that we've written the object, we can check out what SHA1 was // generated when the object was written to our database. console.log("Written Object: ", oid.toString()); - + // ### Object Parsing // libgit2 has methods to parse every object type in Git so you don't have @@ -99,10 +98,7 @@ const path = require("path"); // including commonly needed variations, such as `git_commit_time` which // returns the author time and `git_commit_message` which gives you the // commit message. - console.log( - "Commit:", commit.message(), - commit.author().name(), commit.date() - ); + console.log("Commit:", commit.message(), commit.author().name(), commit.date()); // Commits can have zero or more parents. The first (root) commit will // have no parents, most commits will have one (i.e. the commit it was @@ -117,32 +113,21 @@ const path = require("path"); // nodegit provides a couple of methods to create commit objects easily as // well. - const author = nodegit.Signature.now("Scott Chacon", - "schacon@gmail.com"); - const committer = nodegit.Signature.now("Scott A Chacon", - "scott@github.com"); + const author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); + const committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); // Commit objects need a tree to point to and optionally one or more // parents. Here we're creating oid objects to create the commit with, // but you can also use existing ones: - const treeId = nodegit.Oid.fromString( - "4170d10f19600b9cb086504e8e05fe7d863358a2"); - const parentId = nodegit.Oid.fromString( - "eebd0ead15d62eaf0ba276da53af43bbc3ce43ab"); + const treeId = nodegit.Oid.fromString("4170d10f19600b9cb086504e8e05fe7d863358a2"); + const parentId = nodegit.Oid.fromString("eebd0ead15d62eaf0ba276da53af43bbc3ce43ab"); let tree = await repo.getTree(treeId); const parent = await repo.getCommit(parentId); // Here we actually create the commit object with a single call with all // the values we need to create the commit. The SHA key is written to // the `commit_id` variable here. - oid = await repo.createCommit( - null /* do not update the HEAD */, - author, - committer, - "example commit", - tree, - [parent] - ); + oid = await repo.createCommit(null /* do not update the HEAD */, author, committer, "example commit", tree, [parent]); console.log("New Commit:", oid.toString()); // #### Tag Parsing @@ -179,9 +164,7 @@ const path = require("path"); console.log("Tree Size:", tree.entryCount()); - /** - * @param {nodegit.Tree} tree - */ + /** @param {nodegit.Tree} tree */ function dfs(tree) { const promises = []; @@ -247,10 +230,7 @@ const path = require("path"); // of `branch1`. const revWalk = repo.createRevWalk(); - revWalk.sorting( - nodegit.Revwalk.SORT.TOPOLOGICAL, - nodegit.Revwalk.SORT.REVERSE - ); + revWalk.sorting(nodegit.Revwalk.SORT.TOPOLOGICAL, nodegit.Revwalk.SORT.REVERSE); revWalk.push(oid); @@ -264,7 +244,7 @@ const path = require("path"); let oid; try { oid = await revWalk.next(); - } catch(error) { + } catch (error) { if (error.errno !== nodegit.Error.CODE.ITEROVER) { throw error; } else { @@ -284,7 +264,7 @@ const path = require("path"); // The [index file API][gi] allows you to read, traverse, update and write // the Git index file (sometimes thought of as the staging area). const index = await repo.refreshIndex(); - + // For each entry in the index, you can get a bunch of information // including the SHA (oid), path and mode which map to the tree objects // that are written out. It also has filesystem properties to help diff --git a/examples/index-add-and-remove.js b/examples/index-add-and-remove.js index 1b274e8b2..6f07c9e67 100644 --- a/examples/index-add-and-remove.js +++ b/examples/index-add-and-remove.js @@ -3,130 +3,119 @@ var path = require("path"); var fse = require("fs-extra"); nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { - return repo.refreshIndex() - .then(function(index) { + .then(function (repo) { + return repo.refreshIndex().then(function (index) { var fileContent = { newFile1: "this has some content", - newFile2: "and this will have more content" + newFile2: "and this will have more content", }; var fileNames = Object.keys(fileContent); - return Promise.all(fileNames.map(function(fileName) { - return fse.writeFile( - path.join(repo.workdir(), fileName), fileContent[fileName]); - })) - - - - // This will add all files to the index - .then(function() { - return index.addAll(); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log( - "\n-------------------\n" + - "Added files: " + - "\n-------------------\n"); - newFiles.forEach(function(entry) { - console.log(entry.path); - }); - }) - .then(function() { - // This will remove the files from the index - return index.removeAll("newFile*"); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log("New files in index: " + newFiles.length); - }) - - - - // We can also provide a pattern to add files to the index - .then(function() { - return index.addAll("newFile*"); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log( - "\n-------------------\n" + - "Added files with pattern: " + - "\n-------------------\n"); - newFiles.forEach(function(entry) { - console.log(entry.path); - }); - }) - .then(function() { - // We're also using the pattern in the remove - return index.removeAll("newFile*"); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log("New files in index: " + newFiles.length); - }) - - - - // Callbacks can be used for a finer degree of control over what - // we add to the index - .then(function() { - return index.addAll( - "newFile*", - nodegit.Index.ADD_OPTION.ADD_CHECK_PATHSPEC, - function(path, _matchedPattern) { - if (path == "newFile1") { - return 0; // add the file - } - - return 1; // skip the file - }); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log( - "\n-------------------\n" + - "Added files with callback: " + - "\n-------------------\n"); - newFiles.forEach(function(entry) { - console.log(entry.path); - }); - }) - .then(function() { - // Lets use a callback in the remove as well - return index.removeAll(null, function(path) { - if (~path.indexOf("newFile")) { - return 0; // remove the file - } - - return 1; // don't remove the file - }); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); - - console.log("Total: " + index.entries().length); - console.log("New files in index: " + newFiles.length); - }); + return ( + Promise.all( + fileNames.map(function (fileName) { + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent[fileName]); + }) + ) + + // This will add all files to the index + .then(function () { + return index.addAll(); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("\n-------------------\n" + "Added files: " + "\n-------------------\n"); + newFiles.forEach(function (entry) { + console.log(entry.path); + }); + }) + .then(function () { + // This will remove the files from the index + return index.removeAll("newFile*"); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("New files in index: " + newFiles.length); + }) + + // We can also provide a pattern to add files to the index + .then(function () { + return index.addAll("newFile*"); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("\n-------------------\n" + "Added files with pattern: " + "\n-------------------\n"); + newFiles.forEach(function (entry) { + console.log(entry.path); + }); + }) + .then(function () { + // We're also using the pattern in the remove + return index.removeAll("newFile*"); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("New files in index: " + newFiles.length); + }) + + // Callbacks can be used for a finer degree of control over what + // we add to the index + .then(function () { + return index.addAll( + "newFile*", + nodegit.Index.ADD_OPTION.ADD_CHECK_PATHSPEC, + function (path, _matchedPattern) { + if (path == "newFile1") { + return 0; // add the file + } + + return 1; // skip the file + } + ); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("\n-------------------\n" + "Added files with callback: " + "\n-------------------\n"); + newFiles.forEach(function (entry) { + console.log(entry.path); + }); + }) + .then(function () { + // Lets use a callback in the remove as well + return index.removeAll(null, function (path) { + if (~path.indexOf("newFile")) { + return 0; // remove the file + } + + return 1; // don't remove the file + }); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); + + console.log("Total: " + index.entries().length); + console.log("New files in index: " + newFiles.length); + }) + ); }); - }).done(function() { + }) + .done(function () { console.log("All done!"); }); diff --git a/examples/merge-cleanly.js b/examples/merge-cleanly.js index e277477bf..f0f1c9830 100644 --- a/examples/merge-cleanly.js +++ b/examples/merge-cleanly.js @@ -18,114 +18,110 @@ var theirCommit; var ourBranch; var theirBranch; -var ourSignature = nodegit.Signature.now("Ron Paul", - "RonPaul@TollRoadsRBest.info"); -var theirSignature = nodegit.Signature.now("Greg Abbott", - "Gregggg@IllTollYourFace.us"); +var ourSignature = nodegit.Signature.now("Ron Paul", "RonPaul@TollRoadsRBest.info"); +var theirSignature = nodegit.Signature.now("Greg Abbott", "Gregggg@IllTollYourFace.us"); // Create a new repository in a clean directory, and add our first file -fse.remove(path.resolve(__dirname, repoDir)) -.then(function() { - return fse.ensureDir(path.resolve(__dirname, repoDir)); -}) -.then(function() { - return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); -}) -.then(function(repo) { - repository = repo; - return fse.writeFile( - path.join(repository.workdir(), ourFileName), - ourFileContent - ); -}) +fse + .remove(path.resolve(__dirname, repoDir)) + .then(function () { + return fse.ensureDir(path.resolve(__dirname, repoDir)); + }) + .then(function () { + return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); + }) + .then(function (repo) { + repository = repo; + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) -// Load up the repository index and make our initial commit to HEAD -.then(function() { - return repository.refreshIndex(); -}) -.then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); -}) -.then(function(oid) { - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); -}) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) -// Get commit object from the oid, and create our new branches at that position -.then(function(commitOid) { - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + // Get commit object from the oid, and create our new branches at that position + .then(function (commitOid) { + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); -}) + }) -// Create a new file, stage it and commit it to our second branch -.then(function(branch) { - theirBranch = branch; - return fse.writeFile( - path.join(repository.workdir(), theirFileName), - theirFileContent - ); -}) -.then(function() { - return repository.refreshIndex(); -}) -.then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); + // Create a new file, stage it and commit it to our second branch + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + // You don"t have to change head to make a commit to a different branch. + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; }); -}) -.then(function(oid) { - // You don"t have to change head to make a commit to a different branch. - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); -}) -.then(function(commitOid) { - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); -}) + }) + // Merge the two commits + .then(function () { + return nodegit.Merge.commits(repository, ourCommit, theirCommit); + }) -// Merge the two commits -.then(function() { - return nodegit.Merge.commits(repository, ourCommit, theirCommit); -}) + // Merging returns an index that isn't backed by the repository. + // You have to manually check for merge conflicts. If there are none + // you just have to write the index. You do have to write it to + // the repository instead of just writing it. + .then(function (index) { + if (!index.hasConflicts()) { + return index.writeTreeTo(repository); + } + }) - -// Merging returns an index that isn't backed by the repository. -// You have to manually check for merge conflicts. If there are none -// you just have to write the index. You do have to write it to -// the repository instead of just writing it. -.then(function(index) { - if (!index.hasConflicts()) { - return index.writeTreeTo(repository); - } -}) - - -// Create our merge commit back on our branch -.then(function(oid) { - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we merged their commit", oid, [ourCommit, theirCommit]); -}) -.done(function(commitId) { - // We never changed the HEAD after the initial commit; - // it should still be the same as master. - console.log("New Commit: ", commitId); -}); + // Create our merge commit back on our branch + .then(function (oid) { + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we merged their commit", oid, [ + ourCommit, + theirCommit, + ]); + }) + .done(function (commitId) { + // We never changed the HEAD after the initial commit; + // it should still be the same as master. + console.log("New Commit: ", commitId); + }); diff --git a/examples/merge-with-conflicts.js b/examples/merge-with-conflicts.js index 55fb87d3b..a4758e81a 100644 --- a/examples/merge-with-conflicts.js +++ b/examples/merge-with-conflicts.js @@ -10,12 +10,9 @@ var ourFileContent = "Big Bobs are best, IMHO.\n"; var theirFileContent = "Nobody expects the small Bobquisition!\n"; var finalFileContent = "Big Bobs are beautiful and the small are unexpected!\n"; -var baseSignature = nodegit.Signature.now("Peaceful Bob", - "justchill@bob.net"); -var ourSignature = nodegit.Signature.now("Big Bob", - "impressive@bob.net"); -var theirSignature = nodegit.Signature.now("Small Bob", - "underestimated@bob.net"); +var baseSignature = nodegit.Signature.now("Peaceful Bob", "justchill@bob.net"); +var ourSignature = nodegit.Signature.now("Big Bob", "impressive@bob.net"); +var theirSignature = nodegit.Signature.now("Small Bob", "underestimated@bob.net"); var ourBranchName = "ours"; var theirBranchName = "theirs"; @@ -29,171 +26,155 @@ var ourBranch; var theirBranch; // Create a new repository in a clean directory, and add our first file -fse.remove(path.resolve(__dirname, repoDir)) -.then(function() { - return fse.ensureDir(path.resolve(__dirname, repoDir)); -}) -.then(function() { - return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); -}) -.then(function(repo) { - repository = repo; - return fse.writeFile( - path.join(repository.workdir(), fileName), - baseFileContent - ); -}) - - -// Load up the repository index and make our initial commit to HEAD -.then(function() { - return repository.refreshIndex(); -}) -.then(function(index) { - return index.addByPath(fileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); -}) -.then(function(oid) { - return repository.createCommit("HEAD", baseSignature, - baseSignature, "bobs are all ok", oid, []); -}) -.then(function(commitOid) { - baseCommitOid = commitOid; - return repository.getCommit(commitOid) - .then(function(commit) { +fse + .remove(path.resolve(__dirname, repoDir)) + .then(function () { + return fse.ensureDir(path.resolve(__dirname, repoDir)); + }) + .then(function () { + return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); + }) + .then(function (repo) { + repository = repo; + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent); + }) + + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + return repository.createCommit("HEAD", baseSignature, baseSignature, "bobs are all ok", oid, []); + }) + .then(function (commitOid) { + baseCommitOid = commitOid; + return repository.getCommit(commitOid).then(function (commit) { baseCommit = commit; }); -}) + }) - -// create our branches -.then(function() { - return repository.createBranch(ourBranchName, baseCommitOid) - .then(function(branch) { + // create our branches + .then(function () { + return repository.createBranch(ourBranchName, baseCommitOid).then(function (branch) { ourBranch = branch; }); -}) -.then(function() { - return repository.createBranch(theirBranchName, baseCommitOid) - .then(function(branch) { + }) + .then(function () { + return repository.createBranch(theirBranchName, baseCommitOid).then(function (branch) { theirBranch = branch; }); -}) - - -// Write and commit our version of the file -.then(function() { - return fse.writeFile( - path.join(repository.workdir(), fileName), - ourFileContent - ); -}) -.then(function() { - return repository.refreshIndex() - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + }) + + // Write and commit our version of the file + .then(function () { + return fse.writeFile(path.join(repository.workdir(), fileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex().then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }); -}) -.then(function(oid) { - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "lol big bobs :yesway:", oid, [baseCommit]); -}) -.then(function(commitOid) { - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); -}) - - -// Write and commit their version of the file -.then(function() { - return fse.writeFile( - path.join(repository.workdir(), fileName), - theirFileContent - ); -}) -.then(function() { - return repository.refreshIndex() - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + }) + .then(function (oid) { + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "lol big bobs :yesway:", oid, [ + baseCommit, + ]); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + + // Write and commit their version of the file + .then(function () { + return fse.writeFile(path.join(repository.workdir(), fileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex().then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); - }); -}) -.then(function(oid) { - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "lol big bobs :poop:", oid, [baseCommit]); -}) -.then(function(commitOid) { - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); -}) - - -// move the head to our branch, just to keep things tidy -.then(function() { - return nodegit.Reference.lookup(repository, "HEAD"); -}) -.then(function(head) { - return head.symbolicSetTarget(ourBranch.name(), ""); -}) - - -// Merge their branch into our branch -.then(function() { - return nodegit.Merge.commits(repository, ourCommit, theirCommit, null); -}) - -// Merging returns an index that isn't backed by the repository. -// You have to write it to the repository instead of just writing it. -.then(function(index) { - if (index.hasConflicts()) { - console.log("Conflict time!"); - - // if the merge had comflicts, solve them - // (in this case, we simply overwrite the file) - fse.writeFileSync( - path.join(repository.workdir(), fileName), - finalFileContent - ); - } -}) - -// we need to get a new index as the other one is not backed to -// the repository in the usual fashion, and just behaves weirdly. -.then(function() { - return repository.refreshIndex() - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + }); + }) + .then(function (oid) { + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "lol big bobs :poop:", oid, [ + baseCommit, + ]); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + + // move the head to our branch, just to keep things tidy + .then(function () { + return nodegit.Reference.lookup(repository, "HEAD"); + }) + .then(function (head) { + return head.symbolicSetTarget(ourBranch.name(), ""); + }) + + // Merge their branch into our branch + .then(function () { + return nodegit.Merge.commits(repository, ourCommit, theirCommit, null); + }) + + // Merging returns an index that isn't backed by the repository. + // You have to write it to the repository instead of just writing it. + .then(function (index) { + if (index.hasConflicts()) { + console.log("Conflict time!"); + + // if the merge had comflicts, solve them + // (in this case, we simply overwrite the file) + fse.writeFileSync(path.join(repository.workdir(), fileName), finalFileContent); + } + }) + + // we need to get a new index as the other one is not backed to + // the repository in the usual fashion, and just behaves weirdly. + .then(function () { + return repository.refreshIndex().then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); + }); + }) + .then(function (oid) { + // create the new merge commit on our branch + return repository.createCommit(ourBranch.name(), baseSignature, baseSignature, "Stop this bob sized fued", oid, [ + ourCommit, + theirCommit, + ]); + }) + .done(function (commitId) { + console.log("New Commit: ", commitId); }); -}) -.then(function(oid) { - // create the new merge commit on our branch - return repository.createCommit(ourBranch.name(), baseSignature, - baseSignature, "Stop this bob sized fued", oid, [ourCommit, theirCommit]); -}) -.done(function(commitId) { - console.log("New Commit: ", commitId); -}); diff --git a/examples/pull.js b/examples/pull.js index fe2d83411..77546a6b1 100644 --- a/examples/pull.js +++ b/examples/pull.js @@ -7,25 +7,25 @@ var repository; // Open a repository that needs to be fetched and fast-forwarded nodegit.Repository.open(path.resolve(__dirname, repoDir)) - .then(function(repo) { + .then(function (repo) { repository = repo; return repository.fetchAll({ callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return nodegit.Cred.sshKeyFromAgent(userName); }, - certificateCheck: function() { + certificateCheck: function () { return 0; - } - } + }, + }, }); }) // Now that we're finished fetching, go ahead and merge our local branch // with the new one - .then(function() { + .then(function () { return repository.mergeBranches("master", "origin/master"); }) - .done(function() { + .done(function () { console.log("Done!"); }); diff --git a/examples/push.js b/examples/push.js index 5c19b7034..416b8a3cf 100644 --- a/examples/push.js +++ b/examples/push.js @@ -10,59 +10,57 @@ var repoDir = "../../newRepo"; var repository; var remote; -var signature = nodegit.Signature.now("Foo bar", - "foo@bar.com"); +var signature = nodegit.Signature.now("Foo bar", "foo@bar.com"); // Create a new repository in a clean directory, and add our first file -fse.remove(path.resolve(__dirname, repoDir)) -.then(function() { - return fse.ensureDir(path.resolve(__dirname, repoDir)); -}) -.then(function() { - return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); -}) -.then(function(repo) { - repository = repo; - return fse.writeFile(path.join(repository.workdir(), fileName), fileContent); -}) +fse + .remove(path.resolve(__dirname, repoDir)) + .then(function () { + return fse.ensureDir(path.resolve(__dirname, repoDir)); + }) + .then(function () { + return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); + }) + .then(function (repo) { + repository = repo; + return fse.writeFile(path.join(repository.workdir(), fileName), fileContent); + }) -// Load up the repository index and make our initial commit to HEAD -.then(function() { - return repository.refreshIndex(); -}) -.then(function(index) { - return index.addByPath(fileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); -}) -.then(function(oid) { - return repository.createCommit("HEAD", signature, signature, - "initial commit", oid, []); -}) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + return repository.createCommit("HEAD", signature, signature, "initial commit", oid, []); + }) -// Add a new remote -.then(function() { - return nodegit.Remote.create(repository, "origin", - "git@github.com:nodegit/push-example.git") - .then(function(remoteResult) { - remote = remoteResult; + // Add a new remote + .then(function () { + return nodegit.Remote.create(repository, "origin", "git@github.com:nodegit/push-example.git").then(function ( + remoteResult + ) { + remote = remoteResult; - // Create the push object for this remote - return remote.push( - ["refs/heads/master:refs/heads/master"], - { + // Create the push object for this remote + return remote.push(["refs/heads/master:refs/heads/master"], { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return nodegit.Cred.sshKeyFromAgent(userName); - } - } - } - ); + }, + }, + }); + }); + }) + .done(function () { + console.log("Done!"); }); -}).done(function() { - console.log("Done!"); -}); diff --git a/examples/read-file.js b/examples/read-file.js index 9da5ed175..f9ae63851 100644 --- a/examples/read-file.js +++ b/examples/read-file.js @@ -9,11 +9,10 @@ const path = require("path"); const commit = await repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); const entry = await commit.getEntry("README.md"); const blob = await entry.getBlob(); - + console.log(entry.name(), entry.sha(), blob.rawsize() + "b"); console.log("========================================================\n\n"); const firstTenLines = blob.toString().split("\n").slice(0, 10).join("\n"); console.log(firstTenLines); console.log("..."); })(); - diff --git a/examples/remove-and-commit.js b/examples/remove-and-commit.js index 4ba8c777a..49944d8f8 100644 --- a/examples/remove-and-commit.js +++ b/examples/remove-and-commit.js @@ -1,13 +1,13 @@ var nodegit = require("../"), - path = require("path"), - fileName = "newfile.txt"; + path = require("path"), + fileName = "newfile.txt"; /** * This example deletes a certain file `newfile.txt`, * removes it from the git index and commits it to head. Similar to a * `git rm newfile.txt` followed by a `git commit`. Use add-and-commit.js * to create the file first. -**/ + **/ var _repository; var _index; @@ -15,40 +15,37 @@ var _oid; //open a git repo nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { + .then(function (repo) { _repository = repo; return repo.refreshIndex(); }) - .then(function(index){ + .then(function (index) { _index = index; }) - .then(function() { + .then(function () { //remove the file from the index... return _index.removeByPath(fileName); }) - .then(function() { + .then(function () { return _index.write(); }) - .then(function() { + .then(function () { return _index.writeTree(); }) - .then(function(oid) { + .then(function (oid) { _oid = oid; return nodegit.Reference.nameToId(_repository, "HEAD"); }) - .then(function(head) { + .then(function (head) { return _repository.getCommit(head); }) - .then(function(parent) { - var author = nodegit.Signature.now("Scott Chacon", - "schacon@gmail.com"); - var committer = nodegit.Signature.now("Scott A Chacon", - "scott@github.com"); + .then(function (parent) { + var author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); + var committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); - return _repository.createCommit("HEAD", author, committer, - "message", _oid, [parent]); + return _repository.createCommit("HEAD", author, committer, "message", _oid, [parent]); }) - .then(function(commitId) { + .then(function (commitId) { // the file is removed from the git repo, use fs.unlink now to remove it // from the filesystem. console.log("New Commit:", commitId.allocfmt()); diff --git a/examples/status.js b/examples/status.js index 9a04bae10..d2dd11c7e 100644 --- a/examples/status.js +++ b/examples/status.js @@ -1,24 +1,33 @@ var nodegit = require("../"), - path = require("path"); + path = require("path"); // This code shows working directory changes similar to git status -nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { - repo.getStatus().then(function(statuses) { - function statusToText(status) { - var words = []; - if (status.isNew()) { words.push("NEW"); } - if (status.isModified()) { words.push("MODIFIED"); } - if (status.isTypechange()) { words.push("TYPECHANGE"); } - if (status.isRenamed()) { words.push("RENAMED"); } - if (status.isIgnored()) { words.push("IGNORED"); } - - return words.join(" "); +nodegit.Repository.open(path.resolve(__dirname, "../.git")).then(function (repo) { + repo.getStatus().then(function (statuses) { + function statusToText(status) { + var words = []; + if (status.isNew()) { + words.push("NEW"); + } + if (status.isModified()) { + words.push("MODIFIED"); + } + if (status.isTypechange()) { + words.push("TYPECHANGE"); } + if (status.isRenamed()) { + words.push("RENAMED"); + } + if (status.isIgnored()) { + words.push("IGNORED"); + } + + return words.join(" "); + } - statuses.forEach(function(file) { - console.log(file.path() + " " + statusToText(file)); - }); + statuses.forEach(function (file) { + console.log(file.path() + " " + statusToText(file)); }); + }); }); diff --git a/examples/walk-history-for-file.js b/examples/walk-history-for-file.js index f09415455..621d2c588 100644 --- a/examples/walk-history-for-file.js +++ b/examples/walk-history-for-file.js @@ -1,10 +1,10 @@ var nodegit = require("../"), - path = require("path"), - historyFile = "generate/input/descriptor.json", - walker, - historyCommits = [], - commit, - repo; + path = require("path"), + historyFile = "generate/input/descriptor.json", + walker, + historyCommits = [], + commit, + repo; // This code walks the history of the master branch and prints results // that look very similar to calling `git log` from the command line @@ -13,15 +13,12 @@ function compileHistory(resultingArrayOfCommits) { var lastSha; if (historyCommits.length > 0) { lastSha = historyCommits[historyCommits.length - 1].commit.sha(); - if ( - resultingArrayOfCommits.length == 1 && - resultingArrayOfCommits[0].commit.sha() == lastSha - ) { + if (resultingArrayOfCommits.length == 1 && resultingArrayOfCommits[0].commit.sha() == lastSha) { return; } } - resultingArrayOfCommits.forEach(function(entry) { + resultingArrayOfCommits.forEach(function (entry) { historyCommits.push(entry); }); @@ -31,16 +28,15 @@ function compileHistory(resultingArrayOfCommits) { walker.push(lastSha); walker.sorting(nodegit.Revwalk.SORT.TIME); - return walker.fileHistoryWalk(historyFile, 500) - .then(compileHistory); + return walker.fileHistoryWalk(historyFile, 500).then(compileHistory); } nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(r) { + .then(function (r) { repo = r; return repo.getMasterCommit(); }) - .then(function(firstCommitOnMaster){ + .then(function (firstCommitOnMaster) { // History returns an event. walker = repo.createRevWalk(); walker.push(firstCommitOnMaster.sha()); @@ -49,12 +45,11 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) return walker.fileHistoryWalk(historyFile, 500); }) .then(compileHistory) - .then(function() { - historyCommits.forEach(function(entry) { + .then(function () { + historyCommits.forEach(function (entry) { commit = entry.commit; console.log("commit " + commit.sha()); - console.log("Author:", commit.author().name() + - " <" + commit.author().email() + ">"); + console.log("Author:", commit.author().name() + " <" + commit.author().email() + ">"); console.log("Date:", commit.date()); console.log("\n " + commit.message()); }); diff --git a/examples/walk-history.js b/examples/walk-history.js index 7bdab9fb9..23c628088 100644 --- a/examples/walk-history.js +++ b/examples/walk-history.js @@ -1,22 +1,21 @@ var nodegit = require("../"), - path = require("path"); + path = require("path"); // This code walks the history of the master branch and prints results // that look very similar to calling `git log` from the command line nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { + .then(function (repo) { return repo.getMasterCommit(); }) - .then(function(firstCommitOnMaster){ + .then(function (firstCommitOnMaster) { // History returns an event. var history = firstCommitOnMaster.history(nodegit.Revwalk.SORT.TIME); // History emits "commit" event for each commit in the branch's history - history.on("commit", function(commit) { + history.on("commit", function (commit) { console.log("commit " + commit.sha()); - console.log("Author:", commit.author().name() + - " <" + commit.author().email() + ">"); + console.log("Author:", commit.author().name() + " <" + commit.author().email() + ">"); console.log("Date:", commit.date()); console.log("\n " + commit.message()); }); diff --git a/examples/walk-tree.js b/examples/walk-tree.js index 6c564acb6..99b5d8bfc 100644 --- a/examples/walk-tree.js +++ b/examples/walk-tree.js @@ -1,21 +1,21 @@ var nodegit = require("../"), - path = require("path"); + path = require("path"); // A `tree` in git is typically a representation of the filesystem at // a revision. A tree has a set of entries, each entry being either a // tree (directory), or a file. nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { + .then(function (repo) { return repo.getMasterCommit(); }) - .then(function(firstCommitOnMaster) { - return firstCommitOnMaster.getTree(); + .then(function (firstCommitOnMaster) { + return firstCommitOnMaster.getTree(); }) - .then(function(tree) { + .then(function (tree) { // `walk()` returns an event. var walker = tree.walk(); - walker.on("entry", function(entry) { + walker.on("entry", function (entry) { console.log(entry.path()); }); diff --git a/generate/README.md b/generate/README.md index 3ee5446d6..b06fbe77d 100644 --- a/generate/README.md +++ b/generate/README.md @@ -2,20 +2,20 @@ The scripts and templates in this dir help generate the source code and tests for NodeGit. The major components of generate are: - 1. Input - 2. Scripts - 3. Templates +1. Input +2. Scripts +3. Templates ### Input - All the **configuration** required for the parser to generate the source code and tests. For more details, check the Input directory. +All the **configuration** required for the parser to generate the source code and tests. For more details, check the Input directory. ### Scripts - The scripts that generate the final configuration (*snapshot of the library*) `idefs.json`, `missing-tests.json`. These configurations are then used to generate `src` for the library. +The scripts that generate the final configuration (_snapshot of the library_) `idefs.json`, `missing-tests.json`. These configurations are then used to generate `src` for the library. ### Templates - All the Combyne templates are placed here. The filters, partials, templates all help NodeGit generate the source code. +All the Combyne templates are placed here. The filters, partials, templates all help NodeGit generate the source code. - > For more information on Combyne: [tbranyen/combyne](https://github.com/tbranyen/combyne) +> For more information on Combyne: [tbranyen/combyne](https://github.com/tbranyen/combyne) diff --git a/generate/index.js b/generate/index.js index 753897d5b..e84947ea6 100644 --- a/generate/index.js +++ b/generate/index.js @@ -24,28 +24,25 @@ module.exports = function generate() { } return submoduleStatus() - .then(function(statuses) { - var dirtySubmodules = statuses - .filter(function(status) { - return status.onNewCommit - || status.needsInitialization - || status.workDirDirty; - }); + .then(function (statuses) { + var dirtySubmodules = statuses.filter(function (status) { + return status.onNewCommit || status.needsInitialization || status.workDirDirty; + }); if (dirtySubmodules.length) { console.warn("[nodegit] WARNING - Some submodules are out-of-sync"); - dirtySubmodules.forEach(function(submodule) { + dirtySubmodules.forEach(function (submodule) { console.warn("[nodegit]\t" + submodule.name); }); } }) .then(tryGenerate) - .catch(function(e) { + .catch(function (e) { console.error("[nodegit] ERROR - Could not generate native code"); console.error(e); throw e; }); -} +}; if (require.main === module) { module.exports(); diff --git a/generate/input/README.md b/generate/input/README.md index 9ab9b51d6..e0ffb463d 100644 --- a/generate/input/README.md +++ b/generate/input/README.md @@ -1,15 +1,21 @@ ## /generate/input - This folder contains the main config files to generate NodeGit's JavaScript functions. - #### callbacks.json - Add all meta data about the callbacks from libgit2 that need to be implemented in NodeGit. +This folder contains the main config files to generate NodeGit's JavaScript functions. - #### descriptor.json - Customize the generated code using this configuration file. Enter the function's signature, arguments and their metadata and which functions can be skipped in this file. If you are using a manual template, remove all of its references from this file. +#### callbacks.json - #### libgit2-docs.json - These are provided by the libgit2 team. It includes all the metadata about the API provided by the libgit2 library. To grab the latest version of this file, download https://libgit2.github.com/libgit2/HEAD.json. +Add all meta data about the callbacks from libgit2 that need to be implemented in NodeGit. - #### libgit2-supplement.json - Use this confiuration file to group and override parts of the generated code. NodeGit tries its best to generate the right classes and structs, if it is not quite right, then use this config file to group/remove the functions. - > If you're using manual templates, update the `cFile` reference to point to the manual template. +#### descriptor.json + +Customize the generated code using this configuration file. Enter the function's signature, arguments and their metadata and which functions can be skipped in this file. If you are using a manual template, remove all of its references from this file. + +#### libgit2-docs.json + +These are provided by the libgit2 team. It includes all the metadata about the API provided by the libgit2 library. To grab the latest version of this file, download https://libgit2.github.com/libgit2/HEAD.json. + +#### libgit2-supplement.json + +Use this confiuration file to group and override parts of the generated code. NodeGit tries its best to generate the right classes and structs, if it is not quite right, then use this config file to group/remove the functions. + +> If you're using manual templates, update the `cFile` reference to point to the manual template. diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index aa0842995..98d5a9466 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -817,7 +817,7 @@ ], "return": { "type": "int", - "noResults":0, + "noResults": 0, "success": 0, "error": -1, "cancel": -1, @@ -845,7 +845,7 @@ ], "return": { "type": "int", - "noResults":0, + "noResults": 0, "success": 0, "error": -1, "cancel": -1 diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index c43cb8fee..b0e3e9cb0 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -97,8 +97,7 @@ "ignore": true } }, - "types": - { + "types": { "allocator": { "ignore": true }, @@ -375,10 +374,7 @@ } } }, - "dependencies": [ - "../include/wrapper.h", - "node_buffer.h" - ] + "dependencies": ["../include/wrapper.h", "node_buffer.h"] }, "blob_filter_options": { "hasConstructor": true @@ -448,22 +444,20 @@ "isOptional": true } }, - "return" : { + "return": { "isReturn": true, "isErrorCode": true } }, "git_branch_upstream": { "isAsync": true, - "return" : { + "return": { "isReturn": true, "isErrorCode": true } } }, - "dependencies": [ - "../include/buf.h" - ] + "dependencies": ["../include/buf.h"] }, "buf": { "freeFunctionName": "git_buf_dispose", @@ -510,9 +504,7 @@ "isAsync": false } }, - "dependencies": [ - "../include/git_buf_converter.h" - ] + "dependencies": ["../include/git_buf_converter.h"] }, "cert": { "needsForwardDeclaration": false @@ -540,10 +532,7 @@ "jsClassName": "Buffer" } }, - "dependencies": [ - "../include/wrapper.h", - "node_buffer.h" - ] + "dependencies": ["../include/wrapper.h", "node_buffer.h"] }, "checkout": { "functions": { @@ -1045,9 +1034,7 @@ } } }, - "dependencies": [ - "../include/git_buf_converter.h" - ] + "dependencies": ["../include/git_buf_converter.h"] }, "config_backend": { "ignore": true @@ -1185,47 +1172,45 @@ }, "diff": { "selfFreeing": true, - "cDependencies": [ - "git2/sys/diff.h" - ], + "cDependencies": ["git2/sys/diff.h"], "functions": { "git_diff_blob_to_buffer": { "args": { - "old_blob" : { + "old_blob": { "isOptional": true }, - "old_as_path" : { + "old_as_path": { "isOptional": true }, - "buffer" : { + "buffer": { "isOptional": true }, - "buffer_len" : { + "buffer_len": { "isOptional": true }, - "buffer_as_path" : { + "buffer_as_path": { "isOptional": true }, - "options" : { + "options": { "isOptional": true }, - "file_cb" : { + "file_cb": { "isOptional": true }, "binary_cb": { "isOptional": true }, - "hunk_cb" : { + "hunk_cb": { "isOptional": true }, - "line_cb" : { + "line_cb": { "isOptional": true } }, "return": { "isErrorCode": true }, - "isAsync": true + "isAsync": true }, "git_diff_blobs": { "ignore": true @@ -1450,9 +1435,7 @@ }, "diff_perfdata": { "selfFreeing": true, - "cDependencies": [ - "git2/sys/diff.h" - ] + "cDependencies": ["git2/sys/diff.h"] }, "diff_similarity_metric": { "ignore": true @@ -1513,16 +1496,12 @@ } }, "fetch_options": { - "dependencies": [ - "../include/str_array_converter.h" - ] + "dependencies": ["../include/str_array_converter.h"] }, "filter": { "selfFreeing": false, "hasConstructor": true, - "cDependencies": [ - "git2/sys/filter.h" - ], + "cDependencies": ["git2/sys/filter.h"], "fields": { "cleanup": { "ignore": true @@ -1586,9 +1565,7 @@ } } }, - "cDependencies": [ - "git2/sys/filter.h" - ] + "cDependencies": ["git2/sys/filter.h"] }, "filter_list": { "selfFreeing": true, @@ -1636,10 +1613,7 @@ "ignore": true } }, - "dependencies": [ - "../include/git_buf_converter.h", - "../include/filter_registry.h" - ] + "dependencies": ["../include/git_buf_converter.h", "../include/filter_registry.h"] }, "giterr": { "ignore": true @@ -1704,9 +1678,7 @@ "ignore": true } }, - "cDependencies": [ - "git2/sys/hashsig.h" - ] + "cDependencies": ["git2/sys/hashsig.h"] }, "ignore": { "functions": { @@ -1962,13 +1934,13 @@ "return": { "isErrorCode": true } - }, - "git_index_write": { - "args": { - "force": { - "isOptional": true - } - }, + }, + "git_index_write": { + "args": { + "force": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true @@ -1987,9 +1959,7 @@ } } }, - "dependencies": [ - "../include/str_array_converter.h" - ] + "dependencies": ["../include/str_array_converter.h"] }, "index_conflict_iterator": { "selfFreeing": true, @@ -2083,9 +2053,7 @@ "isPrototypeMethod": false } }, - "cDependencies": [ - "git2/sys/index.h" - ] + "cDependencies": ["git2/sys/index.h"] }, "index_reuc_entry": { "fields": { @@ -2149,9 +2117,7 @@ } } }, - "cDependencies": [ - "git2/sys/index.h" - ] + "cDependencies": ["git2/sys/index.h"] }, "index_time": { "isReturnable": true, @@ -2644,10 +2610,7 @@ } } }, - "dependencies": [ - "../include/wrapper.h", - "node_buffer.h" - ] + "dependencies": ["../include/wrapper.h", "node_buffer.h"] }, "odb_stream": { "ignore": true @@ -2790,9 +2753,7 @@ }, "patch": { "selfFreeing": true, - "dependencies": [ - "../include/convenient_patch.h" - ], + "dependencies": ["../include/convenient_patch.h"], "ownerFn": { "name": "git_patch_owner", "singletonCppClassName": "GitRepository" @@ -2896,15 +2857,11 @@ } }, "path": { - "cDependencies": [ - "git2/sys/path.h" - ] + "cDependencies": ["git2/sys/path.h"] }, "pathspec": { "selfFreeing": true, - "dependencies": [ - "../include/str_array_converter.h" - ], + "dependencies": ["../include/str_array_converter.h"], "functions": { "git_pathspec_free": { "ignore": true @@ -2977,9 +2934,7 @@ "ignore": true }, "push_options": { - "dependencies": [ - "../include/str_array_converter.h" - ] + "dependencies": ["../include/str_array_converter.h"] }, "rebase": { "hasConstructor": false, @@ -3263,9 +3218,7 @@ } }, "reference_iterator": { - "cDependencies": [ - "git2/sys/refdb_backend.h" - ], + "cDependencies": ["git2/sys/refdb_backend.h"], "needsForwardDeclaration": false, "ignore": true }, @@ -3342,10 +3295,7 @@ } }, "remote": { - "dependencies": [ - "../include/str_array_converter.h", - "../include/remote_head.h" - ], + "dependencies": ["../include/str_array_converter.h", "../include/remote_head.h"], "cType": "git_remote", "selfFreeing": true, "ownerFn": { @@ -3616,9 +3566,7 @@ } }, "remote_head": { - "dependencies": [ - "../include/functions/free.h" - ], + "dependencies": ["../include/functions/free.h"], "freeFunctionName": "git_remote_head_free", "selfFreeing": true }, @@ -3626,11 +3574,7 @@ "hasConstructor": false, "selfFreeing": true, "isSingleton": true, - "dependencies": [ - "git2/sys/repository.h", - "../include/submodule.h", - "../include/remote.h" - ], + "dependencies": ["git2/sys/repository.h", "../include/submodule.h", "../include/remote.h"], "functions": { "git_repository__cleanup": { "isAsync": true, @@ -3816,9 +3760,7 @@ } }, "reset": { - "dependencies": [ - "../include/str_array_converter.h" - ], + "dependencies": ["../include/str_array_converter.h"], "functions": { "git_reset": { "isCollectionRoot": true, @@ -3868,10 +3810,7 @@ "name": "git_revwalk_repository", "singletonCppClassName": "GitRepository" }, - "dependencies": [ - "../include/commit.h", - "../include/functions/copy.h" - ], + "dependencies": ["../include/commit.h", "../include/functions/copy.h"], "functions": { "git_revwalk_add_hide_cb": { "ignore": true @@ -3884,10 +3823,10 @@ } } }, - "signature": { + "signature": { "selfFreeing": true, "dupFunction": "git_signature_dup", - "functions": { + "functions": { "git_signature_default": { "isAsync": true, "return": { @@ -3900,9 +3839,9 @@ "git_signature_free": { "ignore": true }, - "git_signature_new": { - "isAsync": false - }, + "git_signature_new": { + "isAsync": false + }, "git_signature_now": { "isAsync": false, "args": { @@ -3914,8 +3853,8 @@ "isErrorCode": true } } - } - }, + } + }, "smart": { "functions": { "git_smart_subtransport_git": { @@ -4000,9 +3939,7 @@ "ignore": true }, "status": { - "cDependencies": [ - "git2/sys/diff.h" - ], + "cDependencies": ["git2/sys/diff.h"], "functions": { "git_status_byindex": { "isAsync": false, @@ -4090,15 +4027,11 @@ "ignore": true } }, - "dependencies": [ - "../include/str_array_converter.h" - ] + "dependencies": ["../include/str_array_converter.h"] }, "stream": { "ignore": true, - "cDependencies": [ - "git2/sys/stream.h" - ] + "cDependencies": ["git2/sys/stream.h"] }, "stream_registration": { "ignore": true @@ -4259,9 +4192,7 @@ } }, "tag": { - "dependencies": [ - "../include/str_array_converter.h" - ], + "dependencies": ["../include/str_array_converter.h"], "selfFreeing": true, "ownerFn": { "name": "git_tag_owner", @@ -4498,9 +4429,7 @@ "ignore": true } }, - "cDependencies": [ - "git2/sys/transport.h" - ] + "cDependencies": ["git2/sys/transport.h"] }, "tree": { "selfFreeing": true, @@ -4713,9 +4642,7 @@ } } }, - "dependencies": [ - "../include/git_buf_converter.h" - ] + "dependencies": ["../include/git_buf_converter.h"] }, "tree_update": { "hasConstructor": true, diff --git a/generate/input/ignored-missing-tests.json b/generate/input/ignored-missing-tests.json index eac03aba8..fadeed15d 100644 --- a/generate/input/ignored-missing-tests.json +++ b/generate/input/ignored-missing-tests.json @@ -1,34 +1,17 @@ { "blob": { - "functions": [ - "createFrombuffer", - "isBinary", - "lookup", - "rawcontent", - "rawsize" - ] + "functions": ["createFrombuffer", "isBinary", "lookup", "rawcontent", "rawsize"] }, "clone": { - "functions": [ - "initOptions" - ] + "functions": ["initOptions"] }, "commit": { - "functions": [ - "parentCount", - "parentId", - "treeId" - ] + "functions": ["parentCount", "parentId", "treeId"] }, "diff": { - "functions": [ - "getDelta", - "numDeltas" - ] + "functions": ["getDelta", "numDeltas"] }, "object": { - "functions": [ - "type" - ] + "functions": ["type"] } } diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index aa0f54e35..0c8b53330 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -16,12 +16,7 @@ }, { "file": "git2/apply.h", - "functions": [ - "git_apply_delta_cb", - "git_apply_hunk_cb", - "git_apply_to_tree", - "git_apply" - ], + "functions": ["git_apply_delta_cb", "git_apply_hunk_cb", "git_apply_to_tree", "git_apply"], "meta": {}, "lines": 147 }, @@ -106,21 +101,13 @@ }, { "file": "git2/buffer.h", - "functions": [ - "git_buf_dispose", - "git_buf_grow", - "git_buf_set", - "git_buf_is_binary", - "git_buf_contains_nul" - ], + "functions": ["git_buf_dispose", "git_buf_grow", "git_buf_set", "git_buf_is_binary", "git_buf_contains_nul"], "meta": {}, "lines": 128 }, { "file": "git2/cert.h", - "functions": [ - "git_transport_certificate_check_cb" - ], + "functions": ["git_transport_certificate_check_cb"], "meta": {}, "lines": 168 }, @@ -140,22 +127,13 @@ }, { "file": "git2/cherrypick.h", - "functions": [ - "git_cherrypick_options_init", - "git_cherrypick_commit", - "git_cherrypick" - ], + "functions": ["git_cherrypick_options_init", "git_cherrypick_commit", "git_cherrypick"], "meta": {}, "lines": 86 }, { "file": "git2/clone.h", - "functions": [ - "git_remote_create_cb", - "git_repository_create_cb", - "git_clone_options_init", - "git_clone" - ], + "functions": ["git_remote_create_cb", "git_repository_create_cb", "git_clone_options_init", "git_clone"], "meta": {}, "lines": 205 }, @@ -200,11 +178,7 @@ }, { "file": "git2/common.h", - "functions": [ - "git_libgit2_version", - "git_libgit2_features", - "git_libgit2_opts" - ], + "functions": ["git_libgit2_version", "git_libgit2_features", "git_libgit2_opts"], "meta": {}, "lines": 466 }, @@ -280,9 +254,7 @@ }, { "file": "git2/credential_helpers.h", - "functions": [ - "git_credential_userpass" - ], + "functions": ["git_credential_userpass"], "meta": {}, "lines": 48 }, @@ -384,12 +356,7 @@ }, { "file": "git2/errors.h", - "functions": [ - "git_error_last", - "git_error_clear", - "git_error_set_str", - "git_error_set_oom" - ], + "functions": ["git_error_last", "git_error_clear", "git_error_set_str", "git_error_set_oom"], "meta": {}, "lines": 161 }, @@ -412,30 +379,19 @@ }, { "file": "git2/global.h", - "functions": [ - "git_libgit2_init", - "git_libgit2_shutdown" - ], + "functions": ["git_libgit2_init", "git_libgit2_shutdown"], "meta": {}, "lines": 39 }, { "file": "git2/graph.h", - "functions": [ - "git_graph_ahead_behind", - "git_graph_descendant_of", - "git_graph_reachable_from_any" - ], + "functions": ["git_graph_ahead_behind", "git_graph_descendant_of", "git_graph_reachable_from_any"], "meta": {}, "lines": 72 }, { "file": "git2/ignore.h", - "functions": [ - "git_ignore_add_rule", - "git_ignore_clear_internal_rules", - "git_ignore_path_is_ignored" - ], + "functions": ["git_ignore_add_rule", "git_ignore_clear_internal_rules", "git_ignore_path_is_ignored"], "meta": {}, "lines": 74 }, @@ -543,11 +499,7 @@ }, { "file": "git2/message.h", - "functions": [ - "git_message_prettify", - "git_message_trailers", - "git_message_trailer_array_free" - ], + "functions": ["git_message_prettify", "git_message_trailers", "git_message_trailer_array_free"], "meta": {}, "lines": 79 }, @@ -646,11 +598,7 @@ }, { "file": "git2/odb_backend.h", - "functions": [ - "git_odb_backend_pack", - "git_odb_backend_loose", - "git_odb_backend_one_pack" - ], + "functions": ["git_odb_backend_pack", "git_odb_backend_loose", "git_odb_backend_one_pack"], "meta": {}, "lines": 131 }, @@ -682,9 +630,7 @@ }, { "file": "git2/oidarray.h", - "functions": [ - "git_oidarray_dispose" - ], + "functions": ["git_oidarray_dispose"], "meta": {}, "lines": 31 }, @@ -756,9 +702,7 @@ }, { "file": "git2/proxy.h", - "functions": [ - "git_proxy_options_init" - ], + "functions": ["git_proxy_options_init"], "meta": {}, "lines": 94 }, @@ -787,12 +731,7 @@ }, { "file": "git2/refdb.h", - "functions": [ - "git_refdb_new", - "git_refdb_open", - "git_refdb_compress", - "git_refdb_free" - ], + "functions": ["git_refdb_new", "git_refdb_open", "git_refdb_compress", "git_refdb_free"], "meta": {}, "lines": 63 }, @@ -997,31 +936,19 @@ }, { "file": "git2/reset.h", - "functions": [ - "git_reset", - "git_reset_from_annotated", - "git_reset_default" - ], + "functions": ["git_reset", "git_reset_from_annotated", "git_reset_default"], "meta": {}, "lines": 107 }, { "file": "git2/revert.h", - "functions": [ - "git_revert_options_init", - "git_revert_commit", - "git_revert" - ], + "functions": ["git_revert_options_init", "git_revert_commit", "git_revert"], "meta": {}, "lines": 86 }, { "file": "git2/revparse.h", - "functions": [ - "git_revparse_single", - "git_revparse_ext", - "git_revparse" - ], + "functions": ["git_revparse_single", "git_revparse_ext", "git_revparse"], "meta": {}, "lines": 108 }, @@ -1097,10 +1024,7 @@ }, { "file": "git2/strarray.h", - "functions": [ - "git_strarray_dispose", - "git_strarray_copy" - ], + "functions": ["git_strarray_dispose", "git_strarray_copy"], "meta": {}, "lines": 49 }, @@ -1220,10 +1144,7 @@ }, { "file": "git2/trace.h", - "functions": [ - "git_trace_cb", - "git_trace_set" - ], + "functions": ["git_trace_cb", "git_trace_set"], "meta": {}, "lines": 63 }, @@ -1244,10 +1165,7 @@ }, { "file": "git2/transport.h", - "functions": [ - "git_transport_message_cb", - "git_transport_cb" - ], + "functions": ["git_transport_message_cb", "git_transport_cb"], "meta": {}, "lines": 37 }, @@ -1353,9 +1271,7 @@ "comments": "", "group": "annotated", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_annotated_commit_from_ref-1" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_annotated_commit_from_ref-1"] } }, "git_annotated_commit_from_fetchhead": { @@ -1486,9 +1402,7 @@ "comments": "", "group": "annotated", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_annotated_commit_id-2" - ], + "checkout.c": ["ex/v1.3.1/checkout.html#git_annotated_commit_id-2"], "merge.c": [ "ex/v1.3.1/merge.html#git_annotated_commit_id-1", "ex/v1.3.1/merge.html#git_annotated_commit_id-2", @@ -1547,9 +1461,7 @@ "comments": "", "group": "annotated", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_annotated_commit_free-6" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_annotated_commit_free-6"] } }, "git_apply_to_tree": { @@ -2072,9 +1984,7 @@ "comments": "", "group": "blame", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blame_get_hunk_byline-1" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blame_get_hunk_byline-1"] } }, "git_blame_file": { @@ -2114,9 +2024,7 @@ "comments": "", "group": "blame", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blame_file-2" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blame_file-2"] } }, "git_blame_buffer": { @@ -2178,9 +2086,7 @@ "comments": "", "group": "blame", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blame_free-3" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blame_free-3"] } }, "git_blob_lookup": { @@ -2215,12 +2121,8 @@ "comments": "", "group": "blob", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blob_lookup-4" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_blob_lookup-1" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blob_lookup-4"], + "general.c": ["ex/v1.3.1/general.html#git_blob_lookup-1"] } }, "git_blob_lookup_prefix": { @@ -2282,12 +2184,8 @@ "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a blob. Failure to do so will cause a memory leak.

\n", "group": "blob", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blob_free-5" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_blob_free-2" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blob_free-5"], + "general.c": ["ex/v1.3.1/general.html#git_blob_free-2"] } }, "git_blob_id": { @@ -2356,15 +2254,9 @@ "comments": "

A pointer to the raw content of a blob is returned; this pointer is owned internally by the object and shall not be free'd. The pointer may be invalidated at a later time.

\n", "group": "blob", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blob_rawcontent-6" - ], - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_blob_rawcontent-1" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_blob_rawcontent-3" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blob_rawcontent-6"], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_blob_rawcontent-1"], + "general.c": ["ex/v1.3.1/general.html#git_blob_rawcontent-3"] } }, "git_blob_rawsize": { @@ -2389,16 +2281,9 @@ "comments": "", "group": "blob", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_blob_rawsize-7" - ], - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_blob_rawsize-2" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_blob_rawsize-4", - "ex/v1.3.1/general.html#git_blob_rawsize-5" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_blob_rawsize-7"], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_blob_rawsize-2"], + "general.c": ["ex/v1.3.1/general.html#git_blob_rawsize-4", "ex/v1.3.1/general.html#git_blob_rawsize-5"] } }, "git_blob_filter_options_init": { @@ -2758,9 +2643,7 @@ "comments": "

This behaves like git_branch_create() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_branch_create().

\n", "group": "branch", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_branch_create_from_annotated-7" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_branch_create_from_annotated-7"] } }, "git_branch_delete": { @@ -2972,9 +2855,7 @@ "comments": "

Given a reference object, this will check that it really is a branch (ie. it lives under "refs/heads/" or "refs/remotes/"), and return the branch part of it.

\n", "group": "branch", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_branch_name-4" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_branch_name-4"] } }, "git_branch_upstream": { @@ -3252,13 +3133,8 @@ "comments": "

Note that this does not free the git_buf itself, just the memory pointed to by buffer->ptr. This will not free the memory if it looks like it was not allocated internally, but it will clear the buffer back to the empty state.

\n", "group": "buf", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_buf_dispose-1", - "ex/v1.3.1/diff.html#git_buf_dispose-2" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_buf_dispose-1" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_buf_dispose-1", "ex/v1.3.1/diff.html#git_buf_dispose-2"], + "tag.c": ["ex/v1.3.1/tag.html#git_buf_dispose-1"] } }, "git_buf_grow": { @@ -3482,12 +3358,8 @@ "comments": "", "group": "checkout", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_checkout_tree-8" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_checkout_tree-5" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_checkout_tree-8"], + "merge.c": ["ex/v1.3.1/merge.html#git_checkout_tree-5"] } }, "git_cherrypick_options_init": { @@ -3692,20 +3564,14 @@ "comments": "

The returned object should be released with git_commit_free when no longer needed.

\n", "group": "commit", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_commit_lookup-9" - ], + "checkout.c": ["ex/v1.3.1/checkout.html#git_commit_lookup-9"], "general.c": [ "ex/v1.3.1/general.html#git_commit_lookup-6", "ex/v1.3.1/general.html#git_commit_lookup-7", "ex/v1.3.1/general.html#git_commit_lookup-8" ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_lookup-1" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_commit_lookup-6" - ] + "log.c": ["ex/v1.3.1/log.html#git_commit_lookup-1"], + "merge.c": ["ex/v1.3.1/merge.html#git_commit_lookup-6"] } }, "git_commit_lookup_prefix": { @@ -3767,9 +3633,7 @@ "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a commit. Failure to do so will cause a memory leak.

\n", "group": "commit", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_commit_free-10" - ], + "checkout.c": ["ex/v1.3.1/checkout.html#git_commit_free-10"], "general.c": [ "ex/v1.3.1/general.html#git_commit_free-9", "ex/v1.3.1/general.html#git_commit_free-10", @@ -3807,12 +3671,8 @@ "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_commit_id-14" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_id-6" - ] + "general.c": ["ex/v1.3.1/general.html#git_commit_id-14"], + "log.c": ["ex/v1.3.1/log.html#git_commit_id-6"] } }, "git_commit_owner": { @@ -3837,10 +3697,7 @@ "comments": "", "group": "commit", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_commit_owner-7", - "ex/v1.3.1/log.html#git_commit_owner-8" - ] + "log.c": ["ex/v1.3.1/log.html#git_commit_owner-7", "ex/v1.3.1/log.html#git_commit_owner-8"] } }, "git_commit_message_encoding": { @@ -3887,10 +3744,7 @@ "comments": "

The returned message will be slightly prettified by removing any potential leading newlines.

\n", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_message-3", - "ex/v1.3.1/cat-file.html#git_commit_message-4" - ], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_message-3", "ex/v1.3.1/cat-file.html#git_commit_message-4"], "general.c": [ "ex/v1.3.1/general.html#git_commit_message-15", "ex/v1.3.1/general.html#git_commit_message-16", @@ -3901,9 +3755,7 @@ "ex/v1.3.1/log.html#git_commit_message-10", "ex/v1.3.1/log.html#git_commit_message-11" ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_commit_message-2" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_commit_message-2"] } }, "git_commit_message_raw": { @@ -3994,10 +3846,7 @@ "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_commit_time-18", - "ex/v1.3.1/general.html#git_commit_time-19" - ] + "general.c": ["ex/v1.3.1/general.html#git_commit_time-18", "ex/v1.3.1/general.html#git_commit_time-19"] } }, "git_commit_time_offset": { @@ -4044,15 +3893,9 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_committer-5" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_commit_committer-20" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_committer-12" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_committer-5"], + "general.c": ["ex/v1.3.1/general.html#git_commit_committer-20"], + "log.c": ["ex/v1.3.1/log.html#git_commit_committer-12"] } }, "git_commit_author": { @@ -4077,17 +3920,9 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_author-6" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_commit_author-21", - "ex/v1.3.1/general.html#git_commit_author-22" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_author-13", - "ex/v1.3.1/log.html#git_commit_author-14" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_author-6"], + "general.c": ["ex/v1.3.1/general.html#git_commit_author-21", "ex/v1.3.1/general.html#git_commit_author-22"], + "log.c": ["ex/v1.3.1/log.html#git_commit_author-13", "ex/v1.3.1/log.html#git_commit_author-14"] } }, "git_commit_committer_with_mailmap": { @@ -4234,9 +4069,7 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_tree_id-7" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_tree_id-7"] } }, "git_commit_parentcount": { @@ -4261,16 +4094,9 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_parentcount-8" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_commit_parentcount-23" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_parentcount-20", - "ex/v1.3.1/log.html#git_commit_parentcount-21" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_parentcount-8"], + "general.c": ["ex/v1.3.1/general.html#git_commit_parentcount-23"], + "log.c": ["ex/v1.3.1/log.html#git_commit_parentcount-20", "ex/v1.3.1/log.html#git_commit_parentcount-21"] } }, "git_commit_parent": { @@ -4305,13 +4131,8 @@ "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_commit_parent-24" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_parent-22", - "ex/v1.3.1/log.html#git_commit_parent-23" - ] + "general.c": ["ex/v1.3.1/general.html#git_commit_parent-24"], + "log.c": ["ex/v1.3.1/log.html#git_commit_parent-22", "ex/v1.3.1/log.html#git_commit_parent-23"] } }, "git_commit_parent_id": { @@ -4341,12 +4162,8 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_commit_parent_id-9" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_commit_parent_id-24" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_commit_parent_id-9"], + "log.c": ["ex/v1.3.1/log.html#git_commit_parent_id-24"] } }, "git_commit_nth_gen_ancestor": { @@ -4522,9 +4339,7 @@ "comments": "

The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.

\n", "group": "commit", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_commit_create-7" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_commit_create-7"] } }, "git_commit_create_v": { @@ -4589,15 +4404,9 @@ "comments": "

The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.

\n\n

The parents for the commit are specified as a variable list of pointers to const git_commit *. Note that this is a convenience method which may not be safe to export for certain languages or compilers

\n\n

All other parameters remain the same as git_commit_create().

\n", "group": "commit", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_commit_create_v-1" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_commit_create_v-25" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_commit_create_v-1" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_commit_create_v-1"], + "general.c": ["ex/v1.3.1/general.html#git_commit_create_v-25"], + "init.c": ["ex/v1.3.1/init.html#git_commit_create_v-1"] } }, "git_commit_amend": { @@ -4880,10 +4689,7 @@ "comments": "", "group": "config", "examples": { - "config.c": [ - "ex/v1.3.1/config.html#git_config_entry_free-1", - "ex/v1.3.1/config.html#git_config_entry_free-2" - ] + "config.c": ["ex/v1.3.1/config.html#git_config_entry_free-1", "ex/v1.3.1/config.html#git_config_entry_free-2"] } }, "git_config_find_global": { @@ -5087,9 +4893,7 @@ "comments": "

This method is a simple utility wrapper for the following sequence of calls: - git_config_new - git_config_add_file_ondisk

\n", "group": "config", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_config_open_ondisk-26" - ] + "general.c": ["ex/v1.3.1/general.html#git_config_open_ondisk-26"] } }, "git_config_open_level": { @@ -5200,13 +5004,8 @@ "comments": "", "group": "config", "examples": { - "config.c": [ - "ex/v1.3.1/config.html#git_config_free-3" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_config_free-27", - "ex/v1.3.1/general.html#git_config_free-28" - ] + "config.c": ["ex/v1.3.1/config.html#git_config_free-3"], + "general.c": ["ex/v1.3.1/general.html#git_config_free-27", "ex/v1.3.1/general.html#git_config_free-28"] } }, "git_config_get_entry": { @@ -5241,9 +5040,7 @@ "comments": "

Free the git_config_entry after use with git_config_entry_free().

\n", "group": "config", "examples": { - "config.c": [ - "ex/v1.3.1/config.html#git_config_get_entry-4" - ] + "config.c": ["ex/v1.3.1/config.html#git_config_get_entry-4"] } }, "git_config_get_int32": { @@ -5706,9 +5503,7 @@ "comments": "

A copy of the string is made and the user is free to use it afterwards.

\n", "group": "config", "examples": { - "config.c": [ - "ex/v1.3.1/config.html#git_config_set_string-5" - ] + "config.c": ["ex/v1.3.1/config.html#git_config_set_string-5"] } }, "git_config_set_multivar": { @@ -7124,9 +6919,7 @@ "comments": "

Initializes a git_describe_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_OPTIONS_INIT.

\n", "group": "describe", "examples": { - "describe.c": [ - "ex/v1.3.1/describe.html#git_describe_options_init-1" - ] + "describe.c": ["ex/v1.3.1/describe.html#git_describe_options_init-1"] } }, "git_describe_format_options_init": { @@ -7156,9 +6949,7 @@ "comments": "

Initializes a git_describe_format_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.

\n", "group": "describe", "examples": { - "describe.c": [ - "ex/v1.3.1/describe.html#git_describe_format_options_init-2" - ] + "describe.c": ["ex/v1.3.1/describe.html#git_describe_format_options_init-2"] } }, "git_describe_commit": { @@ -7193,9 +6984,7 @@ "comments": "

Perform the describe operation on the given committish object.

\n", "group": "describe", "examples": { - "describe.c": [ - "ex/v1.3.1/describe.html#git_describe_commit-3" - ] + "describe.c": ["ex/v1.3.1/describe.html#git_describe_commit-3"] } }, "git_describe_workdir": { @@ -7230,9 +7019,7 @@ "comments": "

Perform the describe operation on the current commit and the worktree. After peforming describe on HEAD, a status is run and the description is considered to be dirty if there are.

\n", "group": "describe", "examples": { - "describe.c": [ - "ex/v1.3.1/describe.html#git_describe_workdir-4" - ] + "describe.c": ["ex/v1.3.1/describe.html#git_describe_workdir-4"] } }, "git_describe_format": { @@ -7267,9 +7054,7 @@ "comments": "", "group": "describe", "examples": { - "describe.c": [ - "ex/v1.3.1/describe.html#git_describe_format-5" - ] + "describe.c": ["ex/v1.3.1/describe.html#git_describe_format-5"] } }, "git_describe_result_free": { @@ -7370,13 +7155,8 @@ "comments": "", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_free-3" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_diff_free-25", - "ex/v1.3.1/log.html#git_diff_free-26" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_free-3"], + "log.c": ["ex/v1.3.1/log.html#git_diff_free-25", "ex/v1.3.1/log.html#git_diff_free-26"] } }, "git_diff_tree_to_tree": { @@ -7421,13 +7201,8 @@ "comments": "

This is equivalent to git diff <old-tree> <new-tree>

\n\n

The first tree will be used for the "old_file" side of the delta and the second tree will be used for the "new_file" side of the delta. You can pass NULL to indicate an empty tree, although it is an error to pass NULL for both the old_tree and new_tree.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_tree_to_tree-4" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_diff_tree_to_tree-27", - "ex/v1.3.1/log.html#git_diff_tree_to_tree-28" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_tree_to_tree-4"], + "log.c": ["ex/v1.3.1/log.html#git_diff_tree_to_tree-27", "ex/v1.3.1/log.html#git_diff_tree_to_tree-28"] } }, "git_diff_tree_to_index": { @@ -7472,9 +7247,7 @@ "comments": "

This is equivalent to git diff --cached <treeish> or if you pass the HEAD tree, then like git diff --cached.

\n\n

The tree you pass will be used for the "old_file" side of the delta, and the index will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_tree_to_index-5" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_tree_to_index-5"] } }, "git_diff_index_to_workdir": { @@ -7514,9 +7287,7 @@ "comments": "

This matches the git diff command. See the note below on git_diff_tree_to_workdir for a discussion of the difference between git diff and git diff HEAD and how to emulate a git diff <treeish> using libgit2.

\n\n

The index will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_index_to_workdir-6" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_index_to_workdir-6"] } }, "git_diff_tree_to_workdir": { @@ -7556,9 +7327,7 @@ "comments": "

The tree you provide will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side.

\n\n

This is not the same as git diff <treeish> or git diff-index <treeish>. Those commands use information from the index, whereas this function strictly returns the differences between the tree and the files in the working directory, regardless of the state of the index. Use git_diff_tree_to_workdir_with_index to emulate those commands.

\n\n

To see difference between this and git_diff_tree_to_workdir_with_index, consider the example of a staged file deletion where the file has then been put back into the working dir and further modified. The tree-to-workdir diff for that file is 'modified', but git diff would show status 'deleted' since there is a staged delete.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_tree_to_workdir-7" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_tree_to_workdir-7"] } }, "git_diff_tree_to_workdir_with_index": { @@ -7598,9 +7367,7 @@ "comments": "

This emulates git diff <tree> by diffing the tree to the index and the index to the working directory and blending the results into a single diff that includes staged deleted, etc.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_tree_to_workdir_with_index-8" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_tree_to_workdir_with_index-8"] } }, "git_diff_index_to_index": { @@ -7699,9 +7466,7 @@ "comments": "

This modifies a diff in place, replacing old entries that look like renames or copies with new entries reflecting those changes. This also will, if requested, break modified files into add/remove pairs if the amount of change is above a threshold.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_find_similar-9" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_find_similar-9"] } }, "git_diff_num_deltas": { @@ -7726,9 +7491,7 @@ "comments": "", "group": "diff", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_diff_num_deltas-29" - ] + "log.c": ["ex/v1.3.1/log.html#git_diff_num_deltas-29"] } }, "git_diff_num_deltas_of_type": { @@ -7913,12 +7676,8 @@ "comments": "

Returning a non-zero value from the callbacks will terminate the iteration and return the non-zero value to the caller.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_print-10" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_diff_print-30" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_print-10"], + "log.c": ["ex/v1.3.1/log.html#git_diff_print-30"] } }, "git_diff_to_buf": { @@ -8201,9 +7960,7 @@ "comments": "

The diff object produced is similar to the one that would be produced if you actually produced it computationally by comparing two trees, however there may be subtle differences. For example, a patch file likely contains abbreviated object IDs, so the object IDs in a git_diff_delta produced by this function will also be abbreviated.

\n\n

This function will only read patch files created by a git implementation, it will not read unified diffs produced by the diff program, nor any other types of patch files.

\n", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_from_buffer-11" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_from_buffer-11"] } }, "git_diff_get_stats": { @@ -8233,9 +7990,7 @@ "comments": "", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_get_stats-12" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_get_stats-12"] } }, "git_diff_stats_files_changed": { @@ -8341,9 +8096,7 @@ "comments": "", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_stats_to_buf-13" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_stats_to_buf-13"] } }, "git_diff_stats_free": { @@ -8368,9 +8121,7 @@ "comments": "", "group": "diff", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_diff_stats_free-14" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_diff_stats_free-14"] } }, "git_diff_patchid_options_init": { @@ -8454,21 +8205,14 @@ "ex/v1.3.1/checkout.html#git_error_last-13", "ex/v1.3.1/checkout.html#git_error_last-14" ], - "commit.c": [ - "ex/v1.3.1/commit.html#git_error_last-2" - ], + "commit.c": ["ex/v1.3.1/commit.html#git_error_last-2"], "config.c": [ "ex/v1.3.1/config.html#git_error_last-6", "ex/v1.3.1/config.html#git_error_last-7", "ex/v1.3.1/config.html#git_error_last-8" ], - "general.c": [ - "ex/v1.3.1/general.html#git_error_last-33" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_error_last-8", - "ex/v1.3.1/merge.html#git_error_last-9" - ] + "general.c": ["ex/v1.3.1/general.html#git_error_last-33"], + "merge.c": ["ex/v1.3.1/merge.html#git_error_last-8", "ex/v1.3.1/merge.html#git_error_last-9"] } }, "git_error_clear": { @@ -8901,9 +8645,7 @@ "comments": "

This function must be called before any other libgit2 function in order to set up global state and threading.

\n\n

This function may be called multiple times - it will return the number of times the initialization has been called (including this one) that have not subsequently been shutdown.

\n", "group": "libgit2", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_libgit2_init-34" - ] + "general.c": ["ex/v1.3.1/general.html#git_libgit2_init-34"] } }, "git_libgit2_shutdown": { @@ -9185,21 +8927,11 @@ "comments": "", "group": "index", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_index_free-1" - ], - "commit.c": [ - "ex/v1.3.1/commit.html#git_index_free-3" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_index_free-35" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_index_free-2" - ], - "ls-files.c": [ - "ex/v1.3.1/ls-files.html#git_index_free-1" - ] + "add.c": ["ex/v1.3.1/add.html#git_index_free-1"], + "commit.c": ["ex/v1.3.1/commit.html#git_index_free-3"], + "general.c": ["ex/v1.3.1/general.html#git_index_free-35"], + "init.c": ["ex/v1.3.1/init.html#git_index_free-2"], + "ls-files.c": ["ex/v1.3.1/ls-files.html#git_index_free-1"] } }, "git_index_owner": { @@ -9371,12 +9103,8 @@ "comments": "", "group": "index", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_index_write-2" - ], - "commit.c": [ - "ex/v1.3.1/commit.html#git_index_write-4" - ] + "add.c": ["ex/v1.3.1/add.html#git_index_write-2"], + "commit.c": ["ex/v1.3.1/commit.html#git_index_write-4"] } }, "git_index_path": { @@ -9477,15 +9205,9 @@ "comments": "

This method will scan the index and write a representation of its current state back to disk; it recursively creates tree objects for each of the subtrees stored in the index, but only returns the OID of the root tree. This is the OID that can be used e.g. to create a commit.

\n\n

The index instance cannot be bare, and needs to be associated to an existing repository.

\n\n

The index must not contain any file in conflict.

\n", "group": "index", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_index_write_tree-5" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_index_write_tree-3" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_index_write_tree-10" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_index_write_tree-5"], + "init.c": ["ex/v1.3.1/init.html#git_index_write_tree-3"], + "merge.c": ["ex/v1.3.1/merge.html#git_index_write_tree-10"] } }, "git_index_write_tree_to": { @@ -9542,12 +9264,8 @@ "comments": "", "group": "index", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_index_entrycount-36" - ], - "ls-files.c": [ - "ex/v1.3.1/ls-files.html#git_index_entrycount-2" - ] + "general.c": ["ex/v1.3.1/general.html#git_index_entrycount-36"], + "ls-files.c": ["ex/v1.3.1/ls-files.html#git_index_entrycount-2"] } }, "git_index_clear": { @@ -9599,12 +9317,8 @@ "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", "group": "index", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_index_get_byindex-37" - ], - "ls-files.c": [ - "ex/v1.3.1/ls-files.html#git_index_get_byindex-3" - ] + "general.c": ["ex/v1.3.1/general.html#git_index_get_byindex-37"], + "ls-files.c": ["ex/v1.3.1/ls-files.html#git_index_get_byindex-3"] } }, "git_index_get_bypath": { @@ -9639,9 +9353,7 @@ "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", "group": "index", "examples": { - "ls-files.c": [ - "ex/v1.3.1/ls-files.html#git_index_get_bypath-4" - ] + "ls-files.c": ["ex/v1.3.1/ls-files.html#git_index_get_bypath-4"] } }, "git_index_remove": { @@ -9988,9 +9700,7 @@ "comments": "

This method will fail in bare index instances.

\n\n

The pathspec is a list of file names or shell glob patterns that will be matched against files in the repository's working directory. Each file that matches will be added to the index (either updating an existing entry or adding a new entry). You can disable glob expansion and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH flag.

\n\n

Files that are ignored will be skipped (unlike git_index_add_bypath). If a file is already tracked in the index, then it will be updated even if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to skip the checking of ignore rules.

\n\n

To emulate git add -A and generate an error if the pathspec contains the exact path of an ignored file (when not using FORCE), add the GIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry in the pathspec that is an exact match to a filename on disk is either not ignored or already in the index. If this check fails, the function will return GIT_EINVALIDSPEC.

\n\n

To emulate git add -A with the "dry-run" option, just use a callback function that always returns a positive value. See below for details.

\n\n

If any files are currently the result of a merge conflict, those files will no longer be marked as conflicting. The data about the conflicts will be moved to the "resolve undo" (REUC) section.

\n\n

If you provide a callback function, it will be invoked on each matching item in the working directory immediately before it is added to / updated in the index. Returning zero will add the item to the index, greater than zero will skip the item, and less than zero will abort the scan and return that value to the caller.

\n", "group": "index", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_index_add_all-3" - ] + "add.c": ["ex/v1.3.1/add.html#git_index_add_all-3"] } }, "git_index_remove_all": { @@ -10067,9 +9777,7 @@ "comments": "

This method will fail in bare index instances.

\n\n

This scans the existing index entries and synchronizes them with the working directory, deleting them if the corresponding working directory file no longer exists otherwise updating the information (including adding the latest version of file to the ODB if needed).

\n\n

If you provide a callback function, it will be invoked on each matching item in the index immediately before it is updated (either refreshed or removed depending on working directory state). Return 0 to proceed with updating the item, > 0 to skip the item, and < 0 to abort the scan.

\n", "group": "index", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_index_update_all-4" - ] + "add.c": ["ex/v1.3.1/add.html#git_index_update_all-4"] } }, "git_index_find": { @@ -10286,9 +9994,7 @@ "comments": "", "group": "index", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_index_has_conflicts-11" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_index_has_conflicts-11"] } }, "git_index_conflict_iterator_new": { @@ -10318,9 +10024,7 @@ "comments": "

The index must not be modified while iterating; the results are undefined.

\n", "group": "index", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_index_conflict_iterator_new-12" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_index_conflict_iterator_new-12"] } }, "git_index_conflict_next": { @@ -10360,9 +10064,7 @@ "comments": "", "group": "index", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_index_conflict_next-13" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_index_conflict_next-13"] } }, "git_index_conflict_iterator_free": { @@ -10387,9 +10089,7 @@ "comments": "", "group": "index", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_index_conflict_iterator_free-14" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_index_conflict_iterator_free-14"] } }, "git_indexer_options_init": { @@ -10911,9 +10611,7 @@ "comments": "", "group": "merge", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_merge_analysis-15" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_merge_analysis-15"] } }, "git_merge_analysis_for_ref": { @@ -11000,12 +10698,8 @@ "comments": "", "group": "merge", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_merge_base-31" - ], - "rev-parse.c": [ - "ex/v1.3.1/rev-parse.html#git_merge_base-1" - ] + "log.c": ["ex/v1.3.1/log.html#git_merge_base-31"], + "rev-parse.c": ["ex/v1.3.1/rev-parse.html#git_merge_base-1"] } }, "git_merge_bases": { @@ -11398,9 +11092,7 @@ "comments": "

For compatibility with git, the repository is put into a merging state. Once the commit is done (or if the uses wishes to abort), you should clear this state by calling git_repository_state_cleanup().

\n", "group": "merge", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_merge-16" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_merge-16"] } }, "git_message_prettify": { @@ -12095,12 +11787,8 @@ "comments": "

The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJECT_ANY' may be passed to let the method guess the object's type.

\n", "group": "object", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_object_lookup-32" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_object_lookup-17" - ] + "log.c": ["ex/v1.3.1/log.html#git_object_lookup-32"], + "merge.c": ["ex/v1.3.1/merge.html#git_object_lookup-17"] } }, "git_object_lookup_prefix": { @@ -12210,10 +11898,7 @@ "ex/v1.3.1/blame.html#git_object_id-10", "ex/v1.3.1/blame.html#git_object_id-11" ], - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_object_id-10", - "ex/v1.3.1/cat-file.html#git_object_id-11" - ], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_object_id-10", "ex/v1.3.1/cat-file.html#git_object_id-11"], "log.c": [ "ex/v1.3.1/log.html#git_object_id-33", "ex/v1.3.1/log.html#git_object_id-34", @@ -12256,9 +11941,7 @@ "comments": "

This starts at the "core.abbrev" length (default 7 characters) and iteratively extends to a longer string if that length is ambiguous. The result will be unambiguous (at least until new objects are added to the repository).

\n", "group": "object", "examples": { - "tag.c": [ - "ex/v1.3.1/tag.html#git_object_short_id-3" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_object_short_id-3"] } }, "git_object_type": { @@ -12288,9 +11971,7 @@ "ex/v1.3.1/cat-file.html#git_object_type-13", "ex/v1.3.1/cat-file.html#git_object_type-14" ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_object_type-4" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_object_type-4"] } }, "git_object_owner": { @@ -12343,18 +12024,10 @@ "ex/v1.3.1/blame.html#git_object_free-14", "ex/v1.3.1/blame.html#git_object_free-15" ], - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_object_free-15" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_object_free-38" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_object_free-37" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_object_free-18" - ], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_object_free-15"], + "general.c": ["ex/v1.3.1/general.html#git_object_free-38"], + "log.c": ["ex/v1.3.1/log.html#git_object_free-37"], + "merge.c": ["ex/v1.3.1/merge.html#git_object_free-18"], "rev-parse.c": [ "ex/v1.3.1/rev-parse.html#git_object_free-7", "ex/v1.3.1/rev-parse.html#git_object_free-8", @@ -12603,12 +12276,8 @@ "comments": "", "group": "odb", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_odb_free-20" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_odb_free-41" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_odb_free-20"], + "general.c": ["ex/v1.3.1/general.html#git_odb_free-41"] } }, "git_odb_read": { @@ -12643,12 +12312,8 @@ "comments": "

This method queries all available ODB backends trying to read the given OID.

\n\n

The returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.

\n", "group": "odb", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_odb_read-21" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_odb_read-42" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_odb_read-21"], + "general.c": ["ex/v1.3.1/general.html#git_odb_read-42"] } }, "git_odb_read_prefix": { @@ -12917,9 +12582,7 @@ "comments": "

This method writes a full object straight into the ODB. For most cases, it is preferred to write objects through a write stream, which is both faster and less memory intensive, specially for big objects.

\n\n

This method is provided for compatibility with custom backends which are not able to support streaming writes

\n", "group": "odb", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_odb_write-43" - ] + "general.c": ["ex/v1.3.1/general.html#git_odb_write-43"] } }, "git_odb_open_wstream": { @@ -13291,12 +12954,8 @@ "comments": "

This method must always be called once a git_odb_object is no longer needed, otherwise memory will leak.

\n", "group": "odb", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_odb_object_free-22" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_odb_object_free-44" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_odb_object_free-22"], + "general.c": ["ex/v1.3.1/general.html#git_odb_object_free-44"] } }, "git_odb_object_id": { @@ -13343,9 +13002,7 @@ "comments": "

This is the uncompressed, raw data as read from the ODB, without the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", "group": "odb", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_odb_object_data-45" - ] + "general.c": ["ex/v1.3.1/general.html#git_odb_object_data-45"] } }, "git_odb_object_size": { @@ -13370,12 +13027,8 @@ "comments": "

This is the real size of the data buffer, not the actual size of the object.

\n", "group": "odb", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_odb_object_size-23" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_odb_object_size-46" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_odb_object_size-23"], + "general.c": ["ex/v1.3.1/general.html#git_odb_object_size-46"] } }, "git_odb_object_type": { @@ -13400,9 +13053,7 @@ "comments": "", "group": "odb", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_odb_object_type-47" - ] + "general.c": ["ex/v1.3.1/general.html#git_odb_object_type-47"] } }, "git_odb_add_backend": { @@ -13803,10 +13454,7 @@ "comments": "", "group": "oid", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_oid_fmt-1", - "ex/v1.3.1/fetch.html#git_oid_fmt-2" - ], + "fetch.c": ["ex/v1.3.1/fetch.html#git_oid_fmt-1", "ex/v1.3.1/fetch.html#git_oid_fmt-2"], "general.c": [ "ex/v1.3.1/general.html#git_oid_fmt-56", "ex/v1.3.1/general.html#git_oid_fmt-57", @@ -13814,9 +13462,7 @@ "ex/v1.3.1/general.html#git_oid_fmt-59", "ex/v1.3.1/general.html#git_oid_fmt-60" ], - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_oid_fmt-1" - ] + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_oid_fmt-1"] } }, "git_oid_nfmt": { @@ -13900,10 +13546,7 @@ "comments": "

The c-string is owned by the library and should not be freed by the user. If libgit2 is built with thread support, the string will be stored in TLS (i.e. one buffer per thread) to allow for concurrent calls of the function.

\n", "group": "oid", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_oid_tostr_s-19", - "ex/v1.3.1/merge.html#git_oid_tostr_s-20" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_oid_tostr_s-19", "ex/v1.3.1/merge.html#git_oid_tostr_s-20"] } }, "git_oid_tostr": { @@ -13938,10 +13581,7 @@ "comments": "

If the buffer is smaller than GIT_OID_HEXSZ+1, then the resulting oid c-string will be truncated to n-1 characters (but will still be NUL-byte terminated).

\n\n

If there are any input parameter errors (out == NULL, n == 0, oid == NULL), then a pointer to an empty string is returned, so that the return value can always be printed.

\n", "group": "oid", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_oid_tostr-16", - "ex/v1.3.1/blame.html#git_oid_tostr-17" - ], + "blame.c": ["ex/v1.3.1/blame.html#git_oid_tostr-16", "ex/v1.3.1/blame.html#git_oid_tostr-17"], "cat-file.c": [ "ex/v1.3.1/cat-file.html#git_oid_tostr-24", "ex/v1.3.1/cat-file.html#git_oid_tostr-25", @@ -13949,10 +13589,7 @@ "ex/v1.3.1/cat-file.html#git_oid_tostr-27", "ex/v1.3.1/cat-file.html#git_oid_tostr-28" ], - "log.c": [ - "ex/v1.3.1/log.html#git_oid_tostr-38", - "ex/v1.3.1/log.html#git_oid_tostr-39" - ], + "log.c": ["ex/v1.3.1/log.html#git_oid_tostr-38", "ex/v1.3.1/log.html#git_oid_tostr-39"], "rev-parse.c": [ "ex/v1.3.1/rev-parse.html#git_oid_tostr-10", "ex/v1.3.1/rev-parse.html#git_oid_tostr-11", @@ -14157,12 +13794,8 @@ "comments": "", "group": "oid", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_oid_is_zero-21" - ], - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_oid_is_zero-3" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_oid_is_zero-21"], + "fetch.c": ["ex/v1.3.1/fetch.html#git_oid_is_zero-3"] } }, "git_oid_shorten_new": { @@ -14888,9 +14521,7 @@ "comments": "

This is just like git_diff_buffers() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_patch_from_buffers-15" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_patch_from_buffers-15"] } }, "git_patch_free": { @@ -14915,9 +14546,7 @@ "comments": "", "group": "patch", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_patch_free-16" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_patch_free-16"] } }, "git_patch_get_delta": { @@ -15198,9 +14827,7 @@ "comments": "", "group": "patch", "examples": { - "diff.c": [ - "ex/v1.3.1/diff.html#git_patch_to_buf-17" - ] + "diff.c": ["ex/v1.3.1/diff.html#git_patch_to_buf-17"] } }, "git_pathspec_new": { @@ -15230,9 +14857,7 @@ "comments": "", "group": "pathspec", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_pathspec_new-40" - ] + "log.c": ["ex/v1.3.1/log.html#git_pathspec_new-40"] } }, "git_pathspec_free": { @@ -15257,9 +14882,7 @@ "comments": "", "group": "pathspec", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_pathspec_free-41" - ] + "log.c": ["ex/v1.3.1/log.html#git_pathspec_free-41"] } }, "git_pathspec_matches_path": { @@ -15405,9 +15028,7 @@ "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_pathspec_match_tree-42" - ] + "log.c": ["ex/v1.3.1/log.html#git_pathspec_match_tree-42"] } }, "git_pathspec_match_diff": { @@ -16533,12 +16154,8 @@ "ex/v1.3.1/checkout.html#git_reference_lookup-15", "ex/v1.3.1/checkout.html#git_reference_lookup-16" ], - "general.c": [ - "ex/v1.3.1/general.html#git_reference_lookup-61" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_lookup-21" - ] + "general.c": ["ex/v1.3.1/general.html#git_reference_lookup-61"], + "merge.c": ["ex/v1.3.1/merge.html#git_reference_lookup-21"] } }, "git_reference_name_to_id": { @@ -16605,9 +16222,7 @@ "comments": "

Apply the git precendence rules to the given shorthand to determine which reference the user is referring to.

\n", "group": "reference", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_dwim-22" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_reference_dwim-22"] } }, "git_reference_symbolic_create_matching": { @@ -16756,9 +16371,7 @@ "comments": "

A direct reference (also called an object id reference) refers directly to a specific object id (a.k.a. OID or SHA) in the repository. The id permanently refers to the object (although the reference itself can be moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0" refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.

\n", "group": "reference", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_create-23" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_reference_create-23"] } }, "git_reference_create_matching": { @@ -16835,9 +16448,7 @@ "comments": "

Only available if the reference is direct (i.e. an object id reference, not a symbolic one).

\n\n

To find the OID of a symbolic ref, call git_reference_resolve() and then this function (or maybe use git_reference_name_to_id() to directly resolve a reference name all the way through to an OID).

\n", "group": "reference", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_reference_target-62" - ] + "general.c": ["ex/v1.3.1/general.html#git_reference_target-62"] } }, "git_reference_target_peel": { @@ -16884,12 +16495,8 @@ "comments": "

Only available if the reference is symbolic.

\n", "group": "reference", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_reference_symbolic_target-63" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_symbolic_target-24" - ] + "general.c": ["ex/v1.3.1/general.html#git_reference_symbolic_target-63"], + "merge.c": ["ex/v1.3.1/merge.html#git_reference_symbolic_target-24"] } }, "git_reference_type": { @@ -16914,9 +16521,7 @@ "comments": "

Either direct (GIT_REFERENCE_DIRECT) or symbolic (GIT_REFERENCE_SYMBOLIC)

\n", "group": "reference", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_reference_type-64" - ] + "general.c": ["ex/v1.3.1/general.html#git_reference_type-64"] } }, "git_reference_name": { @@ -16941,12 +16546,8 @@ "comments": "

See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_reference_name-17" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_name-25" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_reference_name-17"], + "merge.c": ["ex/v1.3.1/merge.html#git_reference_name-25"] } }, "git_reference_resolve": { @@ -17072,9 +16673,7 @@ "comments": "

The new reference will be written to disk, overwriting the given reference.

\n", "group": "reference", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_set_target-26" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_reference_set_target-26"] } }, "git_reference_rename": { @@ -17195,9 +16794,7 @@ "comments": "

The string array will be filled with the names of all references; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free().

\n", "group": "reference", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_reference_list-65" - ] + "general.c": ["ex/v1.3.1/general.html#git_reference_list-65"] } }, "git_reference_foreach": { @@ -17318,17 +16915,13 @@ "ex/v1.3.1/checkout.html#git_reference_free-19", "ex/v1.3.1/checkout.html#git_reference_free-20" ], - "general.c": [ - "ex/v1.3.1/general.html#git_reference_free-66" - ], + "general.c": ["ex/v1.3.1/general.html#git_reference_free-66"], "merge.c": [ "ex/v1.3.1/merge.html#git_reference_free-27", "ex/v1.3.1/merge.html#git_reference_free-28", "ex/v1.3.1/merge.html#git_reference_free-29" ], - "status.c": [ - "ex/v1.3.1/status.html#git_reference_free-1" - ] + "status.c": ["ex/v1.3.1/status.html#git_reference_free-1"] } }, "git_reference_cmp": { @@ -17628,9 +17221,7 @@ "comments": "", "group": "reference", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_reference_is_remote-21" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_reference_is_remote-21"] } }, "git_reference_is_tag": { @@ -17746,9 +17337,7 @@ "comments": "

The retrieved peeled object is owned by the repository and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object will be peeled until a non-tag object is met.

\n", "group": "reference", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_reference_peel-30" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_reference_peel-30"] } }, "git_reference_name_is_valid": { @@ -17800,9 +17389,7 @@ "comments": "

This will transform the reference name into a name "human-readable" version. If no shortname is appropriate, it will return the full name.

\n\n

The memory is owned by the reference and must not be freed.

\n", "group": "reference", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_reference_shorthand-2" - ] + "status.c": ["ex/v1.3.1/status.html#git_reference_shorthand-2"] } }, "git_refspec_parse": { @@ -18124,9 +17711,7 @@ "comments": "", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_create-1" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_create-1"] } }, "git_remote_create_options_init": { @@ -18262,12 +17847,8 @@ "comments": "

Create a remote with the given url in-memory. You can use this when you have a URL instead of a remote's name.

\n", "group": "remote", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_remote_create_anonymous-4" - ], - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_remote_create_anonymous-2" - ] + "fetch.c": ["ex/v1.3.1/fetch.html#git_remote_create_anonymous-4"], + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_remote_create_anonymous-2"] } }, "git_remote_create_detached": { @@ -18329,18 +17910,10 @@ "comments": "

The name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "remote", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_remote_lookup-5" - ], - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_remote_lookup-3" - ], - "push.c": [ - "ex/v1.3.1/push.html#git_remote_lookup-1" - ], - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_lookup-2" - ] + "fetch.c": ["ex/v1.3.1/fetch.html#git_remote_lookup-5"], + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_remote_lookup-3"], + "push.c": ["ex/v1.3.1/push.html#git_remote_lookup-1"], + "remote.c": ["ex/v1.3.1/remote.html#git_remote_lookup-2"] } }, "git_remote_dup": { @@ -18436,9 +18009,7 @@ "comments": "

If url.*.insteadOf has been configured for this URL, it will return the modified URL. If git_remote_set_instance_pushurl has been called for this remote, then that URL will be returned.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_url-3" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_url-3"] } }, "git_remote_pushurl": { @@ -18463,9 +18034,7 @@ "comments": "

If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL. If git_remote_set_instance_pushurl has been called for this remote, then that URL will be returned.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_pushurl-4" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_pushurl-4"] } }, "git_remote_set_url": { @@ -18500,9 +18069,7 @@ "comments": "

Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_set_url-5" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_set_url-5"] } }, "git_remote_set_pushurl": { @@ -18537,9 +18104,7 @@ "comments": "

Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_set_pushurl-6" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_set_pushurl-6"] } }, "git_remote_set_instance_url": { @@ -18805,9 +18370,7 @@ "comments": "

The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.

\n", "group": "remote", "examples": { - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_remote_connect-4" - ] + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_remote_connect-4"] } }, "git_remote_ls": { @@ -18842,9 +18405,7 @@ "comments": "

Get the list of references with which the server responds to a new connection.

\n\n

The remote (or more exactly its transport) must have connected to the remote repository. This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.

\n\n

The memory belongs to the remote. The pointer will be valid as long as a new connection is not initiated, but it is recommended that you make a copy in order to make use of the data.

\n", "group": "remote", "examples": { - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_remote_ls-5" - ] + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_remote_ls-5"] } }, "git_remote_connected": { @@ -18935,16 +18496,9 @@ "comments": "

This also disconnects from the remote, if the connection has not been closed yet (using git_remote_disconnect).

\n", "group": "remote", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_remote_free-6", - "ex/v1.3.1/fetch.html#git_remote_free-7" - ], - "ls-remote.c": [ - "ex/v1.3.1/ls-remote.html#git_remote_free-6" - ], - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_free-7" - ] + "fetch.c": ["ex/v1.3.1/fetch.html#git_remote_free-6", "ex/v1.3.1/fetch.html#git_remote_free-7"], + "ls-remote.c": ["ex/v1.3.1/ls-remote.html#git_remote_free-6"], + "remote.c": ["ex/v1.3.1/remote.html#git_remote_free-7"] } }, "git_remote_list": { @@ -18974,12 +18528,8 @@ "comments": "

The string array must be freed by the user.

\n", "group": "remote", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_remote_list-22" - ], - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_list-8" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_remote_list-22"], + "remote.c": ["ex/v1.3.1/remote.html#git_remote_list-8"] } }, "git_remote_init_callbacks": { @@ -19063,9 +18613,7 @@ "comments": "

Initializes a git_push_options with default values. Equivalent to creating an instance with GIT_PUSH_OPTIONS_INIT.

\n", "group": "push", "examples": { - "push.c": [ - "ex/v1.3.1/push.html#git_push_options_init-2" - ] + "push.c": ["ex/v1.3.1/push.html#git_push_options_init-2"] } }, "git_remote_download": { @@ -19211,9 +18759,7 @@ "comments": "

Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.

\n", "group": "remote", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_remote_fetch-8" - ] + "fetch.c": ["ex/v1.3.1/fetch.html#git_remote_fetch-8"] } }, "git_remote_prune": { @@ -19275,9 +18821,7 @@ "comments": "

Peform all the steps from a push.

\n", "group": "remote", "examples": { - "push.c": [ - "ex/v1.3.1/push.html#git_remote_push-3" - ] + "push.c": ["ex/v1.3.1/push.html#git_remote_push-3"] } }, "git_remote_stats": { @@ -19302,9 +18846,7 @@ "comments": "", "group": "remote", "examples": { - "fetch.c": [ - "ex/v1.3.1/fetch.html#git_remote_stats-9" - ] + "fetch.c": ["ex/v1.3.1/fetch.html#git_remote_stats-9"] } }, "git_remote_autotag": { @@ -19420,9 +18962,7 @@ "comments": "

All remote-tracking branches and configuration settings for the remote are updated.

\n\n

The new name will be checked for validity. See git_tag_create() for rules about valid names.

\n\n

No loaded instances of a the remote with the old name will change their name or their list of refspecs.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_rename-9" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_rename-9"] } }, "git_remote_name_is_valid": { @@ -19479,9 +19019,7 @@ "comments": "

All remote-tracking branches and configuration settings for the remote will be removed.

\n", "group": "remote", "examples": { - "remote.c": [ - "ex/v1.3.1/remote.html#git_remote_delete-10" - ] + "remote.c": ["ex/v1.3.1/remote.html#git_remote_delete-10"] } }, "git_remote_default_branch": { @@ -19538,9 +19076,7 @@ "comments": "

The 'path' argument must point to either a git repository folder, or an existing work dir.

\n\n

The method will automatically detect if 'path' is a normal or bare repository or fail is 'path' is neither.

\n", "group": "repository", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_repository_open-67" - ] + "general.c": ["ex/v1.3.1/general.html#git_repository_open-67"] } }, "git_repository_open_from_worktree": { @@ -19671,9 +19207,7 @@ "comments": "", "group": "repository", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_repository_open_ext-43" - ] + "log.c": ["ex/v1.3.1/log.html#git_repository_open_ext-43"] } }, "git_repository_open_bare": { @@ -19725,12 +19259,8 @@ "comments": "

Note that after a repository is free'd, all the objects it has spawned will still exist until they are manually closed by the user with git_object_free, but accessing any of the attributes of an object without a backing repository will result in undefined behavior

\n", "group": "repository", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_repository_free-68" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_repository_free-4" - ] + "general.c": ["ex/v1.3.1/general.html#git_repository_free-68"], + "init.c": ["ex/v1.3.1/init.html#git_repository_free-4"] } }, "git_repository_init": { @@ -19765,9 +19295,7 @@ "comments": "

TODO: - Reinit the repository

\n", "group": "repository", "examples": { - "init.c": [ - "ex/v1.3.1/init.html#git_repository_init-5" - ] + "init.c": ["ex/v1.3.1/init.html#git_repository_init-5"] } }, "git_repository_init_options_init": { @@ -19829,9 +19357,7 @@ "comments": "

This will initialize a new git repository (creating the repo_path if requested by flags) and working directory as needed. It will auto-detect the case sensitivity of the file system and if the file system supports file mode bits correctly.

\n", "group": "repository", "examples": { - "init.c": [ - "ex/v1.3.1/init.html#git_repository_init_ext-6" - ] + "init.c": ["ex/v1.3.1/init.html#git_repository_init_ext-6"] } }, "git_repository_head": { @@ -19861,13 +19387,8 @@ "comments": "

The returned git_reference will be owned by caller and git_reference_free() must be called when done with it to release the allocated memory and prevent a leak.

\n", "group": "repository", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_repository_head-31", - "ex/v1.3.1/merge.html#git_repository_head-32" - ], - "status.c": [ - "ex/v1.3.1/status.html#git_repository_head-3" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_repository_head-31", "ex/v1.3.1/merge.html#git_repository_head-32"], + "status.c": ["ex/v1.3.1/status.html#git_repository_head-3"] } }, "git_repository_head_for_worktree": { @@ -20049,12 +19570,8 @@ "comments": "

This is the path of the .git folder for normal repositories, or of the repository itself for bare repositories.

\n", "group": "repository", "examples": { - "init.c": [ - "ex/v1.3.1/init.html#git_repository_path-7" - ], - "status.c": [ - "ex/v1.3.1/status.html#git_repository_path-4" - ] + "init.c": ["ex/v1.3.1/init.html#git_repository_path-7"], + "status.c": ["ex/v1.3.1/status.html#git_repository_path-4"] } }, "git_repository_workdir": { @@ -20079,9 +19596,7 @@ "comments": "

If the repository is bare, this function will always return NULL.

\n", "group": "repository", "examples": { - "init.c": [ - "ex/v1.3.1/init.html#git_repository_workdir-8" - ] + "init.c": ["ex/v1.3.1/init.html#git_repository_workdir-8"] } }, "git_repository_commondir": { @@ -20160,9 +19675,7 @@ "comments": "", "group": "repository", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_repository_is_bare-5" - ] + "status.c": ["ex/v1.3.1/status.html#git_repository_is_bare-5"] } }, "git_repository_is_worktree": { @@ -20214,9 +19727,7 @@ "comments": "

If a configuration file has not been set, the default config set for the repository will be returned, including global and system configurations (if they are available).

\n\n

The configuration file must be freed once it's no longer being used by the user.

\n", "group": "repository", "examples": { - "config.c": [ - "ex/v1.3.1/config.html#git_repository_config-9" - ] + "config.c": ["ex/v1.3.1/config.html#git_repository_config-9"] } }, "git_repository_config_snapshot": { @@ -20279,12 +19790,8 @@ "comments": "

If a custom ODB has not been set, the default database for the repository will be returned (the one located in .git/objects).

\n\n

The ODB must be freed once it's no longer being used by the user.

\n", "group": "repository", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_repository_odb-29" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_repository_odb-71" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_repository_odb-29"], + "general.c": ["ex/v1.3.1/general.html#git_repository_odb-71"] } }, "git_repository_refdb": { @@ -20341,24 +19848,12 @@ "comments": "

If a custom index has not been set, the default index for the repository will be returned (the one located in .git/index).

\n\n

The index must be freed once it's no longer being used by the user.

\n", "group": "repository", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_repository_index-5" - ], - "commit.c": [ - "ex/v1.3.1/commit.html#git_repository_index-6" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_repository_index-72" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_repository_index-9" - ], - "ls-files.c": [ - "ex/v1.3.1/ls-files.html#git_repository_index-5" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_repository_index-33" - ] + "add.c": ["ex/v1.3.1/add.html#git_repository_index-5"], + "commit.c": ["ex/v1.3.1/commit.html#git_repository_index-6"], + "general.c": ["ex/v1.3.1/general.html#git_repository_index-72"], + "init.c": ["ex/v1.3.1/init.html#git_repository_index-9"], + "ls-files.c": ["ex/v1.3.1/ls-files.html#git_repository_index-5"], + "merge.c": ["ex/v1.3.1/merge.html#git_repository_index-33"] } }, "git_repository_message": { @@ -20432,9 +19927,7 @@ "comments": "", "group": "repository", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_repository_state_cleanup-34" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_repository_state_cleanup-34"] } }, "git_repository_fetchhead_foreach": { @@ -20570,9 +20063,7 @@ "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.

\n\n

If the provided reference points to a branch, the HEAD will point to that branch, staying attached, or become attached if it isn't yet. If the branch doesn't exist yet, no error will be return. The HEAD will then be attached to an unborn branch.

\n\n

Otherwise, the HEAD will be detached and will directly point to the Commit.

\n", "group": "repository", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_repository_set_head-23" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_repository_set_head-23"] } }, "git_repository_set_head_detached": { @@ -20629,9 +20120,7 @@ "comments": "

This behaves like git_repository_set_head_detached() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_repository_set_head_detached().

\n", "group": "repository", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_repository_set_head_detached_from_annotated-24" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_repository_set_head_detached_from_annotated-24"] } }, "git_repository_detach_head": { @@ -20678,12 +20167,8 @@ "comments": "", "group": "repository", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_repository_state-25" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_repository_state-35" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_repository_state-25"], + "merge.c": ["ex/v1.3.1/merge.html#git_repository_state-35"] } }, "git_repository_set_namespace": { @@ -21065,18 +20550,10 @@ "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no longer needed.

\n", "group": "revparse", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_revparse_single-22" - ], - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_revparse_single-30" - ], - "describe.c": [ - "ex/v1.3.1/describe.html#git_revparse_single-6" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revparse_single-44" - ], + "blame.c": ["ex/v1.3.1/blame.html#git_revparse_single-22"], + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_revparse_single-30"], + "describe.c": ["ex/v1.3.1/describe.html#git_revparse_single-6"], + "log.c": ["ex/v1.3.1/log.html#git_revparse_single-44"], "tag.c": [ "ex/v1.3.1/tag.html#git_revparse_single-9", "ex/v1.3.1/tag.html#git_revparse_single-10", @@ -21122,9 +20599,7 @@ "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

In some cases (@{<-n>} or <branchname>@{upstream}), the expression may point to an intermediate reference. When such expressions are being passed in, reference_out will be valued as well.

\n\n

The returned object should be released with git_object_free and the returned reference with git_reference_free when no longer needed.

\n", "group": "revparse", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_revparse_ext-7" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_revparse_ext-7"] } }, "git_revparse": { @@ -21159,16 +20634,9 @@ "comments": "

See man gitrevisions or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n", "group": "revparse", "examples": { - "blame.c": [ - "ex/v1.3.1/blame.html#git_revparse-23" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revparse-45" - ], - "rev-parse.c": [ - "ex/v1.3.1/rev-parse.html#git_revparse-14", - "ex/v1.3.1/rev-parse.html#git_revparse-15" - ] + "blame.c": ["ex/v1.3.1/blame.html#git_revparse-23"], + "log.c": ["ex/v1.3.1/log.html#git_revparse-45"], + "rev-parse.c": ["ex/v1.3.1/rev-parse.html#git_revparse-14", "ex/v1.3.1/rev-parse.html#git_revparse-15"] } }, "git_revwalk_new": { @@ -21198,13 +20666,8 @@ "comments": "

This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be reused for different walks.

\n\n

This revision walker is not thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository.

\n", "group": "revwalk", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_revwalk_new-73" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_new-46", - "ex/v1.3.1/log.html#git_revwalk_new-47" - ] + "general.c": ["ex/v1.3.1/general.html#git_revwalk_new-73"], + "log.c": ["ex/v1.3.1/log.html#git_revwalk_new-46", "ex/v1.3.1/log.html#git_revwalk_new-47"] } }, "git_revwalk_reset": { @@ -21256,12 +20719,8 @@ "comments": "

The pushed commit will be marked as one of the roots from which to start the walk. This commit may not be walked if it or a child is hidden.

\n\n

At least one commit must be pushed onto the walker before a walk can be started.

\n\n

The given id must belong to a committish on the walked repository.

\n", "group": "revwalk", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_revwalk_push-74" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_push-48" - ] + "general.c": ["ex/v1.3.1/general.html#git_revwalk_push-74"], + "log.c": ["ex/v1.3.1/log.html#git_revwalk_push-48"] } }, "git_revwalk_push_glob": { @@ -21313,9 +20772,7 @@ "comments": "", "group": "revwalk", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_push_head-49" - ] + "log.c": ["ex/v1.3.1/log.html#git_revwalk_push_head-49"] } }, "git_revwalk_hide": { @@ -21345,9 +20802,7 @@ "comments": "

The given id must belong to a committish on the walked repository.

\n\n

The resolved commit and all its parents will be hidden from the output on the revision walk.

\n", "group": "revwalk", "examples": { - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_hide-50" - ] + "log.c": ["ex/v1.3.1/log.html#git_revwalk_hide-50"] } }, "git_revwalk_hide_glob": { @@ -21480,12 +20935,8 @@ "comments": "

The initial call to this method is not blocking when iterating through a repo with a time-sorting mode.

\n\n

Iterating with Topological or inverted modes makes the initial call blocking to preprocess the commit list, but this block should be mostly unnoticeable on most repositories (topological preprocessing times at 0.3s on the git.git repo).

\n\n

The revision walker is reset when the walk is over.

\n", "group": "revwalk", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_revwalk_next-75" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_next-51" - ] + "general.c": ["ex/v1.3.1/general.html#git_revwalk_next-75"], + "log.c": ["ex/v1.3.1/log.html#git_revwalk_next-51"] } }, "git_revwalk_sorting": { @@ -21515,13 +20966,8 @@ "comments": "

Changing the sorting mode resets the walker.

\n", "group": "revwalk", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_revwalk_sorting-76" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_sorting-52", - "ex/v1.3.1/log.html#git_revwalk_sorting-53" - ] + "general.c": ["ex/v1.3.1/general.html#git_revwalk_sorting-76"], + "log.c": ["ex/v1.3.1/log.html#git_revwalk_sorting-52", "ex/v1.3.1/log.html#git_revwalk_sorting-53"] } }, "git_revwalk_push_range": { @@ -21595,12 +21041,8 @@ "comments": "", "group": "revwalk", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_revwalk_free-77" - ], - "log.c": [ - "ex/v1.3.1/log.html#git_revwalk_free-54" - ] + "general.c": ["ex/v1.3.1/general.html#git_revwalk_free-77"], + "log.c": ["ex/v1.3.1/log.html#git_revwalk_free-54"] } }, "git_revwalk_repository": { @@ -21699,10 +21141,7 @@ "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('<' and '>') characters are not allowed to be used in either the name or the email parameter.

\n", "group": "signature", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_signature_new-78", - "ex/v1.3.1/general.html#git_signature_new-79" - ] + "general.c": ["ex/v1.3.1/general.html#git_signature_new-78", "ex/v1.3.1/general.html#git_signature_new-79"] } }, "git_signature_now": { @@ -21737,9 +21176,7 @@ "comments": "

Call git_signature_free() to free the data.

\n", "group": "signature", "examples": { - "merge.c": [ - "ex/v1.3.1/merge.html#git_signature_now-36" - ] + "merge.c": ["ex/v1.3.1/merge.html#git_signature_now-36"] } }, "git_signature_default": { @@ -21769,15 +21206,9 @@ "comments": "

This looks up the user.name and user.email from the configuration and uses the current time as the timestamp, and creates a new signature based on that information. It will return GIT_ENOTFOUND if either the user.name or user.email are not set.

\n", "group": "signature", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_signature_default-8" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_signature_default-10" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_signature_default-13" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_signature_default-8"], + "init.c": ["ex/v1.3.1/init.html#git_signature_default-10"], + "tag.c": ["ex/v1.3.1/tag.html#git_signature_default-13"] } }, "git_signature_from_buffer": { @@ -21856,19 +21287,10 @@ "comments": "

Because the signature is not an opaque structure, it is legal to free it manually, but be sure to free the "name" and "email" strings in addition to the structure itself.

\n", "group": "signature", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_signature_free-9" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_signature_free-80", - "ex/v1.3.1/general.html#git_signature_free-81" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_signature_free-11" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_signature_free-14" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_signature_free-9"], + "general.c": ["ex/v1.3.1/general.html#git_signature_free-80", "ex/v1.3.1/general.html#git_signature_free-81"], + "init.c": ["ex/v1.3.1/init.html#git_signature_free-11"], + "tag.c": ["ex/v1.3.1/tag.html#git_signature_free-14"] } }, "git_stash_save": { @@ -22122,9 +21544,7 @@ "comments": "

The callback is passed the path of the file, the status (a combination of the git_status_t values above) and the payload data pointer passed into this function.

\n\n

If the callback returns a non-zero value, this function will stop looping and return that value to caller.

\n", "group": "status", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_status_foreach-6" - ] + "status.c": ["ex/v1.3.1/status.html#git_status_foreach-6"] } }, "git_status_foreach_ext": { @@ -22164,9 +21584,7 @@ "comments": "

This is an extended version of the git_status_foreach() API that allows for more granular control over which paths will be processed and in what order. See the git_status_options structure for details about the additional controls that this makes available.

\n\n

Note that if a pathspec is given in the git_status_options to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec so that all files can be considered.

\n", "group": "status", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_status_foreach_ext-7" - ] + "status.c": ["ex/v1.3.1/status.html#git_status_foreach_ext-7"] } }, "git_status_file": { @@ -22201,9 +21619,7 @@ "comments": "

This tries to get status for the filename that you give. If no files match that name (in either the HEAD, index, or working directory), this returns GIT_ENOTFOUND.

\n\n

If the name matches multiple files (for example, if the path names a directory or if running on a case- insensitive filesystem and yet the HEAD has two entries that both match the path), then this returns GIT_EAMBIGUOUS because it cannot give correct results.

\n\n

This does not do any sort of rename detection. Renames require a set of targets and because of the path filtering, there is not enough information to check renames correctly. To check file status with rename detection, there is no choice but to do a full git_status_list_new and scan through looking for the path that you are interested in.

\n", "group": "status", "examples": { - "add.c": [ - "ex/v1.3.1/add.html#git_status_file-6" - ] + "add.c": ["ex/v1.3.1/add.html#git_status_file-6"] } }, "git_status_list_new": { @@ -22238,10 +21654,7 @@ "comments": "

Note that if a pathspec is given in the git_status_options to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec so that all files can be considered.

\n", "group": "status", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_status_list_new-8", - "ex/v1.3.1/status.html#git_status_list_new-9" - ] + "status.c": ["ex/v1.3.1/status.html#git_status_list_new-8", "ex/v1.3.1/status.html#git_status_list_new-9"] } }, "git_status_list_entrycount": { @@ -22331,9 +21744,7 @@ "comments": "", "group": "status", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_status_list_free-18" - ] + "status.c": ["ex/v1.3.1/status.html#git_status_list_free-18"] } }, "git_status_should_ignore": { @@ -22390,19 +21801,10 @@ "comments": "

This does not free the git_strarray itself, since the library will never allocate that object directly itself.

\n", "group": "strarray", "examples": { - "checkout.c": [ - "ex/v1.3.1/checkout.html#git_strarray_dispose-26" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_strarray_dispose-82" - ], - "remote.c": [ - "ex/v1.3.1/remote.html#git_strarray_dispose-11", - "ex/v1.3.1/remote.html#git_strarray_dispose-12" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_strarray_dispose-15" - ] + "checkout.c": ["ex/v1.3.1/checkout.html#git_strarray_dispose-26"], + "general.c": ["ex/v1.3.1/general.html#git_strarray_dispose-82"], + "remote.c": ["ex/v1.3.1/remote.html#git_strarray_dispose-11", "ex/v1.3.1/remote.html#git_strarray_dispose-12"], + "tag.c": ["ex/v1.3.1/tag.html#git_strarray_dispose-15"] } }, "git_submodule_update_options_init": { @@ -22577,9 +21979,7 @@ "comments": "

See the note on git_submodule above. This iterates over the tracked submodules as described therein.

\n\n

If you are concerned about items in the working directory that look like submodules but are not tracked, the diff API will generate a diff record for workdir items that look like submodules but are not tracked, showing them as added in the workdir. Also, the status API will treat the entire subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.

\n", "group": "submodule", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_submodule_foreach-19" - ] + "status.c": ["ex/v1.3.1/status.html#git_submodule_foreach-19"] } }, "git_submodule_add_setup": { @@ -22749,9 +22149,7 @@ "comments": "", "group": "submodule", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_submodule_name-20" - ] + "status.c": ["ex/v1.3.1/status.html#git_submodule_name-20"] } }, "git_submodule_path": { @@ -22776,9 +22174,7 @@ "comments": "

The path is almost always the same as the submodule name, but the two are actually not required to match.

\n", "group": "submodule", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_submodule_path-21" - ] + "status.c": ["ex/v1.3.1/status.html#git_submodule_path-21"] } }, "git_submodule_url": { @@ -23321,9 +22717,7 @@ "comments": "

This looks at a submodule and tries to determine the status. It will return a combination of the GIT_SUBMODULE_STATUS values above. How deeply it examines the working directory to do this will depend on the git_submodule_ignore_t value for the submodule.

\n", "group": "submodule", "examples": { - "status.c": [ - "ex/v1.3.1/status.html#git_submodule_status-22" - ] + "status.c": ["ex/v1.3.1/status.html#git_submodule_status-22"] } }, "git_submodule_location": { @@ -23385,9 +22779,7 @@ "comments": "", "group": "tag", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_tag_lookup-83" - ] + "general.c": ["ex/v1.3.1/general.html#git_tag_lookup-83"] } }, "git_tag_lookup_prefix": { @@ -23449,9 +22841,7 @@ "comments": "

You can no longer use the git_tag pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you are through with a tag to release memory. Failure to do so will cause a memory leak.

\n", "group": "tag", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_tag_free-84" - ] + "general.c": ["ex/v1.3.1/general.html#git_tag_free-84"] } }, "git_tag_id": { @@ -23525,9 +22915,7 @@ "comments": "

This method performs a repository lookup for the given object and returns it

\n", "group": "tag", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_tag_target-85" - ] + "general.c": ["ex/v1.3.1/general.html#git_tag_target-85"] } }, "git_tag_target_id": { @@ -23552,9 +22940,7 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tag_target_id-31" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tag_target_id-31"] } }, "git_tag_target_type": { @@ -23579,12 +22965,8 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tag_target_type-32" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tag_target_type-86" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tag_target_type-32"], + "general.c": ["ex/v1.3.1/general.html#git_tag_target_type-86"] } }, "git_tag_name": { @@ -23609,15 +22991,9 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tag_name-33" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tag_name-87" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_name-16" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tag_name-33"], + "general.c": ["ex/v1.3.1/general.html#git_tag_name-87"], + "tag.c": ["ex/v1.3.1/tag.html#git_tag_name-16"] } }, "git_tag_tagger": { @@ -23642,9 +23018,7 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tag_tagger-34" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tag_tagger-34"] } }, "git_tag_message": { @@ -23669,16 +23043,9 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tag_message-35", - "ex/v1.3.1/cat-file.html#git_tag_message-36" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tag_message-88" - ], - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_message-17" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tag_message-35", "ex/v1.3.1/cat-file.html#git_tag_message-36"], + "general.c": ["ex/v1.3.1/general.html#git_tag_message-88"], + "tag.c": ["ex/v1.3.1/tag.html#git_tag_message-17"] } }, "git_tag_create": { @@ -23733,9 +23100,7 @@ "comments": "

A new reference will also be created pointing to this tag object. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved through git_message_prettify().

\n\n

The tag name will be checked for validity. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.

\n", "group": "tag", "examples": { - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_create-18" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_tag_create-18"] } }, "git_tag_annotation_create": { @@ -23864,9 +23229,7 @@ "comments": "

A new direct reference will be created pointing to this target object. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_create_lightweight-19" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_tag_create_lightweight-19"] } }, "git_tag_delete": { @@ -23896,9 +23259,7 @@ "comments": "

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_delete-20" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_tag_delete-20"] } }, "git_tag_list": { @@ -23960,9 +23321,7 @@ "comments": "

If an empty pattern is provided, all the tags will be returned.

\n\n

The string array will be filled with the names of the matching tags; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free.

\n", "group": "tag", "examples": { - "tag.c": [ - "ex/v1.3.1/tag.html#git_tag_list_match-21" - ] + "tag.c": ["ex/v1.3.1/tag.html#git_tag_list_match-21"] } }, "git_tag_foreach": { @@ -24378,19 +23737,10 @@ "comments": "", "group": "tree", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_tree_lookup-10" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tree_lookup-89", - "ex/v1.3.1/general.html#git_tree_lookup-90" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_tree_lookup-12" - ], - "merge.c": [ - "ex/v1.3.1/merge.html#git_tree_lookup-37" - ] + "commit.c": ["ex/v1.3.1/commit.html#git_tree_lookup-10"], + "general.c": ["ex/v1.3.1/general.html#git_tree_lookup-89", "ex/v1.3.1/general.html#git_tree_lookup-90"], + "init.c": ["ex/v1.3.1/init.html#git_tree_lookup-12"], + "merge.c": ["ex/v1.3.1/merge.html#git_tree_lookup-37"] } }, "git_tree_lookup_prefix": { @@ -24452,20 +23802,10 @@ "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you stop using a tree to release memory. Failure to do so will cause a memory leak.

\n", "group": "tree", "examples": { - "commit.c": [ - "ex/v1.3.1/commit.html#git_tree_free-11" - ], - "diff.c": [ - "ex/v1.3.1/diff.html#git_tree_free-18", - "ex/v1.3.1/diff.html#git_tree_free-19" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tree_free-91", - "ex/v1.3.1/general.html#git_tree_free-92" - ], - "init.c": [ - "ex/v1.3.1/init.html#git_tree_free-13" - ], + "commit.c": ["ex/v1.3.1/commit.html#git_tree_free-11"], + "diff.c": ["ex/v1.3.1/diff.html#git_tree_free-18", "ex/v1.3.1/diff.html#git_tree_free-19"], + "general.c": ["ex/v1.3.1/general.html#git_tree_free-91", "ex/v1.3.1/general.html#git_tree_free-92"], + "init.c": ["ex/v1.3.1/init.html#git_tree_free-13"], "log.c": [ "ex/v1.3.1/log.html#git_tree_free-55", "ex/v1.3.1/log.html#git_tree_free-56", @@ -24541,12 +23881,8 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entrycount-37" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tree_entrycount-93" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entrycount-37"], + "general.c": ["ex/v1.3.1/general.html#git_tree_entrycount-93"] } }, "git_tree_entry_byname": { @@ -24576,9 +23912,7 @@ "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_tree_entry_byname-94" - ] + "general.c": ["ex/v1.3.1/general.html#git_tree_entry_byname-94"] } }, "git_tree_entry_byindex": { @@ -24608,12 +23942,8 @@ "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entry_byindex-38" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tree_entry_byindex-95" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entry_byindex-38"], + "general.c": ["ex/v1.3.1/general.html#git_tree_entry_byindex-95"] } }, "git_tree_entry_byid": { @@ -24746,13 +24076,8 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entry_name-39" - ], - "general.c": [ - "ex/v1.3.1/general.html#git_tree_entry_name-96", - "ex/v1.3.1/general.html#git_tree_entry_name-97" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entry_name-39"], + "general.c": ["ex/v1.3.1/general.html#git_tree_entry_name-96", "ex/v1.3.1/general.html#git_tree_entry_name-97"] } }, "git_tree_entry_id": { @@ -24777,9 +24102,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entry_id-40" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entry_id-40"] } }, "git_tree_entry_type": { @@ -24804,9 +24127,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entry_type-41" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entry_type-41"] } }, "git_tree_entry_filemode": { @@ -24831,9 +24152,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v1.3.1/cat-file.html#git_tree_entry_filemode-42" - ] + "cat-file.c": ["ex/v1.3.1/cat-file.html#git_tree_entry_filemode-42"] } }, "git_tree_entry_filemode_raw": { @@ -24917,9 +24236,7 @@ "comments": "

You must call git_object_free() on the object when you are done with it.

\n", "group": "tree", "examples": { - "general.c": [ - "ex/v1.3.1/general.html#git_tree_entry_to_object-98" - ] + "general.c": ["ex/v1.3.1/general.html#git_tree_entry_to_object-98"] } }, "git_treebuilder_new": { @@ -27208,9 +26525,7 @@ [ "git_apply_flags_t", { - "decl": [ - "GIT_APPLY_CHECK" - ], + "decl": ["GIT_APPLY_CHECK"], "type": "enum", "file": "git2/apply.h", "line": 57, @@ -27236,11 +26551,7 @@ [ "git_apply_location_t", { - "decl": [ - "GIT_APPLY_LOCATION_WORKDIR", - "GIT_APPLY_LOCATION_INDEX", - "GIT_APPLY_LOCATION_BOTH" - ], + "decl": ["GIT_APPLY_LOCATION_WORKDIR", "GIT_APPLY_LOCATION_INDEX", "GIT_APPLY_LOCATION_BOTH"], "type": "enum", "file": "git2/apply.h", "line": 113, @@ -27271,9 +26582,7 @@ ], "used": { "returns": [], - "needs": [ - "git_apply" - ] + "needs": ["git_apply"] } } ], @@ -27325,22 +26634,14 @@ ], "used": { "returns": [], - "needs": [ - "git_apply", - "git_apply_to_tree" - ] + "needs": ["git_apply", "git_apply_to_tree"] } } ], [ "git_attr_options", { - "decl": [ - "unsigned int version", - "unsigned int flags", - "git_oid * commit_id", - "git_oid attr_commit_id" - ], + "decl": ["unsigned int version", "unsigned int flags", "git_oid * commit_id", "git_oid attr_commit_id"], "type": "struct", "value": "git_attr_options", "file": "git2/attr.h", @@ -27374,23 +26675,14 @@ ], "used": { "returns": [], - "needs": [ - "git_attr_foreach_ext", - "git_attr_get_ext", - "git_attr_get_many_ext" - ] + "needs": ["git_attr_foreach_ext", "git_attr_get_ext", "git_attr_get_many_ext"] } } ], [ "git_attr_value_t", { - "decl": [ - "GIT_ATTR_VALUE_UNSPECIFIED", - "GIT_ATTR_VALUE_TRUE", - "GIT_ATTR_VALUE_FALSE", - "GIT_ATTR_VALUE_STRING" - ], + "decl": ["GIT_ATTR_VALUE_UNSPECIFIED", "GIT_ATTR_VALUE_TRUE", "GIT_ATTR_VALUE_FALSE", "GIT_ATTR_VALUE_STRING"], "type": "enum", "file": "git2/attr.h", "line": 82, @@ -27426,9 +26718,7 @@ } ], "used": { - "returns": [ - "git_attr_value" - ], + "returns": ["git_attr_value"], "needs": [] } } @@ -27446,10 +26736,7 @@ "description": " Opaque structure to hold blame results ", "comments": "", "used": { - "returns": [ - "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline" - ], + "returns": ["git_blame_get_hunk_byindex", "git_blame_get_hunk_byline"], "needs": [ "git_blame_buffer", "git_blame_file", @@ -27611,10 +26898,7 @@ } ], "used": { - "returns": [ - "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline" - ], + "returns": ["git_blame_get_hunk_byindex", "git_blame_get_hunk_byline"], "needs": [] } } @@ -27679,11 +26963,7 @@ ], "used": { "returns": [], - "needs": [ - "git_blame_file", - "git_blame_init_options", - "git_blame_options_init" - ] + "needs": ["git_blame_file", "git_blame_init_options", "git_blame_options_init"] } } ], @@ -27778,12 +27058,7 @@ [ "git_blob_filter_options", { - "decl": [ - "int version", - "uint32_t flags", - "git_oid * commit_id", - "git_oid attr_commit_id" - ], + "decl": ["int version", "uint32_t flags", "git_oid * commit_id", "git_oid attr_commit_id"], "type": "struct", "value": "git_blob_filter_options", "file": "git2/blob.h", @@ -27817,10 +27092,7 @@ ], "used": { "returns": [], - "needs": [ - "git_blob_filter", - "git_blob_filter_options_init" - ] + "needs": ["git_blob_filter", "git_blob_filter_options_init"] } } ], @@ -27838,22 +27110,14 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_branch_iterator_free", - "git_branch_iterator_new", - "git_branch_next" - ] + "needs": ["git_branch_iterator_free", "git_branch_iterator_new", "git_branch_next"] } } ], [ "git_branch_t", { - "decl": [ - "GIT_BRANCH_LOCAL", - "GIT_BRANCH_REMOTE", - "GIT_BRANCH_ALL" - ], + "decl": ["GIT_BRANCH_LOCAL", "GIT_BRANCH_REMOTE", "GIT_BRANCH_ALL"], "type": "enum", "file": "git2/types.h", "line": 215, @@ -27884,22 +27148,14 @@ ], "used": { "returns": [], - "needs": [ - "git_branch_iterator_new", - "git_branch_lookup", - "git_branch_next" - ] + "needs": ["git_branch_iterator_new", "git_branch_lookup", "git_branch_next"] } } ], [ "git_buf", { - "decl": [ - "char * ptr", - "size_t asize", - "size_t size" - ], + "decl": ["char * ptr", "size_t asize", "size_t size"], "type": "struct", "value": "git_buf", "file": "git2/buffer.h", @@ -28003,9 +27259,7 @@ ], "used": { "returns": [], - "needs": [ - "git_transport_certificate_check_cb" - ] + "needs": ["git_transport_certificate_check_cb"] } } ], @@ -28082,12 +27336,7 @@ [ "git_cert_ssh_t", { - "decl": [ - "GIT_CERT_SSH_MD5", - "GIT_CERT_SSH_SHA1", - "GIT_CERT_SSH_SHA256", - "GIT_CERT_SSH_RAW" - ], + "decl": ["GIT_CERT_SSH_MD5", "GIT_CERT_SSH_SHA1", "GIT_CERT_SSH_SHA256", "GIT_CERT_SSH_RAW"], "type": "enum", "file": "git2/cert.h", "line": 77, @@ -28131,12 +27380,7 @@ [ "git_cert_t", { - "decl": [ - "GIT_CERT_NONE", - "GIT_CERT_X509", - "GIT_CERT_HOSTKEY_LIBSSH2", - "GIT_CERT_STRARRAY" - ], + "decl": ["GIT_CERT_NONE", "GIT_CERT_X509", "GIT_CERT_HOSTKEY_LIBSSH2", "GIT_CERT_STRARRAY"], "type": "enum", "file": "git2/cert.h", "line": 25, @@ -28180,11 +27424,7 @@ [ "git_cert_x509", { - "decl": [ - "git_cert parent", - "void * data", - "size_t len" - ], + "decl": ["git_cert parent", "void * data", "size_t len"], "type": "struct", "value": "git_cert_x509", "file": "git2/cert.h", @@ -28283,9 +27523,7 @@ ], "used": { "returns": [], - "needs": [ - "git_checkout_notify_cb" - ] + "needs": ["git_checkout_notify_cb"] } } ], @@ -28442,11 +27680,7 @@ [ "git_checkout_perfdata", { - "decl": [ - "size_t mkdir_calls", - "size_t stat_calls", - "size_t chmod_calls" - ], + "decl": ["size_t mkdir_calls", "size_t stat_calls", "size_t chmod_calls"], "type": "struct", "value": "git_checkout_perfdata", "file": "git2/checkout.h", @@ -28475,9 +27709,7 @@ ], "used": { "returns": [], - "needs": [ - "git_checkout_perfdata_cb" - ] + "needs": ["git_checkout_perfdata_cb"] } } ], @@ -28705,22 +27937,14 @@ ], "used": { "returns": [], - "needs": [ - "git_cherrypick", - "git_cherrypick_options_init" - ] + "needs": ["git_cherrypick", "git_cherrypick_options_init"] } } ], [ "git_clone_local_t", { - "decl": [ - "GIT_CLONE_LOCAL_AUTO", - "GIT_CLONE_LOCAL", - "GIT_CLONE_NO_LOCAL", - "GIT_CLONE_LOCAL_NO_LINKS" - ], + "decl": ["GIT_CLONE_LOCAL_AUTO", "GIT_CLONE_LOCAL", "GIT_CLONE_NO_LOCAL", "GIT_CLONE_LOCAL_NO_LINKS"], "type": "enum", "file": "git2/clone.h", "line": 33, @@ -28839,10 +28063,7 @@ ], "used": { "returns": [], - "needs": [ - "git_clone", - "git_clone_options_init" - ] + "needs": ["git_clone", "git_clone_options_init"] } } ], @@ -28920,18 +28141,14 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_odb_set_commit_graph" - ] + "needs": ["git_odb_set_commit_graph"] } } ], [ "git_commit_graph_split_strategy_t", { - "decl": [ - "GIT_COMMIT_GRAPH_SPLIT_STRATEGY_SINGLE_FILE" - ], + "decl": ["GIT_COMMIT_GRAPH_SPLIT_STRATEGY_SINGLE_FILE"], "type": "enum", "file": "git2/sys/commit_graph.h", "line": 92, @@ -29043,9 +28260,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_config_backend_foreach_match" - ] + "needs": ["git_config_backend_foreach_match"] } } ], @@ -29103,12 +28318,7 @@ ], "used": { "returns": [], - "needs": [ - "git_config_entry_free", - "git_config_foreach_cb", - "git_config_get_entry", - "git_config_next" - ] + "needs": ["git_config_entry_free", "git_config_foreach_cb", "git_config_get_entry", "git_config_next"] } } ], @@ -29202,21 +28412,14 @@ ], "used": { "returns": [], - "needs": [ - "git_config_add_file_ondisk", - "git_config_open_level" - ] + "needs": ["git_config_add_file_ondisk", "git_config_open_level"] } } ], [ "git_configmap", { - "decl": [ - "git_configmap_t type", - "const char * str_match", - "int map_value" - ], + "decl": ["git_configmap_t type", "const char * str_match", "int map_value"], "type": "struct", "value": "git_configmap", "file": "git2/config.h", @@ -29245,22 +28448,14 @@ ], "used": { "returns": [], - "needs": [ - "git_config_get_mapped", - "git_config_lookup_map_value" - ] + "needs": ["git_config_get_mapped", "git_config_lookup_map_value"] } } ], [ "git_configmap_t", { - "decl": [ - "GIT_CONFIGMAP_FALSE", - "GIT_CONFIGMAP_TRUE", - "GIT_CONFIGMAP_INT32", - "GIT_CONFIGMAP_STRING" - ], + "decl": ["GIT_CONFIGMAP_FALSE", "GIT_CONFIGMAP_TRUE", "GIT_CONFIGMAP_INT32", "GIT_CONFIGMAP_STRING"], "type": "enum", "file": "git2/config.h", "line": 94, @@ -29383,9 +28578,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_credential_ssh_interactive_new" - ] + "needs": ["git_credential_ssh_interactive_new"] } } ], @@ -29498,10 +28691,7 @@ [ "git_credential_userpass_payload", { - "decl": [ - "const char * username", - "const char * password" - ], + "decl": ["const char * username", "const char * password"], "type": "struct", "value": "git_credential_userpass_payload", "file": "git2/credential_helpers.h", @@ -29623,10 +28813,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_num_deltas_of_type", - "git_diff_status_char" - ] + "needs": ["git_diff_num_deltas_of_type", "git_diff_status_char"] } } ], @@ -29672,10 +28859,7 @@ ], "used": { "returns": [], - "needs": [ - "git_describe_format", - "git_describe_format_options_init" - ] + "needs": ["git_describe_format", "git_describe_format_options_init"] } } ], @@ -29733,11 +28917,7 @@ ], "used": { "returns": [], - "needs": [ - "git_describe_commit", - "git_describe_options_init", - "git_describe_workdir" - ] + "needs": ["git_describe_commit", "git_describe_options_init", "git_describe_workdir"] } } ], @@ -29755,23 +28935,14 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_describe_commit", - "git_describe_format", - "git_describe_result_free", - "git_describe_workdir" - ] + "needs": ["git_describe_commit", "git_describe_format", "git_describe_result_free", "git_describe_workdir"] } } ], [ "git_describe_strategy_t", { - "decl": [ - "GIT_DESCRIBE_DEFAULT", - "GIT_DESCRIBE_TAGS", - "GIT_DESCRIBE_ALL" - ], + "decl": ["GIT_DESCRIBE_DEFAULT", "GIT_DESCRIBE_TAGS", "GIT_DESCRIBE_ALL"], "type": "enum", "file": "git2/describe.h", "line": 30, @@ -29819,11 +28990,7 @@ "description": " The diff object that contains all individual file deltas.", "comments": "

A diff represents the cumulative list of differences between two snapshots of a repository (possibly filtered by a set of file name patterns).

\n\n

Calculating diffs is generally done in two phases: building a list of diffs then traversing it. This makes is easier to share logic across the various types of diffs (tree vs tree, workdir vs index, etc.), and also allows you to insert optional diff post-processing phases, such as rename detection, in between the steps. When you are done with a diff object, it must be freed.

\n\n

This is an opaque structure which will be allocated by one of the diff generator functions below (such as git_diff_tree_to_tree). You are responsible for releasing the object memory when done, using the git_diff_free() function.

\n", "used": { - "returns": [ - "git_diff_get_delta", - "git_patch_get_delta", - "git_pathspec_match_list_diff_entry" - ], + "returns": ["git_diff_get_delta", "git_patch_get_delta", "git_pathspec_match_list_diff_entry"], "needs": [ "git_apply", "git_apply_delta_cb", @@ -29884,11 +29051,7 @@ [ "git_diff_binary", { - "decl": [ - "unsigned int contains_data", - "git_diff_binary_file old_file", - "git_diff_binary_file new_file" - ], + "decl": ["unsigned int contains_data", "git_diff_binary_file old_file", "git_diff_binary_file new_file"], "type": "struct", "value": "git_diff_binary", "file": "git2/diff.h", @@ -29930,12 +29093,7 @@ [ "git_diff_binary_file", { - "decl": [ - "git_diff_binary_t type", - "const char * data", - "size_t datalen", - "size_t inflatedlen" - ], + "decl": ["git_diff_binary_t type", "const char * data", "size_t datalen", "size_t inflatedlen"], "type": "struct", "value": "git_diff_binary_file", "file": "git2/diff.h", @@ -29976,11 +29134,7 @@ [ "git_diff_binary_t", { - "decl": [ - "GIT_DIFF_BINARY_NONE", - "GIT_DIFF_BINARY_LITERAL", - "GIT_DIFF_BINARY_DELTA" - ], + "decl": ["GIT_DIFF_BINARY_NONE", "GIT_DIFF_BINARY_LITERAL", "GIT_DIFF_BINARY_DELTA"], "type": "enum", "file": "git2/diff.h", "line": 492, @@ -30068,11 +29222,7 @@ } ], "used": { - "returns": [ - "git_diff_get_delta", - "git_patch_get_delta", - "git_pathspec_match_list_diff_entry" - ], + "returns": ["git_diff_get_delta", "git_patch_get_delta", "git_pathspec_match_list_diff_entry"], "needs": [ "git_apply_delta_cb", "git_diff_binary_cb", @@ -30214,10 +29364,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_find_options_init", - "git_diff_find_similar" - ] + "needs": ["git_diff_find_options_init", "git_diff_find_similar"] } } ], @@ -30357,12 +29504,7 @@ [ "git_diff_flag_t", { - "decl": [ - "GIT_DIFF_FLAG_BINARY", - "GIT_DIFF_FLAG_NOT_BINARY", - "GIT_DIFF_FLAG_VALID_ID", - "GIT_DIFF_FLAG_EXISTS" - ], + "decl": ["GIT_DIFF_FLAG_BINARY", "GIT_DIFF_FLAG_NOT_BINARY", "GIT_DIFF_FLAG_VALID_ID", "GIT_DIFF_FLAG_EXISTS"], "type": "enum", "file": "git2/diff.h", "line": 206, @@ -30406,10 +29548,7 @@ [ "git_diff_format_email_flags_t", { - "decl": [ - "GIT_DIFF_FORMAT_EMAIL_NONE", - "GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER" - ], + "decl": ["GIT_DIFF_FORMAT_EMAIL_NONE", "GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER"], "type": "enum", "file": "git2/deprecated.h", "line": 311, @@ -30504,10 +29643,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_format_email", - "git_diff_format_email_options_init" - ] + "needs": ["git_diff_format_email", "git_diff_format_email_options_init"] } } ], @@ -30570,10 +29706,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_print", - "git_diff_to_buf" - ] + "needs": ["git_diff_print", "git_diff_to_buf"] } } ], @@ -31157,9 +30290,7 @@ [ "git_diff_patchid_options", { - "decl": [ - "unsigned int version" - ], + "decl": ["unsigned int version"], "type": "struct", "value": "git_diff_patchid_options", "file": "git2/diff.h", @@ -31178,10 +30309,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_patchid", - "git_diff_patchid_options_init" - ] + "needs": ["git_diff_patchid", "git_diff_patchid_options_init"] } } ], @@ -31314,19 +30442,14 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_stats_to_buf" - ] + "needs": ["git_diff_stats_to_buf"] } } ], [ "git_direction", { - "decl": [ - "GIT_DIRECTION_FETCH", - "GIT_DIRECTION_PUSH" - ], + "decl": ["GIT_DIRECTION_FETCH", "GIT_DIRECTION_PUSH"], "type": "enum", "file": "git2/net.h", "line": 31, @@ -31350,12 +30473,8 @@ } ], "used": { - "returns": [ - "git_refspec_direction" - ], - "needs": [ - "git_remote_connect" - ] + "returns": ["git_refspec_direction"], + "needs": ["git_remote_connect"] } } ], @@ -31411,10 +30530,7 @@ [ "git_error", { - "decl": [ - "char * message", - "int klass" - ], + "decl": ["char * message", "int klass"], "type": "struct", "value": "git_error", "file": "git2/errors.h", @@ -31437,10 +30553,7 @@ } ], "used": { - "returns": [ - "git_error_last", - "giterr_last" - ], + "returns": ["git_error_last", "giterr_last"], "needs": [] } } @@ -31959,12 +31072,7 @@ [ "git_feature_t", { - "decl": [ - "GIT_FEATURE_THREADS", - "GIT_FEATURE_HTTPS", - "GIT_FEATURE_SSH", - "GIT_FEATURE_NSEC" - ], + "decl": ["GIT_FEATURE_THREADS", "GIT_FEATURE_HTTPS", "GIT_FEATURE_SSH", "GIT_FEATURE_NSEC"], "type": "enum", "file": "git2/common.h", "line": 128, @@ -32065,22 +31173,14 @@ ], "used": { "returns": [], - "needs": [ - "git_fetch_options_init", - "git_remote_download", - "git_remote_fetch" - ] + "needs": ["git_fetch_options_init", "git_remote_download", "git_remote_fetch"] } } ], [ "git_fetch_prune_t", { - "decl": [ - "GIT_FETCH_PRUNE_UNSPECIFIED", - "GIT_FETCH_PRUNE", - "GIT_FETCH_NO_PRUNE" - ], + "decl": ["GIT_FETCH_PRUNE_UNSPECIFIED", "GIT_FETCH_PRUNE", "GIT_FETCH_NO_PRUNE"], "type": "enum", "file": "git2/remote.h", "line": 656, @@ -32173,13 +31273,8 @@ } ], "used": { - "returns": [ - "git_tree_entry_filemode", - "git_tree_entry_filemode_raw" - ], - "needs": [ - "git_treebuilder_insert" - ] + "returns": ["git_tree_entry_filemode", "git_tree_entry_filemode_raw"], + "needs": ["git_treebuilder_insert"] } } ], @@ -32304,12 +31399,7 @@ [ "git_filter_mode_t", { - "decl": [ - "GIT_FILTER_TO_WORKTREE", - "GIT_FILTER_SMUDGE", - "GIT_FILTER_TO_ODB", - "GIT_FILTER_CLEAN" - ], + "decl": ["GIT_FILTER_TO_WORKTREE", "GIT_FILTER_SMUDGE", "GIT_FILTER_TO_ODB", "GIT_FILTER_CLEAN"], "type": "enum", "file": "git2/filter.h", "line": 31, @@ -32346,22 +31436,14 @@ ], "used": { "returns": [], - "needs": [ - "git_filter_list_load", - "git_filter_list_load_ext" - ] + "needs": ["git_filter_list_load", "git_filter_list_load_ext"] } } ], [ "git_filter_options", { - "decl": [ - "unsigned int version", - "uint32_t flags", - "git_oid * commit_id", - "git_oid attr_commit_id" - ], + "decl": ["unsigned int version", "uint32_t flags", "git_oid * commit_id", "git_oid attr_commit_id"], "type": "struct", "value": "git_filter_options", "file": "git2/filter.h", @@ -32395,9 +31477,7 @@ ], "used": { "returns": [], - "needs": [ - "git_filter_list_load_ext" - ] + "needs": ["git_filter_list_load_ext"] } } ], @@ -32481,11 +31561,7 @@ "description": " Memory representation of an index file. ", "comments": "", "used": { - "returns": [ - "git_index_get_byindex", - "git_index_get_bypath", - "git_remote_stats" - ], + "returns": ["git_index_get_byindex", "git_index_get_bypath", "git_remote_stats"], "needs": [ "git_apply_to_tree", "git_checkout_index", @@ -32668,11 +31744,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_index_conflict_iterator_free", - "git_index_conflict_iterator_new", - "git_index_conflict_next" - ] + "needs": ["git_index_conflict_iterator_free", "git_index_conflict_iterator_new", "git_index_conflict_next"] } } ], @@ -32765,10 +31837,7 @@ } ], "used": { - "returns": [ - "git_index_get_byindex", - "git_index_get_bypath" - ], + "returns": ["git_index_get_byindex", "git_index_get_bypath"], "needs": [ "git_index_add", "git_index_add_from_buffer", @@ -32835,10 +31904,7 @@ [ "git_index_entry_flag_t", { - "decl": [ - "GIT_INDEX_ENTRY_EXTENDED", - "GIT_INDEX_ENTRY_VALID" - ], + "decl": ["GIT_INDEX_ENTRY_EXTENDED", "GIT_INDEX_ENTRY_VALID"], "type": "enum", "file": "git2/index.h", "line": 87, @@ -32881,11 +31947,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_index_iterator_free", - "git_index_iterator_new", - "git_index_iterator_next" - ] + "needs": ["git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next"] } } ], @@ -32948,10 +32010,7 @@ [ "git_index_time", { - "decl": [ - "int32_t seconds", - "uint32_t nanoseconds" - ], + "decl": ["int32_t seconds", "uint32_t nanoseconds"], "type": "struct", "value": "git_index_time", "file": "git2/index.h", @@ -32992,9 +32051,7 @@ "description": " A git indexer object ", "comments": "", "used": { - "returns": [ - "git_remote_stats" - ], + "returns": ["git_remote_stats"], "needs": [ "git_indexer_append", "git_indexer_commit", @@ -33051,10 +32108,7 @@ ], "used": { "returns": [], - "needs": [ - "git_indexer_new", - "git_indexer_options_init" - ] + "needs": ["git_indexer_new", "git_indexer_options_init"] } } ], @@ -33117,9 +32171,7 @@ } ], "used": { - "returns": [ - "git_remote_stats" - ], + "returns": ["git_remote_stats"], "needs": [ "git_indexer_append", "git_indexer_commit", @@ -33490,10 +32542,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_analysis", - "git_merge_analysis_for_ref" - ] + "needs": ["git_merge_analysis", "git_merge_analysis_for_ref"] } } ], @@ -33651,13 +32700,7 @@ [ "git_merge_file_input", { - "decl": [ - "unsigned int version", - "const char * ptr", - "size_t size", - "const char * path", - "unsigned int mode" - ], + "decl": ["unsigned int version", "const char * ptr", "size_t size", "const char * path", "unsigned int mode"], "type": "struct", "value": "git_merge_file_input", "file": "git2/merge.h", @@ -33696,10 +32739,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_file", - "git_merge_file_input_init" - ] + "needs": ["git_merge_file", "git_merge_file_input_init"] } } ], @@ -33763,11 +32803,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_file", - "git_merge_file_from_index", - "git_merge_file_options_init" - ] + "needs": ["git_merge_file", "git_merge_file_from_index", "git_merge_file_options_init"] } } ], @@ -33819,11 +32855,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_file", - "git_merge_file_from_index", - "git_merge_file_result_free" - ] + "needs": ["git_merge_file", "git_merge_file_from_index", "git_merge_file_result_free"] } } ], @@ -33997,20 +33029,14 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_analysis", - "git_merge_analysis_for_ref" - ] + "needs": ["git_merge_analysis", "git_merge_analysis_for_ref"] } } ], [ "git_message_trailer", { - "decl": [ - "const char * key", - "const char * value" - ], + "decl": ["const char * key", "const char * value"], "type": "struct", "value": "git_message_trailer", "file": "git2/message.h", @@ -34034,21 +33060,14 @@ ], "used": { "returns": [], - "needs": [ - "git_message_trailer_array_free", - "git_message_trailers" - ] + "needs": ["git_message_trailer_array_free", "git_message_trailers"] } } ], [ "git_message_trailer_array", { - "decl": [ - "git_message_trailer * trailers", - "size_t count", - "char * _trailer_block" - ], + "decl": ["git_message_trailer * trailers", "size_t count", "char * _trailer_block"], "type": "struct", "value": "git_message_trailer_array", "file": "git2/message.h", @@ -34077,10 +33096,7 @@ ], "used": { "returns": [], - "needs": [ - "git_message_trailer_array_free", - "git_message_trailers" - ] + "needs": ["git_message_trailer_array_free", "git_message_trailers"] } } ], @@ -34147,12 +33163,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_note_commit_iterator_new", - "git_note_iterator_free", - "git_note_iterator_new", - "git_note_next" - ] + "needs": ["git_note_commit_iterator_new", "git_note_iterator_free", "git_note_iterator_new", "git_note_next"] } } ], @@ -34399,11 +33410,7 @@ [ "git_odb_expand_id", { - "decl": [ - "git_oid id", - "unsigned short length", - "git_object_t type" - ], + "decl": ["git_oid id", "unsigned short length", "git_object_t type"], "type": "struct", "value": "git_odb_expand_id", "file": "git2/odb.h", @@ -34432,9 +33439,7 @@ ], "used": { "returns": [], - "needs": [ - "git_odb_expand_ids" - ] + "needs": ["git_odb_expand_ids"] } } ], @@ -34541,11 +33546,7 @@ [ "git_odb_stream_t", { - "decl": [ - "GIT_STREAM_RDONLY", - "GIT_STREAM_WRONLY", - "GIT_STREAM_RW" - ], + "decl": ["GIT_STREAM_RDONLY", "GIT_STREAM_WRONLY", "GIT_STREAM_RW"], "type": "enum", "file": "git2/odb_backend.h", "line": 71, @@ -34617,18 +33618,14 @@ ], "used": { "returns": [], - "needs": [ - "git_odb_write_pack" - ] + "needs": ["git_odb_write_pack"] } } ], [ "git_oid", { - "decl": [ - "unsigned char [20] id" - ], + "decl": ["unsigned char [20] id"], "type": "struct", "value": "git_oid", "file": "git2/oid.h", @@ -34795,23 +33792,15 @@ "description": " OID Shortener object", "comments": "", "used": { - "returns": [ - "git_oid_shorten_new" - ], - "needs": [ - "git_oid_shorten_add", - "git_oid_shorten_free" - ] + "returns": ["git_oid_shorten_new"], + "needs": ["git_oid_shorten_add", "git_oid_shorten_free"] } } ], [ "git_oidarray", { - "decl": [ - "git_oid * ids", - "size_t count" - ], + "decl": ["git_oid * ids", "size_t count"], "type": "struct", "value": "git_oidarray", "file": "git2/oidarray.h", @@ -34835,12 +33824,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_bases", - "git_merge_bases_many", - "git_oidarray_dispose", - "git_oidarray_free" - ] + "needs": ["git_merge_bases", "git_merge_bases_many", "git_oidarray_dispose", "git_oidarray_free"] } } ], @@ -34881,10 +33865,7 @@ [ "git_packbuilder_stage_t", { - "decl": [ - "GIT_PACKBUILDER_ADDING_OBJECTS", - "GIT_PACKBUILDER_DELTAFICATION" - ], + "decl": ["GIT_PACKBUILDER_ADDING_OBJECTS", "GIT_PACKBUILDER_DELTAFICATION"], "type": "enum", "file": "git2/pack.h", "line": 52, @@ -34950,11 +33931,7 @@ [ "git_path_fs", { - "decl": [ - "GIT_PATH_FS_GENERIC", - "GIT_PATH_FS_NTFS", - "GIT_PATH_FS_HFS" - ], + "decl": ["GIT_PATH_FS_GENERIC", "GIT_PATH_FS_NTFS", "GIT_PATH_FS_HFS"], "type": "enum", "file": "git2/sys/path.h", "line": 34, @@ -35174,21 +34151,14 @@ ], "used": { "returns": [], - "needs": [ - "git_proxy_options_init", - "git_remote_connect" - ] + "needs": ["git_proxy_options_init", "git_remote_connect"] } } ], [ "git_proxy_t", { - "decl": [ - "GIT_PROXY_NONE", - "GIT_PROXY_AUTO", - "GIT_PROXY_SPECIFIED" - ], + "decl": ["GIT_PROXY_NONE", "GIT_PROXY_AUTO", "GIT_PROXY_SPECIFIED"], "type": "enum", "file": "git2/proxy.h", "line": 20, @@ -35237,12 +34207,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_push_negotiation", - "git_push_options_init", - "git_remote_push", - "git_remote_upload" - ] + "needs": ["git_push_negotiation", "git_push_options_init", "git_remote_push", "git_remote_upload"] } } ], @@ -35294,23 +34259,14 @@ ], "used": { "returns": [], - "needs": [ - "git_push_options_init", - "git_remote_push", - "git_remote_upload" - ] + "needs": ["git_push_options_init", "git_remote_push", "git_remote_upload"] } } ], [ "git_push_update", { - "decl": [ - "char * src_refname", - "char * dst_refname", - "git_oid src", - "git_oid dst" - ], + "decl": ["char * src_refname", "char * dst_refname", "git_oid src", "git_oid dst"], "type": "struct", "value": "git_push_update", "file": "git2/remote.h", @@ -35344,9 +34300,7 @@ ], "used": { "returns": [], - "needs": [ - "git_push_negotiation" - ] + "needs": ["git_push_negotiation"] } } ], @@ -35363,9 +34317,7 @@ "description": " Representation of a rebase ", "comments": "", "used": { - "returns": [ - "git_rebase_operation_byindex" - ], + "returns": ["git_rebase_operation_byindex"], "needs": [ "git_rebase_abort", "git_rebase_commit", @@ -35390,11 +34342,7 @@ [ "git_rebase_operation", { - "decl": [ - "git_rebase_operation_t type", - "const git_oid id", - "const char * exec" - ], + "decl": ["git_rebase_operation_t type", "const git_oid id", "const char * exec"], "type": "struct", "value": "git_rebase_operation", "file": "git2/rebase.h", @@ -35422,12 +34370,8 @@ } ], "used": { - "returns": [ - "git_rebase_operation_byindex" - ], - "needs": [ - "git_rebase_next" - ] + "returns": ["git_rebase_operation_byindex"], + "needs": ["git_rebase_next"] } } ], @@ -35566,11 +34510,7 @@ ], "used": { "returns": [], - "needs": [ - "git_rebase_init", - "git_rebase_open", - "git_rebase_options_init" - ] + "needs": ["git_rebase_init", "git_rebase_open", "git_rebase_options_init"] } } ], @@ -35588,13 +34528,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_refdb_compress", - "git_refdb_free", - "git_refdb_new", - "git_refdb_open", - "git_repository_refdb" - ] + "needs": ["git_refdb_compress", "git_refdb_free", "git_refdb_new", "git_refdb_open", "git_repository_refdb"] } } ], @@ -35629,9 +34563,7 @@ "description": " In-memory representation of a reference. ", "comments": "", "used": { - "returns": [ - "git_reference_type" - ], + "returns": ["git_reference_type"], "needs": [ "git_annotated_commit_from_ref", "git_branch_create", @@ -35764,12 +34696,7 @@ [ "git_reference_t", { - "decl": [ - "GIT_REFERENCE_INVALID", - "GIT_REFERENCE_DIRECT", - "GIT_REFERENCE_SYMBOLIC", - "GIT_REFERENCE_ALL" - ], + "decl": ["GIT_REFERENCE_INVALID", "GIT_REFERENCE_DIRECT", "GIT_REFERENCE_SYMBOLIC", "GIT_REFERENCE_ALL"], "type": "enum", "file": "git2/types.h", "line": 207, @@ -35805,9 +34732,7 @@ } ], "used": { - "returns": [ - "git_reference_type" - ], + "returns": ["git_reference_type"], "needs": [] } } @@ -35825,9 +34750,7 @@ "description": " Representation of a reference log ", "comments": "", "used": { - "returns": [ - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ "git_reflog_append", "git_reflog_drop", @@ -35858,9 +34781,7 @@ "description": " Representation of a reference log entry ", "comments": "", "used": { - "returns": [ - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -35883,9 +34804,7 @@ "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", "comments": "", "used": { - "returns": [ - "git_remote_get_refspec" - ], + "returns": ["git_remote_get_refspec"], "needs": [ "git_refspec_direction", "git_refspec_dst", @@ -35915,9 +34834,7 @@ "description": " Git's idea of a remote repository. A remote can be anonymous (in\n which case it does not have backing configuration entires).", "comments": "", "used": { - "returns": [ - "git_remote_autotag" - ], + "returns": ["git_remote_autotag"], "needs": [ "git_headlist_cb", "git_remote_autotag", @@ -36007,13 +34924,8 @@ } ], "used": { - "returns": [ - "git_remote_autotag" - ], - "needs": [ - "git_remote_set_autotag", - "git_remote_update_tips" - ] + "returns": ["git_remote_autotag"], + "needs": ["git_remote_set_autotag", "git_remote_update_tips"] } } ], @@ -36125,23 +35037,14 @@ ], "used": { "returns": [], - "needs": [ - "git_remote_connect", - "git_remote_init_callbacks", - "git_remote_prune", - "git_remote_update_tips" - ] + "needs": ["git_remote_connect", "git_remote_init_callbacks", "git_remote_prune", "git_remote_update_tips"] } } ], [ "git_remote_completion_t", { - "decl": [ - "GIT_REMOTE_COMPLETION_DOWNLOAD", - "GIT_REMOTE_COMPLETION_INDEXING", - "GIT_REMOTE_COMPLETION_ERROR" - ], + "decl": ["GIT_REMOTE_COMPLETION_DOWNLOAD", "GIT_REMOTE_COMPLETION_INDEXING", "GIT_REMOTE_COMPLETION_ERROR"], "type": "enum", "file": "git2/remote.h", "line": 443, @@ -36179,10 +35082,7 @@ [ "git_remote_create_flags", { - "decl": [ - "GIT_REMOTE_CREATE_SKIP_INSTEADOF", - "GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC" - ], + "decl": ["GIT_REMOTE_CREATE_SKIP_INSTEADOF", "GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC"], "type": "enum", "file": "git2/remote.h", "line": 47, @@ -36259,23 +35159,14 @@ ], "used": { "returns": [], - "needs": [ - "git_remote_create_options_init", - "git_remote_create_with_opts" - ] + "needs": ["git_remote_create_options_init", "git_remote_create_with_opts"] } } ], [ "git_remote_head", { - "decl": [ - "int local", - "git_oid oid", - "git_oid loid", - "char * name", - "char * symref_target" - ], + "decl": ["int local", "git_oid oid", "git_oid loid", "char * name", "char * symref_target"], "type": "struct", "value": "git_remote_head", "file": "git2/net.h", @@ -36314,10 +35205,7 @@ ], "used": { "returns": [], - "needs": [ - "git_headlist_cb", - "git_remote_ls" - ] + "needs": ["git_headlist_cb", "git_remote_ls"] } } ], @@ -36750,10 +35638,7 @@ ], "used": { "returns": [], - "needs": [ - "git_repository_init_ext", - "git_repository_init_options_init" - ] + "needs": ["git_repository_init_ext", "git_repository_init_options_init"] } } ], @@ -36879,9 +35764,7 @@ ], "used": { "returns": [], - "needs": [ - "git_repository_item_path" - ] + "needs": ["git_repository_item_path"] } } ], @@ -37049,11 +35932,7 @@ [ "git_reset_t", { - "decl": [ - "GIT_RESET_SOFT", - "GIT_RESET_MIXED", - "GIT_RESET_HARD" - ], + "decl": ["GIT_RESET_SOFT", "GIT_RESET_MIXED", "GIT_RESET_HARD"], "type": "enum", "file": "git2/reset.h", "line": 26, @@ -37084,10 +35963,7 @@ ], "used": { "returns": [], - "needs": [ - "git_reset", - "git_reset_from_annotated" - ] + "needs": ["git_reset", "git_reset_from_annotated"] } } ], @@ -37133,21 +36009,14 @@ ], "used": { "returns": [], - "needs": [ - "git_revert", - "git_revert_options_init" - ] + "needs": ["git_revert", "git_revert_options_init"] } } ], [ "git_revspec", { - "decl": [ - "git_object * from", - "git_object * to", - "unsigned int flags" - ], + "decl": ["git_object * from", "git_object * to", "unsigned int flags"], "type": "struct", "value": "git_revspec", "file": "git2/revparse.h", @@ -37176,20 +36045,14 @@ ], "used": { "returns": [], - "needs": [ - "git_revparse" - ] + "needs": ["git_revparse"] } } ], [ "git_revspec_t", { - "decl": [ - "GIT_REVSPEC_SINGLE", - "GIT_REVSPEC_RANGE", - "GIT_REVSPEC_MERGE_BASE" - ], + "decl": ["GIT_REVSPEC_SINGLE", "GIT_REVSPEC_RANGE", "GIT_REVSPEC_MERGE_BASE"], "type": "enum", "file": "git2/revparse.h", "line": 71, @@ -37264,11 +36127,7 @@ [ "git_signature", { - "decl": [ - "char * name", - "char * email", - "git_time when" - ], + "decl": ["char * name", "char * email", "git_time when"], "type": "struct", "value": "git_signature", "file": "git2/types.h", @@ -37387,12 +36246,7 @@ [ "git_sort_t", { - "decl": [ - "GIT_SORT_NONE", - "GIT_SORT_TOPOLOGICAL", - "GIT_SORT_TIME", - "GIT_SORT_REVERSE" - ], + "decl": ["GIT_SORT_NONE", "GIT_SORT_TOPOLOGICAL", "GIT_SORT_TIME", "GIT_SORT_REVERSE"], "type": "enum", "file": "git2/revwalk.h", "line": 26, @@ -37436,10 +36290,7 @@ [ "git_stash_apply_flags", { - "decl": [ - "GIT_STASH_APPLY_DEFAULT", - "GIT_STASH_APPLY_REINSTATE_INDEX" - ], + "decl": ["GIT_STASH_APPLY_DEFAULT", "GIT_STASH_APPLY_REINSTATE_INDEX"], "type": "enum", "file": "git2/stash.h", "line": 75, @@ -37516,11 +36367,7 @@ ], "used": { "returns": [], - "needs": [ - "git_stash_apply", - "git_stash_apply_options_init", - "git_stash_pop" - ] + "needs": ["git_stash_apply", "git_stash_apply_options_init", "git_stash_pop"] } } ], @@ -37597,9 +36444,7 @@ ], "used": { "returns": [], - "needs": [ - "git_stash_apply_progress_cb" - ] + "needs": ["git_stash_apply_progress_cb"] } } ], @@ -37655,11 +36500,7 @@ [ "git_status_entry", { - "decl": [ - "git_status_t status", - "git_diff_delta * head_to_index", - "git_diff_delta * index_to_workdir" - ], + "decl": ["git_status_t status", "git_diff_delta * head_to_index", "git_diff_delta * index_to_workdir"], "type": "struct", "value": "git_status_entry", "file": "git2/status.h", @@ -37687,9 +36528,7 @@ } ], "used": { - "returns": [ - "git_status_byindex" - ], + "returns": ["git_status_byindex"], "needs": [] } } @@ -37708,12 +36547,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_status_byindex", - "git_status_list_entrycount", - "git_status_list_free", - "git_status_list_new" - ] + "needs": ["git_status_byindex", "git_status_list_entrycount", "git_status_list_free", "git_status_list_new"] } } ], @@ -37898,22 +36732,14 @@ ], "used": { "returns": [], - "needs": [ - "git_status_foreach_ext", - "git_status_list_new", - "git_status_options_init" - ] + "needs": ["git_status_foreach_ext", "git_status_list_new", "git_status_options_init"] } } ], [ "git_status_show_t", { - "decl": [ - "GIT_STATUS_SHOW_INDEX_AND_WORKDIR", - "GIT_STATUS_SHOW_INDEX_ONLY", - "GIT_STATUS_SHOW_WORKDIR_ONLY" - ], + "decl": ["GIT_STATUS_SHOW_INDEX_AND_WORKDIR", "GIT_STATUS_SHOW_INDEX_ONLY", "GIT_STATUS_SHOW_WORKDIR_ONLY"], "type": "enum", "file": "git2/status.h", "line": 73, @@ -38070,10 +36896,7 @@ [ "git_strarray", { - "decl": [ - "char ** strings", - "size_t count" - ], + "decl": ["char ** strings", "size_t count"], "type": "struct", "value": "git_strarray", "file": "git2/strarray.h", @@ -38126,10 +36949,7 @@ [ "git_stream_t", { - "decl": [ - "GIT_STREAM_STANDARD", - "GIT_STREAM_TLS" - ], + "decl": ["GIT_STREAM_STANDARD", "GIT_STREAM_TLS"], "type": "enum", "file": "git2/sys/stream.h", "line": 77, @@ -38264,24 +37084,15 @@ } ], "used": { - "returns": [ - "git_submodule_ignore" - ], - "needs": [ - "git_submodule_set_ignore", - "git_submodule_status" - ] + "returns": ["git_submodule_ignore"], + "needs": ["git_submodule_set_ignore", "git_submodule_status"] } } ], [ "git_submodule_recurse_t", { - "decl": [ - "GIT_SUBMODULE_RECURSE_NO", - "GIT_SUBMODULE_RECURSE_YES", - "GIT_SUBMODULE_RECURSE_ONDEMAND" - ], + "decl": ["GIT_SUBMODULE_RECURSE_NO", "GIT_SUBMODULE_RECURSE_YES", "GIT_SUBMODULE_RECURSE_ONDEMAND"], "type": "enum", "file": "git2/types.h", "line": 350, @@ -38311,12 +37122,8 @@ } ], "used": { - "returns": [ - "git_submodule_fetch_recurse_submodules" - ], - "needs": [ - "git_submodule_set_fetch_recurse_submodules" - ] + "returns": ["git_submodule_fetch_recurse_submodules"], + "needs": ["git_submodule_set_fetch_recurse_submodules"] } } ], @@ -38481,11 +37288,7 @@ ], "used": { "returns": [], - "needs": [ - "git_submodule_clone", - "git_submodule_update", - "git_submodule_update_options_init" - ] + "needs": ["git_submodule_clone", "git_submodule_update", "git_submodule_update_options_init"] } } ], @@ -38540,12 +37343,8 @@ } ], "used": { - "returns": [ - "git_submodule_update_strategy" - ], - "needs": [ - "git_submodule_set_update" - ] + "returns": ["git_submodule_update_strategy"], + "needs": ["git_submodule_set_update"] } } ], @@ -38585,11 +37384,7 @@ [ "git_time", { - "decl": [ - "git_time_t time", - "int offset", - "char sign" - ], + "decl": ["git_time_t time", "int offset", "char sign"], "type": "struct", "value": "git_time", "file": "git2/types.h", @@ -38617,12 +37412,8 @@ } ], "used": { - "returns": [ - "git_commit_time" - ], - "needs": [ - "git_signature_new" - ] + "returns": ["git_commit_time"], + "needs": ["git_signature_new"] } } ], @@ -38692,10 +37483,7 @@ ], "used": { "returns": [], - "needs": [ - "git_trace_cb", - "git_trace_set" - ] + "needs": ["git_trace_cb", "git_trace_set"] } } ], @@ -38741,9 +37529,7 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_transport_cb" - ] + "needs": ["git_transport_cb"] } } ], @@ -38760,12 +37546,7 @@ "description": " Representation of a tree object. ", "comments": "", "used": { - "returns": [ - "git_tree_entry_byid", - "git_tree_entry_byindex", - "git_tree_entry_byname", - "git_treebuilder_get" - ], + "returns": ["git_tree_entry_byid", "git_tree_entry_byindex", "git_tree_entry_byname", "git_treebuilder_get"], "needs": [ "git_apply_to_tree", "git_commit_amend", @@ -38832,12 +37613,7 @@ "description": " Representation of each one of the entries in a tree object. ", "comments": "", "used": { - "returns": [ - "git_tree_entry_byid", - "git_tree_entry_byindex", - "git_tree_entry_byname", - "git_treebuilder_get" - ], + "returns": ["git_tree_entry_byid", "git_tree_entry_byindex", "git_tree_entry_byname", "git_treebuilder_get"], "needs": [ "git_tree_entry_bypath", "git_tree_entry_cmp", @@ -38859,12 +37635,7 @@ [ "git_tree_update", { - "decl": [ - "git_tree_update_t action", - "git_oid id", - "git_filemode_t filemode", - "const char * path" - ], + "decl": ["git_tree_update_t action", "git_oid id", "git_filemode_t filemode", "const char * path"], "type": "struct", "value": "git_tree_update", "file": "git2/tree.h", @@ -38898,19 +37669,14 @@ ], "used": { "returns": [], - "needs": [ - "git_tree_create_updated" - ] + "needs": ["git_tree_create_updated"] } } ], [ "git_tree_update_t", { - "decl": [ - "GIT_TREE_UPDATE_UPSERT", - "GIT_TREE_UPDATE_REMOVE" - ], + "decl": ["GIT_TREE_UPDATE_UPSERT", "GIT_TREE_UPDATE_REMOVE"], "type": "enum", "file": "git2/tree.h", "line": 427, @@ -38971,10 +37737,7 @@ [ "git_treewalk_mode", { - "decl": [ - "GIT_TREEWALK_PRE", - "GIT_TREEWALK_POST" - ], + "decl": ["GIT_TREEWALK_PRE", "GIT_TREEWALK_POST"], "type": "enum", "file": "git2/tree.h", "line": 387, @@ -38999,9 +37762,7 @@ ], "used": { "returns": [], - "needs": [ - "git_tree_walk" - ] + "needs": ["git_tree_walk"] } } ], @@ -39042,11 +37803,7 @@ [ "git_worktree_add_options", { - "decl": [ - "unsigned int version", - "int lock", - "git_reference * ref" - ], + "decl": ["unsigned int version", "int lock", "git_reference * ref"], "type": "struct", "value": "git_worktree_add_options", "file": "git2/worktree.h", @@ -39075,20 +37832,14 @@ ], "used": { "returns": [], - "needs": [ - "git_worktree_add", - "git_worktree_add_options_init" - ] + "needs": ["git_worktree_add", "git_worktree_add_options_init"] } } ], [ "git_worktree_prune_options", { - "decl": [ - "unsigned int version", - "uint32_t flags" - ], + "decl": ["unsigned int version", "uint32_t flags"], "type": "struct", "value": "git_worktree_prune_options", "file": "git2/worktree.h", @@ -39112,22 +37863,14 @@ ], "used": { "returns": [], - "needs": [ - "git_worktree_is_prunable", - "git_worktree_prune", - "git_worktree_prune_options_init" - ] + "needs": ["git_worktree_is_prunable", "git_worktree_prune", "git_worktree_prune_options_init"] } } ], [ "git_worktree_prune_t", { - "decl": [ - "GIT_WORKTREE_PRUNE_VALID", - "GIT_WORKTREE_PRUNE_LOCKED", - "GIT_WORKTREE_PRUNE_WORKING_TREE" - ], + "decl": ["GIT_WORKTREE_PRUNE_VALID", "GIT_WORKTREE_PRUNE_LOCKED", "GIT_WORKTREE_PRUNE_WORKING_TREE"], "type": "enum", "file": "git2/worktree.h", "line": 182, @@ -39224,13 +37967,7 @@ "git_annotated_commit_ref" ] ], - [ - "apply", - [ - "git_apply", - "git_apply_to_tree" - ] - ], + ["apply", ["git_apply", "git_apply_to_tree"]], [ "attr", [ @@ -39305,39 +38042,11 @@ ], [ "buf", - [ - "git_buf_contains_nul", - "git_buf_dispose", - "git_buf_free", - "git_buf_grow", - "git_buf_is_binary", - "git_buf_set" - ] - ], - [ - "checkout", - [ - "git_checkout_head", - "git_checkout_index", - "git_checkout_options_init", - "git_checkout_tree" - ] - ], - [ - "cherrypick", - [ - "git_cherrypick", - "git_cherrypick_commit", - "git_cherrypick_options_init" - ] - ], - [ - "clone", - [ - "git_clone", - "git_clone_options_init" - ] + ["git_buf_contains_nul", "git_buf_dispose", "git_buf_free", "git_buf_grow", "git_buf_is_binary", "git_buf_set"] ], + ["checkout", ["git_checkout_head", "git_checkout_index", "git_checkout_options_init", "git_checkout_tree"]], + ["cherrypick", ["git_cherrypick", "git_cherrypick_commit", "git_cherrypick_options_init"]], + ["clone", ["git_clone", "git_clone_options_init"]], [ "commit", [ @@ -39489,21 +38198,8 @@ "git_diff_tree_to_workdir_with_index" ] ], - [ - "error", - [ - "git_error_clear", - "git_error_last", - "git_error_set_oom", - "git_error_set_str" - ] - ], - [ - "fetch", - [ - "git_fetch_options_init" - ] - ], + ["error", ["git_error_clear", "git_error_last", "git_error_set_oom", "git_error_set_str"]], + ["fetch", ["git_fetch_options_init"]], [ "filter", [ @@ -39521,31 +38217,9 @@ "git_filter_list_stream_file" ] ], - [ - "giterr", - [ - "giterr_clear", - "giterr_last", - "giterr_set_oom", - "giterr_set_str" - ] - ], - [ - "graph", - [ - "git_graph_ahead_behind", - "git_graph_descendant_of", - "git_graph_reachable_from_any" - ] - ], - [ - "ignore", - [ - "git_ignore_add_rule", - "git_ignore_clear_internal_rules", - "git_ignore_path_is_ignored" - ] - ], + ["giterr", ["giterr_clear", "giterr_last", "giterr_set_oom", "giterr_set_str"]], + ["graph", ["git_graph_ahead_behind", "git_graph_descendant_of", "git_graph_reachable_from_any"]], + ["ignore", ["git_ignore_add_rule", "git_ignore_clear_internal_rules", "git_ignore_path_is_ignored"]], [ "index", [ @@ -39607,13 +38281,7 @@ ], [ "libgit2", - [ - "git_libgit2_features", - "git_libgit2_init", - "git_libgit2_opts", - "git_libgit2_shutdown", - "git_libgit2_version" - ] + ["git_libgit2_features", "git_libgit2_init", "git_libgit2_opts", "git_libgit2_shutdown", "git_libgit2_version"] ], [ "mailmap", @@ -39648,14 +38316,7 @@ "git_merge_trees" ] ], - [ - "message", - [ - "git_message_prettify", - "git_message_trailer_array_free", - "git_message_trailers" - ] - ], + ["message", ["git_message_prettify", "git_message_trailer_array_free", "git_message_trailers"]], [ "note", [ @@ -39764,13 +38425,7 @@ "git_oid_tostr_s" ] ], - [ - "oidarray", - [ - "git_oidarray_dispose", - "git_oidarray_free" - ] - ], + ["oidarray", ["git_oidarray_dispose", "git_oidarray_free"]], [ "packbuilder", [ @@ -39829,18 +38484,8 @@ "git_pathspec_new" ] ], - [ - "proxy", - [ - "git_proxy_options_init" - ] - ], - [ - "push", - [ - "git_push_options_init" - ] - ], + ["proxy", ["git_proxy_options_init"]], + ["push", ["git_push_options_init"]], [ "rebase", [ @@ -39862,15 +38507,7 @@ "git_rebase_orig_head_name" ] ], - [ - "refdb", - [ - "git_refdb_compress", - "git_refdb_free", - "git_refdb_new", - "git_refdb_open" - ] - ], + ["refdb", ["git_refdb_compress", "git_refdb_free", "git_refdb_new", "git_refdb_open"]], [ "reference", [ @@ -40051,30 +38688,9 @@ "git_repository_wrap_odb" ] ], - [ - "reset", - [ - "git_reset", - "git_reset_default", - "git_reset_from_annotated" - ] - ], - [ - "revert", - [ - "git_revert", - "git_revert_commit", - "git_revert_options_init" - ] - ], - [ - "revparse", - [ - "git_revparse", - "git_revparse_ext", - "git_revparse_single" - ] - ], + ["reset", ["git_reset", "git_reset_default", "git_reset_from_annotated"]], + ["revert", ["git_revert", "git_revert_commit", "git_revert_options_init"]], + ["revparse", ["git_revparse", "git_revparse_ext", "git_revparse_single"]], [ "revwalk", [ @@ -40133,14 +38749,7 @@ "git_status_should_ignore" ] ], - [ - "strarray", - [ - "git_strarray_copy", - "git_strarray_dispose", - "git_strarray_free" - ] - ], + ["strarray", ["git_strarray_copy", "git_strarray_dispose", "git_strarray_free"]], [ "submodule", [ @@ -40207,12 +38816,7 @@ "git_tag_target_type" ] ], - [ - "trace", - [ - "git_trace_set" - ] - ], + ["trace", ["git_trace_set"]], [ "transaction", [ @@ -40290,121 +38894,34 @@ ] ], "examples": [ - [ - "add.c", - "ex/v1.3.1/add.html" - ], - [ - "args.c", - "ex/v1.3.1/args.html" - ], - [ - "blame.c", - "ex/v1.3.1/blame.html" - ], - [ - "cat-file.c", - "ex/v1.3.1/cat-file.html" - ], - [ - "checkout.c", - "ex/v1.3.1/checkout.html" - ], - [ - "clone.c", - "ex/v1.3.1/clone.html" - ], - [ - "commit.c", - "ex/v1.3.1/commit.html" - ], - [ - "common.c", - "ex/v1.3.1/common.html" - ], - [ - "config.c", - "ex/v1.3.1/config.html" - ], - [ - "describe.c", - "ex/v1.3.1/describe.html" - ], - [ - "diff.c", - "ex/v1.3.1/diff.html" - ], - [ - "fetch.c", - "ex/v1.3.1/fetch.html" - ], - [ - "for-each-ref.c", - "ex/v1.3.1/for-each-ref.html" - ], - [ - "general.c", - "ex/v1.3.1/general.html" - ], - [ - "index-pack.c", - "ex/v1.3.1/index-pack.html" - ], - [ - "init.c", - "ex/v1.3.1/init.html" - ], - [ - "lg2.c", - "ex/v1.3.1/lg2.html" - ], - [ - "log.c", - "ex/v1.3.1/log.html" - ], - [ - "ls-files.c", - "ex/v1.3.1/ls-files.html" - ], - [ - "ls-remote.c", - "ex/v1.3.1/ls-remote.html" - ], - [ - "merge.c", - "ex/v1.3.1/merge.html" - ], - [ - "push.c", - "ex/v1.3.1/push.html" - ], - [ - "remote.c", - "ex/v1.3.1/remote.html" - ], - [ - "rev-list.c", - "ex/v1.3.1/rev-list.html" - ], - [ - "rev-parse.c", - "ex/v1.3.1/rev-parse.html" - ], - [ - "show-index.c", - "ex/v1.3.1/show-index.html" - ], - [ - "stash.c", - "ex/v1.3.1/stash.html" - ], - [ - "status.c", - "ex/v1.3.1/status.html" - ], - [ - "tag.c", - "ex/v1.3.1/tag.html" - ] + ["add.c", "ex/v1.3.1/add.html"], + ["args.c", "ex/v1.3.1/args.html"], + ["blame.c", "ex/v1.3.1/blame.html"], + ["cat-file.c", "ex/v1.3.1/cat-file.html"], + ["checkout.c", "ex/v1.3.1/checkout.html"], + ["clone.c", "ex/v1.3.1/clone.html"], + ["commit.c", "ex/v1.3.1/commit.html"], + ["common.c", "ex/v1.3.1/common.html"], + ["config.c", "ex/v1.3.1/config.html"], + ["describe.c", "ex/v1.3.1/describe.html"], + ["diff.c", "ex/v1.3.1/diff.html"], + ["fetch.c", "ex/v1.3.1/fetch.html"], + ["for-each-ref.c", "ex/v1.3.1/for-each-ref.html"], + ["general.c", "ex/v1.3.1/general.html"], + ["index-pack.c", "ex/v1.3.1/index-pack.html"], + ["init.c", "ex/v1.3.1/init.html"], + ["lg2.c", "ex/v1.3.1/lg2.html"], + ["log.c", "ex/v1.3.1/log.html"], + ["ls-files.c", "ex/v1.3.1/ls-files.html"], + ["ls-remote.c", "ex/v1.3.1/ls-remote.html"], + ["merge.c", "ex/v1.3.1/merge.html"], + ["push.c", "ex/v1.3.1/push.html"], + ["remote.c", "ex/v1.3.1/remote.html"], + ["rev-list.c", "ex/v1.3.1/rev-list.html"], + ["rev-parse.c", "ex/v1.3.1/rev-parse.html"], + ["show-index.c", "ex/v1.3.1/show-index.html"], + ["stash.c", "ex/v1.3.1/stash.html"], + ["status.c", "ex/v1.3.1/status.html"], + ["tag.c", "ex/v1.3.1/tag.html"] ] -} \ No newline at end of file +} diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 98f8eb8d8..1cae3a3a8 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -216,7 +216,7 @@ ] } }, - "new" : { + "new": { "functions": { "git_libgit2_opts": { "type": "function", @@ -1102,12 +1102,7 @@ "git_config_next" ] ], - [ - "diff", - [ - "git_diff_get_perfdata" - ] - ], + ["diff", ["git_diff_get_perfdata"]], [ "diff_stats", [ @@ -1139,38 +1134,15 @@ "git_filter_source_flags" ] ], - [ - "hashsig", - [ - "git_hashsig_compare", - "git_hashsig_create", - "git_hashsig_create_fromfile" - ] - ], + ["hashsig", ["git_hashsig_compare", "git_hashsig_create", "git_hashsig_create_fromfile"]], [ "index_conflict_iterator", - [ - "git_index_conflict_iterator_free", - "git_index_conflict_iterator_new", - "git_index_conflict_next" - ] - ], - [ - "index_iterator", - [ - "git_index_iterator_free", - "git_index_iterator_new", - "git_index_iterator_next" - ] + ["git_index_conflict_iterator_free", "git_index_conflict_iterator_new", "git_index_conflict_next"] ], + ["index_iterator", ["git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next"]], [ "index_name_entry", - [ - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex" - ] + ["git_index_name_add", "git_index_name_clear", "git_index_name_entrycount", "git_index_name_get_byindex"] ], [ "index_reuc_entry", @@ -1184,12 +1156,7 @@ "git_index_reuc_remove" ] ], - [ - "merge_file_result", - [ - "git_merge_file_result_free" - ] - ], + ["merge_file_result", ["git_merge_file_result_free"]], [ "odb_object", [ @@ -1203,33 +1170,11 @@ ], [ "odb_stream", - [ - "git_odb_stream_finalize_write", - "git_odb_stream_free", - "git_odb_stream_read", - "git_odb_stream_write" - ] - ], - [ - "oid_shorten", - [ - "git_oid_shorten_add", - "git_oid_shorten_free", - "git_oid_shorten_new" - ] - ], - [ - "patch", - [ - "git_patch_convenient_from_diff" - ] - ], - [ - "path", - [ - "git_path_is_gitfile" - ] + ["git_odb_stream_finalize_write", "git_odb_stream_free", "git_odb_stream_read", "git_odb_stream_write"] ], + ["oid_shorten", ["git_oid_shorten_add", "git_oid_shorten_free", "git_oid_shorten_new"]], + ["patch", ["git_patch_convenient_from_diff"]], + ["path", ["git_path_is_gitfile"]], [ "pathspec_match_list", [ @@ -1243,19 +1188,9 @@ ], [ "reflog_entry", - [ - "git_reflog_entry_committer", - "git_reflog_entry_id_new", - "git_reflog_entry_id_old", - "git_reflog_entry_message" - ] - ], - [ - "remote", - [ - "git_remote_reference_list" - ] + ["git_reflog_entry_committer", "git_reflog_entry_id_new", "git_reflog_entry_id_old", "git_reflog_entry_message"] ], + ["remote", ["git_remote_reference_list"]], [ "repository", [ @@ -1270,36 +1205,13 @@ "git_repository_submodule_cache_clear" ] ], - [ - "revwalk", - [ - "git_revwalk_commit_walk", - "git_revwalk_fast_walk", - "git_revwalk_file_history_walk" - ] - ], - [ - "stash", - [ - "git_stash_save_options_init", - "git_stash_save_with_opts" - ] - ], + ["revwalk", ["git_revwalk_commit_walk", "git_revwalk_fast_walk", "git_revwalk_file_history_walk"]], + ["stash", ["git_stash_save_options_init", "git_stash_save_with_opts"]], [ "status_list", - [ - "git_status_list_entrycount", - "git_status_list_free", - "git_status_list_get_perfdata", - "git_status_list_new" - ] - ], - [ - "tree", - [ - "git_tree_get_all_filepaths" - ] + ["git_status_list_entrycount", "git_status_list_free", "git_status_list_get_perfdata", "git_status_list_new"] ], + ["tree", ["git_tree_get_all_filepaths"]], [ "tree_entry", [ @@ -1337,9 +1249,7 @@ } ], "used": { - "needs": [ - "git_apply_init_options" - ] + "needs": ["git_apply_init_options"] } } ], @@ -1449,9 +1359,7 @@ } ], "used": { - "needs": [ - "git_describe_init_format_options" - ] + "needs": ["git_describe_init_format_options"] } } ], @@ -1486,9 +1394,7 @@ } ], "used": { - "needs": [ - "git_describe_init_options" - ] + "needs": ["git_describe_init_options"] } } ], @@ -1584,10 +1490,7 @@ } ], "used": { - "needs": [ - "git_fetch_init_options", - "git_remote_init_callbacks" - ] + "needs": ["git_fetch_init_options", "git_remote_init_callbacks"] } } ], @@ -1722,9 +1625,7 @@ } ], "used": { - "needs": [ - "git_remote_init_callbacks" - ] + "needs": ["git_remote_init_callbacks"] } } ], @@ -1755,9 +1656,7 @@ } ], "used": { - "needs": [ - "git_remote_create_init_options" - ] + "needs": ["git_remote_create_init_options"] } } ], @@ -1788,9 +1687,7 @@ } ], "used": { - "needs": [ - "git_remote_reference_list" - ] + "needs": ["git_remote_reference_list"] } } ], @@ -1892,10 +1789,7 @@ } ], "used": { - "needs": [ - "git_stash_apply_init_options", - "git_checkout_init_options" - ] + "needs": ["git_stash_apply_init_options", "git_checkout_init_options"] } } ], @@ -1959,10 +1853,7 @@ } ], "used": { - "needs": [ - "git_stash_save_with_opts", - "git_stash_save_options_init" - ] + "needs": ["git_stash_save_with_opts", "git_stash_save_options_init"] } } ], @@ -1989,11 +1880,7 @@ } ], "used": { - "needs": [ - "git_status_init_options", - "git_status_foreach_ext", - "git_status_list_new" - ] + "needs": ["git_status_init_options", "git_status_foreach_ext", "git_status_list_new"] } } ], @@ -2024,9 +1911,7 @@ } ], "used": { - "needs": [ - "git_worktree_add_options_init" - ] + "needs": ["git_worktree_add_options_init"] } } ], @@ -2045,9 +1930,7 @@ } ], "used": { - "needs": [ - "git_worktree_prune_options_init" - ] + "needs": ["git_worktree_prune_options_init"] } } ], @@ -2146,9 +2029,7 @@ ] }, "message": { - "functions": [ - "git_message_trailer_array_free" - ] + "functions": ["git_message_trailer_array_free"] }, "odb": { "functions": [ @@ -2169,11 +2050,7 @@ ] }, "oid": { - "functions": [ - "git_oid_shorten_add", - "git_oid_shorten_free", - "git_oid_shorten_new" - ] + "functions": ["git_oid_shorten_add", "git_oid_shorten_free", "git_oid_shorten_new"] }, "pathspec": { "functions": [ diff --git a/generate/scripts/generateJson.js b/generate/scripts/generateJson.js index 68d149e90..de32fb1d8 100644 --- a/generate/scripts/generateJson.js +++ b/generate/scripts/generateJson.js @@ -10,13 +10,13 @@ module.exports = function generateJson() { var helpers = require("./helpers"); _ = require("lodash"); // libgit2's docs aren't complete so we'll add in what they're missing here - libgit2.types.forEach(function(type) { + libgit2.types.forEach(function (type) { if (supplement.types[type[0]]) { _.merge(type[1], supplement.types[type[0]]); } }); - libgit2.groups.forEach(function(group) { + libgit2.groups.forEach(function (group) { if (supplement.groups[group[0]]) { Array.prototype.push.apply(group[1], supplement.groups[group[0]]); } @@ -32,16 +32,18 @@ module.exports = function generateJson() { var enums = []; // reduce all of the groups into a hashmap and a name array for easy lookup - var groups = libgit2.groups.reduce(function(memo, group) { + var groups = libgit2.groups.reduce(function (memo, group) { var groupName = group[0]; // Some functions are in the wrong group so we can't just ignore them. // We have to completely remove them from one group and manually add them // into the other. - var functionNames = group[1].filter(function(fnName) { - return !supplement.remove[groupName] || + var functionNames = group[1].filter(function (fnName) { + return ( + !supplement.remove[groupName] || !supplement.remove[groupName].functions || - !~supplement.remove[groupName].functions.indexOf(fnName); + !~supplement.remove[groupName].functions.indexOf(fnName) + ); }); // If we've already found some functions for this group lets add the new @@ -57,56 +59,53 @@ module.exports = function generateJson() { return memo; }, {}); - // Split each type from the array into classes/structs and enums // each entry is of type ['name', {definingobject}] - libgit2.types.forEach(function(current) { + libgit2.types.forEach(function (current) { current[1].typeName = current[0]; // just log these out to a file for fun if (current[1].type === "enum") { enums.push(current[1]); - } - else { + } else { types.push(current[1]); } }); var previous = ""; - enums = _(enums).sortBy("name").reduce(function(enumMemo, enumerable) { - if (previous == enumerable.typeName) { - if (process.env.BUILD_ONLY) { - console.warn('Duplicate definition for enum ' + enumerable.typeName + - ". skipped."); + enums = _(enums) + .sortBy("name") + .reduce(function (enumMemo, enumerable) { + if (previous == enumerable.typeName) { + if (process.env.BUILD_ONLY) { + console.warn("Duplicate definition for enum " + enumerable.typeName + ". skipped."); + } + } else if (!enumerable.fields) { + if (process.env.BUILD_ONLY) { + console.warn("Incomplete definition for enum " + enumerable.typeName + ". skipped."); + } + } else { + enumMemo[enumerable.typeName] = { + typeName: enumerable.typeName.replace(/^git_/, "").replace(/_t$/, ""), + type: "enum", + cType: enumerable.typeName, + isMask: /_t$/.test(enumerable.typeName), + values: enumerable.fields.map(function (field) { + return { + name: field.name, + value: field.value, + }; + }), + }; } - } - else if (!enumerable.fields) { - if (process.env.BUILD_ONLY) { - console.warn('Incomplete definition for enum ' + enumerable.typeName + - ". skipped."); - } - } - else { - enumMemo[enumerable.typeName] = { - typeName: enumerable.typeName.replace(/^git_/, "").replace(/_t$/, ""), - type: "enum", - cType: enumerable.typeName, - isMask: (/_t$/).test(enumerable.typeName), - values: enumerable.fields.map(function(field) { - return { - name: field.name, - value: field.value - } - }) - }; - } - previous = enumerable.typeName; - return enumMemo; - }, {}).valueOf(); + previous = enumerable.typeName; + return enumMemo; + }, {}) + .valueOf(); // decorate the definitions with required data to build the C++ files - types.forEach(function(typeDef) { + types.forEach(function (typeDef) { var typeName = typeDef.typeName; typeDef.cType = typeName; typeName = typeName.replace("git_", ""); @@ -131,7 +130,7 @@ module.exports = function generateJson() { } groupDef = { - functions: groupDef + functions: groupDef, }; groupDef.type = "class"; @@ -169,7 +168,7 @@ module.exports = function generateJson() { } }; - var addSelfReferentialField = function(prop){ + var addSelfReferentialField = function (prop) { if (helpers.isSelfReferential(prop.type)) { prop.isSelfReferential = true; def.isExtendedStruct = true; @@ -180,7 +179,6 @@ module.exports = function generateJson() { def.fields.forEach(addSelfReferentialField); def.functions.forEach(addDependencies); - Object.keys(dependencies).forEach(function (dependencyFilename) { def.dependencies.push("../include/" + dependencyFilename + ".h"); }); @@ -188,17 +186,16 @@ module.exports = function generateJson() { // Additionally provide a friendly name to the actual filename. def.name = path.basename(def.filename, ".h"); - def.functions.forEach(function(fn) { + def.functions.forEach(function (fn) { fn.cppClassName = def.cppClassName; }); }); // Process enums - _(enums).forEach(function(enumerable) { + _(enums).forEach(function (enumerable) { for (const obj of output) { if (enumerable.typeName.indexOf(obj.typeName) == 0) { - enumerable.owner = obj.jsClassName; - } - else if (enumerable.owner) { + enumerable.owner = obj.jsClassName; + } else if (enumerable.owner) { break; } } @@ -212,7 +209,7 @@ module.exports = function generateJson() { .replace(/^_/, "") .toUpperCase(); - enumerable.values.forEach(function(value) { + enumerable.values.forEach(function (value) { value.JsName = value.name .replace(/^GIT_/, "") .replace(override.removeString || "", "") @@ -238,7 +235,6 @@ module.exports = function generateJson() { helpers.filterDocumentation(output); } - utils.writeLocalFile("output/idefs.json", output); }; diff --git a/generate/scripts/generateMissingTests.js b/generate/scripts/generateMissingTests.js index 4b06afeef..9c5a9d818 100644 --- a/generate/scripts/generateMissingTests.js +++ b/generate/scripts/generateMissingTests.js @@ -8,7 +8,7 @@ module.exports = function generateMissingTests() { var output = {}; function findMissingTest(idef) { - return new Promise(function(resolve) { + return new Promise(function (resolve) { var testFilePath = path.join(testFilesPath, idef.filename + ".js"); var result = {}; @@ -23,25 +23,22 @@ module.exports = function generateMissingTests() { functionIgnores = functionIgnores || []; file = file || ""; - idef.fields.forEach(function(field) { - if (file.indexOf(field.jsFunctionName) < 0 - && fieldIgnores.indexOf(field.jsFunctionName < 0)) { - fieldsResult.push(field.jsFunctionName); - } + idef.fields.forEach(function (field) { + if (file.indexOf(field.jsFunctionName) < 0 && fieldIgnores.indexOf(field.jsFunctionName < 0)) { + fieldsResult.push(field.jsFunctionName); + } }); result.fields = fieldsResult; - idef.functions.forEach(function(fn) { - if (file.indexOf(fn.jsFunctionName) < 0 - && functionIgnores.indexOf(fn.jsFunctionName) < 0) { - functionsResult.push(fn.jsFunctionName); - } + idef.functions.forEach(function (fn) { + if (file.indexOf(fn.jsFunctionName) < 0 && functionIgnores.indexOf(fn.jsFunctionName) < 0) { + functionsResult.push(fn.jsFunctionName); + } }); result.functions = functionsResult; - } - else { + } else { result.testFileMissing = false; result.testFilePath = testFilePath; } @@ -49,22 +46,21 @@ module.exports = function generateMissingTests() { output[idef.filename] = result; resolve(); }); - }; + } const idefs = require("../output/idefs"); - var promises = idefs.map(function(idef) { + var promises = idefs.map(function (idef) { return findMissingTest(idef); }); Promise.all(promises).then( - function() { + function () { utils.writeLocalFile("/output/missing-tests.json", output); }, - function(fail) { + function (fail) { console.error(fail); } ); - }; if (require.main === module) { diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 44fb21dec..7ceaf51f6 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -1,7 +1,7 @@ const path = require("path"); const fse = require("fs-extra"); -const os = require('os'); -const exec = require('../../utils/execPromise'); +const os = require("os"); +const exec = require("../../utils/execPromise"); const utils = require("./utils"); module.exports = function generateNativeCode() { @@ -9,18 +9,18 @@ module.exports = function generateNativeCode() { const js_beautify = require("js-beautify").js_beautify; const beautify = function (input) { return js_beautify(input, { - "brace_style": "end-expand", - "max_preserve_newlines": 2, - "preserve_newlines": true, - "indent_size": 2, - "indent_char": " " + brace_style: "end-expand", + max_preserve_newlines: 2, + preserve_newlines: true, + indent_size: 2, + indent_char: " ", }); }; // Customize the delimiters so as to not process `{{{` or `}}}`. combyne.settings.delimiters = { START_RAW: "{{=", - END_RAW: "=}}" + END_RAW: "=}}", }; var partials = { @@ -34,7 +34,7 @@ module.exports = function generateNativeCode() { guardArguments: utils.readLocalFile("templates/partials/guard_arguments.cc"), syncFunction: utils.readLocalFile("templates/partials/sync_function.cc"), fieldAccessors: utils.readLocalFile("templates/partials/field_accessors.cc"), - traits: utils.readLocalFile("templates/partials/traits.h") + traits: utils.readLocalFile("templates/partials/traits.h"), }; var templates = { @@ -45,7 +45,7 @@ module.exports = function generateNativeCode() { binding: utils.readLocalFile("templates/templates/binding.gyp"), nodegitCC: utils.readLocalFile("templates/templates/nodegit.cc"), nodegitJS: utils.readLocalFile("templates/templates/nodegit.js"), - enums: utils.readLocalFile("templates/templates/enums.js") + enums: utils.readLocalFile("templates/templates/enums.js"), }; var filters = { @@ -78,98 +78,101 @@ module.exports = function generateNativeCode() { subtract: require("../templates/filters/subtract"), thisInfo: require("../templates/filters/this_info"), titleCase: require("../templates/filters/title_case"), - toBool: require('../templates/filters/to_bool'), + toBool: require("../templates/filters/to_bool"), toSizeOfArray: require("../templates/filters/to_size_of_array"), unPointer: require("../templates/filters/un_pointer"), setUnsigned: require("../templates/filters/unsigned"), - upper: require("../templates/filters/upper") + upper: require("../templates/filters/upper"), }; // Convert Buffers to Combyne templates. - Object.keys(templates).forEach(function(template) { + Object.keys(templates).forEach(function (template) { templates[template] = combyne(templates[template]); // Attach all filters to all templates. - Object.keys(filters).forEach(function(filter) { + Object.keys(filters).forEach(function (filter) { templates[template].registerFilter(filter, filters[filter]); }); }); // Attach all partials to select templates. - Object.keys(partials).forEach(function(partial) { + Object.keys(partials).forEach(function (partial) { templates.class_header.registerPartial(partial, combyne(partials[partial])); templates.class_content.registerPartial(partial, combyne(partials[partial])); templates.struct_header.registerPartial(partial, combyne(partials[partial])); templates.struct_content.registerPartial(partial, combyne(partials[partial])); }); - // Determine which definitions to actually include in the source code. // This might not be needed anymore but to be frank I'm not totally positive const idefs = require("../output/idefs"); - var enabled = idefs.filter(function(idef) { + var enabled = idefs.filter(function (idef) { return !idef.ignore; }); - const tempDirPath = path.join(os.tmpdir(), 'nodegit_build'); + const tempDirPath = path.join(os.tmpdir(), "nodegit_build"); const tempSrcDirPath = path.join(tempDirPath, "src"); const tempIncludeDirPath = path.join(tempDirPath, "include"); - const finalSrcDirPath = path.join(__dirname, '../../src'); - const finalIncludeDirPath = path.join(__dirname, '../../include'); - - fse.remove(tempDirPath).then(function() { - return fse.copy(path.resolve(__dirname, "../templates/manual/include"), tempIncludeDirPath); - }).then(function() { - return fse.copy(path.resolve(__dirname, "../templates/manual/src"), tempSrcDirPath); - }).then(function() { - // Write out single purpose templates. - utils.writeLocalFile("../binding.gyp", beautify(templates.binding.render(enabled)), "binding.gyp"); - utils.writeFile(path.join(tempSrcDirPath, "nodegit.cc"), templates.nodegitCC.render(enabled), "nodegit.cc"); - utils.writeLocalFile("../lib/nodegit.js", beautify(templates.nodegitJS.render(enabled)), "nodegit.js"); - // Write out all the classes. - enabled.forEach(function(idef) { - if (idef.type && idef.type != "enum") { - utils.writeFile( - path.join(tempSrcDirPath, idef.filename + ".cc"), - templates[idef.type + "_content"].render(idef), - idef.type + "_content.cc" - ); - - utils.writeFile( - path.join(tempIncludeDirPath, idef.filename + ".h"), - templates[idef.type + "_header"].render(idef), - idef.type + "_header.h" - ); - } - }); - - utils.writeLocalFile("../lib/enums.js", beautify(templates.enums.render(enabled)), "enums.js"); - }).then(function() { - return exec("command -v astyle").then(function(astyle) { - if (astyle) { - return exec( - "astyle --options=\".astylerc\" " - + tempSrcDirPath + "/*.cc " - + tempIncludeDirPath + "/*.h" - ).then(function() { - return exec( - "rm " - + tempSrcDirPath + "/*.cc.orig " - + tempIncludeDirPath + "/*.h.orig " + const finalSrcDirPath = path.join(__dirname, "../../src"); + const finalIncludeDirPath = path.join(__dirname, "../../include"); + + fse + .remove(tempDirPath) + .then(function () { + return fse.copy(path.resolve(__dirname, "../templates/manual/include"), tempIncludeDirPath); + }) + .then(function () { + return fse.copy(path.resolve(__dirname, "../templates/manual/src"), tempSrcDirPath); + }) + .then(function () { + // Write out single purpose templates. + utils.writeLocalFile("../binding.gyp", beautify(templates.binding.render(enabled)), "binding.gyp"); + utils.writeFile(path.join(tempSrcDirPath, "nodegit.cc"), templates.nodegitCC.render(enabled), "nodegit.cc"); + utils.writeLocalFile("../lib/nodegit.js", beautify(templates.nodegitJS.render(enabled)), "nodegit.js"); + // Write out all the classes. + enabled.forEach(function (idef) { + if (idef.type && idef.type != "enum") { + utils.writeFile( + path.join(tempSrcDirPath, idef.filename + ".cc"), + templates[idef.type + "_content"].render(idef), + idef.type + "_content.cc" ); - }); - } - }, function() {}) - }).then(function() { - return Promise.all([ - utils.syncDirs(tempSrcDirPath, finalSrcDirPath), - utils.syncDirs(tempIncludeDirPath, finalIncludeDirPath), - ]); - }).then(function() { - return fse.remove(tempDirPath); - }).catch(console.log); + utils.writeFile( + path.join(tempIncludeDirPath, idef.filename + ".h"), + templates[idef.type + "_header"].render(idef), + idef.type + "_header.h" + ); + } + }); + + utils.writeLocalFile("../lib/enums.js", beautify(templates.enums.render(enabled)), "enums.js"); + }) + .then(function () { + return exec("command -v astyle").then( + function (astyle) { + if (astyle) { + return exec('astyle --options=".astylerc" ' + tempSrcDirPath + "/*.cc " + tempIncludeDirPath + "/*.h").then( + function () { + return exec("rm " + tempSrcDirPath + "/*.cc.orig " + tempIncludeDirPath + "/*.h.orig "); + } + ); + } + }, + function () {} + ); + }) + .then(function () { + return Promise.all([ + utils.syncDirs(tempSrcDirPath, finalSrcDirPath), + utils.syncDirs(tempIncludeDirPath, finalIncludeDirPath), + ]); + }) + .then(function () { + return fse.remove(tempDirPath); + }) + .catch(console.log); }; if (require.main === module) { diff --git a/generate/scripts/helpers.js b/generate/scripts/helpers.js index 70ce02879..ff6e97868 100644 --- a/generate/scripts/helpers.js +++ b/generate/scripts/helpers.js @@ -14,38 +14,38 @@ var libgit2 = require("../input/libgit2-docs.json"); // var cTypes = libgit2.groups.map(function(group) { return group[0];}); var cTypeMappings = { - "char": "String", - "short": "Number", - "int": "Number", - "int16_t": "Number", - "int32_t": "Number", - "int64_t": "Number", - "size_t": "Number", - "uint16_t": "Number", - "uint32_t": "Number", - "uint64_t": "Number", - "double": "Number", - "git_object_size_t": "Number" -} + char: "String", + short: "Number", + int: "Number", + int16_t: "Number", + int32_t: "Number", + int64_t: "Number", + size_t: "Number", + uint16_t: "Number", + uint32_t: "Number", + uint64_t: "Number", + double: "Number", + git_object_size_t: "Number", +}; var collisionMappings = { - "new": "create" -} + new: "create", +}; var Helpers = { - normalizeCtype: function(cType) { + normalizeCtype: function (cType) { return (cType || "") - .toLowerCase() - .replace("const ", "") - .replace("unsigned ", "") - .replace("struct", "") - .replace(utils.doublePointerRegex, "") - .replace(utils.pointerRegex, "") - .replace(utils.arrayTypeRegex, "") - .trim(); + .toLowerCase() + .replace("const ", "") + .replace("unsigned ", "") + .replace("struct", "") + .replace(utils.doublePointerRegex, "") + .replace(utils.pointerRegex, "") + .replace(utils.arrayTypeRegex, "") + .trim(); }, - cTypeToCppName: function(cType, ownerType) { + cTypeToCppName: function (cType, ownerType) { var normalizedType = Helpers.normalizeCtype(cType); if (ownerType && normalizedType != ownerType) { normalizedType = normalizedType.replace(ownerType, ""); @@ -54,22 +54,22 @@ var Helpers = { return cTypeMappings[normalizedType] || utils.titleCase(normalizedType); }, - cTypeToJsName: function(cType, ownerType) { + cTypeToJsName: function (cType, ownerType) { var output = utils.camelCase(Helpers.cTypeToCppName(cType, ownerType).replace(/^Git/, "")); var mergedPrefixes = ["from", "by"]; - mergedPrefixes.forEach(function(prefix) { + mergedPrefixes.forEach(function (prefix) { var reg = new RegExp("(^" + prefix + "|" + utils.titleCase(prefix) + ")([a-z]+)$"); - output = output.replace(reg, function(all, prefixMatch, otherWord) { + output = output.replace(reg, function (all, prefixMatch, otherWord) { return prefixMatch + utils.titleCase(otherWord); }); }); - output = output.replace(/([a-z])Str$/, "$1String") + output = output.replace(/([a-z])Str$/, "$1String"); return output; }, - isConstructorFunction: function(cType, fnName) { + isConstructorFunction: function (cType, fnName) { var deprecatedInitFnName = cType.split("_"); deprecatedInitFnName.splice(-1, 0, "init"); deprecatedInitFnName = deprecatedInitFnName.join("_"); @@ -79,37 +79,42 @@ var Helpers = { return initFnName === fnName || deprecatedInitFnName === fnName; }, - hasConstructor: function(type, normalizedType) { + hasConstructor: function (type, normalizedType) { if (normalizedType && descriptor.types[normalizedType.substr(4)]) { var descriptorEntry = descriptor.types[normalizedType.substr(4)]; // eslint-disable-next-line no-prototype-builtins - if (descriptorEntry.hasOwnProperty('hasConstructor')) { + if (descriptorEntry.hasOwnProperty("hasConstructor")) { return descriptorEntry.hasConstructor; } } - return type.used - && type.used.needs - && type.used.needs.some(function (fnName) { + return ( + type.used && + type.used.needs && + type.used.needs.some(function (fnName) { return Helpers.isConstructorFunction(normalizedType, fnName); - }); + }) + ); }, - isCallbackFunction: function(cType, isCallback) { + isCallbackFunction: function (cType, isCallback) { return isCallback === true || callbackTypePattern.test(cType); }, - isPayloadFor: function(cbField, payloadName) { - return payloadName && ~payloadName.indexOf("_payload") - && Helpers.isCallbackFunction(cbField.cType) - && ~cbField.name.indexOf(payloadName.replace("_payload", "")); + isPayloadFor: function (cbField, payloadName) { + return ( + payloadName && + ~payloadName.indexOf("_payload") && + Helpers.isCallbackFunction(cbField.cType) && + ~cbField.name.indexOf(payloadName.replace("_payload", "")) + ); }, - isSelfReferential: function(cType){ + isSelfReferential: function (cType) { return selfReferentialTypePattern.test(cType); }, - getLibgitType: function(normalizedType, types) { + getLibgitType: function (normalizedType, types) { for (const type of types) { if (type[0] === normalizedType) { return type[1]; @@ -117,27 +122,25 @@ var Helpers = { } }, - processCallback: function(field) { + processCallback: function (field) { field.isCallbackFunction = true; var callbackDef = callbackDefs[field.type] || callbackDefs[field.cType]; if (callbackDef) { _.merge(field, callbackDef); - } - else { + } else { if (process.env.BUILD_ONLY) { console.warn("Couldn't find callback definition for " + field.type); } } }, - processPayload: function(field, allFields) { + processPayload: function (field, allFields) { if (field.name === "payload") { field.payloadFor = "*"; field.globalPayload = true; field.isOptional = true; - } - else { + } else { for (const cbField of allFields) { if (Helpers.isPayloadFor(cbField, field.name)) { field.payloadFor = cbField.name; @@ -149,7 +152,7 @@ var Helpers = { }, // returns the libgittype found in types - decorateLibgitType: function(type, types, enums) { + decorateLibgitType: function (type, types, enums) { var normalizedType = Helpers.normalizeCtype(type.cType); var libgitType = Helpers.getLibgitType(normalizedType, types); @@ -165,7 +168,7 @@ var Helpers = { type.cppClassName = "Number"; type.jsClassName = "Number"; if (enums[type.cType]) { - type.isMask = enums[type.cType].isMask || false + type.isMask = enums[type.cType].isMask || false; } } @@ -178,7 +181,7 @@ var Helpers = { return libgitType; }, - decoratePrimaryType: function(typeDef, enums) { + decoratePrimaryType: function (typeDef, enums) { var typeDefOverrides = descriptor.types[typeDef.typeName] || {}; var partialOverrides = _.omit(typeDefOverrides, ["fields", "functions"]); @@ -192,8 +195,8 @@ var Helpers = { if (typeDefOverrides.freeFunctionName) { typeDef.freeFunctionName = typeDefOverrides.freeFunctionName; - } else if (typeDef.type === 'struct') { - typeDef.freeFunctionName = 'free'; + } else if (typeDef.type === "struct") { + typeDef.freeFunctionName = "free"; } typeDef.fields = typeDef.fields || []; @@ -207,21 +210,21 @@ var Helpers = { var normalizedType = Helpers.normalizeCtype(typeDef.cType); typeDef.hasConstructor = Helpers.hasConstructor(typeDef, normalizedType); - typeDef.functions = (typeDef.functions).map(function(fn) { + typeDef.functions = typeDef.functions.map(function (fn) { var fnDef = libgit2.functions[fn]; fnDef.cFunctionName = fn; return fnDef; }); var functionOverrides = typeDefOverrides.functions || {}; - typeDef.functions.forEach(function(fnDef) { + typeDef.functions.forEach(function (fnDef) { Helpers.decorateFunction(fnDef, typeDef, functionOverrides[fnDef.cFunctionName] || {}, enums); }); _.merge(typeDef, partialOverrides); }, - decorateField: function(field, allFields, fieldOverrides, enums) { + decorateField: function (field, allFields, fieldOverrides, enums) { // var normalizeType = Helpers.normalizeCtype(field.type); field.cType = field.type; @@ -239,8 +242,7 @@ var Helpers = { field.args.forEach(function (arg) { Helpers.decorateArg(arg, field.args, null, null, argOverrides[arg.name] || {}, enums); }); - } - else { + } else { field.isCallbackFunction = false; Helpers.processPayload(field, allFields); if (field.payloadFor) { @@ -252,7 +254,7 @@ var Helpers = { _.merge(field, fieldOverrides); }, - decorateArg: function(arg, allArgs, typeDef, fnDef, argOverrides, enums) { + decorateArg: function (arg, allArgs, typeDef, fnDef, argOverrides, enums) { var type = argOverrides.cType || argOverrides.type || arg.cType || arg.type; var normalizedType = Helpers.normalizeCtype(type); @@ -269,12 +271,18 @@ var Helpers = { var callBackArgOverrides = argOverrides.args || {}; arg.args = arg.args || []; arg.args.forEach(function (argForCallback) { - Helpers.decorateArg(argForCallback, arg.args, null, null, callBackArgOverrides[argForCallback.name] || {}, enums); + Helpers.decorateArg( + argForCallback, + arg.args, + null, + null, + callBackArgOverrides[argForCallback.name] || {}, + enums + ); }); - } - else if (typeDef && fnDef) { + } else if (typeDef && fnDef) { Helpers.processPayload(arg, allArgs); - if(arg.payloadFor) { + if (arg.payloadFor) { return; } @@ -282,12 +290,15 @@ var Helpers = { // itself and determine if this function goes on the prototype // or is a constructor method. arg.isReturn = arg.name === "out" || (utils.isDoublePointer(arg.type) && normalizedType == typeDef.cType); - if (typeof arg.isSelf == 'undefined') { - arg.isSelf = utils.isPointer(arg.type) && + if (typeof arg.isSelf == "undefined") { + arg.isSelf = + utils.isPointer(arg.type) && normalizedType == typeDef.cType && arg.cppClassName !== "Array" && argOverrides.cppClassName !== "Array" && - _.every(allArgs, function(_arg) { return !_arg.isSelf; }); + _.every(allArgs, function (_arg) { + return !_arg.isSelf; + }); } if (arg.isReturn && fnDef.return && fnDef.return.type === "int") { fnDef.return.isErrorCode = true; @@ -297,8 +308,7 @@ var Helpers = { if (arg.isReturn && arg.isSelf) { arg.isSelf = false; fnDef.isConstructorMethod = true; - } - else if (arg.isSelf) { + } else if (arg.isSelf) { fnDef.isPrototypeMethod = true; } } @@ -306,7 +316,7 @@ var Helpers = { _.merge(arg, argOverrides); }, - decorateFunction: function(fnDef, typeDef, fnOverrides, enums) { + decorateFunction: function (fnDef, typeDef, fnOverrides, enums) { var key = fnDef.cFunctionName; // if this is the free function for the class, make the ref on the class @@ -325,7 +335,7 @@ var Helpers = { } var argOverrides = fnOverrides.args || {}; - fnDef.args.forEach(function(arg) { + fnDef.args.forEach(function (arg) { Helpers.decorateArg(arg, fnDef.args, typeDef, fnDef, argOverrides[arg.name] || {}, enums); // if a function has any callbacks then it MUST be async @@ -335,14 +345,14 @@ var Helpers = { }); if (fnDef.cFile) { - fnDef.implementation = fs.readFileSync(path.resolve(fnDef.cFile), 'utf8'); + fnDef.implementation = fs.readFileSync(path.resolve(fnDef.cFile), "utf8"); } if (fnDef.return) { Helpers.decorateArg(fnDef.return, fnDef.args, typeDef, fnDef, fnOverrides.return || {}, enums); } - _(collisionMappings).forEach(function(newName, collidingName) { + _(collisionMappings).forEach(function (newName, collidingName) { if (fnDef.cppFunctionName == utils.titleCase(collidingName)) { fnDef.cppFunctionName = utils.titleCase(newName); } @@ -365,14 +375,13 @@ var Helpers = { for (var i = arr.length - 1; i >= 0; i--) { if (arr[i].ignore) { arr.splice(i, 1); - } - else if (callback) { + } else if (callback) { callback(arr[i]); } } }, - deleteProperties: function(obj) { + deleteProperties: function (obj) { delete obj.line; delete obj.lineto; delete obj.block; @@ -385,23 +394,22 @@ var Helpers = { delete obj.sig; }, - filterDocumentation: function(idefs) { + filterDocumentation: function (idefs) { Helpers.filterIgnored(idefs, function (idef) { Helpers.deleteProperties(idef); Helpers.filterIgnored(idef.fields, Helpers.deleteProperties); - Helpers.filterIgnored(idef.functions, function (fn) { Helpers.deleteProperties(fn); - Helpers.filterIgnored(fn.args, function(arg) { + Helpers.filterIgnored(fn.args, function (arg) { Helpers.deleteProperties(arg); delete arg.functions; }); }); }); - } + }, }; module.exports = Helpers; diff --git a/generate/scripts/utils.js b/generate/scripts/utils.js index e755a4512..41a7bd65f 100644 --- a/generate/scripts/utils.js +++ b/generate/scripts/utils.js @@ -1,6 +1,6 @@ const fse = require("fs-extra"); const walk = require("walk"); -const _ = require('lodash'); +const _ = require("lodash"); const fs = require("fs"); const path = require("path"); @@ -13,32 +13,32 @@ var util = { pointerRegex: /\s*\*\s*/, doublePointerRegex: /\s*\*\*\s*/, - readLocalFile: function(filePath) { + readLocalFile: function (filePath) { return util.readFile(local(filePath)); }, - readFile: function(filePath) { + readFile: function (filePath) { try { return fs.readFileSync(filePath).toString(); - } - catch (unhandledException) { + } catch (unhandledException) { return ""; } }, - writeLocalFile: function(filePath, content, header) { + writeLocalFile: function (filePath, content, header) { return util.writeFile(local(filePath), content, header); }, - writeFile: function(filePath, content, header) { + writeFile: function (filePath, content, header) { try { if (typeof content == "object") { - content = JSON.stringify(content, null, 2) + content = JSON.stringify(content, null, 2); } if (header) { - var commentPrefix = ~header.indexOf('.gyp') ? '#' : '//' - content = commentPrefix + + var commentPrefix = ~header.indexOf(".gyp") ? "#" : "//"; + content = + commentPrefix + " This is a generated file, modify: generate/templates/templates/" + header + "\n\n" + @@ -48,108 +48,111 @@ var util = { fse.ensureFileSync(filePath); fse.writeFileSync(filePath, content); return true; - } - catch (exception) { + } catch (exception) { return false; } }, - titleCase: function(str) { - return str.split(/_|\//).map(function(val) { - if (val.length) { - return val[0].toUpperCase() + val.slice(1); - } + titleCase: function (str) { + return str + .split(/_|\//) + .map(function (val) { + if (val.length) { + return val[0].toUpperCase() + val.slice(1); + } - return val; - }).join(""); + return val; + }) + .join(""); }, camelCase: _.camelCase, - getFilePathsRelativeToDir: function(dir) { + getFilePathsRelativeToDir: function (dir) { const files = []; const walker = walk.walk(dir, { followLinks: false }); if (!util.isDirectory(dir)) { return Promise.resolve([]); } - return new Promise(function(resolve, reject) { - walker.on('file', function(root, stat, next) { + return new Promise(function (resolve, reject) { + walker.on("file", function (root, stat, next) { files.push(path.relative(dir, path.join(root, stat.name))); next(); }); - walker.on('end', function() { + walker.on("end", function () { resolve(files); }); - walker.on('errors', function() { + walker.on("errors", function () { reject(); }); }); }, - isFile: function(path) { + isFile: function (path) { var isFile; try { isFile = fse.statSync(path).isFile(); - } catch(e) { + } catch (e) { isFile = false; } return isFile; }, - isDirectory: function(path) { + isDirectory: function (path) { var isDirectory; try { isDirectory = fse.statSync(path).isDirectory(); - } catch(e) { + } catch (e) { isDirectory = false; } return isDirectory; }, - isPointer: function(type) { + isPointer: function (type) { return util.pointerRegex.test(type) || util.doublePointerRegex.test(type); }, - isDoublePointer: function(type) { + isDoublePointer: function (type) { return util.doublePointerRegex.test(type); }, - syncDirs: function(fromDir, toDir) { + syncDirs: function (fromDir, toDir) { let toFilePaths; let fromFilePaths; - return Promise.all([ - util.getFilePathsRelativeToDir(toDir), - util.getFilePathsRelativeToDir(fromDir) - ]) - .then(function(filePaths) { + return Promise.all([util.getFilePathsRelativeToDir(toDir), util.getFilePathsRelativeToDir(fromDir)]) + .then(function (filePaths) { toFilePaths = filePaths[0]; fromFilePaths = filePaths[1]; // Delete files that aren't in fromDir - return Promise.all(toFilePaths.map(function(filePath) { - if (!util.isFile(path.join(fromDir, filePath))) { - return fse.remove(path.join(toDir, filePath)); - } - return Promise.resolve(); - })); + return Promise.all( + toFilePaths.map(function (filePath) { + if (!util.isFile(path.join(fromDir, filePath))) { + return fse.remove(path.join(toDir, filePath)); + } + return Promise.resolve(); + }) + ); }) - .then(function() { + .then(function () { // Copy files that don't exist in toDir or have different contents - return Promise.all(fromFilePaths.map(function(filePath) { - const toFilePath = path.join(toDir, filePath); - const fromFilePath = path.join(fromDir, filePath); - if (!util.isFile(toFilePath) || util.readFile(toFilePath) !== util.readFile(fromFilePath)) { - return fse.copy(fromFilePath, toFilePath); - } - return Promise.resolve(); - })); + return Promise.all( + fromFilePaths.map(function (filePath) { + const toFilePath = path.join(toDir, filePath); + const fromFilePath = path.join(fromDir, filePath); + if (!util.isFile(toFilePath) || util.readFile(toFilePath) !== util.readFile(fromFilePath)) { + return fse.copy(fromFilePath, toFilePath); + } + return Promise.resolve(); + }) + ); }); - } + }, }; module.exports = util; diff --git a/generate/templates/README.md b/generate/templates/README.md index ee8b1f70c..92aed4b2e 100644 --- a/generate/templates/README.md +++ b/generate/templates/README.md @@ -1,35 +1,41 @@ # Manual templates - Manual templates override generated code from nodegit while generating source code. They really should be avoid untill absolutely necessary. +Manual templates override generated code from nodegit while generating source code. They really should be avoid untill absolutely necessary. ## Why? - #### 1. Performance - > Everytime the library switches between C land and the javascript thread, there is a penalty in performance. If in practice the usage of a method in libgit2 requires crossing the c/javascript boundary frequently, it might be better option to use manual templates. An example being ```Revwalk::FastWalk```. +#### 1. Performance - #### 2. Saftey - > The generated code sometimes does not handle structures that are interdependent. An example would be ```git_patch``` and ```git_diff```. A ```git_patch```'s memory is owned by ```git_diff```, and that includes all of the children of ```git_patch```, as well. So a ```git_diff_hunk```, ```git_diff_line```, and ```git_patch``` all are owned by a ```git_diff```, and when that ```git_diff``` is deleted, all the memory for any patches, hunks, or lines that are in use as NodeGitWrappers are now corrupted. Further, a ```git_diff``` keeps a file handle open for its entire lifespan, which can lead to NodeGit holding onto file locks in Windows. Due to both of these compounding issues, we wrote manual templates to shift ownership away from a ```git_diff``` to ```git_patch```, ```git_diff_hunk```, and ```git_diff_line``` and also shorten the lifespan of a diff. +> Everytime the library switches between C land and the javascript thread, there is a penalty in performance. If in practice the usage of a method in libgit2 requires crossing the c/javascript boundary frequently, it might be better option to use manual templates. An example being `Revwalk::FastWalk`. - #### 3. Odd cases - > If a new pattern exists in libgit that would be difficult to implement using generated code, manual templates can be used for one-off cases. Typically generated code takes care of most patterns seen in libgit, but if function signatures do not follow typical pattern, manual templates could be used. Example: ```git_filter``` and ```git_remote_ls```. +#### 2. Saftey + +> The generated code sometimes does not handle structures that are interdependent. An example would be `git_patch` and `git_diff`. A `git_patch`'s memory is owned by `git_diff`, and that includes all of the children of `git_patch`, as well. So a `git_diff_hunk`, `git_diff_line`, and `git_patch` all are owned by a `git_diff`, and when that `git_diff` is deleted, all the memory for any patches, hunks, or lines that are in use as NodeGitWrappers are now corrupted. Further, a `git_diff` keeps a file handle open for its entire lifespan, which can lead to NodeGit holding onto file locks in Windows. Due to both of these compounding issues, we wrote manual templates to shift ownership away from a `git_diff` to `git_patch`, `git_diff_hunk`, and `git_diff_line` and also shorten the lifespan of a diff. + +#### 3. Odd cases + +> If a new pattern exists in libgit that would be difficult to implement using generated code, manual templates can be used for one-off cases. Typically generated code takes care of most patterns seen in libgit, but if function signatures do not follow typical pattern, manual templates could be used. Example: `git_filter` and `git_remote_ls`. + +##
-
------ ## Implementing manual templates -#### 1. Write manual .cc and .h files to *generate/templates/manual/* +#### 1. Write manual .cc and .h files to _generate/templates/manual/_ + *.cc files -> /generate/templates/manual/src/ *.h files -> /generate/templates/manual/include/ #### 2. Remove all references from /generate configuration files - + #### 3. Add references to binding.gyp template + location: /generate/templates/templates/binding.gyp #### 4. Add headers to nodegit.cc template + location: /generate/templates/templates/nodegit.cc #### 5. Add new wrapper to nodegit.js template + use rawApi.ManualWrapper reference to add _ManualWrapper add any js wrapper (if any) via importExtension - diff --git a/generate/templates/filters/and.js b/generate/templates/filters/and.js index 042631623..ee7306456 100644 --- a/generate/templates/filters/and.js +++ b/generate/templates/filters/and.js @@ -1,3 +1,3 @@ -module.exports = function(value, other) { +module.exports = function (value, other) { return value && other; }; diff --git a/generate/templates/filters/args_info.js b/generate/templates/filters/args_info.js index 55270102d..a02a16850 100644 --- a/generate/templates/filters/args_info.js +++ b/generate/templates/filters/args_info.js @@ -1,17 +1,11 @@ -var bannedCppClassNames = [ - "Buffer", - "Function", - "GitBuf", - "GitStrarray", - "Wrapper" -]; - -module.exports = function(args) { +var bannedCppClassNames = ["Buffer", "Function", "GitBuf", "GitStrarray", "Wrapper"]; + +module.exports = function (args) { var result = [], - cArg, - jsArg; + cArg, + jsArg; - for(cArg = 0, jsArg = 0; cArg < args.length; cArg++) { + for (cArg = 0, jsArg = 0; cArg < args.length; cArg++) { var arg = args[cArg]; if (!arg.isReturn && !arg.isSelf) { @@ -28,13 +22,13 @@ module.exports = function(args) { arg.isCppClassStringOrArray = ~["String", "Array"].indexOf(arg.cppClassName); arg.isConst = ~arg.cType.indexOf("const "); - arg.isUnwrappable = !arg.isStructType && arg.isLibgitType && !arg.isEnum && - !bannedCppClassNames.includes(arg.cppClassName); + arg.isUnwrappable = + !arg.isStructType && arg.isLibgitType && !arg.isEnum && !bannedCppClassNames.includes(arg.cppClassName); // if we have a callback then we also need the corresponding payload for that callback if (arg.isCallbackFunction) { - var payload = args.filter(function(payload) { - return payload.payloadFor == arg.name || payload.payloadFor == '*'; + var payload = args.filter(function (payload) { + return payload.payloadFor == arg.name || payload.payloadFor == "*"; })[0]; if (payload) { diff --git a/generate/templates/filters/array_type_to_plain_type.js b/generate/templates/filters/array_type_to_plain_type.js index 55f283350..d416f7fe3 100644 --- a/generate/templates/filters/array_type_to_plain_type.js +++ b/generate/templates/filters/array_type_to_plain_type.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return /(.*)\s\[\d+\]\s*/.exec(cType)[1]; }; diff --git a/generate/templates/filters/as_element_pointer.js b/generate/templates/filters/as_element_pointer.js index 8b34eed17..ac0adecba 100644 --- a/generate/templates/filters/as_element_pointer.js +++ b/generate/templates/filters/as_element_pointer.js @@ -1,7 +1,5 @@ const isArrayType = require("./is_array_type"); -module.exports = function(cType, parsedName) { - return isArrayType(cType) ? - "&" + parsedName + "[i]" : - parsedName; +module.exports = function (cType, parsedName) { + return isArrayType(cType) ? "&" + parsedName + "[i]" : parsedName; }; diff --git a/generate/templates/filters/callback_args_count.js b/generate/templates/filters/callback_args_count.js index 26c7762ea..73a505df0 100644 --- a/generate/templates/filters/callback_args_count.js +++ b/generate/templates/filters/callback_args_count.js @@ -1,18 +1,11 @@ -module.exports = function(args) { +module.exports = function (args) { if (!args) { return 0; } - return args.reduce( - function(count, arg) { - var shouldCount = !arg.isReturn && - !arg.isSelf && - arg.name !== "payload" && - arg.name !== "self" && - !arg.ignore; + return args.reduce(function (count, arg) { + var shouldCount = !arg.isReturn && !arg.isSelf && arg.name !== "payload" && arg.name !== "self" && !arg.ignore; - return shouldCount ? count + 1 : count; - }, - 0 - ); + return shouldCount ? count + 1 : count; + }, 0); }; diff --git a/generate/templates/filters/callback_args_info.js b/generate/templates/filters/callback_args_info.js index a7285c0b8..f0038b05f 100644 --- a/generate/templates/filters/callback_args_info.js +++ b/generate/templates/filters/callback_args_info.js @@ -1,23 +1,16 @@ -module.exports = function(args) { - var result = args.reduce( - function(argList, arg) { - var useArg = !arg.isReturn && - !arg.isSelf && - arg.name !== "payload" && - arg.name !== "self" && - !arg.ignore; +module.exports = function (args) { + var result = args.reduce(function (argList, arg) { + var useArg = !arg.isReturn && !arg.isSelf && arg.name !== "payload" && arg.name !== "self" && !arg.ignore; - if (!useArg) { - return argList; - } + if (!useArg) { + return argList; + } - arg.firstArg = argList.length === 0; - argList.push(arg); + arg.firstArg = argList.length === 0; + argList.push(arg); - return argList; - }, - [] - ); + return argList; + }, []); if (result.length) { result[result.length - 1].lastArg = true; diff --git a/generate/templates/filters/cpp_to_v8.js b/generate/templates/filters/cpp_to_v8.js index 96b2b0ba6..e00a1ef6b 100644 --- a/generate/templates/filters/cpp_to_v8.js +++ b/generate/templates/filters/cpp_to_v8.js @@ -1,9 +1,9 @@ var isV8Value = require("./is_v8_value"); -module.exports = function(cppClassName) { +module.exports = function (cppClassName) { if (cppClassName === "Integer") { cppClassName = "Number"; - } else if (cppClassName === "Wrapper"){ + } else if (cppClassName === "Wrapper") { cppClassName = "String"; } diff --git a/generate/templates/filters/default_value.js b/generate/templates/filters/default_value.js index 42682549e..ebdcc8e94 100644 --- a/generate/templates/filters/default_value.js +++ b/generate/templates/filters/default_value.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return cType === "git_otype" ? "GIT_OBJ_ANY" : "0"; }; diff --git a/generate/templates/filters/fields_info.js b/generate/templates/filters/fields_info.js index 6022aab12..2f7eb8ee1 100644 --- a/generate/templates/filters/fields_info.js +++ b/generate/templates/filters/fields_info.js @@ -1,15 +1,9 @@ -var bannedCppClassNames = [ - "Buffer", - "Function", - "GitBuf", - "GitStrarray", - "Wrapper" -]; +var bannedCppClassNames = ["Buffer", "Function", "GitBuf", "GitStrarray", "Wrapper"]; -module.exports = function(fields) { +module.exports = function (fields) { var result = []; - fields.forEach(function (field, index){ + fields.forEach(function (field, index) { var fieldInfo = {}; fieldInfo.__proto__ = field; @@ -17,10 +11,10 @@ module.exports = function(fields) { fieldInfo.index = index; fieldInfo.parsedName = field.name || "result"; fieldInfo.isCppClassIntType = ~["Uint32", "Int32"].indexOf(field.cppClassName); - fieldInfo.parsedClassName = (field.cppClassName || '').toLowerCase() + "_t"; + fieldInfo.parsedClassName = (field.cppClassName || "").toLowerCase() + "_t"; fieldInfo.hasOwner = !fieldInfo.selfOwned && !!fieldInfo.ownedByThis; - fieldInfo.isUnwrappable = fieldInfo.isLibgitType && !fieldInfo.isEnum && - !bannedCppClassNames.includes(fieldInfo.cppClassName); + fieldInfo.isUnwrappable = + fieldInfo.isLibgitType && !fieldInfo.isEnum && !bannedCppClassNames.includes(fieldInfo.cppClassName); result.push(fieldInfo); }); diff --git a/generate/templates/filters/get_cpp_function_for_root_proto.js b/generate/templates/filters/get_cpp_function_for_root_proto.js index 6571af880..280c43af9 100644 --- a/generate/templates/filters/get_cpp_function_for_root_proto.js +++ b/generate/templates/filters/get_cpp_function_for_root_proto.js @@ -1,9 +1,11 @@ -module.exports = function(functions) { +module.exports = function (functions) { if (!functions || functions.length === 0) { throw new Error("Should not be able to get function from empty function list"); } - const fun = functions.find(function(f) { return f.useAsOnRootProto; }); + const fun = functions.find(function (f) { + return f.useAsOnRootProto; + }); if (!fun) { throw new Error("There is no function on the root prototype for this collection"); } diff --git a/generate/templates/filters/has_function_on_root_proto.js b/generate/templates/filters/has_function_on_root_proto.js index 626ce0ff6..3b3e98379 100644 --- a/generate/templates/filters/has_function_on_root_proto.js +++ b/generate/templates/filters/has_function_on_root_proto.js @@ -1,7 +1,9 @@ -module.exports = function(functions) { +module.exports = function (functions) { if (!functions || functions.length === 0) { return false; } - return functions.some(function(f) { return f.useAsOnRootProto; }); + return functions.some(function (f) { + return f.useAsOnRootProto; + }); }; diff --git a/generate/templates/filters/has_return_type.js b/generate/templates/filters/has_return_type.js index 2d21a0e66..ca85b6e8b 100644 --- a/generate/templates/filters/has_return_type.js +++ b/generate/templates/filters/has_return_type.js @@ -1,4 +1,4 @@ -module.exports = function(functionInfo) { +module.exports = function (functionInfo) { if (functionInfo.return) { return functionInfo.return.cType != "void" || functionInfo.return.isErrorCode; } diff --git a/generate/templates/filters/has_return_value.js b/generate/templates/filters/has_return_value.js index bbe371808..03ee6b755 100644 --- a/generate/templates/filters/has_return_value.js +++ b/generate/templates/filters/has_return_value.js @@ -1,8 +1,6 @@ -module.exports = function(fn) { - if (fn.return - && !fn.return.isErrorCode - && fn.return.cType != "void") { - return true +module.exports = function (fn) { + if (fn.return && !fn.return.isErrorCode && fn.return.cType != "void") { + return true; } return false; diff --git a/generate/templates/filters/is_array_type.js b/generate/templates/filters/is_array_type.js index d633d9e40..e8bd4d596 100644 --- a/generate/templates/filters/is_array_type.js +++ b/generate/templates/filters/is_array_type.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return /\s\[\d+\]\s*/.test(cType); }; diff --git a/generate/templates/filters/is_double_pointer.js b/generate/templates/filters/is_double_pointer.js index 9d1246ab4..8cdcb7228 100644 --- a/generate/templates/filters/is_double_pointer.js +++ b/generate/templates/filters/is_double_pointer.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return /\s*\*\*\s*/.test(cType); }; diff --git a/generate/templates/filters/is_fixed_length_string.js b/generate/templates/filters/is_fixed_length_string.js index a2baa43bf..48fe4c4c5 100644 --- a/generate/templates/filters/is_fixed_length_string.js +++ b/generate/templates/filters/is_fixed_length_string.js @@ -1,3 +1,3 @@ -module.exports = function(field) { +module.exports = function (field) { return field.cppClassName == "String" && field.size; }; diff --git a/generate/templates/filters/is_oid.js b/generate/templates/filters/is_oid.js index 1d13f700f..348891b4f 100644 --- a/generate/templates/filters/is_oid.js +++ b/generate/templates/filters/is_oid.js @@ -1,3 +1,3 @@ -module.exports = function(arg) { +module.exports = function (arg) { return arg.cppClassName == "GitOid" && !arg.isSelf && !arg.isReturn; }; diff --git a/generate/templates/filters/is_payload.js b/generate/templates/filters/is_payload.js index 510cec95e..05ae3a5c5 100644 --- a/generate/templates/filters/is_payload.js +++ b/generate/templates/filters/is_payload.js @@ -1,3 +1,3 @@ -module.exports = function(field) { - return field.name == 'payload' || field.payload || field.payloadFor; +module.exports = function (field) { + return field.name == "payload" || field.payload || field.payloadFor; }; diff --git a/generate/templates/filters/is_pointer.js b/generate/templates/filters/is_pointer.js index a5dbb053e..616dcdfdb 100644 --- a/generate/templates/filters/is_pointer.js +++ b/generate/templates/filters/is_pointer.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return /\s*\*\s*/.test(cType); }; diff --git a/generate/templates/filters/is_v8_value.js b/generate/templates/filters/is_v8_value.js index f773ff6a2..e9e7c1800 100644 --- a/generate/templates/filters/is_v8_value.js +++ b/generate/templates/filters/is_v8_value.js @@ -1,14 +1,5 @@ -var v8 = [ - "Boolean", - "Number", - "String", - "Integer", - "Int32", - "Uint32", - "Date", - "Function" -]; +var v8 = ["Boolean", "Number", "String", "Integer", "Int32", "Uint32", "Date", "Function"]; -module.exports = function(cppClassName) { +module.exports = function (cppClassName) { return v8.indexOf(cppClassName) > -1; }; diff --git a/generate/templates/filters/js_args_count.js b/generate/templates/filters/js_args_count.js index 17a56a1c1..4d4cd2b15 100644 --- a/generate/templates/filters/js_args_count.js +++ b/generate/templates/filters/js_args_count.js @@ -1,12 +1,11 @@ -module.exports = function(args) { - var cArg, - jsArg; +module.exports = function (args) { + var cArg, jsArg; if (!args) { return 0; } - for(cArg = 0, jsArg = 0; cArg < args.length; cArg++) { + for (cArg = 0, jsArg = 0; cArg < args.length; cArg++) { var arg = args[cArg]; if (!arg.isReturn && !arg.isSelf) { diff --git a/generate/templates/filters/or.js b/generate/templates/filters/or.js index fe02c2a87..47e4e4ffc 100644 --- a/generate/templates/filters/or.js +++ b/generate/templates/filters/or.js @@ -1,3 +1,3 @@ -module.exports = function(value, other) { +module.exports = function (value, other) { return value || other; }; diff --git a/generate/templates/filters/payload_for.js b/generate/templates/filters/payload_for.js index 412cf6123..1ffe62bdd 100644 --- a/generate/templates/filters/payload_for.js +++ b/generate/templates/filters/payload_for.js @@ -1,4 +1,4 @@ -module.exports = function(fields, payloadForField) { +module.exports = function (fields, payloadForField) { fields = fields || []; var result = fields.filter(function (field) { @@ -7,8 +7,7 @@ module.exports = function(fields, payloadForField) { if (result.length > 0) { return result[0].name; - } - else { + } else { return ""; } }; diff --git a/generate/templates/filters/replace.js b/generate/templates/filters/replace.js index 15ed9c71f..16a1e8594 100644 --- a/generate/templates/filters/replace.js +++ b/generate/templates/filters/replace.js @@ -1,3 +1,3 @@ -module.exports = function(value, find, replace) { +module.exports = function (value, find, replace) { return value.replace(find, replace); }; diff --git a/generate/templates/filters/returns_count.js b/generate/templates/filters/returns_count.js index 9ba92aec4..99b692a50 100644 --- a/generate/templates/filters/returns_count.js +++ b/generate/templates/filters/returns_count.js @@ -1,13 +1,10 @@ -module.exports = function(fn) { +module.exports = function (fn) { var args = fn.args || []; var result = args.reduce(function (currentValue, arg) { return currentValue + (arg.isReturn ? 1 : 0); }, 0); - if (!result - && fn.return - && !fn.return.isErrorCode - && fn.return.cType != "void") { + if (!result && fn.return && !fn.return.isErrorCode && fn.return.cType != "void") { result = 1; } diff --git a/generate/templates/filters/returns_info.js b/generate/templates/filters/returns_info.js index 5f7bcdc08..3c52c4b5f 100644 --- a/generate/templates/filters/returns_info.js +++ b/generate/templates/filters/returns_info.js @@ -1,6 +1,6 @@ var isPointer = require("./is_pointer"); -module.exports = function(fn, argReturnsOnly, isAsync) { +module.exports = function (fn, argReturnsOnly, isAsync) { var result = []; var args = fn.args || []; @@ -12,7 +12,7 @@ module.exports = function(fn, argReturnsOnly, isAsync) { // any sort of string to argument index // in the template. var nameToArgIndex = {}; - var thisArgName = ''; + var thisArgName = ""; args.forEach(function (arg, index) { nameToArgIndex[arg.name] = index; if (arg.isSelf) { @@ -29,17 +29,14 @@ module.exports = function(fn, argReturnsOnly, isAsync) { return_info.isAsync = isAsync; return_info.parsedName = isAsync ? "baton->" + return_info.name : return_info.name; - return_info.isCppClassIntType = ~['Uint32', 'Int32'].indexOf(return_info.cppClassName); - return_info.needsDereference - = isAsync && - return_info.cppClassName == "Number" && - isPointer(return_info.cType); - return_info.parsedClassName = (return_info.cppClassName || '').toLowerCase() + "_t"; + return_info.isCppClassIntType = ~["Uint32", "Int32"].indexOf(return_info.cppClassName); + return_info.needsDereference = isAsync && return_info.cppClassName == "Number" && isPointer(return_info.cType); + return_info.parsedClassName = (return_info.cppClassName || "").toLowerCase() + "_t"; return_info.returnNameOrName = return_info.returnName || return_info.name; return_info.jsOrCppClassName = return_info.jsClassName || return_info.cppClassName; return_info.isOutParam = true; - return_info.hasOwner = !return_info.selfOwned && - !!(return_info.ownedBy || return_info.ownedByThis || return_info.ownerFn); + return_info.hasOwner = + !return_info.selfOwned && !!(return_info.ownedBy || return_info.ownedByThis || return_info.ownerFn); return_info.ownedByIndices = []; if (isAsync && return_info.ownedByThis) { @@ -53,24 +50,20 @@ module.exports = function(fn, argReturnsOnly, isAsync) { if (!isAsync && return_info.ownedBy) { return_info.ownedBy.forEach(function (argName) { return_info.ownedByIndices.push(nameToArgIndex[argName]); - }) + }); } result.push(return_info); }); - if (!result.length - && !argReturnsOnly - && fn.return - && !fn.return.isErrorCode - && fn.return.cType != "void") { + if (!result.length && !argReturnsOnly && fn.return && !fn.return.isErrorCode && fn.return.cType != "void") { var return_info = {}; return_info.__proto__ = fn.return; return_info.isAsync = isAsync; - return_info.hasOwner = !return_info.selfOwned && - !!(return_info.ownedBy || return_info.ownedByThis || return_info.ownerFn); + return_info.hasOwner = + !return_info.selfOwned && !!(return_info.ownedBy || return_info.ownedByThis || return_info.ownerFn); return_info.ownedByIndices = []; return_info.ownedBy = return_info.ownedBy || []; @@ -89,14 +82,13 @@ module.exports = function(fn, argReturnsOnly, isAsync) { } else { return_info.parsedName = "result"; } - return_info.isCppClassIntType = ~['Uint32', 'Int32'].indexOf(return_info.cppClassName); - return_info.parsedClassName = (return_info.cppClassName || '').toLowerCase() + "_t"; + return_info.isCppClassIntType = ~["Uint32", "Int32"].indexOf(return_info.cppClassName); + return_info.parsedClassName = (return_info.cppClassName || "").toLowerCase() + "_t"; return_info.returnNameOrName = return_info.returnName || return_info.name; return_info.jsOrCppClassName = return_info.jsClassName || return_info.cppClassName; result.push(return_info); } - return result; }; diff --git a/generate/templates/filters/subtract.js b/generate/templates/filters/subtract.js index 6329f2e2c..646592bb8 100644 --- a/generate/templates/filters/subtract.js +++ b/generate/templates/filters/subtract.js @@ -1,3 +1,3 @@ -module.exports = function(value, other) { +module.exports = function (value, other) { return value - other; }; diff --git a/generate/templates/filters/this_info.js b/generate/templates/filters/this_info.js index e5d57520a..0c8ee475b 100644 --- a/generate/templates/filters/this_info.js +++ b/generate/templates/filters/this_info.js @@ -1,5 +1,5 @@ -module.exports = function(args, fieldToRetrieve) { - const thisArg = args.find(arg => arg.isSelf); +module.exports = function (args, fieldToRetrieve) { + const thisArg = args.find((arg) => arg.isSelf); if (thisArg) { return thisArg[fieldToRetrieve]; } diff --git a/generate/templates/filters/title_case.js b/generate/templates/filters/title_case.js index 8669c04fb..14cf70917 100644 --- a/generate/templates/filters/title_case.js +++ b/generate/templates/filters/title_case.js @@ -1,9 +1,12 @@ -module.exports = function(str) { - return str.split(/_|\//).map(function(val) { - if (val.length) { - return val[0].toUpperCase() + val.slice(1); - } +module.exports = function (str) { + return str + .split(/_|\//) + .map(function (val) { + if (val.length) { + return val[0].toUpperCase() + val.slice(1); + } - return val; - }).join(""); + return val; + }) + .join(""); }; diff --git a/generate/templates/filters/to_bool.js b/generate/templates/filters/to_bool.js index dd6063f28..3c368b208 100644 --- a/generate/templates/filters/to_bool.js +++ b/generate/templates/filters/to_bool.js @@ -1,3 +1,3 @@ -module.exports = function(value) { +module.exports = function (value) { return !!value; }; diff --git a/generate/templates/filters/to_size_of_array.js b/generate/templates/filters/to_size_of_array.js index b56e9315f..6f7b874c2 100644 --- a/generate/templates/filters/to_size_of_array.js +++ b/generate/templates/filters/to_size_of_array.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return /\s\[(\d+)\]\s*/.exec(cType)[1]; }; diff --git a/generate/templates/filters/un_pointer.js b/generate/templates/filters/un_pointer.js index 99382f36f..92edf3126 100644 --- a/generate/templates/filters/un_pointer.js +++ b/generate/templates/filters/un_pointer.js @@ -1,3 +1,3 @@ -module.exports = function(cType) { +module.exports = function (cType) { return cType.replace(/\s*\*\s*$/, ""); }; diff --git a/generate/templates/filters/unsigned.js b/generate/templates/filters/unsigned.js index a46078331..1cb49f74a 100644 --- a/generate/templates/filters/unsigned.js +++ b/generate/templates/filters/unsigned.js @@ -1,3 +1,3 @@ -module.exports = function(value) { +module.exports = function (value) { return value < 0 ? 0 : value; }; diff --git a/generate/templates/filters/upper.js b/generate/templates/filters/upper.js index bf0aa534b..2248e5f1f 100644 --- a/generate/templates/filters/upper.js +++ b/generate/templates/filters/upper.js @@ -1,3 +1,3 @@ -module.exports = function(value) { +module.exports = function (value) { return value.toUpperCase(); }; diff --git a/guides/README.md b/guides/README.md index 3fda23c7b..03ebcd1af 100644 --- a/guides/README.md +++ b/guides/README.md @@ -13,7 +13,7 @@ description: Learning NodeGit - [From source](install/from-source) - [Electron](install/electron/) -*** +--- ## Repository @@ -22,7 +22,7 @@ description: Learning NodeGit - [Opening](repositories/) - [Initializing](repositories/initializing) -*** +--- ## Cloning diff --git a/guides/cloning/README.md b/guides/cloning/README.md index 8b8390f23..f326450ce 100644 --- a/guides/cloning/README.md +++ b/guides/cloning/README.md @@ -10,10 +10,9 @@ first.** [Return to all guides](../) -* * * +--- -HTTP/HTTPS ----------- +## HTTP/HTTPS This guide explains how to clone a repository, and in the case of failure, attempt to open the existing path. @@ -25,13 +24,13 @@ attempt to open the existing path. In the guides directory, we like to keep our NodeGit relative to the project root. -``` javascript +```javascript var NodeGit = require("../../../"); ``` However, in your project you will most likely be using the following command: -``` javascript +```javascript var NodeGit = require("nodegit"); ``` @@ -43,7 +42,7 @@ In this example we're going to clone one of our test repositories from GitHub. You could easily substitute this with any valid http or https Git repository URL. -``` javascript +```javascript var cloneURL = "https://github.com/nodegit/test"; ``` @@ -52,12 +51,12 @@ var cloneURL = "https://github.com/nodegit/test"; The second argument to the `clone` method is a path. Ideally your application will clone a repository into the same folder path -regardless of how or where you execute it from. Paths are relative to the +regardless of how or where you execute it from. Paths are relative to the current working directory in NodeGit, so you will need to normalize it first. This is very simple in Node: -``` javascript +```javascript var localPath = require("path").join(__dirname, "tmp"); ``` @@ -68,7 +67,7 @@ or where you execute it from. The third argument to the `clone` method is an optional simple object. -``` javascript +```javascript var cloneOptions = {}; ``` @@ -77,16 +76,18 @@ var cloneOptions = {}; #### GitHub certificate issue in OS X Unfortunately in OS X there is a problem where libgit2 is unable to look up -GitHub certificates correctly. In order to bypass this problem, we're going +GitHub certificates correctly. In order to bypass this problem, we're going to passthrough the certificate check. -*Note: this is not a problem with Windows or Linux* +_Note: this is not a problem with Windows or Linux_ -``` javascript +```javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; } - } + certificateCheck: function () { + return 0; + }, + }, }; ``` @@ -95,23 +96,23 @@ cloneOptions.fetchOpts = { You can easily invoke our top-level Clone as a function passing along the three aforementioned arguments. -``` javascript +```javascript var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); ``` -Notice how we store the return value from `Git.Clone`. This is a +Notice how we store the return value from `Git.Clone`. This is a [Promise](https://www.promisejs.org/) to represent the asynchronous operation. It offers finer control flow by allowing us to capture errors and fallback if there is a clone failure. ### Handling clone failure -A naive way to handle a clone failure is to try opening the same path. Clones -will most commonly fail when the directory already exists. We can define +A naive way to handle a clone failure is to try opening the same path. Clones +will most commonly fail when the directory already exists. We can define a function to attempt opening in this case. -``` javascript -var errorAndAttemptOpen = function() { +```javascript +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; ``` @@ -123,10 +124,9 @@ This will be called as part of the Promise resolution in the final step. Lastly in our clone operation, we'll assemble a Promise chain to handle errors and work with the `Git.Repository` instance result. -``` javascript -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +```javascript +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); ``` diff --git a/guides/cloning/gh-two-factor/README.md b/guides/cloning/gh-two-factor/README.md index a6d24d40d..f07f6d26b 100644 --- a/guides/cloning/gh-two-factor/README.md +++ b/guides/cloning/gh-two-factor/README.md @@ -10,10 +10,9 @@ first.** [Return to all guides](../../) -* * * +--- -GitHub Two Factor Auth ----------------------- +## GitHub Two Factor Auth This guide explains how to clone a repository, and in the case of failure, attempt to open the existing path. @@ -25,33 +24,31 @@ attempt to open the existing path. In the guides directory, we like to keep our NodeGit relative to the project root. -``` javascript +```javascript var NodeGit = require("../../../"); ``` However, in your project you will most likely be using the following command: -``` javascript +```javascript var NodeGit = require("nodegit"); ``` ### GitHub Personal OAuth Token Before you can clone a repository, you'll need a GitHub OAuth application -token. You can find more information on generating one here: +token. You can find more information on generating one here: -[Creating an access token for command-line use]( -https://help.github.com/articles/creating-an-access-token-for-command-line-use/ -) +[Creating an access token for command-line use](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) Once you have this token you'll assign it to a variable in your project, for this example, we'll call it `GITHUB_TOKEN`. -``` javascript +```javascript var GITHUB_TOKEN = ""; ``` -Keep this variable a secret. If you accidentally commit this key to a public +Keep this variable a secret. If you accidentally commit this key to a public GitHub repository they will immediately revoke it. ### Clone URL @@ -59,9 +56,9 @@ GitHub repository they will immediately revoke it. The first argument to the `clone` method is a URL. In this example we're going to clone one of our private test repositories from -GitHub. This must be an `https` protocol URL for the clone to work. +GitHub. This must be an `https` protocol URL for the clone to work. -``` javascript +```javascript var cloneURL = "https://github.com/nodegit/private"; ``` @@ -70,12 +67,12 @@ var cloneURL = "https://github.com/nodegit/private"; The second argument to the `clone` method is a path. Ideally your application will clone a repository into the same folder path -regardless of how or where you execute it from. Paths are relative to the +regardless of how or where you execute it from. Paths are relative to the current working directory in NodeGit, so you will need to normalize it first. This is very simple in Node: -``` javascript +```javascript var localPath = require("path").join(__dirname, "tmp"); ``` @@ -86,23 +83,25 @@ or where you execute it from. The third argument to the `clone` method is an optional simple object. -``` javascript +```javascript var cloneOptions = {}; ``` #### GitHub certificate issue in OS X Unfortunately in OS X there is a problem where libgit2 is unable to look up -GitHub certificates correctly. In order to bypass this problem, we're going +GitHub certificates correctly. In order to bypass this problem, we're going to passthrough the certificate check. -*Note: this is not a problem with Windows or Linux* +_Note: this is not a problem with Windows or Linux_ -``` javascript +```javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; } - } + certificateCheck: function () { + return 0; + }, + }, }; ``` @@ -116,14 +115,16 @@ respond back with the OAuth token. The `fetchOpts` object now looks like this: -``` javascript +```javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; }, - credentials: function() { + certificateCheck: function () { + return 0; + }, + credentials: function () { return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic"); - } - } + }, + }, }; ``` @@ -132,23 +133,23 @@ cloneOptions.fetchOpts = { You can easily invoke our top-level Clone as a function passing along the three aforementioned arguments. -``` javascript +```javascript var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); ``` -Notice how we store the return value from `Git.Clone`. This is a +Notice how we store the return value from `Git.Clone`. This is a [Promise](https://www.promisejs.org/) to represent the asynchronous operation. It offers finer control flow by allowing us to capture errors and fallback if there is a clone failure. ### Handling clone failure -A naive way to handle a clone failure is to try opening the same path. Clones -will most commonly fail when the directory already exists. We can define +A naive way to handle a clone failure is to try opening the same path. Clones +will most commonly fail when the directory already exists. We can define a function to attempt opening in this case. -``` javascript -var errorAndAttemptOpen = function() { +```javascript +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; ``` @@ -160,10 +161,9 @@ This will be called as part of the Promise resolution in the final step. Lastly in our clone operation, we'll assemble a Promise chain to handle errors and work with the `Git.Repository` instance result. -``` javascript -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +```javascript +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); ``` diff --git a/guides/cloning/gh-two-factor/index.js b/guides/cloning/gh-two-factor/index.js index 945aac351..647e80597 100644 --- a/guides/cloning/gh-two-factor/index.js +++ b/guides/cloning/gh-two-factor/index.js @@ -22,11 +22,13 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; }, - credentials: function() { + certificateCheck: function () { + return 0; + }, + credentials: function () { return NodeGit.Credential.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic"); - } - } + }, + }, }; // Invoke the clone operation and store the returned Promise. @@ -34,14 +36,13 @@ var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); // If the repository already exists, the clone above will fail. You can simply // open the repository in this case to continue execution. -var errorAndAttemptOpen = function() { +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; // Once the repository has been cloned or opened, you can work with a returned // `Git.Repository` instance. -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); diff --git a/guides/cloning/index.js b/guides/cloning/index.js index ec455fbd7..ff8312a63 100644 --- a/guides/cloning/index.js +++ b/guides/cloning/index.js @@ -18,8 +18,10 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; } - } + certificateCheck: function () { + return 0; + }, + }, }; // Invoke the clone operation and store the returned Promise. @@ -27,14 +29,13 @@ var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); // If the repository already exists, the clone above will fail. You can simply // open the repository in this case to continue execution. -var errorAndAttemptOpen = function() { +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; // Once the repository has been cloned or opened, you can work with a returned // `Git.Repository` instance. -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); diff --git a/guides/cloning/ssh-with-agent/README.md b/guides/cloning/ssh-with-agent/README.md index 46a72b823..e43d62399 100644 --- a/guides/cloning/ssh-with-agent/README.md +++ b/guides/cloning/ssh-with-agent/README.md @@ -10,10 +10,9 @@ first.** [Return to all guides](../../) -* * * +--- -SSH w/ Agent ------------- +## SSH w/ Agent This guide explains how to clone a repository, and in the case of failure, attempt to open the existing path. @@ -25,13 +24,13 @@ attempt to open the existing path. In the guides directory, we like to keep our NodeGit relative to the project root. -``` javascript +```javascript var NodeGit = require("../../../"); ``` However, in your project you will most likely be using the following command: -``` javascript +```javascript var NodeGit = require("nodegit"); ``` @@ -43,7 +42,7 @@ In this example we're going to clone one of our test repositories from GitHub. You could easily substitute this with any valid Git repository that is accessible by SSH. -``` javascript +```javascript var cloneURL = "git@github.com:nodegit/test"; ``` @@ -52,12 +51,12 @@ var cloneURL = "git@github.com:nodegit/test"; The second argument to the `clone` method is a path. Ideally your application will clone a repository into the same folder path -regardless of how or where you execute it from. Paths are relative to the +regardless of how or where you execute it from. Paths are relative to the current working directory in NodeGit, so you will need to normalize it first. This is very simple in Node: -``` javascript +```javascript var localPath = require("path").join(__dirname, "tmp"); ``` @@ -68,23 +67,25 @@ or where you execute it from. The third argument to the `clone` method is an optional simple object. -``` javascript +```javascript var cloneOptions = {}; ``` #### GitHub certificate issue in OS X Unfortunately in OS X there is a problem where libgit2 is unable to look up -GitHub certificates correctly. In order to bypass this problem, we're going +GitHub certificates correctly. In order to bypass this problem, we're going to passthrough the certificate check. -*Note: this is not a problem with Windows or Linux* +_Note: this is not a problem with Windows or Linux_ -``` javascript +```javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; } - } + certificateCheck: function () { + return 0; + }, + }, }; ``` @@ -94,49 +95,49 @@ In order to authorize the clone operation, we'll need to respond to a low-level callback that expects credentials to be passed. This function will be attached below the above `certificateCheck`, and will -respond back with the credentials from the agent. You'll notice we handle +respond back with the credentials from the agent. You'll notice we handle the second argument passed to credentials, `userName`. The `fetchOpts` object now looks like this: -``` javascript +```javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; }, - credentials: function(url, userName) { + certificateCheck: function () { + return 0; + }, + credentials: function (url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); - } - } + }, + }, }; ``` There are many other methods you can use to authorize the SSH connection without -using an agent. For now they are documented in the [unit tests]( -https://github.com/nodegit/nodegit/blob/master/test/tests/clone.js -). +using an agent. For now they are documented in the [unit tests](https://github.com/nodegit/nodegit/blob/master/test/tests/clone.js). ### Invoking the clone method You can easily invoke our top-level Clone as a function passing along the three aforementioned arguments. -``` javascript +```javascript var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); ``` -Notice how we store the return value from `Git.Clone`. This is a +Notice how we store the return value from `Git.Clone`. This is a [Promise](https://www.promisejs.org/) to represent the asynchronous operation. It offers finer control flow by allowing us to capture errors and fallback if there is a clone failure. ### Handling clone failure -A naive way to handle a clone failure is to try opening the same path. Clones -will most commonly fail when the directory already exists. We can define +A naive way to handle a clone failure is to try opening the same path. Clones +will most commonly fail when the directory already exists. We can define a function to attempt opening in this case. -``` javascript -var errorAndAttemptOpen = function() { +```javascript +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; ``` @@ -148,10 +149,9 @@ This will be called as part of the Promise resolution in the final step. Lastly in our clone operation, we'll assemble a Promise chain to handle errors and work with the `Git.Repository` instance result. -``` javascript -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +```javascript +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); ``` diff --git a/guides/cloning/ssh-with-agent/index.js b/guides/cloning/ssh-with-agent/index.js index 655f07e24..fb9c33332 100644 --- a/guides/cloning/ssh-with-agent/index.js +++ b/guides/cloning/ssh-with-agent/index.js @@ -17,15 +17,17 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 0; }, + certificateCheck: function () { + return 0; + }, // Credentials are passed two arguments, url and username. We forward the // `userName` argument to the `sshKeyFromAgent` function to validate // authentication. - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); - } - } + }, + }, }; // Invoke the clone operation and store the returned Promise. @@ -33,14 +35,13 @@ var cloneRepository = NodeGit.Clone(cloneURL, localPath, cloneOptions); // If the repository already exists, the clone above will fail. You can simply // open the repository in this case to continue execution. -var errorAndAttemptOpen = function() { +var errorAndAttemptOpen = function () { return NodeGit.Repository.open(localPath); }; // Once the repository has been cloned or opened, you can work with a returned // `Git.Repository` instance. -cloneRepository.catch(errorAndAttemptOpen) - .then(function(repository) { - // Access any repository methods here. - console.log("Is the repository bare? %s", Boolean(repository.isBare())); - }); +cloneRepository.catch(errorAndAttemptOpen).then(function (repository) { + // Access any repository methods here. + console.log("Is the repository bare? %s", Boolean(repository.isBare())); +}); diff --git a/guides/install/README.md b/guides/install/README.md index 1cb727a1d..e056256fc 100644 --- a/guides/install/README.md +++ b/guides/install/README.md @@ -7,18 +7,16 @@ description: How to install NodeGit [Return to all guides](../) -* * * +--- -From NPM -------------------------------- +## From NPM To install from the NPM repository you can issue the following command: -``` bash +```bash npm install nodegit ``` -From GitHub -------------------------------------- +## From GitHub Check out our [build from source](./from-source) guides. diff --git a/guides/install/electron/README.md b/guides/install/electron/README.md index 99e67084a..6d1c89b89 100644 --- a/guides/install/electron/README.md +++ b/guides/install/electron/README.md @@ -7,14 +7,14 @@ description: How to install NodeGit with Electron [Return to all guides](../../) -* * * +--- -Install for Electron ----------------------- +## Install for Electron Please see the official electron docs [here](https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md) For a slightly simpler version of the first method, use an `.npmrc` file. For example if you have an Electron app that's targeting version 1.2.8 your .npmrc file would look something like: + ``` runtime = electron target = 1.2.8 @@ -22,4 +22,4 @@ target_arch = x64 disturl = https://atom.io/download/atom-shell ``` -*NOTE: We try to provide prebuilt binaries for electron, but we don't always have them available for every version. If prebuilts are not available and you have trouble with local compilation, visit our [building guides](../from-source) for help* +_NOTE: We try to provide prebuilt binaries for electron, but we don't always have them available for every version. If prebuilts are not available and you have trouble with local compilation, visit our [building guides](../from-source) for help_ diff --git a/guides/install/from-source/README.md b/guides/install/from-source/README.md index eadd8306d..f1a6330a9 100644 --- a/guides/install/from-source/README.md +++ b/guides/install/from-source/README.md @@ -7,14 +7,13 @@ description: How to build NodeGit from source [Return to all guides](../../) -* * * +--- -Building from source --------------------- +## Building from source If you wish to help contribute to NodeGit it is useful to build locally. -``` bash +```bash # Fetch this project. git clone git://github.com/nodegit/nodegit.git @@ -27,29 +26,29 @@ npm install If you encounter errors, you most likely have not configured the dependencies correctly. -### Installing dependencies: ### +### Installing dependencies: -#### Mac OS X #### +#### Mac OS X - [Install XCode Command Line Tools](http://railsapps.github.io/xcode-command-line-tools.html) -#### Linux #### +#### Linux Using APT in Ubuntu: -``` bash +```bash sudo apt-get install build-essential ``` Using Pacman in Arch Linux: -``` bash +```bash sudo pacman -S base-devel ``` Note that GCC/G++ 4.7+ are required, as the library makes use of some c++11 std calls. -#### Windows #### +#### Windows - [Download and install Python 2](https://www.python.org/download/windows). - [Download and install VS Community](https://www.visualstudio.com/products/visual-studio-community-vs). @@ -57,14 +56,15 @@ Note that GCC/G++ 4.7+ are required, as the library makes use of some c++11 std You may have to add a build flag to the installation process to successfully install. Try first without, if the build fails, try again with the flag. -*Allegedly the order in which you install Visual Studio could trigger this error.* +_Allegedly the order in which you install Visual Studio could trigger this error._ -``` bash +```bash npm install nodegit --msvs_version=2013 # Or whatever version you've installed. ``` -### Electron and OpenSSL ### +### Electron and OpenSSL + A local version of OpenSSL is required when building for Electron on Windows and macOS. This is due to Electron using BoringSSL, as we are not able to link to it like we are OpenSSL in Node. Additionally, OpenSSL can be statically linked on Linux by setting the `NODEGIT_OPENSSL_STATIC_LINK` environment variable to `1`. `acquireOpenSSL.js` will attempt to download OpenSSL prebuilts from S3. If preferred, it can also be built locally by setting the environment variable `npm_config_openssl_bin_url=skip`. On macOS, this should Just Work(tm). On Windows, things are a little trickier. @@ -74,7 +74,8 @@ A local version of OpenSSL is required when building for Electron on Windows and Alternatively, you can provide your own OpenSSL binaries and headers. These can either go in `vendor/openssl` (e.g. `/vendor/openssl/{lib,bin,include}` should exist) or in an external directory located by `npm config set openssl_dir ` or the environment variable `npm_config_openssl_dir`. Additionally, you can `npm config set openssl_bin_url ` or the environment variable `npm_config_openssl_bin_url` to download and extract prebuilt binaries (only supports tar.gz files). `npm config set openssl_bin_sha256 ` or the environment variable `npm_config_openssl_bin_sha256` can be set to verify the download. -##### A note on environment variables in Windows ##### +##### A note on environment variables in Windows + In many of the npm scripts (and examples above), things are run like `BUILD_ONLY=true npm install`. This sets the `BUILD_ONLY` environment variable to true for the duration of that command. This doesn't work in windows, however @@ -84,7 +85,7 @@ So for the above example, you would run `cmd /C "set BUILD_ONLY=true && npm inst See here for more details: [SuperUser](http://superuser.com/questions/223104/setting-environment-variable-for-just-one-command-in-windows-cmd-exe). -### Debug build: ### +### Debug build: In order to track down possible bugs, you will need a debug build so you can get a backtrace with [gdb](http://www.gnu.org/software/gdb/) or diff --git a/guides/repositories/README.md b/guides/repositories/README.md index a436a24c9..e55cba3de 100644 --- a/guides/repositories/README.md +++ b/guides/repositories/README.md @@ -10,10 +10,9 @@ first.** [Return to all guides](../) -* * * +--- -Opening a Repository --------------------- +## Opening a Repository This guide explains how to open a repository, and how to work with errors in a promise chain @@ -25,13 +24,13 @@ promise chain In the guides directory, we like to keep our NodeGit relative to the project root. -``` javascript +```javascript var NodeGit = require("../../../"); ``` However, in your project you will most likely be using the following command: -``` javascript +```javascript var NodeGit = require("nodegit"); ``` @@ -41,13 +40,13 @@ The only argument to the `open` method is a path to the repo on disk. Here we are calculating that from our current directory using the `path` object from node. -``` javascript +```javascript var pathToRepo = require("path").resolve("../my-git-projects/my-project"); ``` You can also point it directly to a `.git` folder to open as well -``` javascript +```javascript var pathToRepo = require("path").resolve("../my-git-projects/my-project/.git"); ``` @@ -59,20 +58,20 @@ for the `.git` subdirectory Now that we have our path to the repo we wish to open we can do so by calling the `open` method on the `NodeGit.Repository` module -``` javascript +```javascript NodeGit.Repository.open(pathToRepo).then(function (repo) { // Inside of this function we have an open repo }); ``` -*NOTE: We use promises to perform operations in NodeGit. This allows the node event +\*NOTE: We use promises to perform operations in NodeGit. This allows the node event loop to keep cycling through while under the hood our wrapped libgit2 code is performing the actions we requested and we're not waiting for it. This allows our apps to remain responsive and performant. However if you're not used to promises then this can take some getting used to. If you need an introduction you can head over to https://www.promisejs.org/ for some -tutorials.* +tutorials.\* ### Handling errors @@ -84,14 +83,17 @@ You can do this through any of the following 3 ways. You can pass a second function parameter to the `.then` method that will have the reason why a promise failed in it's first argument. -``` javascript -NodeGit.Repository.open(pathToRepo).then(function (successfulResult) { - // This is the first function of the then which contains the successfully - // calculated result of the promise -}, function (reasonForFailure) { - // This is the second function of the then which contains the reason the - // promise failed -}); +```javascript +NodeGit.Repository.open(pathToRepo).then( + function (successfulResult) { + // This is the first function of the then which contains the successfully + // calculated result of the promise + }, + function (reasonForFailure) { + // This is the second function of the then which contains the reason the + // promise failed + } +); ``` #### Including a `.catch` in a chain @@ -99,14 +101,15 @@ NodeGit.Repository.open(pathToRepo).then(function (successfulResult) { You can also append a `.catch` to the end of a promise chain which will receive any promise failure that isn't previously caught -``` javascript -NodeGit.Repository.open(pathToRepo).then(function (successfulResult) { - // This is the first function of the then which contains the successfully - // calculated result of the promise -}) -.catch(function (reasonForFailure) { - // failure is handled here -}); +```javascript +NodeGit.Repository.open(pathToRepo) + .then(function (successfulResult) { + // This is the first function of the then which contains the successfully + // calculated result of the promise + }) + .catch(function (reasonForFailure) { + // failure is handled here + }); ``` #### Finishing a chain with `done` @@ -114,14 +117,15 @@ NodeGit.Repository.open(pathToRepo).then(function (successfulResult) { If you append a `.done` at the end of your chain, you will have any error that wasn't previously handled by the above 2 methods thrown. -``` javascript -NodeGit.Repository.open(pathToRepo).then(function (successfulResult) { - // This is the first function of the then which contains the successfully - // calculated result of the promise -}) -.done(function () { - // If we have a .done then the error will be thrown if there was an error that - // wasn't caught by either providing a 2nd function to the `.then` or a - // `.catch` function -}); +```javascript +NodeGit.Repository.open(pathToRepo) + .then(function (successfulResult) { + // This is the first function of the then which contains the successfully + // calculated result of the promise + }) + .done(function () { + // If we have a .done then the error will be thrown if there was an error that + // wasn't caught by either providing a 2nd function to the `.then` or a + // `.catch` function + }); ``` diff --git a/guides/repositories/index.js b/guides/repositories/index.js index db7ed64b5..7f4ecef74 100644 --- a/guides/repositories/index.js +++ b/guides/repositories/index.js @@ -11,29 +11,33 @@ var pathToRepo = require("path").resolve("../my-git-projects/my-project"); // In NodeGit we use Promises to make callbacks easier to deal with. // // For more information visit https://www.promisejs.org/ -NodeGit.Repository.open(pathToRepo).then(function (_repo) { - // In this function we have a repo object that we can perform git operations - // on. - // NOTE: Many NodeGit objects will appear as empty objects if inspected in - // the console. This is a known issue. You can track it's progress at - // https://github.com/nodegit/nodegit/issues/307 -}) -// Promises will swallow errors and not report them unless you have supplied -// a second function to the `.then` or end the chain with either a `.catch` or -// a `.done` -.then(function (_successfulResult) { - // This is the first function of the then which contains the successfully - // calculated result of the promise -}, function (_reasonForFailure) { - // This is the second function of the then which contains the reason the - // promise failed -}) -.catch(function (_reasonForFailure) { - // You can also provide a catch function which will contain the reason why - // any above promises that weren't handled have failed -}) -.done(function() { - // If we have a .done then the error will be thrown if there was an error that - // wasn't caught by either providing a 2nd function to the `.then` or a - // `.catch` function -}); +NodeGit.Repository.open(pathToRepo) + .then(function (_repo) { + // In this function we have a repo object that we can perform git operations + // on. + // NOTE: Many NodeGit objects will appear as empty objects if inspected in + // the console. This is a known issue. You can track it's progress at + // https://github.com/nodegit/nodegit/issues/307 + }) + // Promises will swallow errors and not report them unless you have supplied + // a second function to the `.then` or end the chain with either a `.catch` or + // a `.done` + .then( + function (_successfulResult) { + // This is the first function of the then which contains the successfully + // calculated result of the promise + }, + function (_reasonForFailure) { + // This is the second function of the then which contains the reason the + // promise failed + } + ) + .catch(function (_reasonForFailure) { + // You can also provide a catch function which will contain the reason why + // any above promises that weren't handled have failed + }) + .done(function () { + // If we have a .done then the error will be thrown if there was an error that + // wasn't caught by either providing a 2nd function to the `.then` or a + // `.catch` function + }); diff --git a/guides/repositories/initializing/README.md b/guides/repositories/initializing/README.md index 90e5090d4..327509828 100644 --- a/guides/repositories/initializing/README.md +++ b/guides/repositories/initializing/README.md @@ -10,10 +10,9 @@ first.** [Return to all guides](../../) -* * * +--- -Initializing a Repository -------------------------- +## Initializing a Repository This guide explains how to create a new repository. @@ -24,13 +23,13 @@ This guide explains how to create a new repository. In the guides directory, we like to keep our NodeGit relative to the project root. -``` javascript +```javascript var NodeGit = require("../../../"); ``` However, in your project you will most likely be using the following command: -``` javascript +```javascript var NodeGit = require("nodegit"); ``` @@ -40,23 +39,20 @@ There are 2 arguments to the `init` method, a path to initialize the repo in and whether or not to make a `.git` subfolder in that directory or use the passed in directory as the `.git` folder itself. - -``` javascript +```javascript var pathToRepo = require("path").resolve("../my-git-projects/my-project"); var isBare = 0; // lets create a .git subfolder ``` - ### Initialize the Repo Now that we have our arguments we can call the `init` method on the `NodeGit.Repository` module to create the repo. -``` javascript +```javascript NodeGit.Repository.init(pathToRepo, isBare).then(function (repo) { // In this function we have a repo object that we can perform git operations // on. - // Note that with a new repository many functions will fail until there is // an initial commit. }); diff --git a/guides/repositories/initializing/index.js b/guides/repositories/initializing/index.js index 6a3e26ffa..0b340eed7 100644 --- a/guides/repositories/initializing/index.js +++ b/guides/repositories/initializing/index.js @@ -16,14 +16,14 @@ var isBare = 0; // In NodeGit we use Promises to make callbacks easier to deal with. // // For more information visit https://www.promisejs.org/ -NodeGit.Repository.init(pathToRepo, isBare).then(function (_repo) { - // In this function we have a repo object that we can perform git operations - // on. - - // Note that with a new repository many functions will fail until there is - // an initial commit. -}) -.catch(function (_reasonForFailure) { - // If the repo cannot be created for any reason we can handle that case here. - // NodeGit won't init a repo over a pre-existing repo. -}); +NodeGit.Repository.init(pathToRepo, isBare) + .then(function (_repo) { + // In this function we have a repo object that we can perform git operations + // on. + // Note that with a new repository many functions will fail until there is + // an initial commit. + }) + .catch(function (_reasonForFailure) { + // If the repo cannot be created for any reason we can handle that case here. + // NodeGit won't init a repo over a pre-existing repo. + }); diff --git a/lib/README.md b/lib/README.md index 3d12686af..ae312034e 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,3 +1,3 @@ ## /lib - Contains javascript extensions for the generated NodeGit modules. Any additional behavior on top of the standard libgit2 behavior will be found here. +Contains javascript extensions for the generated NodeGit modules. Any additional behavior on top of the standard libgit2 behavior will be found here. diff --git a/lib/attr.js b/lib/attr.js index 8ecdd5eee..ad9946c86 100644 --- a/lib/attr.js +++ b/lib/attr.js @@ -6,7 +6,7 @@ var DEPRECATED_STATES = { UNSPECIFIED_T: "UNSPECIFIED", TRUE_T: "TRUE", FALSE_T: "FALSE", - VALUE_T: "STRING" + VALUE_T: "STRING", }; Object.keys(DEPRECATED_STATES).forEach((key) => { @@ -15,6 +15,6 @@ Object.keys(DEPRECATED_STATES).forEach((key) => { get: util.deprecate( () => NodeGit.Attr.VALUE[newKey], `Use NodeGit.Attr.VALUE.${newKey} instead of NodeGit.Attr.STATES.${key}.` - ) + ), }); }); diff --git a/lib/blob.js b/lib/blob.js index be6331248..2620b7323 100644 --- a/lib/blob.js +++ b/lib/blob.js @@ -7,29 +7,30 @@ var TreeEntry = NodeGit.TreeEntry; var _filteredContent = Blob.filteredContent; /** -* Retrieves the blob pointed to by the oid -* @async -* @param {Repository} repo The repo that the blob lives in -* @param {String|Oid|Blob} id The blob to lookup -* @return {Blob} -*/ + * Retrieves the blob pointed to by the oid. + * + * @param {Repository} repo The repo that the blob lives in. + * @param {string | Oid | Blob} id The blob to lookup. + * @returns {Blob} + * @async + */ Blob.lookup = LookupWrapper(Blob); /** * Retrieve the content of the Blob. * - * @return {Buffer} Contents as a buffer. + * @returns {Buffer} Contents. As a buffer. */ -Blob.prototype.content = function() { +Blob.prototype.content = function () { return this.rawcontent().toBuffer(this.rawsize()); }; /** * Retrieve the Blob's type. * - * @return {Number} The filemode of the blob. + * @returns {number} The. Filemode of the blob. */ -Blob.prototype.filemode = function() { +Blob.prototype.filemode = function () { var FileMode = TreeEntry.FILEMODE; return this.isBinary() ? FileMode.EXECUTABLE : FileMode.BLOB; @@ -38,14 +39,13 @@ Blob.prototype.filemode = function() { /** * Retrieve the Blob's content as String. * - * @return {String} Contents as a string. + * @returns {string} Contents. As a string. */ -Blob.prototype.toString = function() { +Blob.prototype.toString = function () { return this.content().toString(); }; Blob.filteredContent = util.deprecate( _filteredContent, - "NodeGit.Blob.filteredContent is deprecated" + - " use NodeGit.Blob.prototype.filter instead." + "NodeGit.Blob.filteredContent is deprecated" + " use NodeGit.Blob.prototype.filter instead." ); diff --git a/lib/branch.js b/lib/branch.js index bc4b23443..eb224b309 100644 --- a/lib/branch.js +++ b/lib/branch.js @@ -6,14 +6,13 @@ var _remoteName = Branch.remoteName; /** * Retrieve the Branch's Remote Name as a String. * - * @async - * @param {Repository} repo The repo to get the remote name from - * @param {String} the refname of the branch - * @return {String} remote name as a string. + * @param {Repository} repo The repo to get the remote name from. + * @param {string} the Refname of the branch. + * @returns {string} Remote. Name as a string. + * @async */ -Branch.remoteName = function(repo, remoteRef) { - return _remoteName.call(this, repo, remoteRef) - .then(function(remoteNameBuffer) { - return remoteNameBuffer.toString(); - }); +Branch.remoteName = function (repo, remoteRef) { + return _remoteName.call(this, repo, remoteRef).then(function (remoteNameBuffer) { + return remoteNameBuffer.toString(); + }); }; diff --git a/lib/buf.js b/lib/buf.js index aec6ba693..8669796e4 100644 --- a/lib/buf.js +++ b/lib/buf.js @@ -9,35 +9,21 @@ var _containsNul = Buf.prototype.containsNul; /** * Sets the content of a GitBuf to a string. - * @param {string} The utf8 value to set in the buffer. - * The string will be null terminated. + * + * @param {string} The Utf8 value to set in the buffer. + * The string will be null terminated. */ -var _setString = function(content) { +var _setString = function (content) { const buf = Buffer.from(content + "\0", "utf8"); this.set(buf, buf.length); }; -Buf.prototype.set = util.deprecate( - _set, - "NodeGit.Buf.prototype.set is deprecated." -); +Buf.prototype.set = util.deprecate(_set, "NodeGit.Buf.prototype.set is deprecated."); -Buf.prototype.setString = util.deprecate( - _setString, - "NodeGit.Buf.prototype.setString is deprecated." -); +Buf.prototype.setString = util.deprecate(_setString, "NodeGit.Buf.prototype.setString is deprecated."); -Buf.prototype.grow = util.deprecate( - _grow, - "NodeGit.Buf.prototype.grow is deprecated." -); +Buf.prototype.grow = util.deprecate(_grow, "NodeGit.Buf.prototype.grow is deprecated."); -Buf.prototype.isBinary = util.deprecate( - _isBinary, - "NodeGit.Buf.prototype.isBinary is deprecated." -); +Buf.prototype.isBinary = util.deprecate(_isBinary, "NodeGit.Buf.prototype.isBinary is deprecated."); -Buf.prototype.containsNul = util.deprecate( - _containsNul, - "NodeGit.Buf.prototype.containsNul is deprecated." -); \ No newline at end of file +Buf.prototype.containsNul = util.deprecate(_containsNul, "NodeGit.Buf.prototype.containsNul is deprecated."); diff --git a/lib/commit.js b/lib/commit.js index 048a98b9b..a8aa7f760 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -8,76 +8,70 @@ var _amend = Commit.prototype.amend; var _parent = Commit.prototype.parent; /** - * Retrieves the commit pointed to by the oid + * Retrieves the commit pointed to by the oid. + * + * @param {Repository} repo The repo that the commit lives in. + * @param {string | Oid | Commit} id The commit to lookup. + * @returns {Commit} * @async - * @param {Repository} repo The repo that the commit lives in - * @param {String|Oid|Commit} id The commit to lookup - * @return {Commit} */ Commit.lookup = LookupWrapper(Commit); /** + * @param {number} n + * @returns {Commit} * @async - * @param {Number} n - * @return {Commit} */ -Commit.prototype.parent = function(n) { +Commit.prototype.parent = function (n) { var repo = this.repo; - return _parent.call(this, n).then(p => { + return _parent.call(this, n).then((p) => { p.repo = repo; return p; }); }; /** - * Amend a commit + * Amend a commit. + * + * @param {string} update_ref + * @param {Signature} author + * @param {Signature} committer + * @param {string} message_encoding + * @param {string} message + * @param {Tree | Oid} tree + * @returns {Oid} * @async - * @param {String} update_ref - * @param {Signature} author - * @param {Signature} committer - * @param {String} message_encoding - * @param {String} message - * @param {Tree|Oid} tree - * @return {Oid} */ -Commit.prototype.amend = function ( - updateRef, author, committer, message_encoding, message, tree) { - var repo = this.repo; - var _this = this; - var treePromise; - - if (tree instanceof NodeGit.Oid){ - treePromise = repo.getTree(tree); - } else { - treePromise = Promise.resolve(tree); - } +Commit.prototype.amend = function (updateRef, author, committer, message_encoding, message, tree) { + var repo = this.repo; + var _this = this; + var treePromise; - return treePromise - .then(function(treeObject){ - return _amend.call(_this, - updateRef, - author, - committer, - message_encoding, - message, - treeObject - ); - }); + if (tree instanceof NodeGit.Oid) { + treePromise = repo.getTree(tree); + } else { + treePromise = Promise.resolve(tree); + } + + return treePromise.then(function (treeObject) { + return _amend.call(_this, updateRef, author, committer, message_encoding, message, treeObject); + }); }; /** - * Amend a commit with the given signature + * Amend a commit with the given signature. + * + * @param {string} updateRef + * @param {Signature} author + * @param {Signature} committer + * @param {string} messageEncoding + * @param {string} message + * @param {Tree | Oid} tree + * @param {Function} onSignature Callback to be called with string to be signed. + * @returns {Oid} * @async - * @param {String} updateRef - * @param {Signature} author - * @param {Signature} committer - * @param {String} messageEncoding - * @param {String} message - * @param {Tree|Oid} tree - * @param {Function} onSignature Callback to be called with string to be signed - * @return {Oid} -*/ -Commit.prototype.amendWithSignature = function( + */ +Commit.prototype.amendWithSignature = function ( updateRef, author, committer, @@ -86,182 +80,167 @@ Commit.prototype.amendWithSignature = function( tree, onSignature ) { - let repo = this.repo; - let parentOids = this.parents(); - let _this = this; - let promises = []; - - if (tree instanceof NodeGit.Oid) { - promises.push(repo.getTree(tree)); - } else { - promises.push(Promise.resolve(tree)); - } + const repo = this.repo; + const parentOids = this.parents(); + const _this = this; + const promises = []; + + if (tree instanceof NodeGit.Oid) { + promises.push(repo.getTree(tree)); + } else { + promises.push(Promise.resolve(tree)); + } - parentOids.forEach(function (parentOid) { - promises.push(repo.getCommit(parentOid)); - }); + parentOids.forEach(function (parentOid) { + promises.push(repo.getCommit(parentOid)); + }); - let treeObject; - let parents; - let commitContent; - let commit; - let skippedSigning; - let resolvedAuthor; - let resolvedCommitter; - let resolvedMessageEncoding; - let resolvedMessage; - let resolvedTree; - - let createCommitPromise = Promise.all(promises) - .then(function(results) { - treeObject = fp.head(results); - parents = fp.tail(results); - return _this.getTree(); - }) - .then(function(commitTreeResult) { - let commitTree = commitTreeResult; - - let truthyArgs = fp.omitBy( - fp.isNil, - { - author, - committer, - messageEncoding, - message, - tree: treeObject - } - ); - - let commitFields = { - author: _this.author(), - committer: _this.committer(), - messageEncoding: _this.messageEncoding(), - message: _this.message(), - tree: commitTree - }; - - ({ - author: resolvedAuthor, - committer: resolvedCommitter, - messageEncoding: resolvedMessageEncoding, - message: resolvedMessage, - tree: resolvedTree - } = fp.assign( - commitFields, - truthyArgs - )); - - return Commit.createBuffer( - repo, - resolvedAuthor, - resolvedCommitter, - resolvedMessageEncoding, - resolvedMessage, - resolvedTree, - parents.length, - parents - ); - }) - .then(function(commitContentResult) { - commitContent = commitContentResult; - if (!commitContent.endsWith("\n")) { - commitContent += "\n"; - } - return onSignature(commitContent); - }) - .then(function({ code, field, signedData }) { - switch (code) { - case NodeGit.Error.CODE.OK: - return Commit.createWithSignature( - repo, - commitContent, - signedData, - field - ); - case NodeGit.Error.CODE.PASSTHROUGH: - skippedSigning = true; - return Commit.create( - repo, - updateRef, - resolvedAuthor, - resolvedCommitter, - resolvedMessageEncoding, - resolvedMessage, - resolvedTree, - parents.length, - parents - ); - default: { - const error = new Error( - `Commit.amendWithSignature threw with error code ${code}` - ); - error.errno = code; - throw error; - } - } + let treeObject; + let parents; + let commitContent; + let commit; + let skippedSigning; + let resolvedAuthor; + let resolvedCommitter; + let resolvedMessageEncoding; + let resolvedMessage; + let resolvedTree; + + const createCommitPromise = Promise.all(promises) + .then(function (results) { + treeObject = fp.head(results); + parents = fp.tail(results); + return _this.getTree(); + }) + .then(function (commitTreeResult) { + const commitTree = commitTreeResult; + + const truthyArgs = fp.omitBy(fp.isNil, { + author, + committer, + messageEncoding, + message, + tree: treeObject, }); - if (!updateRef) { - return createCommitPromise; - } - - return createCommitPromise - .then(function(commitOid) { - if (skippedSigning) { - return commitOid; + const commitFields = { + author: _this.author(), + committer: _this.committer(), + messageEncoding: _this.messageEncoding(), + message: _this.message(), + tree: commitTree, + }; + + ({ + author: resolvedAuthor, + committer: resolvedCommitter, + messageEncoding: resolvedMessageEncoding, + message: resolvedMessage, + tree: resolvedTree, + } = fp.assign(commitFields, truthyArgs)); + + return Commit.createBuffer( + repo, + resolvedAuthor, + resolvedCommitter, + resolvedMessageEncoding, + resolvedMessage, + resolvedTree, + parents.length, + parents + ); + }) + .then(function (commitContentResult) { + commitContent = commitContentResult; + if (!commitContent.endsWith("\n")) { + commitContent += "\n"; + } + return onSignature(commitContent); + }) + .then(function ({ code, field, signedData }) { + switch (code) { + case NodeGit.Error.CODE.OK: + return Commit.createWithSignature(repo, commitContent, signedData, field); + case NodeGit.Error.CODE.PASSTHROUGH: + skippedSigning = true; + return Commit.create( + repo, + updateRef, + resolvedAuthor, + resolvedCommitter, + resolvedMessageEncoding, + resolvedMessage, + resolvedTree, + parents.length, + parents + ); + default: { + const error = new Error(`Commit.amendWithSignature threw with error code ${code}`); + error.errno = code; + throw error; } + } + }); - return repo.getCommit(commitOid) - .then(function(commitResult) { - commit = commitResult; - return repo.getReference(updateRef); - }).then(function(ref) { - return ref.setTarget( - commitOid, - `commit (amend): ${commit.summary()}` - ); - }).then(function() { - return commitOid; - }); + if (!updateRef) { + return createCommitPromise; + } + + return createCommitPromise.then(function (commitOid) { + if (skippedSigning) { + return commitOid; + } + + return repo + .getCommit(commitOid) + .then(function (commitResult) { + commit = commitResult; + return repo.getReference(updateRef); + }) + .then(function (ref) { + return ref.setTarget(commitOid, `commit (amend): ${commit.summary()}`); + }) + .then(function () { + return commitOid; }); + }); }; /** * Retrieve the commit time as a Date object. - * @return {Date} + * + * @returns {Date} */ -Commit.prototype.date = function() { +Commit.prototype.date = function () { return new Date(this.timeMs()); }; /** - * Generate an array of diff trees showing changes between this commit - * and its parent(s). + * Generate an array of diff trees showing changes between this commit and its parent(s). * + * @returns {Diff[]} An array of diffs. * @async - * @returns {Diff[]} an array of diffs */ -Commit.prototype.getDiff = function() { +Commit.prototype.getDiff = function () { return this.getDiffWithOptions(null); }; /** - * Generate an array of diff trees showing changes between this commit - * and its parent(s). + * Generate an array of diff trees showing changes between this commit and its parent(s). * - * @async * @param {Object} options - * @returns {Diff[]} an array of diffs + * @returns {Diff[]} An array of diffs. + * @async */ -Commit.prototype.getDiffWithOptions = function(options) { +Commit.prototype.getDiffWithOptions = function (options) { var commit = this; - return commit.getTree().then(function(thisTree) { - return commit.getParents().then(function(parents) { + return commit.getTree().then(function (thisTree) { + return commit.getParents().then(function (parents) { var diffs; if (parents.length) { - diffs = parents.map(function(parent) { - return parent.getTree().then(function(parentTree) { + diffs = parents.map(function (parent) { + return parent.getTree().then(function (parentTree) { return thisTree.diffWithOptions(parentTree, options); }); }); @@ -278,12 +257,12 @@ Commit.prototype.getDiffWithOptions = function(options) { * Retrieve the entry represented by path for this commit. * Path must be relative to repository root. * + * @param {string} path + * @returns {TreeEntry} * @async - * @param {String} path - * @return {TreeEntry} */ -Commit.prototype.getEntry = function(path) { - return this.getTree().then(function(tree) { +Commit.prototype.getEntry = function (path) { + return this.getTree().then(function (tree) { return tree.getEntry(path); }); }; @@ -291,11 +270,11 @@ Commit.prototype.getEntry = function(path) { /** * Retrieve the commit's parents as commit objects. * + * @param {number} limit Optional amount of parents to return. + * @returns {Commit[]} Array of commits. * @async - * @param {number} limit Optional amount of parents to return. - * @returns {Commit[]} array of commits */ -Commit.prototype.getParents = function(limit) { +Commit.prototype.getParents = function (limit) { var parents = []; // If no limit was set, default to the maximum parents. @@ -314,47 +293,47 @@ Commit.prototype.getParents = function(limit) { }; /** - * @typedef extractedSignature * @type {Object} - * @property {String} signature the signature of the commit - * @property {String} signedData the extracted signed data + * @typedef extractedSignature + * @property {string} signature The signature of the commit. + * @property {string} signedData The extracted signed data. */ /** * Retrieve the signature and signed data for a commit. - * @param {String} field Optional field to get from the signature, - * defaults to gpgsig - * @return {extractedSignature} + * + * @param {string} field Optional field to get from the signature, + * defaults to gpgsig. + * @returns {extractedSignature} */ -Commit.prototype.getSignature = function(field) { +Commit.prototype.getSignature = function (field) { return Commit.extractSignature(this.repo, this.id(), field); }; /** * Get the tree associated with this commit. * + * @returns {Tree} * @async - * @return {Tree} */ -Commit.prototype.getTree = function() { +Commit.prototype.getTree = function () { return this.repo.getTree(this.treeId()); }; /** * Walk the history from this commit backwards. * - * An EventEmitter is returned that will emit a "commit" event for each - * commit in the history, and one "end" event when the walk is completed. + * An EventEmitter is returned that will emit a "commit" event for each commit in the history, and one "end" event when + * the walk is completed. * Don't forget to call `start()` on the returned event. * - * @fires EventEmitter#commit Commit - * @fires EventEmitter#end Array - * @fires EventEmitter#error Error - * - * @return {EventEmitter} + * @returns {EventEmitter} + * @fires EventEmitter#commit Commit. + * @fires EventEmitter#end Array + * @fires EventEmitter#error Error. * @start start() */ -Commit.prototype.history = function() { +Commit.prototype.history = function () { var event = new events.EventEmitter(); var oid = this.id(); var revwalk = this.repo.createRevWalk(); @@ -363,7 +342,7 @@ Commit.prototype.history = function() { var commits = []; - event.start = function() { + event.start = function () { revwalk.walk(oid, function commitRevWalk(error, commit) { if (error) { if (error.errno === NodeGit.Error.CODE.ITEROVER) { @@ -385,13 +364,13 @@ Commit.prototype.history = function() { /** * Get the specified parent of the commit. * - * @param {number} the position of the parent, starting from 0 + * @param {number} the Position of the parent, starting from 0. + * @returns {Commit} The parent commit at the specified position. * @async - * @returns {Commit} the parent commit at the specified position */ Commit.prototype.parent = function (id) { var repository = this.repo; - return _parent.call(this, id).then(function(parent) { + return _parent.call(this, id).then(function (parent) { parent.repo = repository; return parent; }); @@ -400,9 +379,9 @@ Commit.prototype.parent = function (id) { /** * Retrieve the commit's parent shas. * - * @return {Array} array of oids + * @returns {Oid[]} Array. Of oids. */ -Commit.prototype.parents = function() { +Commit.prototype.parents = function () { var result = []; for (var i = 0; i < this.parentcount(); i++) { @@ -414,24 +393,27 @@ Commit.prototype.parents = function() { /** * Retrieve the SHA. - * @return {String} + * + * @returns {string} */ -Commit.prototype.sha = function() { +Commit.prototype.sha = function () { return this.id().toString(); }; /** * Retrieve the commit time as a unix timestamp. - * @return {Number} + * + * @returns {number} */ -Commit.prototype.timeMs = function() { +Commit.prototype.timeMs = function () { return this.time() * 1000; }; /** - * The sha of this commit - * @return {String} + * The sha of this commit. + * + * @returns {string} */ -Commit.prototype.toString = function() { +Commit.prototype.toString = function () { return this.sha(); }; diff --git a/lib/config.js b/lib/config.js index 37b792da8..0458adb47 100644 --- a/lib/config.js +++ b/lib/config.js @@ -7,42 +7,33 @@ var _getBool = Config.prototype.getBool; var _setBool = Config.prototype.setBool; /** + * @param {string} name The variable's name. + * @returns {boolean} The. Variable's value. * @async - * @param {String} name The variable's name - * @return {Boolean} The variable's value */ -Config.prototype.getBool = function(name) { - return _getBool.call(this, name) - .then(result => Boolean(result)); +Config.prototype.getBool = function (name) { + return _getBool.call(this, name).then((result) => Boolean(result)); }; /** + * @param {string} name The variable's name. + * @param {boolean} name The variable's value. + * @returns {number} 0. Or an error code. * @async - * @param {String} name The variable's name - * @param {Boolean} name The variable's value - * @return {Number} 0 or an error code */ -Config.prototype.setBool = function(name, value) { +Config.prototype.setBool = function (name, value) { return _setBool.call(this, name, value ? 1 : 0); }; // Backwards compatibility. -Config.prototype.getString = function() { +Config.prototype.getString = function () { return this.getStringBuf.apply(this, arguments); }; NodeGit.Enums.CVAR = {}; -var DEPRECATED_CVAR_ENUMS = [ - "FALSE", - "TRUE", - "INT32", - "STRING" -]; +var DEPRECATED_CVAR_ENUMS = ["FALSE", "TRUE", "INT32", "STRING"]; DEPRECATED_CVAR_ENUMS.forEach((key) => { Object.defineProperty(NodeGit.Enums.CVAR, key, { - get: util.deprecate( - () => Config.MAP[key], - `Use NodeGit.Config.MAP.${key} instead of NodeGit.Enums.CVAR.${key}.` - ) + get: util.deprecate(() => Config.MAP[key], `Use NodeGit.Config.MAP.${key} instead of NodeGit.Enums.CVAR.${key}.`), }); }); diff --git a/lib/convenient_hunks.js b/lib/convenient_hunks.js index ef8070d06..12520358e 100644 --- a/lib/convenient_hunks.js +++ b/lib/convenient_hunks.js @@ -3,59 +3,66 @@ var NodeGit = require("../"); var ConvenientHunk = NodeGit.ConvenientHunk; var header = ConvenientHunk.prototype.header; - /** - * Diff header string that represents the context of this hunk - * of the diff. Something like `@@ -169,14 +167,12 @@ ...` - * @return {String} - */ +/** + * Diff header string that represents the context of this hunk of the diff. Something like `@@ -169,14 +167,12 @@ ...` + * + * @returns {string} + */ ConvenientHunk.prototype.header = header; var headerLen = ConvenientHunk.prototype.headerLen; /** - * The length of the header - * @return {Number} + * The length of the header. + * + * @returns {number} */ ConvenientHunk.prototype.headerLen = headerLen; var lines = ConvenientHunk.prototype.lines; /** - * The lines in this hunk + * The lines in this hunk. + * + * @returns {DiffLine[]} * @async - * @return {Array} */ ConvenientHunk.prototype.lines = lines; var newLines = ConvenientHunk.prototype.newLines; /** - * The number of new lines in the hunk - * @return {Number} + * The number of new lines in the hunk. + * + * @returns {number} */ ConvenientHunk.prototype.newLines = newLines; var newStart = ConvenientHunk.prototype.newStart; /** - * The starting offset of the first new line in the file - * @return {Number} + * The starting offset of the first new line in the file. + * + * @returns {number} */ ConvenientHunk.prototype.newStart = newStart; var oldLines = ConvenientHunk.prototype.oldLines; /** - * The number of old lines in the hunk - * @return {Number} + * The number of old lines in the hunk. + * + * @returns {number} */ ConvenientHunk.prototype.oldLines = oldLines; var oldStart = ConvenientHunk.prototype.oldStart; /** - * The starting offset of the first old line in the file - * @return {Number} + * The starting offset of the first old line in the file. + * + * @returns {number} */ ConvenientHunk.prototype.oldStart = oldStart; var size = ConvenientHunk.prototype.size; /** - * Number of lines in this hunk - * @return {Number} + * Number of lines in this hunk. + * + * @returns {number} */ ConvenientHunk.prototype.size = size; diff --git a/lib/convenient_patch.js b/lib/convenient_patch.js index 2670330ae..db46bc397 100644 --- a/lib/convenient_patch.js +++ b/lib/convenient_patch.js @@ -4,127 +4,144 @@ var ConvenientPatch = NodeGit.ConvenientPatch; var hunks = ConvenientPatch.prototype.hunks; /** - * The hunks in this patch - * @async + * The hunks in this patch. + * * @returns {Promise} + * @async */ ConvenientPatch.prototype.hunks = hunks; var isAdded = ConvenientPatch.prototype.isAdded; /** * Is this an added patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isAdded = isAdded; var isConflicted = ConvenientPatch.prototype.isConflicted; /** * Is this a conflicted patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isConflicted = isConflicted; var isCopied = ConvenientPatch.prototype.isCopied; /** * Is this a copied patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isCopied = isCopied; var isDeleted = ConvenientPatch.prototype.isDeleted; /** * Is this a deleted patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isDeleted = isDeleted; var isIgnored = ConvenientPatch.prototype.isIgnored; /** * Is this an ignored patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isIgnored = isIgnored; var isModified = ConvenientPatch.prototype.isModified; /** * Is this an modified patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isModified = isModified; var isRenamed = ConvenientPatch.prototype.isRenamed; /** * Is this a renamed patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isRenamed = isRenamed; var isTypeChange = ConvenientPatch.prototype.isTypeChange; /** * Is this a type change? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isTypeChange = isTypeChange; var isUnmodified = ConvenientPatch.prototype.isUnmodified; /** * Is this an unmodified patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isUnmodified = isUnmodified; var isUnreadable = ConvenientPatch.prototype.isUnreadable; /** * Is this an undreadable patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isUnreadable = isUnreadable; var isUntracked = ConvenientPatch.prototype.isUntracked; /** * Is this an untracked patch? - * @return {Boolean} + * + * @returns {boolean} */ ConvenientPatch.prototype.isUntracked = isUntracked; /** - * @typedef lineStats * @type {Object} - * @property {number} total_context # of contexts in the patch - * @property {number} total_additions # of lines added in the patch - * @property {number} total_deletions # of lines deleted in the patch + * @typedef lineStats + * @property {number} total_context # of contexts in the patch. + * @property {number} total_additions # of lines added in the patch. + * @property {number} total_deletions # of lines deleted in the patch. */ var lineStats = ConvenientPatch.prototype.lineStats; /** * The line statistics of this patch (#contexts, #added, #deleted) - * @return {lineStats} + * + * @returns {lineStats} */ ConvenientPatch.prototype.lineStats = lineStats; var newFile = ConvenientPatch.prototype.newFile; /** - * New attributes of the file - * @return {DiffFile} + * New attributes of the file. + * + * @returns {DiffFile} */ ConvenientPatch.prototype.newFile = newFile; var oldFile = ConvenientPatch.prototype.oldFile; /** - * Old attributes of the file - * @return {DiffFile} + * Old attributes of the file. + * + * @returns {DiffFile} */ ConvenientPatch.prototype.oldFile = oldFile; var size = ConvenientPatch.prototype.size; /** - * The number of hunks in this patch - * @return {Number} + * The number of hunks in this patch. + * + * @returns {number} */ ConvenientPatch.prototype.size = size; var status = ConvenientPatch.prototype.status; /** * The status of this patch (unmodified, added, deleted) - * @return {Number} + * + * @returns {number} */ ConvenientPatch.prototype.status = status; diff --git a/lib/credential.js b/lib/credential.js index db1f82a78..b57b81fdb 100644 --- a/lib/credential.js +++ b/lib/credential.js @@ -9,7 +9,7 @@ var deprecatedFn = (method) => `Use NodeGit.Credential.${method} instead of NodeGit.Cred.${method}` ); -var createCredTypeDeprecationMessage = type => +var createCredTypeDeprecationMessage = (type) => `Use NodeGit.Credential.TYPE.${type} instead of NodeGit.Cred.TYPE.${type}`; NodeGit.Cred = { @@ -18,16 +18,10 @@ NodeGit.Cred = { sshKeyNew: deprecatedFn("sshKeyNew"), usernameNew: deprecatedFn("usernameNew"), userpassPlaintextNew: deprecatedFn("userpassPlaintextNew"), - TYPE: Object.keys(Credential.TYPE).reduce( - (type, key) => { - Object.defineProperty(type, key, { - get: util.deprecate( - () => Credential.TYPE[key], - createCredTypeDeprecationMessage(type) - ) - }); - return type; - }, - {} - ) + TYPE: Object.keys(Credential.TYPE).reduce((type, key) => { + Object.defineProperty(type, key, { + get: util.deprecate(() => Credential.TYPE[key], createCredTypeDeprecationMessage(type)), + }); + return type; + }, {}), }; diff --git a/lib/deprecated/structs/ApplyOptions.js b/lib/deprecated/structs/ApplyOptions.js index cd9f22ca0..18fd96cfc 100644 --- a/lib/deprecated/structs/ApplyOptions.js +++ b/lib/deprecated/structs/ApplyOptions.js @@ -1,3 +1,3 @@ -module.exports = function() { +module.exports = function () { this.flags = 0; }; diff --git a/lib/deprecated/structs/BlameOptions.js b/lib/deprecated/structs/BlameOptions.js index 8ffd415de..af706f15c 100644 --- a/lib/deprecated/structs/BlameOptions.js +++ b/lib/deprecated/structs/BlameOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.flags = 0; this.minMatchCharacters = 0; this.minLine = 0; diff --git a/lib/deprecated/structs/BlobFilterOptions.js b/lib/deprecated/structs/BlobFilterOptions.js index df9a3d762..3760bdb7c 100644 --- a/lib/deprecated/structs/BlobFilterOptions.js +++ b/lib/deprecated/structs/BlobFilterOptions.js @@ -1,3 +1,3 @@ -module.exports = function() { +module.exports = function () { this.flags = 1; }; diff --git a/lib/deprecated/structs/CheckoutOptions.js b/lib/deprecated/structs/CheckoutOptions.js index 89e28d093..ec3117ba4 100644 --- a/lib/deprecated/structs/CheckoutOptions.js +++ b/lib/deprecated/structs/CheckoutOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.checkoutStrategy = 1; this.disableFilters = 0; this.dirMode = 0; diff --git a/lib/deprecated/structs/CherrypickOptions.js b/lib/deprecated/structs/CherrypickOptions.js index fce5efa10..33d621b6f 100644 --- a/lib/deprecated/structs/CherrypickOptions.js +++ b/lib/deprecated/structs/CherrypickOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.checkoutOpts = new NodeGit.CheckoutOptions(); this.mainline = 0; this.mergeOpts = new NodeGit.MergeOptions(); diff --git a/lib/deprecated/structs/CloneOptions.js b/lib/deprecated/structs/CloneOptions.js index 84deb60da..d57132dda 100644 --- a/lib/deprecated/structs/CloneOptions.js +++ b/lib/deprecated/structs/CloneOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.bare = 0; this.checkoutOpts = new NodeGit.CheckoutOptions(); this.fetchOpts = new NodeGit.FetchOptions(); diff --git a/lib/deprecated/structs/DescribeFormatOptions.js b/lib/deprecated/structs/DescribeFormatOptions.js index 6e9d25031..06bfbc71a 100644 --- a/lib/deprecated/structs/DescribeFormatOptions.js +++ b/lib/deprecated/structs/DescribeFormatOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.abbreviatedSize = 7; this.alwaysUseLongFormat = 0; }; diff --git a/lib/deprecated/structs/DescribeOptions.js b/lib/deprecated/structs/DescribeOptions.js index a4c29a2a7..cfb9bf9f6 100644 --- a/lib/deprecated/structs/DescribeOptions.js +++ b/lib/deprecated/structs/DescribeOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.describeStrategy = 0; this.maxCandidatesTags = 10; this.onlyFollowFirstParent = 0; diff --git a/lib/deprecated/structs/DiffFindOptions.js b/lib/deprecated/structs/DiffFindOptions.js index 459bc0ac1..469e2b138 100644 --- a/lib/deprecated/structs/DiffFindOptions.js +++ b/lib/deprecated/structs/DiffFindOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.breakRewriteThreshold = 0; this.copyThreshold = 0; this.flags = 0; diff --git a/lib/deprecated/structs/DiffOptions.js b/lib/deprecated/structs/DiffOptions.js index eeb6c5c3a..7f819a5ec 100644 --- a/lib/deprecated/structs/DiffOptions.js +++ b/lib/deprecated/structs/DiffOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.contextLines = 3; this.flags = 0; this.idAbbrev = 0; diff --git a/lib/deprecated/structs/FetchOptions.js b/lib/deprecated/structs/FetchOptions.js index cd3f890dc..a0be9a611 100644 --- a/lib/deprecated/structs/FetchOptions.js +++ b/lib/deprecated/structs/FetchOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.callbacks = new NodeGit.RemoteCallbacks(); this.downloadTags = 0; this.proxyOpts = new NodeGit.ProxyOptions(); diff --git a/lib/deprecated/structs/MergeFileInput.js b/lib/deprecated/structs/MergeFileInput.js index 0b77f1383..98526b743 100644 --- a/lib/deprecated/structs/MergeFileInput.js +++ b/lib/deprecated/structs/MergeFileInput.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.mode = 0; this.size = 0; }; diff --git a/lib/deprecated/structs/MergeFileOptions.js b/lib/deprecated/structs/MergeFileOptions.js index fd7101514..6c1af2c82 100644 --- a/lib/deprecated/structs/MergeFileOptions.js +++ b/lib/deprecated/structs/MergeFileOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.favor = 0; this.flags = 0; this.markerSize = 0; diff --git a/lib/deprecated/structs/MergeOptions.js b/lib/deprecated/structs/MergeOptions.js index 3c73243a2..a79ee0cd0 100644 --- a/lib/deprecated/structs/MergeOptions.js +++ b/lib/deprecated/structs/MergeOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.fileFavor = 0; this.fileFlags = 0; this.flags = 1; diff --git a/lib/deprecated/structs/ProxyOptions.js b/lib/deprecated/structs/ProxyOptions.js index d1b3260ba..64db949c2 100644 --- a/lib/deprecated/structs/ProxyOptions.js +++ b/lib/deprecated/structs/ProxyOptions.js @@ -1,3 +1,3 @@ -module.exports = function() { +module.exports = function () { this.type = 0; }; diff --git a/lib/deprecated/structs/PushOptions.js b/lib/deprecated/structs/PushOptions.js index bab5bc14f..9a7440757 100644 --- a/lib/deprecated/structs/PushOptions.js +++ b/lib/deprecated/structs/PushOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.callbacks = new NodeGit.RemoteCallbacks(); this.pbParallelism = 1; this.proxyOpts = new NodeGit.ProxyOptions(); diff --git a/lib/deprecated/structs/RebaseOptions.js b/lib/deprecated/structs/RebaseOptions.js index 414b296b5..12e4ba27d 100644 --- a/lib/deprecated/structs/RebaseOptions.js +++ b/lib/deprecated/structs/RebaseOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.checkoutOptions = new NodeGit.CheckoutOptions(); this.inmemory = 0; this.mergeOptions = new NodeGit.MergeOptions(); diff --git a/lib/deprecated/structs/RemoteCreateOptions.js b/lib/deprecated/structs/RemoteCreateOptions.js index cd9f22ca0..18fd96cfc 100644 --- a/lib/deprecated/structs/RemoteCreateOptions.js +++ b/lib/deprecated/structs/RemoteCreateOptions.js @@ -1,3 +1,3 @@ -module.exports = function() { +module.exports = function () { this.flags = 0; }; diff --git a/lib/deprecated/structs/RepositoryInitOptions.js b/lib/deprecated/structs/RepositoryInitOptions.js index 39657b17e..43670cf70 100644 --- a/lib/deprecated/structs/RepositoryInitOptions.js +++ b/lib/deprecated/structs/RepositoryInitOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.flags = 0; this.mode = 0; }; diff --git a/lib/deprecated/structs/RevertOptions.js b/lib/deprecated/structs/RevertOptions.js index fce5efa10..33d621b6f 100644 --- a/lib/deprecated/structs/RevertOptions.js +++ b/lib/deprecated/structs/RevertOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.checkoutOpts = new NodeGit.CheckoutOptions(); this.mainline = 0; this.mergeOpts = new NodeGit.MergeOptions(); diff --git a/lib/deprecated/structs/StashApplyOptions.js b/lib/deprecated/structs/StashApplyOptions.js index a7a9fcc83..ec4a80da2 100644 --- a/lib/deprecated/structs/StashApplyOptions.js +++ b/lib/deprecated/structs/StashApplyOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.checkoutOptions = new NodeGit.CheckoutOptions(); this.flags = 0; }; diff --git a/lib/deprecated/structs/StatusOptions.js b/lib/deprecated/structs/StatusOptions.js index d7c35c0f4..9abbdbc14 100644 --- a/lib/deprecated/structs/StatusOptions.js +++ b/lib/deprecated/structs/StatusOptions.js @@ -1,4 +1,4 @@ -module.exports = function() { +module.exports = function () { this.flags = 0; this.show = 0; }; diff --git a/lib/deprecated/structs/SubmoduleUpdateOptions.js b/lib/deprecated/structs/SubmoduleUpdateOptions.js index 8dad87f11..c4ea505b8 100644 --- a/lib/deprecated/structs/SubmoduleUpdateOptions.js +++ b/lib/deprecated/structs/SubmoduleUpdateOptions.js @@ -1,4 +1,4 @@ -module.exports = function(NodeGit) { +module.exports = function (NodeGit) { this.allowFetch = 1; this.checkoutOpts = new NodeGit.CheckoutOptions(); this.fetchOpts = new NodeGit.FetchOptions(); diff --git a/lib/diff.js b/lib/diff.js index c63d99f20..18dde4e30 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -6,30 +6,32 @@ var _blobToBuffer = Diff.blobToBuffer; /** * Directly run a diff between a blob and a buffer. + * + * @param {Blob} old_blob Blob for old side of diff, or NULL for empty blob. + * @param {string} old_as_path Treat old blob as if it had this filename; + * can be NULL. + * @param {string} buffer Raw data for new side of diff, or NULL for empty. + * @param {string} buffer_as_path Treat buffer as if it had this filename; + * can be NULL. + * @param {DiffOptions} opts Options for diff, or NULL for default options. + * @param {Function} file_cb Callback for "file"; made once if there is a diff; + * can be NULL. + * @param {Function} binary_cb Callback for binary files; can be NULL. + * @param {Function} hunk_cb Callback for each hunk in diff; can be NULL. + * @param {Function} line_cb Callback for each line in diff; can be NULL. * @async - * @param {Blob} old_blob Blob for old side of diff, or NULL for empty blob - * @param {String} old_as_path Treat old blob as if it had this filename; - * can be NULL - * @param {String} buffer Raw data for new side of diff, or NULL for empty - * @param {String} buffer_as_path Treat buffer as if it had this filename; - * can be NULL - * @param {DiffOptions} opts Options for diff, or NULL for default options - * @param {Function} file_cb Callback for "file"; made once if there is a diff; - * can be NULL - * @param {Function} binary_cb Callback for binary files; can be NULL - * @param {Function} hunk_cb Callback for each hunk in diff; can be NULL - * @param {Function} line_cb Callback for each line in diff; can be NULL */ -Diff.blobToBuffer= function( - old_blob, - old_as_path, - buffer, - buffer_as_path, - opts, - file_cb, - binary_cb, - hunk_cb, - line_cb) { +Diff.blobToBuffer = function ( + old_blob, + old_as_path, + buffer, + buffer_as_path, + opts, + file_cb, + binary_cb, + hunk_cb, + line_cb +) { var bufferText; var bufferLength; if (buffer instanceof Buffer) { @@ -52,15 +54,16 @@ Diff.blobToBuffer= function( binary_cb, hunk_cb, line_cb, - null); + null + ); }; /** - * Retrieve patches in this difflist + * Retrieve patches in this difflist. * + * @returns {Promise} * @async - * @return {Promise} */ -Diff.prototype.patches = function(idxs) { +Diff.prototype.patches = function (idxs) { return Patch.convenientFromDiff(this, idxs); }; diff --git a/lib/diff_file.js b/lib/diff_file.js index 34ce315ce..6e9f9d2a5 100644 --- a/lib/diff_file.js +++ b/lib/diff_file.js @@ -4,35 +4,40 @@ var DiffFile = NodeGit.DiffFile; var flags = DiffFile.prototype.flags; /** - * Returns the file's flags - * @return {Number} + * Returns the file's flags. + * + * @returns {number} */ DiffFile.prototype.flags = flags; var id = DiffFile.prototype.id; /** - * Returns the file's Oid - * @return {Oid} + * Returns the file's Oid. + * + * @returns {Oid} */ DiffFile.prototype.id = id; var mode = DiffFile.prototype.mode; /** - * Returns the file's mode - * @return {Number} + * Returns the file's mode. + * + * @returns {number} */ DiffFile.prototype.mode = mode; var path = DiffFile.prototype.path; /** - * Returns the file's path - * @return {String} + * Returns the file's path. + * + * @returns {string} */ DiffFile.prototype.path = path; var size = DiffFile.prototype.size; /** - * Returns the file's size - * @return {Number} + * Returns the file's size. + * + * @returns {number} */ DiffFile.prototype.size = size; diff --git a/lib/diff_line.js b/lib/diff_line.js index f856f07c7..5b6c7ec46 100644 --- a/lib/diff_line.js +++ b/lib/diff_line.js @@ -4,28 +4,28 @@ var DiffLine = NodeGit.DiffLine; var _rawContent = DiffLine.prototype.content; /** -* The relevant line -* @return {String} -*/ -DiffLine.prototype.content = function() { + * The relevant line. + * + * @returns {string} + */ +DiffLine.prototype.content = function () { if (!this._cache) { this._cache = {}; } if (!this._cache.content) { - this._cache.content = Buffer.from(this.rawContent()) - .slice(0, this.contentLen()) - .toString("utf8"); + this._cache.content = Buffer.from(this.rawContent()).slice(0, this.contentLen()).toString("utf8"); } return this._cache.content; }; /** -* The non utf8 translated text -* @return {String} -*/ -DiffLine.prototype.rawContent = function() { + * The non utf8 translated text. + * + * @returns {string} + */ +DiffLine.prototype.rawContent = function () { return _rawContent.call(this); }; diff --git a/lib/error.js b/lib/error.js index 819299681..a2dfafbcd 100644 --- a/lib/error.js +++ b/lib/error.js @@ -10,8 +10,7 @@ Object.keys(NodeGit.Error.CODE).forEach((key) => { Object.defineProperty(NodeGit.Error.CODE, `GITERR_${key}`, { get: util.deprecate( () => NodeGit.Error.CODE[key], - `Use NodeGit.Error.CODE.${key} instead of ` + - `NodeGit.Error.CODE.GETERR_${key}.` - ) + `Use NodeGit.Error.CODE.${key} instead of ` + `NodeGit.Error.CODE.GETERR_${key}.` + ), }); }); diff --git a/lib/filter_registry.js b/lib/filter_registry.js index cfa17415e..135cce98e 100644 --- a/lib/filter_registry.js +++ b/lib/filter_registry.js @@ -6,16 +6,14 @@ var _register = FilterRegistry.register; // register should add filter by name to dict and return // Override FilterRegistry.register to normalize Filter -FilterRegistry.register = function(name, filter, priority) { +FilterRegistry.register = function (name, filter, priority) { // setting default value of attributes if (filter.attributes === undefined) { filter.attributes = ""; } if (!filter.check || !filter.apply) { - return Promise.reject(new Error( - "ERROR: please provide check and apply callbacks for filter" - )); + return Promise.reject(new Error("ERROR: please provide check and apply callbacks for filter")); } return _register(name, filter, priority); diff --git a/lib/graph.js b/lib/graph.js index 737141007..b23b6c4dc 100644 --- a/lib/graph.js +++ b/lib/graph.js @@ -6,10 +6,11 @@ var _reachableFromAny = Graph.reachableFromAny; /** * Determine if a commit is reachable from any of a list of commits by following parent edges. - * @param {repository} the repository where the commits exist - * @param {commit} a previously loaded commit - * @param {descendant_array} oids of the commits + * + * @param {repository} the Repository where the commits exist. + * @param {commit} a Previously loaded commit. + * @param {descendant_array} oids Of the commits. */ -Graph.reachableFromAny = function(repository, commit, descendant_array) { +Graph.reachableFromAny = function (repository, commit, descendant_array) { return _reachableFromAny(repository, commit, descendant_array, descendant_array.length); }; diff --git a/lib/index.js b/lib/index.js index 11774763c..2865bc14c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,15 +7,16 @@ var _addAll = Index.prototype.addAll; var _removeAll = Index.prototype.removeAll; var _updateAll = Index.prototype.updateAll; -Index.prototype.addAll = function(pathspec, flags, matchedCallback) { +Index.prototype.addAll = function (pathspec, flags, matchedCallback) { return _addAll.call(this, pathspec || "*", flags, matchedCallback, null); }; /** * Return an array of the entries in this index. - * @return {IndexEntry[]} + * + * @returns {IndexEntry[]} */ -Index.prototype.entries = function() { +Index.prototype.entries = function () { var size = this.entryCount(); var result = []; @@ -26,11 +27,11 @@ Index.prototype.entries = function() { return result; }; -Index.prototype.removeAll = function(pathspec, matchedCallback) { +Index.prototype.removeAll = function (pathspec, matchedCallback) { return _removeAll.call(this, pathspec || "*", matchedCallback, null); }; -Index.prototype.updateAll = function(pathspec, matchedCallback) { +Index.prototype.updateAll = function (pathspec, matchedCallback) { return _updateAll.call(this, pathspec || "*", matchedCallback, null); }; @@ -41,9 +42,8 @@ Object.keys(NodeGit.Index.CAPABILITY).forEach((key) => { Object.defineProperty(NodeGit.Index.CAP, key, { get: util.deprecate( () => NodeGit.Index.CAPABILITY[key], - `Use NodeGit.Index.CAPABILITY.${key} instead of ` + - `NodeGit.Index.CAP.${key}.` - ) + `Use NodeGit.Index.CAPABILITY.${key} instead of ` + `NodeGit.Index.CAP.${key}.` + ), }); }); @@ -51,16 +51,14 @@ NodeGit.Enums.INDXENTRY_FLAG = {}; Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_EXTENDED", { get: util.deprecate( () => NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED, - "Use NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED instead of " + - "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_EXTENDED." - ) + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED instead of " + "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_EXTENDED." + ), }); Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_VALID", { get: util.deprecate( () => NodeGit.Index.ENTRY_FLAG.ENTRY_VALID, - "Use NodeGit.Index.ENTRY_FLAG.ENTRY_VALID instead of " + - "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_VALID." - ) + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_VALID instead of " + "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_VALID." + ), }); NodeGit.Enums.IDXENTRY_EXTENDED_FLAG = {}; @@ -68,16 +66,15 @@ var EXTENDED_FLAGS_MAP = { IDXENTRY_INTENT_TO_ADD: "ENTRY_INTENT_TO_ADD", IDXENTRY_SKIP_WORKTREE: "ENTRY_SKIP_WORKTREE", S: "S", - IDXENTRY_UPTODATE: "ENTRY_UPTODATE" + IDXENTRY_UPTODATE: "ENTRY_UPTODATE", }; Object.keys(EXTENDED_FLAGS_MAP).forEach((key) => { const newKey = EXTENDED_FLAGS_MAP[key]; Object.defineProperty(NodeGit.Enums.IDXENTRY_EXTENDED_FLAG, key, { get: util.deprecate( () => NodeGit.Index.ENTRY_EXTENDED_FLAG[newKey], - `Use NodeGit.Index.ENTRY_EXTENDED_FLAG.${newKey} instead of ` + - `NodeGit.Enums.IDXENTRY_EXTENDED_FLAG.${key}.` - ) + `Use NodeGit.Index.ENTRY_EXTENDED_FLAG.${newKey} instead of ` + `NodeGit.Enums.IDXENTRY_EXTENDED_FLAG.${key}.` + ), }); }); @@ -95,9 +92,6 @@ var DEPRECATED_EXTENDED_FLAGS = { }; Object.keys(DEPRECATED_EXTENDED_FLAGS).forEach((key) => { Object.defineProperty(NodeGit.Enums.IDXENTRY_EXTENDED_FLAG, key, { - get: util.deprecate( - () => DEPRECATED_EXTENDED_FLAGS[key], - "LibGit2 has removed this flag for public usage." - ) + get: util.deprecate(() => DEPRECATED_EXTENDED_FLAGS[key], "LibGit2 has removed this flag for public usage."), }); }); diff --git a/lib/merge.js b/lib/merge.js index 549bbad91..d459e3ca9 100644 --- a/lib/merge.js +++ b/lib/merge.js @@ -5,19 +5,15 @@ var _commits = Merge.commits; var _merge = Merge.merge; /** - * Merge 2 commits together and create an new index that can - * be used to create a merge commit. + * Merge 2 commits together and create an new index that can be used to create a merge commit. * - * @param {Repository} repo Repository that contains the given commits - * @param {Commit} ourCommit The commit that reflects the destination tree - * @param {Commit} theirCommit The commit to merge into ourCommit - * @param {MergeOptions} [options] The merge tree options (null for default) + * @param {Repository} repo Repository that contains the given commits. + * @param {Commit} ourCommit The commit that reflects the destination tree. + * @param {Commit} theirCommit The commit to merge into ourCommit. + * @param {MergeOptions} [options] The merge tree options (null for default) */ -Merge.commits = function(repo, ourCommit, theirCommit, options) { - return Promise.all([ - repo.getCommit(ourCommit), - repo.getCommit(theirCommit) - ]).then(function(commits) { +Merge.commits = function (repo, ourCommit, theirCommit, options) { + return Promise.all([repo.getCommit(ourCommit), repo.getCommit(theirCommit)]).then(function (commits) { return _commits.call(this, repo, commits[0], commits[1], options); }); }; @@ -25,17 +21,15 @@ Merge.commits = function(repo, ourCommit, theirCommit, options) { /** * Merge a commit into HEAD and writes the results to the working directory. * - * @param {Repository} repo Repository that contains the given commits - * @param {AnnotatedCommit} theirHead The annotated commit to merge into HEAD - * @param {MergeOptions} [mergeOpts] The merge tree options (null for default) - * @param {CheckoutOptions} [checkoutOpts] The checkout options - * (null for default) + * @param {Repository} repo Repository that contains the given commits. + * @param {AnnotatedCommit} theirHead The annotated commit to merge into HEAD. + * @param {MergeOptions} [mergeOpts] The merge tree options (null for default) + * @param {CheckoutOptions} [checkoutOpts] The checkout options (null for default) */ -Merge.merge = function(repo, theirHead, mergeOpts, checkoutOpts) { +Merge.merge = function (repo, theirHead, mergeOpts, checkoutOpts) { // Even though git_merge takes an array of annotated_commits, it expects // exactly one to have been passed in or it will throw an error... ¯\_(ツ)_/¯ var theirHeads = [theirHead]; - return _merge.call(this, repo, theirHeads, theirHeads.length, - mergeOpts, checkoutOpts); + return _merge.call(this, repo, theirHeads, theirHeads.length, mergeOpts, checkoutOpts); }; diff --git a/lib/note.js b/lib/note.js index 8e46427cf..8fc2eefb8 100644 --- a/lib/note.js +++ b/lib/note.js @@ -5,7 +5,7 @@ var Note = NodeGit.Note; var _foreach = Note.foreach; // Override Note.foreach to eliminate the need to pass null payload -Note.foreach = function(repo, notesRef, callback) { +Note.foreach = function (repo, notesRef, callback) { function wrapperCallback(blobId, objectId) { // We need to copy the OID since libgit2 types are getting cleaned up // incorrectly right now in callbacks diff --git a/lib/object.js b/lib/object.js index 680aebd12..0855f9f69 100644 --- a/lib/object.js +++ b/lib/object.js @@ -5,41 +5,42 @@ var Obj = NodeGit.Object; /** * Is this object a blob? - * @return {Boolean} + * + * @returns {boolean} */ -Obj.prototype.isBlob = function() { +Obj.prototype.isBlob = function () { return this.type() == Obj.TYPE.BLOB; }; /** * Is this object a commit? - * @return {Boolean} + * + * @returns {boolean} */ -Obj.prototype.isCommit = function() { +Obj.prototype.isCommit = function () { return this.type() == Obj.TYPE.COMMIT; }; /** * Is this object a tag? - * @return {Boolean} + * + * @returns {boolean} */ -Obj.prototype.isTag = function() { +Obj.prototype.isTag = function () { return this.type() == Obj.TYPE.TAG; }; /** * Is this object a tree? - * @return {Boolean} + * + * @returns {boolean} */ -Obj.prototype.isTree = function() { +Obj.prototype.isTree = function () { return this.type() == Obj.TYPE.TREE; }; // Deprecated ----------------------------------------------------------------- Object.defineProperty(Obj.TYPE, "BAD", { - get: util.deprecate( - () => Obj.TYPE.INVALID, - "Use NodeGit.Object.TYPE.INVALID instead of NodeGit.Object.TYPE.BAD." - ) + get: util.deprecate(() => Obj.TYPE.INVALID, "Use NodeGit.Object.TYPE.INVALID instead of NodeGit.Object.TYPE.BAD."), }); diff --git a/lib/odb_object.js b/lib/odb_object.js index cd5995eb5..8ade3ed97 100644 --- a/lib/odb_object.js +++ b/lib/odb_object.js @@ -2,7 +2,7 @@ var NodeGit = require("../"); var OdbObject = NodeGit.OdbObject; -OdbObject.prototype.toString = function(size) { +OdbObject.prototype.toString = function (size) { size = size || this.size(); return this.data().toBuffer(size).toString(); diff --git a/lib/oid.js b/lib/oid.js index fcbf9b48f..c5ec2cefa 100644 --- a/lib/oid.js +++ b/lib/oid.js @@ -4,20 +4,20 @@ var Oid = NodeGit.Oid; // Backwards compatibility. Object.defineProperties(Oid.prototype, { - "allocfmt": { + allocfmt: { value: Oid.prototype.tostrS, - enumerable: false + enumerable: false, }, - "toString": { + toString: { value: Oid.prototype.tostrS, - enumerable: false - } + enumerable: false, + }, }); -Oid.prototype.copy = function() { +Oid.prototype.copy = function () { return this.cpy(); // seriously??? }; -Oid.prototype.inspect = function() { +Oid.prototype.inspect = function () { return "[Oid " + this.allocfmt() + "]"; }; diff --git a/lib/rebase.js b/lib/rebase.js index 821d470dd..b3ef18c58 100644 --- a/lib/rebase.js +++ b/lib/rebase.js @@ -6,32 +6,19 @@ var _open = Rebase.open; function defaultRebaseOptions(repository, options, checkoutStrategy) { if (options) { - // Ensure we don't modify the passed-in options object. - // This could lead to us recursing commitCreateCb if the same - // options object is later re-used. + // Ensure we don't modify the passed-in options object. + // This could lead to us recursing commitCreateCb if the same + // options object is later re-used. options = Object.assign({}, options); if (options.signingCb && !options.commitCreateCb) { console.warn("signingCb is deperecated, use commitCreateCb instead."); - let signingCb = options.signingCb; - options.commitCreateCb = function ( - author, - committer, - message_encoding, - message, - tree, - parent_count, - parents - ) { - return repository.createCommitWithSignature( - null, - author, - committer, - message, - tree, - parents, - signingCb).then((oid) => { + const signingCb = options.signingCb; + options.commitCreateCb = function (author, committer, message_encoding, message, tree, parent_count, parents) { + return repository + .createCommitWithSignature(null, author, committer, message, tree, parents, signingCb) + .then((oid) => { return oid; }); }; @@ -39,8 +26,8 @@ function defaultRebaseOptions(repository, options, checkoutStrategy) { } else if (checkoutStrategy) { options = { checkoutOptions: { - checkoutStrategy: checkoutStrategy - } + checkoutStrategy: checkoutStrategy, + }, }; } @@ -48,39 +35,35 @@ function defaultRebaseOptions(repository, options, checkoutStrategy) { } /** - * Initializes a rebase + * Initializes a rebase. + * + * @param {Repository} repo The repository to perform the rebase. + * @param {AnnotatedCommit} branch The terminal commit to rebase, or NULL to rebase the current branch. + * @param {AnnotatedCommit} upstream The commit to begin rebasing from, or NULL to rebase all reachable commits. + * @param {AnnotatedCommit} onto The branch to rebase onto, or NULL to rebase onto the given upstream. + * @param {RebaseOptions} options Options to specify how rebase is performed, + * or NULL. + * @returns {Remote} * @async - * @param {Repository} repo The repository to perform the rebase - * @param {AnnotatedCommit} branch The terminal commit to rebase, or NULL to - * rebase the current branch - * @param {AnnotatedCommit} upstream The commit to begin rebasing from, or NULL - * to rebase all reachable commits - * @param {AnnotatedCommit} onto The branch to rebase onto, or NULL to rebase - * onto the given upstream - * @param {RebaseOptions} options Options to specify how rebase is performed, - * or NULL - * @return {Remote} */ -Rebase.init = function(repository, branch, upstream, onto, options) { - return _init(repository, branch, upstream, onto, defaultRebaseOptions( +Rebase.init = function (repository, branch, upstream, onto, options) { + return _init( repository, - options, - NodeGit.Checkout.STRATEGY.FORCE - )); + branch, + upstream, + onto, + defaultRebaseOptions(repository, options, NodeGit.Checkout.STRATEGY.FORCE) + ); }; /** - * Opens an existing rebase that was previously started by either an invocation - * of Rebase.open or by another client. + * Opens an existing rebase that was previously started by either an invocation of Rebase.open or by another client. + * + * @param {Repository} repo The repository that has a rebase in-progress. + * @param {RebaseOptions} options Options to specify how rebase is performed. + * @returns {Remote} * @async - * @param {Repository} repo The repository that has a rebase in-progress - * @param {RebaseOptions} options Options to specify how rebase is performed - * @return {Remote} */ -Rebase.open = function(repository, options) { - return _open(repository, defaultRebaseOptions( - repository, - options, - NodeGit.Checkout.STRATEGY.SAFE - )); +Rebase.open = function (repository, options) { + return _open(repository, defaultRebaseOptions(repository, options, NodeGit.Checkout.STRATEGY.SAFE)); }; diff --git a/lib/reference.js b/lib/reference.js index af3e00621..b7d0c4d61 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -6,70 +6,77 @@ var Reference = NodeGit.Reference; var Branch = NodeGit.Branch; /** -* Retrieves the reference by it's short name -* @async -* @param {Repository} repo The repo that the reference lives in -* @param {String|Reference} id The reference to lookup -* @param {Function} callback -* @return {Reference} -*/ + * Retrieves the reference by it's short name. + * + * @param {Repository} repo The repo that the reference lives in. + * @param {string | Reference} id The reference to lookup. + * @param {Function} callback + * @returns {Reference} + * @async + */ Reference.dwim = LookupWrapper(Reference, Reference.dwim); /** -* Retrieves the reference pointed to by the oid -* @async -* @param {Repository} repo The repo that the reference lives in -* @param {String|Reference} id The reference to lookup -* @param {Function} callback -* @return {Reference} -*/ + * Retrieves the reference pointed to by the oid. + * + * @param {Repository} repo The repo that the reference lives in. + * @param {string | Reference} id The reference to lookup. + * @param {Function} callback + * @returns {Reference} + * @async + */ Reference.lookup = LookupWrapper(Reference); /** - * Returns true if this reference is not symbolic - * @return {Boolean} + * Returns true if this reference is not symbolic. + * + * @returns {boolean} */ -Reference.prototype.isConcrete = function() { +Reference.prototype.isConcrete = function () { return this.type() == Reference.TYPE.DIRECT; }; /** - * Returns if the ref is pointed at by HEAD - * @return {Boolean} + * Returns if the ref is pointed at by HEAD. + * + * @returns {boolean} */ -Reference.prototype.isHead = function() { +Reference.prototype.isHead = function () { return Branch.isHead(this); }; /** - * Returns true if this reference is symbolic - * @return {Boolean} + * Returns true if this reference is symbolic. + * + * @returns {boolean} */ -Reference.prototype.isSymbolic = function() { +Reference.prototype.isSymbolic = function () { return this.type() == Reference.TYPE.SYMBOLIC; }; /** - * Returns true if this reference is valid - * @return {Boolean} + * Returns true if this reference is valid. + * + * @returns {boolean} */ -Reference.prototype.isValid = function() { +Reference.prototype.isValid = function () { return this.type() != Reference.TYPE.INVALID; }; /** * Returns the name of the reference. - * @return {String} + * + * @returns {string} */ -Reference.prototype.toString = function() { - return this.name(); +Reference.prototype.toString = function () { + return this.name(); }; const getTerminal = (repo, refName, depth = 10, prevRef = null) => { if (depth <= 0) { return Promise.resolve({ error: NodeGit.Error.CODE.ENOTFOUND, - out: prevRef + out: prevRef, }); } @@ -78,23 +85,22 @@ const getTerminal = (repo, refName, depth = 10, prevRef = null) => { if (ref.type() === NodeGit.Reference.TYPE.DIRECT) { return { error: NodeGit.Error.CODE.OK, - out: ref + out: ref, }; } else { - return getTerminal(repo, ref.symbolicTarget(), depth - 1, ref) - .then(({ error, out }) => { - if (error === NodeGit.Error.CODE.ENOTFOUND && !out) { - return { error, out: ref }; - } else { - return { error, out }; - } - }); + return getTerminal(repo, ref.symbolicTarget(), depth - 1, ref).then(({ error, out }) => { + if (error === NodeGit.Error.CODE.ENOTFOUND && !out) { + return { error, out: ref }; + } else { + return { error, out }; + } + }); } }) .catch((error) => { return { error: error.errno, - out: null + out: null, }; }); }; @@ -105,28 +111,21 @@ const getSignatureForReflog = (repo) => { return Promise.resolve(NodeGit.Signature.now(name, email)); } - return NodeGit.Signature.default(repo) - .catch(() => NodeGit.Signature.now("unknown", "unknown")); + return NodeGit.Signature.default(repo).catch(() => NodeGit.Signature.now("unknown", "unknown")); }; /** - * Given a reference name, follows symbolic links and updates the direct - * reference to point to a given OID. Updates the reflog with a given message. + * Given a reference name, follows symbolic links and updates the direct reference to point to a given OID. Updates the + * reflog with a given message. * + * @param {Repository} repo The repo where the reference and objects live. + * @param {string} refName The reference name to update. + * @param {Oid} oid The target OID that the reference will point to. + * @param {string} logMessage The reflog message to be writted. + * @param {Signature} signature Optional signature to use for the reflog entry. * @async - * @param {Repository} repo The repo where the reference and objects live - * @param {String} refName The reference name to update - * @param {Oid} oid The target OID that the reference will point to - * @param {String} logMessage The reflog message to be writted - * @param {Signature} signature Optional signature to use for the reflog entry */ -Reference.updateTerminal = function ( - repo, - refName, - oid, - logMessage, - signature -) { +Reference.updateTerminal = function (repo, refName, oid, logMessage, signature) { let signatureToUse; let promiseChain = Promise.resolve(); @@ -145,30 +144,11 @@ Reference.updateTerminal = function ( .then(() => getTerminal(repo, refName)) .then(({ error, out }) => { if (error === NodeGit.Error.CODE.ENOTFOUND && out) { - return NodeGit.Reference.create( - repo, - out.symbolicTarget(), - oid, - 0, - logMessage - ); + return NodeGit.Reference.create(repo, out.symbolicTarget(), oid, 0, logMessage); } else if (error === NodeGit.Error.CODE.ENOTFOUND) { - return NodeGit.Reference.create( - repo, - refName, - oid, - 0, - logMessage - ); + return NodeGit.Reference.create(repo, refName, oid, 0, logMessage); } else { - return NodeGit.Reference.createMatching( - repo, - out.name(), - oid, - 1, - out.target(), - logMessage - ); + return NodeGit.Reference.createMatching(repo, out.name(), oid, 1, out.target(), logMessage); } }) .then(() => NodeGit.Reflog.read(repo, refName)) @@ -191,14 +171,14 @@ Object.defineProperty(NodeGit.Reference.TYPE, "OID", { get: util.deprecate( () => NodeGit.Reference.TYPE.DIRECT, "Use NodeGit.Reference.TYPE.DIRECT instead of NodeGit.Reference.TYPE.OID." - ) + ), }); Object.defineProperty(NodeGit.Reference.TYPE, "LISTALL", { get: util.deprecate( () => NodeGit.Reference.TYPE.ALL, "Use NodeGit.Reference.TYPE.ALL instead of NodeGit.Reference.TYPE.LISTALL." - ) + ), }); NodeGit.Reference.NORMALIZE = {}; @@ -206,8 +186,7 @@ Object.keys(NodeGit.Reference.FORMAT).forEach((key) => { Object.defineProperty(NodeGit.Reference.NORMALIZE, `REF_FORMAT_${key}`, { get: util.deprecate( () => NodeGit.Reference.FORMAT[key], - `Use NodeGit.Reference.FORMAT.${key} instead of ` + - `NodeGit.Reference.NORMALIZE.REF_FORMAT_${key}.` - ) + `Use NodeGit.Reference.FORMAT.${key} instead of ` + `NodeGit.Reference.NORMALIZE.REF_FORMAT_${key}.` + ), }); }); diff --git a/lib/repository.js b/lib/repository.js index 0aa1cac56..3ab26d21e 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -695,8 +695,8 @@ Repository.prototype.createCommitOnHead = function (filesToAdd, author, committe /** * Creates a new lightweight tag. * - * @param {string | Oid} oid string sha or Oid. - * @param {string} name The name of the tag. + * @param {string | Oid} oid String sha or Oid. + * @param {string} name The name of the tag. * @returns {Reference} * @async */ @@ -726,7 +726,7 @@ Repository.prototype.createRevWalk = function () { /** * Creates a new annotated tag. * - * @param {string | Oid} oid string sha or Oid. + * @param {string | Oid} oid String sha or Oid. * @param {string} name The name of the tag. * @param {string} message The description that will be attached to the annotated tag. * @returns {Tag} @@ -773,7 +773,7 @@ Repository.prototype.defaultSignature = function () { /** * Deletes a tag from a repository by the tag name. * - * @param {string} name short or full tag name. + * @param {string} name Short or full tag name. * @async */ Repository.prototype.deleteTagByName = function (name) { @@ -924,7 +924,7 @@ Repository.prototype.fetchheadForeach = function (callback) { /** * Retrieve the blob represented by the oid. * - * @param {string | Oid} oid string sha or Oid. + * @param {string | Oid} oid String sha or Oid. * @returns {Blob} * @async */ @@ -964,7 +964,7 @@ Repository.prototype.getBranchCommit = function (name) { /** * Retrieve the commit identified by oid. * - * @param {string | Oid} oid string sha or Oid. + * @param {string | Oid} oid String sha or Oid. * @returns {Commit} * @async */ @@ -1188,7 +1188,7 @@ Repository.prototype.getTag = function (oid) { /** * Retrieve the tag represented by the tag name. * - * @param {string} name Short or full tag name. + * @param {string} name Short or full tag name. * @returns {Tag} * @async */ @@ -1210,7 +1210,7 @@ Repository.prototype.getTagByName = function (name) { /** * Retrieve the tree represented by the oid. * - * @param {string | Oid} oid string sha or Oid. + * @param {string | Oid} oid String sha or Oid. * @returns {Tree} * @async */ @@ -1322,7 +1322,7 @@ Repository.prototype.rebaseBranches = function ( let branchCommit; let upstreamCommit; let ontoCommit; - let mergeOptions = (rebaseOptions || {}).mergeOptions; + const mergeOptions = (rebaseOptions || {}).mergeOptions; let promiseChain = Promise.resolve(); @@ -1340,46 +1340,46 @@ Repository.prototype.rebaseBranches = function ( upstream ? repo.getReference(upstream) : null, onto ? repo.getReference(onto) : null, ]) - .then(function (refs) { - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repo, refs[0]), - upstream ? NodeGit.AnnotatedCommit.fromRef(repo, refs[1]) : null, - onto ? NodeGit.AnnotatedCommit.fromRef(repo, refs[2]) : null, - ]); - }) - .then(function (annotatedCommits) { - branchCommit = annotatedCommits[0]; - upstreamCommit = annotatedCommits[1]; - ontoCommit = annotatedCommits[2]; + .then(function (refs) { + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repo, refs[0]), + upstream ? NodeGit.AnnotatedCommit.fromRef(repo, refs[1]) : null, + onto ? NodeGit.AnnotatedCommit.fromRef(repo, refs[2]) : null, + ]); + }) + .then(function (annotatedCommits) { + branchCommit = annotatedCommits[0]; + upstreamCommit = annotatedCommits[1]; + ontoCommit = annotatedCommits[2]; - return NodeGit.Merge.base(repo, branchCommit.id(), upstreamCommit.id()); - }) - .then(function (oid) { - if (oid.toString() === branchCommit.id().toString()) { - // we just need to fast-forward - return repo.mergeBranches(branch, upstream, null, null, mergeOptions).then(function () { + return NodeGit.Merge.base(repo, branchCommit.id(), upstreamCommit.id()); + }) + .then(function (oid) { + if (oid.toString() === branchCommit.id().toString()) { + // we just need to fast-forward + return repo.mergeBranches(branch, upstream, null, null, mergeOptions).then(function () { + // checkout 'branch' to match the behavior of rebase + return repo.checkoutBranch(branch); + }); + } else if (oid.toString() === upstreamCommit.id().toString()) { + // 'branch' is already on top of 'upstream' // checkout 'branch' to match the behavior of rebase return repo.checkoutBranch(branch); - }); - } else if (oid.toString() === upstreamCommit.id().toString()) { - // 'branch' is already on top of 'upstream' - // checkout 'branch' to match the behavior of rebase - return repo.checkoutBranch(branch); - } + } - return NodeGit.Rebase.init(repo, branchCommit, upstreamCommit, ontoCommit, rebaseOptions) - .then(function (rebase) { - return performRebase(repo, rebase, signature, beforeNextFn, beforeFinishFn); - }) - .then(function (error) { - if (error) { - throw error; - } - }); - }) - .then(function () { - return repo.getBranchCommit("HEAD"); - }) + return NodeGit.Rebase.init(repo, branchCommit, upstreamCommit, ontoCommit, rebaseOptions) + .then(function (rebase) { + return performRebase(repo, rebase, signature, beforeNextFn, beforeFinishFn); + }) + .then(function (error) { + if (error) { + throw error; + } + }); + }) + .then(function () { + return repo.getBranchCommit("HEAD"); + }) ); }; @@ -1676,9 +1676,9 @@ Repository.prototype.stageFilemode = function (filePath, stageNew, additionalDif /** * Stages or unstages line selection of a specified file. * - * @param {string} filePath The relative path of this file in the repo. - * @param {Array} selectedLines The array of DiffLine objects selected for staging or unstaging. - * @param {boolean} isSelectionStaged Are the selected lines currently staged. + * @param {string} filePath The relative path of this file in the repo. + * @param {Array} selectedLines The array of DiffLine objects selected for staging or unstaging. + * @param {boolean} isSelectionStaged Are the selected lines currently staged. * @returns {number} 0 or an error code. * @async */ diff --git a/lib/reset.js b/lib/reset.js index 38b6b1bff..95512b46e 100644 --- a/lib/reset.js +++ b/lib/reset.js @@ -7,41 +7,32 @@ var _reset = Reset.reset; /** * Look up a refs's commit. * + * @param {Repository} repo Repository where to perform the reset operation. + * @param {Commit | Tag} target The committish which content will be used to reset the content of the index. + * @param {Strarray} pathspecs List of pathspecs to operate on. + * @returns {number} 0. On success or an error code. * @async - * @param {Repository} repo Repository where to perform the reset operation. - * @param {Commit|Tag} target The committish which content will be used to reset - * the content of the index. - * @param {Strarray} pathspecs List of pathspecs to operate on. - * - * @return {Number} 0 on success or an error code */ -Reset.default = function(repo, target, pathspecs) { +Reset.default = function (repo, target, pathspecs) { return _default.call(this, repo, target, pathspecs); }; /** * Reset a repository's current HEAD to the specified target. * + * @param {Repository} repo Repository where to perform the reset operation. + * @param {Commit | Tag} target Committish to which the Head should be moved to. + * This object must belong to the given `repo` and can either be a git_commit or a + * git_tag. When a git_tag is being passed, it should be dereferencable to a + * git_commit which oid will be used as the target of the branch. + * @param {number} resetType Kind of reset operation to perform. + * @param {CheckoutOptions} opts Checkout options to be used for a HARD reset. + * The checkout_strategy field will be overridden (based on reset_type). This + * parameter can be used to propagate notify and progress callbacks. + * @returns {number} 0. On success or an error code. * @async - * @param {Repository} repo Repository where to perform the reset operation. - * - * @param {Commit|Tag} target Committish to which the Head should be moved to. - * This object must belong to the given `repo` and can - * either be a git_commit or a git_tag. When a git_tag is - * being passed, it should be dereferencable to a - * git_commit which oid will be used as the target of the - * branch. - * @param {Number} resetType Kind of reset operation to perform. - * - * @param {CheckoutOptions} opts Checkout options to be used for a HARD reset. - * The checkout_strategy field will be overridden - * (based on reset_type). This parameter can be - * used to propagate notify and progress - * callbacks. - * - * @return {Number} 0 on success or an error code */ -Reset.reset = function(repo, target, resetType, opts) { +Reset.reset = function (repo, target, resetType, opts) { if (repo !== target.repo) { // this is the same that is performed on libgit2's side // https://github.com/nodegit/libgit2/blob/8d89e409616831b7b30a5ca7b89354957137b65e/src/reset.c#L120-L124 diff --git a/lib/revparse.js b/lib/revparse.js index 74c1fa4c2..e68a4783d 100644 --- a/lib/revparse.js +++ b/lib/revparse.js @@ -10,9 +10,6 @@ const MODE = { NodeGit.Revparse.MODE = {}; Object.keys(MODE).forEach((key) => { Object.defineProperty(NodeGit.Revparse.MODE, key, { - get: util.deprecate( - () => MODE[key], - `Use NodeGit.Revspec.TYPE.${key} instead of NodeGit.Revparse.MODE.${key}.` - ) + get: util.deprecate(() => MODE[key], `Use NodeGit.Revspec.TYPE.${key} instead of NodeGit.Revparse.MODE.${key}.`), }); }); diff --git a/lib/revwalk.js b/lib/revwalk.js index 7787fc89b..c0ddd0033 100644 --- a/lib/revwalk.js +++ b/lib/revwalk.js @@ -2,101 +2,106 @@ var NodeGit = require("../"); var Revwalk = NodeGit.Revwalk; Object.defineProperty(Revwalk.prototype, "repo", { - get: function () { return this.repository(); }, - configurable: true + get: function () { + return this.repository(); + }, + configurable: true, }); var _sorting = Revwalk.prototype.sorting; /** - * @typedef historyEntry * @type {Object} - * @property {Commit} commit the commit for this entry - * @property {Number} status the status of the file in the commit - * @property {String} newName the new name that is provided when status is - * renamed - * @property {String} oldName the old name that is provided when status is - * renamed + * @typedef historyEntry + * @property {Commit} commit The commit for this entry. + * @property {number} status The status of the file in the commit. + * @property {string} newName The new name that is provided when status is renamed. + * @property {string} oldName The old name that is provided when status is renamed. */ var fileHistoryWalk = Revwalk.prototype.fileHistoryWalk; /** - * @param {String} filePath - * @param {Number} max_count + * @param {string} filePath + * @param {number} max_count + * @returns {historyEntry[]} * @async - * @return {Array} */ Revwalk.prototype.fileHistoryWalk = fileHistoryWalk; /** * Get a number of commits. * + * @param {number} count (default: 10) + * @returns {Commit[]} * @async - * @param {Number} count (default: 10) - * @return {Array} */ -Revwalk.prototype.getCommits = function(count) { +Revwalk.prototype.getCommits = function (count) { count = count || 10; var promises = []; var walker = this; function walkCommitsCount(count) { - if (count === 0) { return; } - - return walker.next().then(function(oid) { - promises.push(walker.repo.getCommit(oid)); - return walkCommitsCount(count - 1); - }) - .catch(function(error) { - if (error.errno !== NodeGit.Error.CODE.ITEROVER) { - throw error; - } - }); + if (count === 0) { + return; + } + + return walker + .next() + .then(function (oid) { + promises.push(walker.repo.getCommit(oid)); + return walkCommitsCount(count - 1); + }) + .catch(function (error) { + if (error.errno !== NodeGit.Error.CODE.ITEROVER) { + throw error; + } + }); } - return walkCommitsCount(count).then(function() { + return walkCommitsCount(count).then(function () { return Promise.all(promises); }); }; /** - * Walk the history grabbing commits until the checkFn called with the - * current commit returns false. + * Walk the history grabbing commits until the checkFn called with the current commit returns false. * + * @param {Function} checkFn Function returns false to stop walking. + * @returns {Array} * @async - * @param {Function} checkFn function returns false to stop walking - * @return {Array} */ -Revwalk.prototype.getCommitsUntil = function(checkFn) { +Revwalk.prototype.getCommitsUntil = function (checkFn) { var commits = []; var walker = this; function walkCommitsCb() { - return walker.next().then(function(oid) { - return walker.repo.getCommit(oid).then(function(commit) { - commits.push(commit); - if (checkFn(commit)) { - return walkCommitsCb(); + return walker + .next() + .then(function (oid) { + return walker.repo.getCommit(oid).then(function (commit) { + commits.push(commit); + if (checkFn(commit)) { + return walkCommitsCb(); + } + }); + }) + .catch(function (error) { + if (error.errno !== NodeGit.Error.CODE.ITEROVER) { + throw error; } }); - }) - .catch(function(error) { - if (error.errno !== NodeGit.Error.CODE.ITEROVER) { - throw error; - } - }); } - return walkCommitsCb().then(function() { + return walkCommitsCb().then(function () { return commits; }); }; /** - * Set the sort order for the revwalk. This function takes variable arguments - * like `revwalk.sorting(NodeGit.RevWalk.Topological, NodeGit.RevWalk.Reverse).` + * Set the sort order for the revwalk. This function takes variable arguments like + * `revwalk.sorting(NodeGit.RevWalk.Topological, NodeGit.RevWalk.Reverse).` * - * @param {Number} sort + * @param {number} sort */ -Revwalk.prototype.sorting = function() { +Revwalk.prototype.sorting = function () { var sort = 0; for (var i = 0; i < arguments.length; i++) { @@ -110,16 +115,16 @@ Revwalk.prototype.sorting = function() { * Walk the history from the given oid. The callback is invoked for each commit; * When the walk is over, the callback is invoked with `(null, null)`. * - * @param {Oid} oid - * @param {Function} callback + * @param {Oid} oid + * @param {Function} callback */ -Revwalk.prototype.walk = function(oid, callback) { +Revwalk.prototype.walk = function (oid, callback) { var revwalk = this; this.push(oid); function walk() { - revwalk.next().then(function(oid) { + revwalk.next().then(function (oid) { if (!oid) { if (typeof callback === "function") { return callback(); @@ -128,7 +133,7 @@ Revwalk.prototype.walk = function(oid, callback) { return; } - revwalk.repo.getCommit(oid).then(function(commit) { + revwalk.repo.getCommit(oid).then(function (commit) { if (typeof callback === "function") { callback(null, commit); } diff --git a/lib/signature.js b/lib/signature.js index 4dfe84a36..33dad1a57 100644 --- a/lib/signature.js +++ b/lib/signature.js @@ -11,10 +11,11 @@ const toPaddedDoubleDigitString = (number) => { /** * Standard string representation of an author. - * @param {Boolean} withTime Whether or not to include timestamp - * @return {String} Representation of the author. + * + * @param {boolean} withTime Whether or not to include timestamp. + * @returns {string} Representation. Of the author. */ -Signature.prototype.toString = function(withTime) { +Signature.prototype.toString = function (withTime) { const name = this.name().toString(); const email = this.email().toString(); @@ -29,7 +30,7 @@ Signature.prototype.toString = function(withTime) { const offsetMagnitude = Math.abs(offset); const time = when.time(); - const sign = (offset < 0 || when.sign() === "-") ? "-" : "+"; + const sign = offset < 0 || when.sign() === "-" ? "-" : "+"; const hours = toPaddedDoubleDigitString(Math.floor(offsetMagnitude / 60)); const minutes = toPaddedDoubleDigitString(offsetMagnitude % 60); diff --git a/lib/stash.js b/lib/stash.js index 88e9f3510..c320c99f7 100644 --- a/lib/stash.js +++ b/lib/stash.js @@ -4,7 +4,7 @@ var Stash = NodeGit.Stash; var _foreach = Stash.foreach; // Override Stash.foreach to eliminate the need to pass null payload -Stash.foreach = function(repo, callback) { +Stash.foreach = function (repo, callback) { function wrappedCallback(index, message, oid) { // We need to copy the OID since libgit2 types are getting cleaned up // incorrectly right now in callbacks diff --git a/lib/status.js b/lib/status.js index 93aca08e0..239d5a3f4 100644 --- a/lib/status.js +++ b/lib/status.js @@ -6,11 +6,11 @@ var _foreach = Status.foreach; var _foreachExt = Status.foreachExt; // Override Status.foreach to eliminate the need to pass null payload -Status.foreach = function(repo, callback) { +Status.foreach = function (repo, callback) { return _foreach(repo, callback, null); }; // Override Status.foreachExt to eliminate the need to pass null payload -Status.foreachExt = function(repo, opts, callback) { +Status.foreachExt = function (repo, opts, callback) { return _foreachExt(repo, opts, callback, null); }; diff --git a/lib/status_file.js b/lib/status_file.js index ac6b124e3..169136db3 100644 --- a/lib/status_file.js +++ b/lib/status_file.js @@ -1,7 +1,7 @@ var NodeGit = require("../"); var Status = NodeGit.Status; -var StatusFile = function(args) { +var StatusFile = function (args) { var path = args.path; var status = args.status; var entry = args.entry; @@ -17,10 +17,10 @@ var StatusFile = function(args) { var codes = Status.STATUS; - var getStatus = function() { + var getStatus = function () { var fileStatuses = []; - for(var key in Status.STATUS) { + for (var key in Status.STATUS) { if (status & Status.STATUS[key]) { fileStatuses.push(key); } @@ -33,73 +33,72 @@ var StatusFile = function(args) { path: path, entry: entry, statusBit: status, - statuses: getStatus() + statuses: getStatus(), }; return { - headToIndex: function() { + headToIndex: function () { if (data.entry) { return entry.headToIndex(); } else { return undefined; } }, - indexToWorkdir: function() { + indexToWorkdir: function () { if (data.entry) { return entry.indexToWorkdir(); } else { return undefined; } }, - inIndex: function() { - return status & codes.INDEX_NEW || - status & codes.INDEX_MODIFIED || - status & codes.INDEX_DELETED || - status & codes.INDEX_TYPECHANGE || - status & codes.INDEX_RENAMED; + inIndex: function () { + return ( + status & codes.INDEX_NEW || + status & codes.INDEX_MODIFIED || + status & codes.INDEX_DELETED || + status & codes.INDEX_TYPECHANGE || + status & codes.INDEX_RENAMED + ); }, - inWorkingTree: function() { - return status & codes.WT_NEW || - status & codes.WT_MODIFIED || - status & codes.WT_DELETED || - status & codes.WT_TYPECHANGE || - status & codes.WT_RENAMED; + inWorkingTree: function () { + return ( + status & codes.WT_NEW || + status & codes.WT_MODIFIED || + status & codes.WT_DELETED || + status & codes.WT_TYPECHANGE || + status & codes.WT_RENAMED + ); }, - isConflicted: function() { + isConflicted: function () { return status & codes.CONFLICTED; }, - isDeleted: function() { - return status & codes.WT_DELETED || - status & codes.INDEX_DELETED; + isDeleted: function () { + return status & codes.WT_DELETED || status & codes.INDEX_DELETED; }, - isIgnored: function() { + isIgnored: function () { return status & codes.IGNORED; }, - isModified: function() { - return status & codes.WT_MODIFIED || - status & codes.INDEX_MODIFIED; + isModified: function () { + return status & codes.WT_MODIFIED || status & codes.INDEX_MODIFIED; }, - isNew: function() { - return status & codes.WT_NEW || - status & codes.INDEX_NEW; + isNew: function () { + return status & codes.WT_NEW || status & codes.INDEX_NEW; }, - isRenamed: function() { - return status & codes.WT_RENAMED || - status & codes.INDEX_RENAMED; + isRenamed: function () { + return status & codes.WT_RENAMED || status & codes.INDEX_RENAMED; }, - isTypechange: function() { - return status & codes.WT_TYPECHANGE || - status & codes.INDEX_TYPECHANGE; + isTypechange: function () { + return status & codes.WT_TYPECHANGE || status & codes.INDEX_TYPECHANGE; }, - path: function() { + path: function () { return data.path; }, - status: function() { + status: function () { return data.statuses; }, - statusBit: function() { + statusBit: function () { return data.statusBit; - } + }, }; }; diff --git a/lib/submodule.js b/lib/submodule.js index 2b0cb530d..aecea9db9 100644 --- a/lib/submodule.js +++ b/lib/submodule.js @@ -5,6 +5,6 @@ var Submodule = NodeGit.Submodule; var _foreach = Submodule.foreach; // Override Submodule.foreach to eliminate the need to pass null payload -Submodule.foreach = function(repo, callback) { +Submodule.foreach = function (repo, callback) { return _foreach(repo, callback, null); }; diff --git a/lib/tag.js b/lib/tag.js index aae20c930..98c55f14b 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -8,73 +8,62 @@ const signatureRegexesBySignatureType = { /-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/gm, /-----BEGIN PGP MESSAGE-----[\s\S]+?-----END PGP MESSAGE-----/gm, ], - x509: [ - /-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----/gm, - ] + x509: [/-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----/gm], }; /** - * Retrieves the tag pointed to by the oid + * Retrieves the tag pointed to by the oid. + * + * @param {Repository} repo The repo that the tag lives in. + * @param {string | Oid | Tag} id The tag to lookup. + * @returns {Tag} * @async - * @param {Repository} repo The repo that the tag lives in - * @param {String|Oid|Tag} id The tag to lookup - * @return {Tag} */ Tag.lookup = LookupWrapper(Tag); /** - * @async * @param {Repository} repo - * @param {String} tagName - * @param {Oid} target - * @param {Signature} tagger - * @return {String} + * @param {string} tagName + * @param {Oid} target + * @param {Signature} tagger + * @returns {string} + * @async */ -Tag.createBuffer = function(repo, tagName, target, tagger, message) { - return NodeGit.Object.lookup(repo, target, NodeGit.Object.TYPE.ANY) - .then((object) => { - if (!NodeGit.Object.typeisloose(object.type())) { - throw new Error("Object must be a loose type"); - } +Tag.createBuffer = function (repo, tagName, target, tagger, message) { + return NodeGit.Object.lookup(repo, target, NodeGit.Object.TYPE.ANY).then((object) => { + if (!NodeGit.Object.typeisloose(object.type())) { + throw new Error("Object must be a loose type"); + } - const id = object.id().toString(); - const objectType = NodeGit.Object.type2String(object.type()); - const lines = [ - `object ${id}`, - `type ${objectType}`, - `tag ${tagName}`, - `tagger ${tagger.toString(true)}\n`, - `${message}${message.endsWith("\n") ? "" : "\n"}` - ]; - return lines.join("\n"); - }); + const id = object.id().toString(); + const objectType = NodeGit.Object.type2String(object.type()); + const lines = [ + `object ${id}`, + `type ${objectType}`, + `tag ${tagName}`, + `tagger ${tagger.toString(true)}\n`, + `${message}${message.endsWith("\n") ? "" : "\n"}`, + ]; + return lines.join("\n"); + }); }; -const deprecatedCreateWithSignatureHelper = util.deprecate(function(repo, oidTarget) { +const deprecatedCreateWithSignatureHelper = util.deprecate(function (repo, oidTarget) { return repo.getCommit(oidTarget); }, "Tag.createWithSignature target should be a Git Object, not Oid"); /** - * @async * @param {Repository} repo - * @param {String} tagName - * @param {Object} target - * @param {Signature} tagger - * @param {String} message - * @param {Number} force - * @param {Function} signingCallback Takes a string and returns a string - * representing the signed message - * @return {Oid} + * @param {string} tagName + * @param {Object} target + * @param {Signature} tagger + * @param {string} message + * @param {number} force + * @param {Function} signingCallback Takes a string and returns a string representing the signed message. + * @returns {Oid} + * @async */ -Tag.createWithSignature = async ( - repo, - tagName, - target, - tagger, - message, - force, - signingCallback -) => { +Tag.createWithSignature = async (repo, tagName, target, tagger, message, force, signingCallback) => { let targetOid; if (!target.id) { targetOid = await deprecatedCreateWithSignatureHelper(repo, target); @@ -91,18 +80,9 @@ Tag.createWithSignature = async ( return Tag.createFromBuffer(repo, signedTagString, force); } case NodeGit.Error.CODE.PASSTHROUGH: - return Tag.create( - repo, - tagName, - targetOid, - tagger, - message, - force - ); + return Tag.create(repo, tagName, targetOid, tagger, message, force); default: { - const error = new Error( - `Tag.createWithSignature threw with error code ${code}` - ); + const error = new Error(`Tag.createWithSignature threw with error code ${code}`); error.errno = code; throw error; } @@ -110,12 +90,13 @@ Tag.createWithSignature = async ( }; /** - * Retrieves the signature of an annotated tag + * Retrieves the signature of an annotated tag. + * + * @param {string} signatureType + * @returns {string | null} * @async - * @param {String} signatureType - * @return {String|null} */ -Tag.prototype.extractSignature = function(signatureType = "gpgsig") { +Tag.prototype.extractSignature = function (signatureType = "gpgsig") { const id = this.id(); const repo = this.repo; const signatureRegexes = signatureRegexesBySignatureType[signatureType]; @@ -123,19 +104,22 @@ Tag.prototype.extractSignature = function(signatureType = "gpgsig") { throw new Error("Unsupported signature type"); } - return repo.odb().then((odb) => { - return odb.read(id); - }).then((odbObject) => { - const odbData = odbObject.toString(); + return repo + .odb() + .then((odb) => { + return odb.read(id); + }) + .then((odbObject) => { + const odbData = odbObject.toString(); - for (const regex of signatureRegexes) { - const matchResult = odbData.match(regex); + for (const regex of signatureRegexes) { + const matchResult = odbData.match(regex); - if (matchResult !== null) { - return matchResult[0]; + if (matchResult !== null) { + return matchResult[0]; + } } - } - throw new Error("this tag is not signed"); - }); + throw new Error("this tag is not signed"); + }); }; diff --git a/lib/tree.js b/lib/tree.js index b07d96c48..63e9657c6 100644 --- a/lib/tree.js +++ b/lib/tree.js @@ -7,19 +7,21 @@ var Tree = NodeGit.Tree; var Treebuilder = NodeGit.Treebuilder; /** -* Retrieves the tree pointed to by the oid -* @async -* @param {Repository} repo The repo that the tree lives in -* @param {String|Oid|Tree} id The tree to lookup -* @return {Tree} -*/ + * Retrieves the tree pointed to by the oid. + * + * @param {Repository} repo The repo that the tree lives in. + * @param {string | Oid | Tree} id The tree to lookup. + * @returns {Tree} + * @async + */ Tree.lookup = LookupWrapper(Tree); /** * Make builder. This is helpful for modifying trees. - * @return {Treebuilder} + * + * @returns {Treebuilder} */ -Tree.prototype.builder = function() { +Tree.prototype.builder = function () { var builder = Treebuilder.create(this); builder.root = builder; @@ -29,31 +31,34 @@ Tree.prototype.builder = function() { }; /** - * Diff two trees + * Diff two trees. + * + * @param {Tree} tree To diff against. + * @returns {Diff} * @async - * @param {Tree} tree to diff against - * @return {Diff} */ -Tree.prototype.diff = function(tree) { +Tree.prototype.diff = function (tree) { return this.diffWithOptions(tree, null); }; /** - * Diff two trees with options - * @async - * @param {Tree} tree to diff against + * Diff two trees with options. + * + * @param {Tree} tree To diff against. * @param {Object} options - * @return {Diff} + * @returns {Diff} + * @async */ -Tree.prototype.diffWithOptions = function(tree, options) { +Tree.prototype.diffWithOptions = function (tree, options) { return Diff.treeToTree(this.repo, tree, this, options); }; /** * Return an array of the entries in this tree (excluding its children). + * * @returns {TreeEntry[]} */ -Tree.prototype.entries = function() { +Tree.prototype.entries = function () { var size = this.entryCount(); var result = []; @@ -67,10 +72,10 @@ Tree.prototype.entries = function() { /** * Get an entry at the ith position. * - * @param {Number} i - * @return {TreeEntry} + * @param {number} i + * @returns {TreeEntry} */ -Tree.prototype.entryByIndex = function(i) { +Tree.prototype.entryByIndex = function (i) { var entry = this._entryByIndex(i); entry.parent = this; return entry; @@ -79,26 +84,26 @@ Tree.prototype.entryByIndex = function(i) { /** * Get an entry by name; if the tree is a directory, the name is the filename. * - * @param {String} name - * @return {TreeEntry} + * @param {string} name + * @returns {TreeEntry} */ -Tree.prototype.entryByName = function(name) { +Tree.prototype.entryByName = function (name) { var entry = this._entryByName(name); entry.parent = this; return entry; }; /** - * Get an entry at a path. Unlike by name, this takes a fully - * qualified path, like `/foo/bar/baz.javascript` + * Get an entry at a path. Unlike by name, this takes a fully qualified path, like `/foo/bar/baz.javascript` + * + * @param {string} filePath + * @returns {TreeEntry} * @async - * @param {String} filePath - * @return {TreeEntry} */ -Tree.prototype.getEntry = function(filePath) { +Tree.prototype.getEntry = function (filePath) { var tree = this; - return this.entryByPath(filePath).then(function(entry) { + return this.entryByPath(filePath).then(function (entry) { entry.parent = tree; entry.dirtoparent = path.dirname(filePath); return entry; @@ -107,26 +112,23 @@ Tree.prototype.getEntry = function(filePath) { /** * Return the path of this tree, like `/lib/foo/bar` - * @return {String} + * + * @returns {string} */ -Tree.prototype.path = function(_blobsOnly) { +Tree.prototype.path = function (_blobsOnly) { return this.entry ? this.entry.path() : ""; }; /** - * Recursively walk the tree in breadth-first order. Fires an event for each - * entry. - * - * @fires EventEmitter#entry Tree - * @fires EventEmitter#end Array - * @fires EventEmitter#error Error - * - * @param {Boolean} [blobsOnly = true] True to emit only blob & blob executable - * entries. + * Recursively walk the tree in breadth-first order. Fires an event for each entry. * - * @return {EventEmitter} + * @param {boolean} [blobsOnly=true] True to emit only blob & blob executable entries. + * @returns {EventEmitter} + * @fires EventEmitter#entry Tree. + * @fires EventEmitter#end Array + * @fires EventEmitter#error Error. */ -Tree.prototype.walk = function(blobsOnly) { +Tree.prototype.walk = function (blobsOnly) { blobsOnly = typeof blobsOnly === "boolean" ? blobsOnly : true; var self = this; @@ -146,7 +148,7 @@ Tree.prototype.walk = function(blobsOnly) { } tree.entries().forEach(function (entry, _entryIndex) { - if (!blobsOnly || entry.isFile() && !entries.has(entry)) { + if (!blobsOnly || (entry.isFile() && !entries.has(entry))) { event.emit("entry", entry); entries.add(entry); @@ -157,8 +159,7 @@ Tree.prototype.walk = function(blobsOnly) { if (entry.isTree()) { total++; - entry.getTree() - .then(result => bfs(null, result), bfs); + entry.getTree().then((result) => bfs(null, result), bfs); } }); @@ -167,7 +168,7 @@ Tree.prototype.walk = function(blobsOnly) { } } - event.start = function() { + event.start = function () { bfs(null, self); }; diff --git a/lib/tree_entry.js b/lib/tree_entry.js index a978de9a3..9cd999b99 100644 --- a/lib/tree_entry.js +++ b/lib/tree_entry.js @@ -4,22 +4,24 @@ var TreeEntry = NodeGit.TreeEntry; /** * Retrieve the blob for this entry. Make sure to call `isBlob` first! + * + * @returns {Blob} * @async - * @return {Blob} */ -TreeEntry.prototype.getBlob = function() { +TreeEntry.prototype.getBlob = function () { return this.parent.repo.getBlob(this.id()); }; /** * Retrieve the tree for this entry. Make sure to call `isTree` first! + * + * @returns {Tree} * @async - * @return {Tree} */ -TreeEntry.prototype.getTree = function() { +TreeEntry.prototype.getTree = function () { var entry = this; - return this.parent.repo.getTree(this.id()).then(function(tree) { + return this.parent.repo.getTree(this.id()).then(function (tree) { tree.entry = entry; return tree; }); @@ -27,73 +29,80 @@ TreeEntry.prototype.getTree = function() { /** * Is this TreeEntry a blob? Alias for `isFile` - * @return {Boolean} + * + * @returns {boolean} */ -TreeEntry.prototype.isBlob = function() { +TreeEntry.prototype.isBlob = function () { return this.isFile(); }; /** * Is this TreeEntry a directory? Alias for `isTree` - * @return {Boolean} + * + * @returns {boolean} */ -TreeEntry.prototype.isDirectory = function() { +TreeEntry.prototype.isDirectory = function () { return this.isTree(); }; /** * Is this TreeEntry a blob? (i.e., a file) - * @return {Boolean} + * + * @returns {boolean} */ -TreeEntry.prototype.isFile = function() { - return this.filemode() === TreeEntry.FILEMODE.BLOB || - this.filemode() === TreeEntry.FILEMODE.EXECUTABLE; +TreeEntry.prototype.isFile = function () { + return this.filemode() === TreeEntry.FILEMODE.BLOB || this.filemode() === TreeEntry.FILEMODE.EXECUTABLE; }; /** * Is this TreeEntry a submodule? - * @return {Boolean} + * + * @returns {boolean} */ -TreeEntry.prototype.isSubmodule = function() { +TreeEntry.prototype.isSubmodule = function () { return this.filemode() === TreeEntry.FILEMODE.COMMIT; }; /** * Is this TreeEntry a tree? (i.e., a directory) - * @return {Boolean} + * + * @returns {boolean} */ -TreeEntry.prototype.isTree = function() { +TreeEntry.prototype.isTree = function () { return this.filemode() === TreeEntry.FILEMODE.TREE; }; /** * Retrieve the SHA for this TreeEntry. Alias for `sha` - * @return {String} + * + * @returns {string} */ -TreeEntry.prototype.oid = function() { +TreeEntry.prototype.oid = function () { return this.sha(); }; /** * Returns the path for this entry. - * @return {String} + * + * @returns {string} */ -TreeEntry.prototype.path = function() { +TreeEntry.prototype.path = function () { var dirtoparent = this.dirtoparent || ""; return path.join(this.parent.path(), dirtoparent, this.name()); }; /** * Retrieve the SHA for this TreeEntry. - * @return {String} + * + * @returns {string} */ -TreeEntry.prototype.sha = function() { +TreeEntry.prototype.sha = function () { return this.id().toString(); }; /** * Alias for `path` */ -TreeEntry.prototype.toString = function() { +TreeEntry.prototype.toString = function () { return this.path(); }; diff --git a/lib/utils/lookup_wrapper.js b/lib/utils/lookup_wrapper.js index eee4dd768..1b87350f1 100644 --- a/lib/utils/lookup_wrapper.js +++ b/lib/utils/lookup_wrapper.js @@ -1,19 +1,19 @@ var NodeGit = require("../../"); /** -* Wraps a method so that you can pass in either a string, OID or the object -* itself and you will always get back a promise that resolves to the object. -* @param {Object} objectType The object type that you're expecting to receive. -* @param {Function} lookupFunction The function to do the lookup for the -* object. Defaults to `objectType.lookup`. -* @return {Function} -*/ + * Wraps a method so that you can pass in either a string, OID or the object itself and you will always get back a + * promise that resolves to the object. + * + * @param {Object} objectType The object type that you're expecting to receive. + * @param {Function} lookupFunction The function to do the lookup for the object. Defaults to `objectType.lookup`. + * @returns {Function} + */ function lookupWrapper(objectType, lookupFunction) { lookupFunction = lookupFunction || objectType.lookup; - return function(repo, id, callback) { + return function (repo, id, callback) { if (id instanceof objectType) { - return Promise.resolve(id).then(function(obj) { + return Promise.resolve(id).then(function (obj) { obj.repo = repo; if (typeof callback === "function") { @@ -24,7 +24,7 @@ function lookupWrapper(objectType, lookupFunction) { }, callback); } - return lookupFunction(repo, id).then(function(obj) { + return lookupFunction(repo, id).then(function (obj) { obj.repo = repo; if (typeof callback === "function") { diff --git a/lib/utils/shallow_clone.js b/lib/utils/shallow_clone.js index 0dbe4113e..4c1082381 100644 --- a/lib/utils/shallow_clone.js +++ b/lib/utils/shallow_clone.js @@ -3,8 +3,8 @@ var NodeGit = require("../../"); function shallowClone() { var merges = Array.prototype.slice.call(arguments); - return merges.reduce(function(obj, merge) { - return Object.keys(merge).reduce(function(obj, key) { + return merges.reduce(function (obj, merge) { + return Object.keys(merge).reduce(function (obj, key) { obj[key] = merge[key]; return obj; }, obj); diff --git a/lifecycleScripts/README.md b/lifecycleScripts/README.md index cc1feeb14..76ccec9a0 100644 --- a/lifecycleScripts/README.md +++ b/lifecycleScripts/README.md @@ -1,5 +1,3 @@ ## /lifecycleScripts - These scripts are responsible for downloading the right dependencies, configuring vendors, and all other dependencies that are required to build, generate, and clean the module. - - \ No newline at end of file +These scripts are responsible for downloading the right dependencies, configuring vendors, and all other dependencies that are required to build, generate, and clean the module. diff --git a/lifecycleScripts/install.js b/lifecycleScripts/install.js index a40877895..003207ce6 100755 --- a/lifecycleScripts/install.js +++ b/lifecycleScripts/install.js @@ -15,55 +15,49 @@ module.exports = function install() { var args = ["install"]; if (buildFlags.mustBuild) { - console.info( - "[nodegit] Pre-built download disabled, building from source." - ); + console.info("[nodegit] Pre-built download disabled, building from source."); args.push("--build-from-source"); if (buildFlags.debugBuild) { console.info("[nodegit] Building debug version."); args.push("--debug"); } - } - else { + } else { args.push("--fallback-to-build"); } - return new Promise(function(resolve, reject) { + return new Promise(function (resolve, reject) { var spawnedNodePreGyp = spawn(nodePreGyp, args, { env: Object.assign({}, process.env, { - npm_config_node_gyp: path.join(__dirname, "..", "node_modules", - "node-gyp", "bin", "node-gyp.js") - }) + npm_config_node_gyp: path.join(__dirname, "..", "node_modules", "node-gyp", "bin", "node-gyp.js"), + }), }); - spawnedNodePreGyp.stdout.on("data", function(data) { + spawnedNodePreGyp.stdout.on("data", function (data) { console.info(data.toString().trim()); }); - spawnedNodePreGyp.stderr.on("data", function(data) { + spawnedNodePreGyp.stderr.on("data", function (data) { console.error(data.toString().trim()); }); - spawnedNodePreGyp.on("close", function(code) { + spawnedNodePreGyp.on("close", function (code) { if (!code) { resolve(); } else { reject(code); } }); - }) - .then(function() { - console.info("[nodegit] Completed installation successfully."); - }); + }).then(function () { + console.info("[nodegit] Completed installation successfully."); + }); }; // Called on the command line if (require.main === module) { - module.exports() - .catch(function(e) { - console.error("[nodegit] ERROR - Could not finish install"); - console.error("[nodegit] ERROR - finished with error code: " + e); - process.exit(e); - }); + module.exports().catch(function (e) { + console.error("[nodegit] ERROR - Could not finish install"); + console.error("[nodegit] ERROR - finished with error code: " + e); + process.exit(e); + }); } diff --git a/lifecycleScripts/postinstall.js b/lifecycleScripts/postinstall.js index f8260e3b7..107cbe14b 100755 --- a/lifecycleScripts/postinstall.js +++ b/lifecycleScripts/postinstall.js @@ -7,9 +7,7 @@ var buildFlags = require("../utils/buildFlags"); var rootPath = path.join(__dirname, ".."); function printStandardLibError() { - console.log( - "[nodegit] ERROR - the latest libstdc++ is missing on your system!" - ); + console.log("[nodegit] ERROR - the latest libstdc++ is missing on your system!"); console.log(""); console.log("On Ubuntu you can install it using:"); console.log(""); @@ -30,22 +28,16 @@ module.exports = function install() { return Promise.resolve(); } - return exec("node \"" + path.join(rootPath, "lib/nodegit.js\"")) - .catch(function(e) { + return exec('node "' + path.join(rootPath, 'lib/nodegit.js"')) + .catch(function (e) { if (~e.toString().indexOf("Module version mismatch")) { - console.warn( - "[nodegit] WARN - NodeGit was built for a different version of node." - ); - console.warn( - "If you are building NodeGit for electron/nwjs you can " + - "ignore this warning." - ); - } - else { + console.warn("[nodegit] WARN - NodeGit was built for a different version of node."); + console.warn("If you are building NodeGit for electron/nwjs you can " + "ignore this warning."); + } else { throw e; } }) - .then(function() { + .then(function () { // If we're using NodeGit from a package manager then let's clean up after // ourselves when we install successfully. if (!buildFlags.mustBuild) { @@ -66,18 +58,13 @@ module.exports = function install() { // Called on the command line if (require.main === module) { - module.exports() - .catch(function(e) { - console.warn("[nodegit] WARN - Could not finish postinstall"); + module.exports().catch(function (e) { + console.warn("[nodegit] WARN - Could not finish postinstall"); - if ( - process.platform === "linux" && - ~e.toString().indexOf("libstdc++") - ) { - printStandardLibError(); - } - else { - console.log(e); - } - }); + if (process.platform === "linux" && ~e.toString().indexOf("libstdc++")) { + printStandardLibError(); + } else { + console.log(e); + } + }); } diff --git a/lifecycleScripts/preinstall.js b/lifecycleScripts/preinstall.js index 8e9417382..25690eb16 100755 --- a/lifecycleScripts/preinstall.js +++ b/lifecycleScripts/preinstall.js @@ -10,39 +10,35 @@ module.exports = function prepareForBuild() { return exec("npm -v") .then( - function(npmVersion) { + function (npmVersion) { if (npmVersion.split(".")[0] < 3) { - console.log( - "[nodegit] npm@2 installed, pre-loading required packages" - ); + console.log("[nodegit] npm@2 installed, pre-loading required packages"); return exec("npm install --ignore-scripts"); } return Promise.resolve(); }, - function() { + function () { // We're installing via yarn, so don't // care about compability with npm@2 } ) - .then(function() { + .then(function () { if (buildFlags.isGitRepo) { var submodules = require(local("submodules")); var generate = require(local("../generate")); - return submodules() - .then(function() { - return generate(); - }); + return submodules().then(function () { + return generate(); + }); } }); }; // Called on the command line if (require.main === module) { - module.exports() - .catch(function(e) { - console.error("[nodegit] ERROR - Could not finish preinstall"); - console.error(e); - process.exit(1); - }); + module.exports().catch(function (e) { + console.error("[nodegit] ERROR - Could not finish preinstall"); + console.error(e); + process.exit(1); + }); } diff --git a/lifecycleScripts/submodules/getStatus.js b/lifecycleScripts/submodules/getStatus.js index 2fcc42d37..14899e0db 100644 --- a/lifecycleScripts/submodules/getStatus.js +++ b/lifecycleScripts/submodules/getStatus.js @@ -3,8 +3,8 @@ var rootDir = path.join(__dirname, "../.."); var exec = require(path.join(rootDir, "./utils/execPromise")); module.exports = function getStatus() { - return exec("git submodule status", { cwd: rootDir}) - .then(function(stdout) { + return exec("git submodule status", { cwd: rootDir }) + .then(function (stdout) { if (!stdout) { // In the case where we pull from npm they pre-init the submodules for // us and `git submodule status` returns empty-string. In that case @@ -19,29 +19,20 @@ module.exports = function getStatus() { var commitOid = lineSections[0].replace("+", "").replace("-", ""); var name = lineSections[1]; - return exec("git status", { cwd: path.join(rootDir, name)}) - .then(function(workDirStatus) { - return { - commitOid: commitOid, - onNewCommit: onNewCommit, - name: name, - needsInitialization: needsInitialization, - workDirDirty: !~workDirStatus - .trim() - .split("\n") - .pop() - .indexOf("nothing to commit") - }; - }); + return exec("git status", { cwd: path.join(rootDir, name) }).then(function (workDirStatus) { + return { + commitOid: commitOid, + onNewCommit: onNewCommit, + name: name, + needsInitialization: needsInitialization, + workDirDirty: !~workDirStatus.trim().split("\n").pop().indexOf("nothing to commit"), + }; + }); } - return Promise.all(stdout - .trim() - .split("\n") - .map(getStatusPromiseFromLine) - ); + return Promise.all(stdout.trim().split("\n").map(getStatusPromiseFromLine)); }) - .catch(function() { + .catch(function () { // In the case that NodeGit is required from another project via npm we // won't be able to run submodule commands but that's ok since the // correct version of libgit2 is published with nodegit. diff --git a/lifecycleScripts/submodules/index.js b/lifecycleScripts/submodules/index.js index 2d13d3c89..650950989 100644 --- a/lifecycleScripts/submodules/index.js +++ b/lifecycleScripts/submodules/index.js @@ -1,82 +1,66 @@ var path = require("path"); var rootDir = path.join(__dirname, "../.."); -var gitExecutableLocation = require( - path.join(rootDir, "./utils/gitExecutableLocation") -); +var gitExecutableLocation = require(path.join(rootDir, "./utils/gitExecutableLocation")); var submoduleStatus = require("./getStatus"); var exec = require(path.join(rootDir, "./utils/execPromise")); module.exports = function submodules() { return gitExecutableLocation() - .catch(function() { - console.error("[nodegit] ERROR - Compilation of NodeGit requires git " + - "CLI to be installed and on the path"); + .catch(function () { + console.error("[nodegit] ERROR - Compilation of NodeGit requires git " + "CLI to be installed and on the path"); throw new Error("git CLI is not installed or not on the path"); }) - .then(function() { + .then(function () { console.log("[nodegit] Checking submodule status"); return submoduleStatus(); }) - .then(function(statuses) { + .then(function (statuses) { function printSubmodule(submoduleName) { console.log("\t" + submoduleName); } var dirtySubmodules = statuses - .filter(function(status) { - return status.workDirDirty && !status.needsInitialization; - }) - .map(function(dirtySubmodule) { - return dirtySubmodule.name; - }); + .filter(function (status) { + return status.workDirDirty && !status.needsInitialization; + }) + .map(function (dirtySubmodule) { + return dirtySubmodule.name; + }); if (dirtySubmodules.length) { - console.error( - "[nodegit] ERROR - Some submodules have uncommited changes:" - ); + console.error("[nodegit] ERROR - Some submodules have uncommited changes:"); dirtySubmodules.forEach(printSubmodule); - console.error( - "\nThey must either be committed or discarded before we build" - ); + console.error("\nThey must either be committed or discarded before we build"); throw new Error("Dirty Submodules: " + dirtySubmodules.join(" ")); } var outOfSyncSubmodules = statuses - .filter(function(status) { + .filter(function (status) { return status.onNewCommit && !status.needsInitialization; }) - .map(function(outOfSyncSubmodule) { + .map(function (outOfSyncSubmodule) { return outOfSyncSubmodule.name; }); if (outOfSyncSubmodules.length) { - console.warn( - "[nodegit] WARNING - Some submodules are pointing to an new commit:" - ); + console.warn("[nodegit] WARNING - Some submodules are pointing to an new commit:"); outOfSyncSubmodules.forEach(printSubmodule); console.warn("\nThey will not be updated."); } return statuses - .filter(function(status) { + .filter(function (status) { return !status.onNewCommit; }) - .reduce(function(chainPromise, submoduleToUpdate) { - return chainPromise - .then(function() { - console.log( - "[nodegit] Initializing submodule", - submoduleToUpdate.name - ); - return exec( - "git submodule update --init --recursive " + - submoduleToUpdate.name - ); - }); + .reduce(function (chainPromise, submoduleToUpdate) { + return chainPromise.then(function () { + console.log("[nodegit] Initializing submodule", submoduleToUpdate.name); + return exec("git submodule update --init --recursive " + submoduleToUpdate.name); + }); }, Promise.resolve()); }); }; diff --git a/test/README.md b/test/README.md index e96c79217..7710a08f7 100644 --- a/test/README.md +++ b/test/README.md @@ -2,20 +2,24 @@ Contains all the test scripts, runner, and keys for running the tests. ------------ +--- #### /home + Contains gitconfig for the test repositories. #### /repos + Contains blame, empty, nonrepo, and workdir test repositories. #### /tests + Unit tests for NodeGit. #### /utils -Test utilities with garbage collector, index, and repository setup, that can be used in tests. +Test utilities with garbage collector, index, and repository setup, that can be used in tests. ## Note + \*.enc are encrypted in base64 and unencrypted before the test suite runs as \*. diff --git a/test/index.js b/test/index.js index 4891a0dba..6ad10e474 100644 --- a/test/index.js +++ b/test/index.js @@ -1,22 +1,16 @@ var fork = require("child_process").fork; var path = require("path"); -var fs = require('fs'); +var fs = require("fs"); var bin = "./node_modules/.bin/istanbul"; var cov = "cover --report=lcov --dir=test/coverage/js _mocha --".split(" "); -if (process.platform === 'win32') { +if (process.platform === "win32") { bin = "./node_modules/mocha/bin/mocha"; cov = []; } -var args = cov.concat([ - "test/runner", - "test/tests", - "--expose-gc", - "--timeout", - "15000" -]); +var args = cov.concat(["test/runner", "test/tests", "--expose-gc", "--timeout", "15000"]); if (!process.env.APPVEYOR && !process.env.TRAVIS && !process.env.GITHUB_ACTION) { var local = path.join.bind(path, __dirname); @@ -27,15 +21,11 @@ if (!process.env.APPVEYOR && !process.env.TRAVIS && !process.env.GITHUB_ACTION) // unencrypt test keys function unencryptKey(fileName) { - var base64Contents = fs.readFileSync( - path.join(__dirname, fileName + '.enc'), - 'utf8' - ); - var asciiContents = Buffer.from(base64Contents, 'base64') - .toString('ascii'); - fs.writeFileSync(path.join(__dirname, fileName), asciiContents, 'utf8'); + var base64Contents = fs.readFileSync(path.join(__dirname, fileName + ".enc"), "utf8"); + var asciiContents = Buffer.from(base64Contents, "base64").toString("ascii"); + fs.writeFileSync(path.join(__dirname, fileName), asciiContents, "utf8"); } -unencryptKey('id_rsa'); -unencryptKey('nodegit-test-rsa'); +unencryptKey("id_rsa"); +unencryptKey("nodegit-test-rsa"); fork(bin, args, { cwd: path.join(__dirname, "../") }).on("close", process.exit); diff --git a/test/runner.js b/test/runner.js index 3d6b25431..2b9a19cde 100644 --- a/test/runner.js +++ b/test/runner.js @@ -1,10 +1,10 @@ var fse = require("fs-extra"); var path = require("path"); var local = path.join.bind(path, __dirname); -var exec = require('../utils/execPromise'); +var exec = require("../utils/execPromise"); // eslint-disable-next-line no-unused-vars -var NodeGit = require('..'); +var NodeGit = require(".."); var workdirPath = local("repos/workdir"); var constWorkdirPath = local("repos/constworkdir"); @@ -34,81 +34,80 @@ const testRepos = [ "repos/workdir", ]; -before(function() { +before(function () { this.timeout(350000); var testUrl = "https://github.com/nodegit/test"; var constTestUrl = "https://github.com/nodegit/test-frozen"; - return fse.remove(local("repos")) - .then(function() { - fse.remove(local("home")) + return fse + .remove(local("repos")) + .then(function () { + fse.remove(local("home")); }) - .then(function() { + .then(function () { fse.mkdir(local("repos")); }) - .then(function() { + .then(function () { return exec("git init " + local("repos", "empty")); }) - .then(function() { + .then(function () { return exec("git clone " + constTestUrl + " " + constWorkdirPath); }) - .then(function() { + .then(function () { return exec("git clone " + testUrl + " " + workdirPath); }) - .then(function() { + .then(function () { //to checkout the longpaths-checkout branch - if(process.platform === "win32") { - return exec("git config core.longpaths true", {cwd: workdirPath}); + if (process.platform === "win32") { + return exec("git config core.longpaths true", { cwd: workdirPath }); } return Promise.resolve(); }) - .then(function() { - return exec("git checkout rev-walk", {cwd: workdirPath}); + .then(function () { + return exec("git checkout rev-walk", { cwd: workdirPath }); }) - .then(function() { - return exec("git checkout checkout-test", {cwd: workdirPath}); + .then(function () { + return exec("git checkout checkout-test", { cwd: workdirPath }); }) - .then(function() { - return exec("git checkout longpaths-checkout", {cwd: workdirPath}); + .then(function () { + return exec("git checkout longpaths-checkout", { cwd: workdirPath }); }) - .then(function() { - return exec("git checkout master", {cwd: workdirPath}); + .then(function () { + return exec("git checkout master", { cwd: workdirPath }); }) - .then(function() { + .then(function () { return fse.mkdir(local("repos", "nonrepo")); }) - .then(function() { - return fse.writeFile(local("repos", "nonrepo", "file.txt"), - "This is a bogus file"); + .then(function () { + return fse.writeFile(local("repos", "nonrepo", "file.txt"), "This is a bogus file"); }) - .then(function() { + .then(function () { return fse.mkdir(local("home")); }) - .then(function() { - return fse.writeFile(local("home", ".gitconfig"), - "[user]\n name = John Doe\n email = johndoe@example.com"); + .then(function () { + return fse.writeFile(local("home", ".gitconfig"), "[user]\n name = John Doe\n email = johndoe@example.com"); }) - .then( async function() { + .then(async function () { //mark all test repos as safe - for(let repo of testRepos) { + for (const repo of testRepos) { await exec(`git config --global --add safe.directory ${local(repo)}`); } - }) + }); }); -beforeEach(function() { +beforeEach(function () { this.timeout(4000); - return exec("git clean -xdf", {cwd: workdirPath}) - .then(function() { - return exec("git checkout master", {cwd: workdirPath}); - }) - .then(function() { - return exec("git reset --hard", {cwd: workdirPath}); - }); + return exec("git clean -xdf", { cwd: workdirPath }) + .then(function () { + return exec("git checkout master", { cwd: workdirPath }); + }) + .then(function () { + return exec("git reset --hard", { cwd: workdirPath }); + }); }); -afterEach(function(done) { - process.nextTick(function() { +afterEach(function (done) { + process.nextTick(function () { if (global.gc) { global.gc(); } diff --git a/test/tests/annotated_commit.js b/test/tests/annotated_commit.js index c87ba859b..eaa49fc4e 100644 --- a/test/tests/annotated_commit.js +++ b/test/tests/annotated_commit.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("AnnotatedCommit", function() { +describe("AnnotatedCommit", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var AnnotatedCommit = NodeGit.AnnotatedCommit; @@ -11,64 +11,61 @@ describe("AnnotatedCommit", function() { var reposPath = local("../repos/workdir"); var branchName = "master"; - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("can create an AnnotatedCommit from a ref", function() { + it("can create an AnnotatedCommit from a ref", function () { var test = this; return Branch.lookup(test.repository, branchName, Branch.BRANCH.LOCAL) - .then(function(ref) { + .then(function (ref) { return AnnotatedCommit.fromRef(test.repository, ref); }) - .then(function(annotatedCommit) { + .then(function (annotatedCommit) { assert(annotatedCommit.id()); }); }); - it("can lookup an AnnotatedCommit after creating it", function() { + it("can lookup an AnnotatedCommit after creating it", function () { var test = this; var id; return Branch.lookup(test.repository, branchName, Branch.BRANCH.LOCAL) - .then(function(ref) { + .then(function (ref) { return AnnotatedCommit.fromRef(test.repository, ref); }) - .then(function(annotatedCommit) { + .then(function (annotatedCommit) { id = annotatedCommit.id(); return AnnotatedCommit.lookup(test.repository, id); }) - .then(function(annotatedCommit) { + .then(function (annotatedCommit) { assert(id, annotatedCommit.id()); }); }); - it("can lookup an AnnotatedCommit from a revspec", function() { + it("can lookup an AnnotatedCommit from a revspec", function () { var test = this; - return AnnotatedCommit.fromRevspec(test.repository, "checkout-test") - .then(function(annotatedCommit) { - assert.equal(annotatedCommit.id().toString(), - "1729c73906bb8467f4095c2f4044083016b4dfde"); - }); + return AnnotatedCommit.fromRevspec(test.repository, "checkout-test").then(function (annotatedCommit) { + assert.equal(annotatedCommit.id().toString(), "1729c73906bb8467f4095c2f4044083016b4dfde"); + }); }); - it("can lookup an AnnotatedCommit from a fetchhead", function() { + it("can lookup an AnnotatedCommit from a fetchhead", function () { var test = this; - return AnnotatedCommit.fromFetchhead(test.repository, + return AnnotatedCommit.fromFetchhead( + test.repository, "rev-walk", "https://github.com/nodegit/test", - "32789a79e71fbc9e04d3eff7425e1771eb595150") - .then(function(annotatedCommit) { - assert.equal(annotatedCommit.id().toString(), - "32789a79e71fbc9e04d3eff7425e1771eb595150"); - }); + "32789a79e71fbc9e04d3eff7425e1771eb595150" + ).then(function (annotatedCommit) { + assert.equal(annotatedCommit.id().toString(), "32789a79e71fbc9e04d3eff7425e1771eb595150"); + }); }); }); diff --git a/test/tests/attr.js b/test/tests/attr.js index cf229d372..e050604b8 100644 --- a/test/tests/attr.js +++ b/test/tests/attr.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Attr", function() { +describe("Attr", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Attr = NodeGit.Attr; @@ -10,26 +10,25 @@ describe("Attr", function() { var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("can add a macro definition", function() { + it("can add a macro definition", function () { var error = Attr.addMacro(this.repository, "binary", "-diff -crlf"); assert.equal(error, 0); }); - it("can flush the attr cache", function() { + it("can flush the attr cache", function () { Attr.cacheFlush(this.repository); }); - it("can lookup the value of a git attribute", function() { + it("can lookup the value of a git attribute", function () { var flags = Status.SHOW.INDEX_AND_WORKDIR; return Attr.get(this.repository, flags, ".gitattributes", "test"); }); diff --git a/test/tests/blame.js b/test/tests/blame.js index c16efdd03..d42a1212d 100644 --- a/test/tests/blame.js +++ b/test/tests/blame.js @@ -3,7 +3,7 @@ var RepoUtils = require("../utils/repository_setup"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Blame", function() { +describe("Blame", function () { var NodeGit = require("../../"); var Blame = NodeGit.Blame; @@ -12,25 +12,19 @@ describe("Blame", function() { var fileName = "foobar.js"; var repoPath = local("../repos/blameRepo"); - beforeEach(function() { + beforeEach(function () { test = this; - return RepoUtils.createRepository(repoPath) - .then(function(repository) { - test.repository = repository; + return RepoUtils.createRepository(repoPath).then(function (repository) { + test.repository = repository; - return RepoUtils.commitFileToRepo( - repository, - fileName, - "line1\nline2\nline3" - ); - }); + return RepoUtils.commitFileToRepo(repository, fileName, "line1\nline2\nline3"); + }); }); - it("can initialize blame without options", function() { - return Blame.file(test.repository, fileName) - .then(function(blame) { - assert(blame); - }); + it("can initialize blame without options", function () { + return Blame.file(test.repository, fileName).then(function (blame) { + assert(blame); + }); }); }); diff --git a/test/tests/blob.js b/test/tests/blob.js index 0c7c524a1..d26c0fde9 100644 --- a/test/tests/blob.js +++ b/test/tests/blob.js @@ -4,7 +4,7 @@ var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); var exec = require("../../utils/execPromise"); -describe("Blob", function() { +describe("Blob", function () { var NodeGit = require("../../"); var Oid = NodeGit.Oid; @@ -21,642 +21,519 @@ describe("Blob", function() { var treeOid; var parent; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; - - return repo.createCommit( - "HEAD", - author, - committer, - commitMessage, - treeOid, - [parent] - ); - }); + return fse + .writeFile(path.join(repo.workdir(), fileName), fileContent) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommit("HEAD", author, committer, commitMessage, treeOid, [parent]); + }); } - before(function() { + before(function () { return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { return repository.getHeadCommit(); }) - .then(function(commit) { + .then(function (commit) { previousCommitOid = commit.id(); }); }); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return repository.getBlob(oid); }) - .then(function(blob) { + .then(function (blob) { test.blob = blob; }); }); - after(function() { - return exec("git clean -xdf", {cwd: reposPath}) - .then(function() { - return exec("git checkout master", {cwd: reposPath}); + after(function () { + return exec("git clean -xdf", { cwd: reposPath }) + .then(function () { + return exec("git checkout master", { cwd: reposPath }); }) - .then(function() { - return exec("git reset --hard " + previousCommitOid, {cwd: reposPath}); + .then(function () { + return exec("git reset --hard " + previousCommitOid, { cwd: reposPath }); }); }); - it("can provide content as a buffer", function() { + it("can provide content as a buffer", function () { var contents = this.blob.content(); assert.ok(Buffer.isBuffer(contents)); }); - it("can provide content as a string", function() { + it("can provide content as a string", function () { var contents = this.blob.toString(); assert.equal(typeof contents, "string"); assert.equal(contents.slice(0, 7), "@import"); }); - it("can determine if a blob is not a binary", function() { + it("can determine if a blob is not a binary", function () { assert.equal(this.blob.filemode(), FileMode.BLOB); }); - it("can get a blob with an Oid object", function() { + it("can get a blob with an Oid object", function () { var oidObject = Oid.fromString(oid); - return this.repository.getBlob(oidObject) - .then(function(blob) { - assert.equal(blob.id().toString(), oid); - }); + return this.repository.getBlob(oidObject).then(function (blob) { + assert.equal(blob.id().toString(), oid); + }); }); - describe("createFromBuffer", function() { - it("creates a new blob from the buffer", function() { + describe("createFromBuffer", function () { + it("creates a new blob from the buffer", function () { var content = "This is a new buffer"; var buf = Buffer.from(content, content.length); var test = this; return Blob.createFromBuffer(test.repository, buf, content.length) - .then(function(oid) { + .then(function (oid) { return test.repository.getBlob(oid); }) - .then(function(newBlob) { + .then(function (newBlob) { assert.equal(newBlob.toString(), content); }); }); - it("creates blob with content equal to length", function() { + it("creates blob with content equal to length", function () { var content = "This is a new buffer"; var buf = Buffer.from(content, content.length); var test = this; return Blob.createFromBuffer(test.repository, buf, 2) - .then(function(oid) { + .then(function (oid) { return test.repository.getBlob(oid); }) - .then(function(newBlob) { + .then(function (newBlob) { assert.equal(newBlob.toString(), "Th"); }); }); - it("throws an error when repository is null", function() { - return Blob.createFromBuffer(null, null, 0) - .catch(function(error) { - assert.strictEqual(error.message, "Repository repo is required."); - }); + it("throws an error when repository is null", function () { + return Blob.createFromBuffer(null, null, 0).catch(function (error) { + assert.strictEqual(error.message, "Repository repo is required."); + }); }); - it("throws an error when buffer is null", function() { + it("throws an error when buffer is null", function () { var test = this; - return Blob.createFromBuffer(test.repository, null) - .catch(function(error) { - assert.strictEqual(error.message, "Buffer buffer is required."); - }); + return Blob.createFromBuffer(test.repository, null).catch(function (error) { + assert.strictEqual(error.message, "Buffer buffer is required."); + }); }); - it("throws an error when no length is provided", function() { + it("throws an error when no length is provided", function () { var test = this; - return Blob.createFromBuffer(test.repository, Buffer.from("testing")) - .catch(function(error) { - assert.strictEqual(error.message, "Number len is required."); - }); + return Blob.createFromBuffer(test.repository, Buffer.from("testing")).catch(function (error) { + assert.strictEqual(error.message, "Number len is required."); + }); }); }); - describe("createFromDisk", function() { + describe("createFromDisk", function () { var fileName = path.join(reposPath, "testFile.zzz"); var fileContent = "this is my file content"; - beforeEach(function() { + beforeEach(function () { return fse.writeFile(fileName, fileContent); }); - afterEach(function() { + afterEach(function () { return fse.unlink(fileName); }); - it("creates a new blob from the file", function() { + it("creates a new blob from the file", function () { var test = this; return Blob.createFromDisk(test.repository, fileName) - .then(function(oid) { + .then(function (oid) { return test.repository.getBlob(oid); }) - .then(function(newBlob) { + .then(function (newBlob) { assert.equal(newBlob.toString(), fileContent); }); }); - it("throws an error when the file cannot be found", function() { + it("throws an error when the file cannot be found", function () { var test = this; - return Blob.createFromDisk(test.repository, "aaaaaaaaaa") - .catch(function(error) { - assert.equal(error.errno, -3); - }); + return Blob.createFromDisk(test.repository, "aaaaaaaaaa").catch(function (error) { + assert.equal(error.errno, -3); + }); }); - it("throws an error when repository is null", function() { - return Blob.createFromDisk(null, null, 0) - .catch(function(error) { - assert.strictEqual(error.message, "Repository repo is required."); - }); + it("throws an error when repository is null", function () { + return Blob.createFromDisk(null, null, 0).catch(function (error) { + assert.strictEqual(error.message, "Repository repo is required."); + }); }); - it("throws an error when path is null", function() { + it("throws an error when path is null", function () { var test = this; - return Blob.createFromDisk(test.repository, null) - .catch(function(error) { - assert.strictEqual(error.message, "String path is required."); - }); + return Blob.createFromDisk(test.repository, null).catch(function (error) { + assert.strictEqual(error.message, "String path is required."); + }); }); }); - describe("createFromWorkdir", function() { - it("creates a blob from the file", function() { + describe("createFromWorkdir", function () { + it("creates a blob from the file", function () { var fileName = "package.json"; var filePath = path.join(reposPath, "package.json"); var test = this; - return fse.readFile(filePath) - .then(function(content) { + return fse + .readFile(filePath) + .then(function (content) { test.content = content.toString(); return Blob.createFromWorkdir(test.repository, fileName); }) - .then(function(oid) { + .then(function (oid) { return test.repository.getBlob(oid); }) - .then(function(newBlob) { + .then(function (newBlob) { assert.equal(newBlob.toString(), test.content); }); }); - it("throws an error when the file cannot be found", function() { + it("throws an error when the file cannot be found", function () { var test = this; - return Blob.createFromWorkdir(test.repository, "thisisabadfile.jpg") - .catch(function(error) { - assert.equal(error.errno, -3); - }); + return Blob.createFromWorkdir(test.repository, "thisisabadfile.jpg").catch(function (error) { + assert.equal(error.errno, -3); + }); }); - it("throws an error when repository is null", function() { - return Blob.createFromWorkdir(null, null, 0) - .catch(function(error) { - assert.strictEqual(error.message, "Repository repo is required."); - }); + it("throws an error when repository is null", function () { + return Blob.createFromWorkdir(null, null, 0).catch(function (error) { + assert.strictEqual(error.message, "Repository repo is required."); + }); }); - it("throws an error when path is null", function() { + it("throws an error when path is null", function () { var test = this; - return Blob.createFromWorkdir(test.repository, null) - .catch(function(error) { - assert - .strictEqual(error.message, "String relative_path is required."); - }); + return Blob.createFromWorkdir(test.repository, null).catch(function (error) { + assert.strictEqual(error.message, "String relative_path is required."); + }); }); }); - describe("filteredContent (DEPRECATED)", function() { + describe("filteredContent (DEPRECATED)", function () { var attrFileName = ".gitattributes"; var filter = "* text eol=crlf"; var lineEndingRegex = /\r\n|\r|\n/; var newFileName = "testfile.test"; - it("retrieves the filtered content", function() { + it("retrieves the filtered content", function () { var test = this; - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - "this\nis\nfunguys", - "added LF ending file" - ); - }) - .then(function(oid) { + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, "this\nis\nfunguys", "added LF ending file"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(lfBlob) { + .then(function (lfBlob) { test.lfBlob = lfBlob; var ending = test.lfBlob.toString().match(lineEndingRegex); assert.strictEqual(ending[0], "\n"); - return Blob.filteredContent( - test.lfBlob, - newFileName, - 0 - ); + return Blob.filteredContent(test.lfBlob, newFileName, 0); }) - .then(function(content) { + .then(function (content) { var ending = content.match(lineEndingRegex); assert.strictEqual(ending[0], "\r\n"); assert.notStrictEqual(content, test.blob.toString()); }); }); - it("returns non-binary filtered content when checking binary", function() { + it("returns non-binary filtered content when checking binary", function () { var test = this; - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - "this\nis\nfunguys", - "added LF ending file" - ); - }) - .then(function(oid) { + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, "this\nis\nfunguys", "added LF ending file"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(lfBlob) { + .then(function (lfBlob) { test.lfBlob = lfBlob; var ending = test.lfBlob.toString().match(lineEndingRegex); assert.strictEqual(ending[0], "\n"); - return Blob.filteredContent( - test.lfBlob, - newFileName, - 1 - ); + return Blob.filteredContent(test.lfBlob, newFileName, 1); }) - .then(function(content) { + .then(function (content) { var ending = content.match(lineEndingRegex); assert.strictEqual(ending[0], "\r\n"); assert.notStrictEqual(content, test.blob.toString()); }); }); - it("returns nothing when checking binary blob", function() { + it("returns nothing when checking binary blob", function () { var test = this; - var binary = Buffer.from(new Uint8Array([1,2,3,4,5,6])); - - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - binary, - "binary content" - ); - }) - .then(function(oid) { + var binary = Buffer.from(new Uint8Array([1, 2, 3, 4, 5, 6])); + + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, binary, "binary content"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(binaryBlob) { + .then(function (binaryBlob) { test.binaryBlob = binaryBlob; assert.equal(true, binaryBlob.isBinary()); - return Blob.filteredContent( - test.binaryBlob, - newFileName, - 1 - ); + return Blob.filteredContent(test.binaryBlob, newFileName, 1); }) - .then(function(content) { + .then(function (content) { assert.strictEqual(content, ""); }); }); - it("returns blob when not checking binary on binary blob", function() { + it("returns blob when not checking binary on binary blob", function () { var test = this; - var binary = Buffer.from(new Uint8Array([1,2,3,4,5,6])); - - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - binary, - "binary content" - ); - }) - .then(function(oid) { + var binary = Buffer.from(new Uint8Array([1, 2, 3, 4, 5, 6])); + + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, binary, "binary content"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(binaryBlob) { + .then(function (binaryBlob) { test.binaryBlob = binaryBlob; assert.equal(true, binaryBlob.isBinary()); - return Blob.filteredContent( - test.binaryBlob, - newFileName, - 0 - ); + return Blob.filteredContent(test.binaryBlob, newFileName, 0); }) - .then(function(content) { + .then(function (content) { assert.strictEqual(content, binary.toString()); }); }); - it("throws an error when the blob is null", function() { - return Blob.filteredContent(null, "", 0) - .catch(function(err) { - assert.strictEqual( - err.message, - "Blob blob is required." - ); - }); + it("throws an error when the blob is null", function () { + return Blob.filteredContent(null, "", 0).catch(function (err) { + assert.strictEqual(err.message, "Blob blob is required."); + }); }); - it("throws an error when the path is null", function() { + it("throws an error when the path is null", function () { var test = this; - return Blob.filteredContent(test.blob, null, 0) - .catch(function(err) { - assert.strictEqual(err.message, "String as_path is required."); - }); + return Blob.filteredContent(test.blob, null, 0).catch(function (err) { + assert.strictEqual(err.message, "String as_path is required."); + }); }); - it("throws an error when the flag is undefined", function() { + it("throws an error when the flag is undefined", function () { var test = this; - return Blob.filteredContent(test.blob, "") - .catch(function(err) { - assert.strictEqual( - err.message, - "Number check_for_binary_data is required." - ); - }); + return Blob.filteredContent(test.blob, "").catch(function (err) { + assert.strictEqual(err.message, "Number check_for_binary_data is required."); + }); }); }); - describe("filter", function() { + describe("filter", function () { var attrFileName = ".gitattributes"; var filter = "* text eol=crlf"; var lineEndingRegex = /\r\n|\r|\n/; var newFileName = "testfile.test"; - it("retrieves the filtered content", function() { + it("retrieves the filtered content", function () { var test = this; - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - "this\nis\nfunguys", - "added LF ending file" - ); - }) - .then(function(oid) { + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, "this\nis\nfunguys", "added LF ending file"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(lfBlob) { + .then(function (lfBlob) { test.lfBlob = lfBlob; var ending = test.lfBlob.toString().match(lineEndingRegex); assert.strictEqual(ending[0], "\n"); return test.lfBlob.filter(newFileName, { flags: 0 }); }) - .then(function(content) { + .then(function (content) { var ending = content.match(lineEndingRegex); assert.strictEqual(ending[0], "\r\n"); assert.notStrictEqual(content, test.blob.toString()); }); }); - it("returns non-binary filtered content when checking binary", function() { + it("returns non-binary filtered content when checking binary", function () { var test = this; - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - "this\nis\nfunguys", - "added LF ending file" - ); - }) - .then(function(oid) { + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, "this\nis\nfunguys", "added LF ending file"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(lfBlob) { + .then(function (lfBlob) { test.lfBlob = lfBlob; var ending = test.lfBlob.toString().match(lineEndingRegex); assert.strictEqual(ending[0], "\n"); - return test.lfBlob.filter( - newFileName, - { flags: NodeGit.Blob.FILTER_FLAG.CHECK_FOR_BINARY } - ); + return test.lfBlob.filter(newFileName, { flags: NodeGit.Blob.FILTER_FLAG.CHECK_FOR_BINARY }); }) - .then(function(content) { + .then(function (content) { var ending = content.match(lineEndingRegex); assert.strictEqual(ending[0], "\r\n"); assert.notStrictEqual(content, test.blob.toString()); }); }); - it("returns nothing when checking binary blob", function() { + it("returns nothing when checking binary blob", function () { var test = this; - var binary = Buffer.from(new Uint8Array([1,2,3,4,5,6])); - - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - binary, - "binary content" - ); - }) - .then(function(oid) { + var binary = Buffer.from(new Uint8Array([1, 2, 3, 4, 5, 6])); + + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, binary, "binary content"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(binaryBlob) { + .then(function (binaryBlob) { test.binaryBlob = binaryBlob; assert.equal(true, binaryBlob.isBinary()); - return test.binaryBlob.filter( - newFileName, - { flags: NodeGit.Blob.FILTER_FLAG.CHECK_FOR_BINARY } - ); + return test.binaryBlob.filter(newFileName, { flags: NodeGit.Blob.FILTER_FLAG.CHECK_FOR_BINARY }); }) - .then(function(content) { + .then(function (content) { assert.strictEqual(content, ""); }); }); - it("returns blob when not checking binary on binary blob", function() { + it("returns blob when not checking binary on binary blob", function () { var test = this; - var binary = Buffer.from(new Uint8Array([1,2,3,4,5,6])); - - return commitFile( - test.repository, - attrFileName, - filter, - "added gitattributes") - .then(function() { - return commitFile( - test.repository, - newFileName, - binary, - "binary content" - ); - }) - .then(function(oid) { + var binary = Buffer.from(new Uint8Array([1, 2, 3, 4, 5, 6])); + + return commitFile(test.repository, attrFileName, filter, "added gitattributes") + .then(function () { + return commitFile(test.repository, newFileName, binary, "binary content"); + }) + .then(function (oid) { return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.filteredCommit = commit; return commit.getEntry(newFileName); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(binaryBlob) { + .then(function (binaryBlob) { test.binaryBlob = binaryBlob; assert.equal(true, binaryBlob.isBinary()); - return test.binaryBlob.filter( - newFileName, - { flags: 0 } - ); + return test.binaryBlob.filter(newFileName, { flags: 0 }); }) - .then(function(content) { + .then(function (content) { assert.strictEqual(content, binary.toString()); }); }); - it("throws an error when the path is null", function() { + it("throws an error when the path is null", function () { var test = this; - return test.blob.filter(test.blob, null, { flags: 0 }) - .catch(function(err) { - assert.strictEqual(err.message, "String as_path is required."); - }); + return test.blob.filter(test.blob, null, { flags: 0 }).catch(function (err) { + assert.strictEqual(err.message, "String as_path is required."); + }); }); }); }); diff --git a/test/tests/branch.js b/test/tests/branch.js index 2584f75a0..6d5664a85 100644 --- a/test/tests/branch.js +++ b/test/tests/branch.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Branch", function() { +describe("Branch", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Branch = NodeGit.Branch; @@ -18,27 +18,26 @@ describe("Branch", function() { var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return repository.getMasterCommit(); }) - .then(function(masterCommit) { + .then(function (masterCommit) { test.masterCommit = masterCommit; return test.repository.createBranch(branchName, masterCommit, true); }) - .then(function(branch) { + .then(function (branch) { test.branch = branch; - return test.repository.createBranch( - branchName2, test.masterCommit, true); + return test.repository.createBranch(branchName2, test.masterCommit, true); }); }); - it("can create a branch", function() { + it("can create a branch", function () { var branch = this.branch; var masterCommit = this.masterCommit; @@ -46,123 +45,124 @@ describe("Branch", function() { assert.equal(branch.target().toString(), masterCommit.sha()); }); - it("can delete a branch", function() { + it("can delete a branch", function () { var repo = this.repository; Branch.delete(this.branch); - return repo.getBranch(branchName) - // Reverse the results, since if we found it it wasn't deleted - .then(Promise.reject.bind(Promise), Promise.resolve.bind(Promise)); + return ( + repo + .getBranch(branchName) + // Reverse the results, since if we found it it wasn't deleted + .then(Promise.reject.bind(Promise), Promise.resolve.bind(Promise)) + ); }); - it("can see if the branch is pointed to by head", function() { + it("can see if the branch is pointed to by head", function () { var repo = this.repository; - return repo.getBranch("master") - .then(function(branch) { - assert.ok(branch.isHead()); - }); + return repo.getBranch("master").then(function (branch) { + assert.ok(branch.isHead()); + }); }); - it("can set an upstream for a branch", function() { + it("can set an upstream for a branch", function () { var branch = this.branch; return NodeGit.Branch.setUpstream(branch, upstreamName) - .then(function() { + .then(function () { return NodeGit.Branch.upstream(branch); }) - .then(function(upstream) { + .then(function (upstream) { assert.equal(upstream.shorthand(), upstreamName); }); }); - it("can get the name of a branch", function() { + it("can get the name of a branch", function () { var branch = this.branch; - return NodeGit.Branch.name(branch) - .then(function(branchNameToTest) { - assert.equal(branchNameToTest, branchName); - }); + return NodeGit.Branch.name(branch).then(function (branchNameToTest) { + assert.equal(branchNameToTest, branchName); + }); }); - it("can get the remote name of a branch", function() { + it("can get the remote name of a branch", function () { var repo = this.repository; - return NodeGit.Branch.remoteName(repo, fullUpstreamName) - .then(function(remoteNameToTest) { - assert.equal(remoteNameToTest, remoteName); - }); + return NodeGit.Branch.remoteName(repo, fullUpstreamName).then(function (remoteNameToTest) { + assert.equal(remoteNameToTest, remoteName); + }); }); - it("cannot get remote name from a non-remote branch", function() { + it("cannot get remote name from a non-remote branch", function () { var repo = this.repository; return NodeGit.Branch.remoteName(repo, fullBranchName) - .then(function() { + .then(function () { assert.fail("The ref should not have been a remote"); }) - .catch(function(err) { + .catch(function (err) { assert.strictEqual(err.errno, -1); }); }); - it("can rename a branch", function() { + it("can rename a branch", function () { var branch = this.branch; // don't force the move - return Branch.move(branch, branchName2, 0) - .then(function(_branch) { - return Promise.reject(new Error( - "should not be able to rename the branch")); - }, function(_error) { + return Branch.move(branch, branchName2, 0).then( + function (_branch) { + return Promise.reject(new Error("should not be able to rename the branch")); + }, + function (_error) { return Promise.resolve() - .then(function() { + .then(function () { // force the move return Branch.move(branch, branchName2, 1); }) - .then(function(branch) { + .then(function (branch) { assert.equal(branch.name(), fullBranchName2); }); - }); + } + ); }); - it("can lookup a branch", function() { + it("can lookup a branch", function () { var repo = this.repository; return Branch.lookup(repo, branchName, Branch.BRANCH.LOCAL) - .then(function(branch) { + .then(function (branch) { assert.equal(branch.name(), fullBranchName); return Branch.lookup(repo, upstreamName, Branch.BRANCH.REMOTE); }) - .then(function(branch) { + .then(function (branch) { assert.equal(branch.name(), fullUpstreamName); }); }); - it("can create branch from annotated commit", function() { + it("can create branch from annotated commit", function () { var repo = this.repository; var annotatedCommit = null; return AnnotatedCommit.fromRevspec(repo, nonHeadCommit) - .then(function(theAnnotatedCommit) { + .then(function (theAnnotatedCommit) { annotatedCommit = theAnnotatedCommit; - return Branch.createFromAnnotated( - repo, branchName, annotatedCommit, 0); + return Branch.createFromAnnotated(repo, branchName, annotatedCommit, 0); }) - .then(function(_branch) { - return Promise.reject(new Error( - "should not be able to create the branch")); - }, function(_error) { - return Promise.resolve() - .then(function() { - // force the branch creation - return Branch.createFromAnnotated( - repo, branchName, annotatedCommit, 1); - }) - .then(function(branch) { - assert.equal(branch.name(), fullBranchName); - }); - }); + .then( + function (_branch) { + return Promise.reject(new Error("should not be able to create the branch")); + }, + function (_error) { + return Promise.resolve() + .then(function () { + // force the branch creation + return Branch.createFromAnnotated(repo, branchName, annotatedCommit, 1); + }) + .then(function (branch) { + assert.equal(branch.name(), fullBranchName); + }); + } + ); }); }); diff --git a/test/tests/checkout.js b/test/tests/checkout.js index 5edad16a2..8d22806bc 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -3,7 +3,7 @@ var path = require("path"); var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); -describe("Checkout", function() { +describe("Checkout", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Checkout = NodeGit.Checkout; @@ -16,73 +16,71 @@ describe("Checkout", function() { var checkoutBranchName = "checkout-test"; var longpathBranchName = "longpaths-checkout"; - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath) - .then(function(repo) { - test.repository = repo; - }); + return Repository.open(reposPath).then(function (repo) { + test.repository = repo; + }); }); - it("can checkout the head", function() { + it("can checkout the head", function () { var test = this; - return Checkout.head(test.repository) - .then(function(_blob) { + return Checkout.head(test.repository).then(function (_blob) { var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); - assert.ok(~packageContent.indexOf("\"ejs\": \"~1.0.0\",")); + assert.ok(~packageContent.indexOf('"ejs": "~1.0.0",')); }); }); - it("can checkout a branch with a long file path", function() { + it("can checkout a branch with a long file path", function () { var test = this; return (function () { - if(process.platform === "win32") { - return test.repository.config() - .then(function(config) { + if (process.platform === "win32") { + return test.repository.config().then(function (config) { return config.setBool("core.longpaths", true); }); } return Promise.resolve(); })() - .then(function() { + .then(function () { return test.repository.checkoutBranch(longpathBranchName); }) - .then(function() { + .then(function () { return test.repository.getStatus(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 0); }); }); - it("cannot checkout long path file if core.longpaths is not set on win32", function() { + it("cannot checkout long path file if core.longpaths is not set on win32", function () { var test = this; if (process.platform !== "win32") { this.skip(); } - return test.repository.config() - .then(function(config) { + return test.repository + .config() + .then(function (config) { config.setBool("core.longpaths", false); }) .then(function () { return test.repository.checkoutBranch(longpathBranchName); }) - .then(function() { + .then(function () { assert.fail(); }) - .catch(function(err) { + .catch(function (err) { assert(~err.message.indexOf("path too long")); }); }); - it("can force checkout a single file", function() { + it("can force checkout a single file", function () { var test = this; var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); @@ -96,91 +94,98 @@ describe("Checkout", function() { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: packageJsonName + paths: packageJsonName, }; return Checkout.head(test.repository, opts) - .then(function() { - var resetPackageContent = fse.readFileSync(packageJsonPath, "utf-8"); - var resetReadmeContent = fse.readFileSync(readMePath, "utf-8"); + .then(function () { + var resetPackageContent = fse.readFileSync(packageJsonPath, "utf-8"); + var resetReadmeContent = fse.readFileSync(readMePath, "utf-8"); - assert.equal(resetPackageContent, packageContent); - assert.equal(resetReadmeContent, ""); + assert.equal(resetPackageContent, packageContent); + assert.equal(resetReadmeContent, ""); - var resetOpts = { - checkoutStrategy: Checkout.STRATEGY.FORCE - }; + var resetOpts = { + checkoutStrategy: Checkout.STRATEGY.FORCE, + }; - return Checkout.head(test.repository, resetOpts); - }).then(function() { - var resetContent = fse.readFileSync(readMePath, "utf-8"); - assert.equal(resetContent, readmeContent); - }); + return Checkout.head(test.repository, resetOpts); + }) + .then(function () { + var resetContent = fse.readFileSync(readMePath, "utf-8"); + assert.equal(resetContent, readmeContent); + }); }); - it("can checkout by tree", function() { + it("can checkout by tree", function () { var test = this; - return test.repository.getTagByName("annotated-tag").then(function(tag) { - return Checkout.tree(test.repository, tag); - }).then(function() { - return test.repository.getHeadCommit(); - }).then(function(commit) { - assert.equal(commit, "32789a79e71fbc9e04d3eff7425e1771eb595150"); - }); + return test.repository + .getTagByName("annotated-tag") + .then(function (tag) { + return Checkout.tree(test.repository, tag); + }) + .then(function () { + return test.repository.getHeadCommit(); + }) + .then(function (commit) { + assert.equal(commit, "32789a79e71fbc9e04d3eff7425e1771eb595150"); + }); }); - it("can checkout a branch", function() { + it("can checkout a branch", function () { var test = this; - return test.repository.checkoutBranch(checkoutBranchName) - .then(function() { - var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); + return test.repository + .checkoutBranch(checkoutBranchName) + .then(function () { + var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); - assert.ok(!~packageContent.indexOf("\"ejs\": \"~1.0.0\",")); - }) - .then(function() { - return test.repository.getStatus(); - }) - .then(function(statuses) { - assert.equal(statuses.length, 0); - }) - .then(function() { - return test.repository.checkoutBranch("master"); - }) - .then(function() { - var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); + assert.ok(!~packageContent.indexOf('"ejs": "~1.0.0",')); + }) + .then(function () { + return test.repository.getStatus(); + }) + .then(function (statuses) { + assert.equal(statuses.length, 0); + }) + .then(function () { + return test.repository.checkoutBranch("master"); + }) + .then(function () { + var packageContent = fse.readFileSync(packageJsonPath, "utf-8"); - assert.ok(~packageContent.indexOf("\"ejs\": \"~1.0.0\",")); - }); + assert.ok(~packageContent.indexOf('"ejs": "~1.0.0",')); + }); }); - it("can checkout an index with conflicts", function() { + it("can checkout an index with conflicts", function () { const test = this; const testBranchName = "test"; let ourCommit; let signature; - return test.repository.defaultSignature() - .then((signatureResult) => { - signature = signatureResult; - return test.repository.getBranchCommit(checkoutBranchName); - }) - .then((commit) => { - ourCommit = commit; - - return test.repository.createBranch(testBranchName, commit.id()); - }) - .then(() => { - return test.repository.checkoutBranch(testBranchName); - }) - .then((_branch) => { - fse.writeFileSync(packageJsonPath, "\n"); - - return test.repository.refreshIndex() - .then((index) => { - return index.addByPath(packageJsonName) + return test.repository + .defaultSignature() + .then((signatureResult) => { + signature = signatureResult; + return test.repository.getBranchCommit(checkoutBranchName); + }) + .then((commit) => { + ourCommit = commit; + + return test.repository.createBranch(testBranchName, commit.id()); + }) + .then(() => { + return test.repository.checkoutBranch(testBranchName); + }) + .then((_branch) => { + fse.writeFileSync(packageJsonPath, "\n"); + + return test.repository.refreshIndex().then((index) => { + return index + .addByPath(packageJsonName) .then(() => { return index.write(); }) @@ -188,49 +193,53 @@ describe("Checkout", function() { return index.writeTree(); }); }); - }) - .then((oid) => { - assert.equal(oid.toString(), - "85135ab398976a4d5be6a8704297a45f2b1e7ab2"); - - return test.repository.createCommit("refs/heads/" + testBranchName, - signature, signature, "we made breaking changes", oid, [ourCommit]); - }) - .then((_commit) => { - return Promise.all([ - test.repository.getBranchCommit(testBranchName), - test.repository.getBranchCommit("master") - ]); - }) - .then((commits) => { - return NodeGit.Merge.commits(test.repository, commits[0], commits[1], - null); - }) - .then((index) => { - assert.ok(index); - assert.ok(index.hasConflicts && index.hasConflicts()); - - return NodeGit.Checkout.index(test.repository, index); - }) - .then(() => { - // Verify that the conflict has been written to disk - var conflictedContent = fse.readFileSync(packageJsonPath, "utf-8"); - - assert.ok(~conflictedContent.indexOf("<<<<<<< ours")); - assert.ok(~conflictedContent.indexOf("=======")); - assert.ok(~conflictedContent.indexOf(">>>>>>> theirs")); - - // Cleanup - var opts = { - checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: packageJsonName - }; - - return Checkout.head(test.repository, opts); - }) - .then(() => { - var finalContent = fse.readFileSync(packageJsonPath, "utf-8"); - assert.equal(finalContent, "\n"); - }); + }) + .then((oid) => { + assert.equal(oid.toString(), "85135ab398976a4d5be6a8704297a45f2b1e7ab2"); + + return test.repository.createCommit( + "refs/heads/" + testBranchName, + signature, + signature, + "we made breaking changes", + oid, + [ourCommit] + ); + }) + .then((_commit) => { + return Promise.all([ + test.repository.getBranchCommit(testBranchName), + test.repository.getBranchCommit("master"), + ]); + }) + .then((commits) => { + return NodeGit.Merge.commits(test.repository, commits[0], commits[1], null); + }) + .then((index) => { + assert.ok(index); + assert.ok(index.hasConflicts && index.hasConflicts()); + + return NodeGit.Checkout.index(test.repository, index); + }) + .then(() => { + // Verify that the conflict has been written to disk + var conflictedContent = fse.readFileSync(packageJsonPath, "utf-8"); + + assert.ok(~conflictedContent.indexOf("<<<<<<< ours")); + assert.ok(~conflictedContent.indexOf("=======")); + assert.ok(~conflictedContent.indexOf(">>>>>>> theirs")); + + // Cleanup + var opts = { + checkoutStrategy: Checkout.STRATEGY.FORCE, + paths: packageJsonName, + }; + + return Checkout.head(test.repository, opts); + }) + .then(() => { + var finalContent = fse.readFileSync(packageJsonPath, "utf-8"); + assert.equal(finalContent, "\n"); + }); }); }); diff --git a/test/tests/cherrypick.js b/test/tests/cherrypick.js index 1a1dc9223..1d1217821 100644 --- a/test/tests/cherrypick.js +++ b/test/tests/cherrypick.js @@ -3,44 +3,47 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); -describe("Cherrypick", function() { +describe("Cherrypick", function () { var RepoUtils = require("../utils/repository_setup"); var NodeGit = require("../../"); var Cherrypick = NodeGit.Cherrypick; var repoPath = local("../repos/cherrypick"); - beforeEach(function() { + beforeEach(function () { var test = this; - return RepoUtils.createRepository(repoPath) - .then(function(repo) { - test.repository = repo; - }); + return RepoUtils.createRepository(repoPath).then(function (repo) { + test.repository = repo; + }); }); - after(function() { + after(function () { return fse.remove(repoPath); }); - it("can cherrypick a commit onto the index", function() { + it("can cherrypick a commit onto the index", function () { var repo = this.repository; var workDirPath = repo.workdir(); var repoInfo; return RepoUtils.setupBranches(repo, true) - .then(function(info) { + .then(function (info) { repoInfo = info; - assert(!fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), - repoInfo.theirFileName + " shouldn't exist"); + assert( + !fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), + repoInfo.theirFileName + " shouldn't exist" + ); var promise = Cherrypick.cherrypick(repo, repoInfo.theirCommit, {}); assert(promise.then); return promise; }) - .then(function() { - assert(fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), - repoInfo.theirFileName + " should exist"); + .then(function () { + assert( + fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), + repoInfo.theirFileName + " should exist" + ); // Cherrypick.cherrypick leaves the repo in a cherrypick state assert.equal(repo.state(), NodeGit.Repository.STATE.CHERRYPICK); @@ -53,48 +56,52 @@ describe("Cherrypick", function() { }); }); - it("can cherrypick a commit onto another specified commit", function() { + it("can cherrypick a commit onto another specified commit", function () { var repo = this.repository; var workDirPath = repo.workdir(); var repoInfo; return RepoUtils.setupBranches(repo) - .then(function(info) { + .then(function (info) { repoInfo = info; - assert(!fse.existsSync(path.join(workDirPath, repoInfo.ourFileName)), - repoInfo.ourFileName + " shouldn't exist"); - assert(!fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), - repoInfo.theirFileName + " shouldn't exist"); + assert( + !fse.existsSync(path.join(workDirPath, repoInfo.ourFileName)), + repoInfo.ourFileName + " shouldn't exist" + ); + assert( + !fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), + repoInfo.theirFileName + " shouldn't exist" + ); - var promise = Cherrypick.commit(repo, repoInfo.theirCommit, - repoInfo.ourCommit, 0, {}); + var promise = Cherrypick.commit(repo, repoInfo.theirCommit, repoInfo.ourCommit, 0, {}); assert(promise.then); return promise; }) - .then(function(index) { + .then(function (index) { assert(index); return index.writeTreeTo(repo); }) - .then(function(oid) { + .then(function (oid) { return repo.getTree(oid); }) - .then(function(tree) { + .then(function (tree) { var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, }; return NodeGit.Checkout.tree(repo, tree, opts); }) - .then(function() { - assert(fse.existsSync(path.join(workDirPath, repoInfo.ourFileName)), - repoInfo.ourFileName + " should exist"); - assert(fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), - repoInfo.theirFileName + " should exist"); + .then(function () { + assert(fse.existsSync(path.join(workDirPath, repoInfo.ourFileName)), repoInfo.ourFileName + " should exist"); + assert( + fse.existsSync(path.join(workDirPath, repoInfo.theirFileName)), + repoInfo.theirFileName + " should exist" + ); }); }); - it("can cherrypick a stash to apply it", function() { + it("can cherrypick a stash to apply it", function () { var repo = this.repository; var workDirPath = repo.workdir(); var repoInfo; @@ -103,56 +110,55 @@ describe("Cherrypick", function() { var addedContent = "\nIt makes things E-Z!"; return RepoUtils.setupBranches(repo, true) - .then(function(info) { + .then(function (info) { repoInfo = info; return repo.getStatus(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 0); - return fse.writeFile(path.join(workDirPath, repoInfo.ourFileName), - repoInfo.ourFileContent + addedContent); + return fse.writeFile(path.join(workDirPath, repoInfo.ourFileName), repoInfo.ourFileContent + addedContent); }) - .then(function() { + .then(function () { return repo.getStatus(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 1); return NodeGit.Stash.save(repo, repoInfo.ourSignature, "our stash", 0); }) - .then(function(oid) { + .then(function (oid) { cherrypickOid = oid; return fse.readFile(path.join(workDirPath, repoInfo.ourFileName)); }) - .then(function(fileContent) { + .then(function (fileContent) { assert.equal(fileContent, repoInfo.ourFileContent); return repo.getStatus(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 0); return repo.getCommit(cherrypickOid); }) - .then(function(commit) { + .then(function (commit) { var opts = { - mainline: 1 + mainline: 1, }; return Cherrypick.cherrypick(repo, commit, opts); }) - .then(function() { + .then(function () { return repo.getStatus(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 1); return fse.readFile(path.join(workDirPath, repoInfo.ourFileName)); }) - .then(function(fileContent) { + .then(function (fileContent) { assert.equal(fileContent, repoInfo.ourFileContent + addedContent); }); }); diff --git a/test/tests/commit.js b/test/tests/commit.js index 0bd31671b..2fcf42adb 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -9,7 +9,7 @@ var local = path.join.bind(path, __dirname); var exec = require("../../utils/execPromise"); -describe("Commit", function() { +describe("Commit", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Commit = NodeGit.Commit; @@ -22,12 +22,12 @@ describe("Commit", function() { function reinitialize(test) { return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.commit = commit; }); } @@ -37,110 +37,104 @@ describe("Commit", function() { var treeOid; var parent; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; - - return repo.createCommit( - "HEAD", - author, - committer, - "message", - treeOid, - [parent]); - }); + return fse + .writeFile(path.join(repo.workdir(), fileName), fileContent) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommit("HEAD", author, committer, "message", treeOid, [parent]); + }); } function undoCommit() { - return exec("git reset --hard HEAD~1", {cwd: reposPath}); + return exec("git reset --hard HEAD~1", { cwd: reposPath }); } - beforeEach(function() { + beforeEach(function () { return reinitialize(this); }); - it("will fail with an invalid sha", function() { - return this.repository.getCommit("invalid").then(null, function(err) { + it("will fail with an invalid sha", function () { + return this.repository.getCommit("invalid").then(null, function (err) { assert.ok(err instanceof Error); }); }); - it("has a message", function() { + it("has a message", function () { assert.equal(this.commit.message(), "Update README.md"); }); - it("has a raw message", function() { + it("has a raw message", function () { assert.equal(this.commit.messageRaw(), "Update README.md"); }); - it("has a message encoding", function() { + it("has a message encoding", function () { var encoding = this.commit.messageEncoding(); assert.ok(encoding === "UTF-8" || encoding === undefined); }); - it("has a summary", function() { + it("has a summary", function () { assert.equal(this.commit.summary(), "Update README.md"); }); - it("has a sha", function() { + it("has a sha", function () { assert.equal(this.commit.sha(), oid); }); - it("has a time", function() { + it("has a time", function () { assert.equal(this.commit.timeMs(), 1362012884000); }); - it("has a date", function() { + it("has a date", function () { assert.equal(this.commit.date().getTime(), 1362012884000); }); - it("has a time offset", function() { + it("has a time offset", function () { assert.equal(this.commit.timeOffset(), 780); }); - it("can call getTree on a parent commit", function() { - return this.commit.parent(0) - .then(function(parent) { - return parent.getTree(); - }) - .then(function(tree) { - assert.equal( - tree.id().toString(), "327ff68e59f94f0c25d2c62fb0938efa01e8a107" - ); - }); + it("can call getTree on a parent commit", function () { + return this.commit + .parent(0) + .then(function (parent) { + return parent.getTree(); + }) + .then(function (tree) { + assert.equal(tree.id().toString(), "327ff68e59f94f0c25d2c62fb0938efa01e8a107"); + }); }); - it("can create a commit", function() { + it("can create a commit", function () { var test = this; var expectedCommitId = "315e77328ef596f3bc065d8ac6dd2c72c09de8a5"; var fileName = "newfile.txt"; @@ -152,66 +146,61 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; - - return repo.createCommit( - "HEAD", - author, - committer, - "message", - treeOid, - [parent]); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return undoCommit() - .then(function(){ - return reinitialize(test); - }); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommit("HEAD", author, committer, "message", treeOid, [parent]); + }) + .then( + function (commitId) { + assert.equal(expectedCommitId, commitId); + return undoCommit().then(function () { + return reinitialize(test); + }); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } + ); }); - it("can create a commit as a buffer", function() { + it("can create a commit as a buffer", function () { var test = this; var fileName = "newfile.txt"; var fileContent = "hello world"; @@ -229,62 +218,59 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; - - return repo.createCommitBuffer( - author, - committer, - "message", - treeOid, - [parent]); - }) - .then(function(commitContent) { - assert.equal(expectedCommitContent, commitContent); - return reinitialize(test); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommitBuffer(author, committer, "message", treeOid, [parent]); + }) + .then( + function (commitContent) { + assert.equal(expectedCommitContent, commitContent); + return reinitialize(test); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } + ); }); - it("can amend commit", function(){ + it("can amend commit", function () { var commitToAmendId = "315e77328ef596f3bc065d8ac6dd2c72c09de8a5"; var expectedAmendedCommitId = "57836e96555243666ea74ea888310cc7c41d4613"; var fileName = "newfile.txt"; @@ -303,190 +289,155 @@ describe("Commit", function() { var amendedCommitId; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; - - return repo.createCommit( - "HEAD", - author, - committer, - "message", - treeOid, - [parent]); - }) - .then(function() { - return fse.writeFile( - path.join(repo.workdir(), newFileName), - newFileContent - ); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(newFileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(resultOid){ - treeOid = resultOid; - return Promise.all([ - repo.getCommit(commitToAmendId), - NodeGit.Signature.create( - "New Foo Bar", - "newfoo@bar.com", - 246802468, - 12 - ), - NodeGit.Signature.create( - "New Foo A Bar", - "newfoo@bar.com", - 4807891730, - 32 - ) - ]); - - }) - .then(function(amendInfo){ - var commit = amendInfo[0]; - author = amendInfo[1]; - committer = amendInfo[2]; - return commit.amend( - "HEAD", - author, - committer, - messageEncoding, - message, - treeOid - ); - }) - .then(function(commitId){ - amendedCommitId = commitId; - return undoCommit(); - }) - .then(function(){ - assert.equal(amendedCommitId, expectedAmendedCommitId); - }); + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommit("HEAD", author, committer, "message", treeOid, [parent]); + }) + .then(function () { + return fse.writeFile(path.join(repo.workdir(), newFileName), newFileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(newFileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (resultOid) { + treeOid = resultOid; + return Promise.all([ + repo.getCommit(commitToAmendId), + NodeGit.Signature.create("New Foo Bar", "newfoo@bar.com", 246802468, 12), + NodeGit.Signature.create("New Foo A Bar", "newfoo@bar.com", 4807891730, 32), + ]); + }) + .then(function (amendInfo) { + var commit = amendInfo[0]; + author = amendInfo[1]; + committer = amendInfo[2]; + return commit.amend("HEAD", author, committer, messageEncoding, message, treeOid); + }) + .then(function (commitId) { + amendedCommitId = commitId; + return undoCommit(); + }) + .then(function () { + assert.equal(amendedCommitId, expectedAmendedCommitId); + }); }); - it("can amend commit and update reference separately", function() { + it("can amend commit and update reference separately", function () { var customReflogMessage = "updating reference manually"; var head, repo, oid, originalReflogCount; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - // grab the original reflog entry count (to make sure .amend - // doesn't add a reflog entry when not given a reference) - return NodeGit.Reflog.read(repo, "HEAD"); - }) - .then(function(reflog) { - originalReflogCount = reflog.entrycount(); - // get the head reference and commit - return repo.head(); - }) - .then(function(headResult) { - head = headResult; - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - // amend the commit but don't update any reference - // (passing null as update_ref) - return headCommit.amend( - null, - null, - null, - "message", - null, - null); - }).then(function(oidResult) { - oid = oidResult; - // update the reference manually - return head.setTarget(oid, customReflogMessage); - }).then(function() { - // load reflog and make sure the last message is what we expected - return NodeGit.Reflog.read(repo, "HEAD"); - }).then(function(reflog) { - var reflogEntry = reflog.entryByIndex(0); - assert.equal( - reflogEntry.message(), - customReflogMessage - ); - assert.equal( - reflogEntry.idNew().toString(), - oid - ); - // only setTarget should have added to the entrycount - assert.equal(reflog.entrycount(), originalReflogCount + 1); - }); + .then(function (repoResult) { + repo = repoResult; + // grab the original reflog entry count (to make sure .amend + // doesn't add a reflog entry when not given a reference) + return NodeGit.Reflog.read(repo, "HEAD"); + }) + .then(function (reflog) { + originalReflogCount = reflog.entrycount(); + // get the head reference and commit + return repo.head(); + }) + .then(function (headResult) { + head = headResult; + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + // amend the commit but don't update any reference + // (passing null as update_ref) + return headCommit.amend(null, null, null, "message", null, null); + }) + .then(function (oidResult) { + oid = oidResult; + // update the reference manually + return head.setTarget(oid, customReflogMessage); + }) + .then(function () { + // load reflog and make sure the last message is what we expected + return NodeGit.Reflog.read(repo, "HEAD"); + }) + .then(function (reflog) { + var reflogEntry = reflog.entryByIndex(0); + assert.equal(reflogEntry.message(), customReflogMessage); + assert.equal(reflogEntry.idNew().toString(), oid); + // only setTarget should have added to the entrycount + assert.equal(reflog.entrycount(), originalReflogCount + 1); + }); }); - describe("amendWithSignature", function() { - it("can amend with signature", function() { - const signedData = "-----BEGIN PGP SIGNATURE-----\n" + - "\n" + - "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + - "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + - "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + - "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + - "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + - "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + - "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + - "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + - "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + - "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + - "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + - "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + - "ekgUBx+BX6nJOw==\n" + - "=4Hy5\n" + - "-----END PGP SIGNATURE-----"; + describe("amendWithSignature", function () { + it("can amend with signature", function () { + const signedData = + "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; const onSignature = () => ({ code: NodeGit.Error.CODE.OK, field: "gpgsig", - signedData + signedData, }); var repo; @@ -496,62 +447,55 @@ describe("Commit", function() { var parents; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - message = headCommit.message() + "\n"; - parents = headCommit.parents(); - - return headCommit.amendWithSignature( - null, - null, - null, - null, - null, - null, - onSignature - ); - }) - .then(function(oidResult) { - oid = oidResult; - return NodeGit.Commit.lookup(repo, oid); - }) - .then(function(commitResult) { - commit = commitResult; - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signatureInfo.signature, signedData); - assert.equal(commit.message(), message); - assert.deepEqual(commit.parents(), parents); - }); + .then(function (repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + message = headCommit.message() + "\n"; + parents = headCommit.parents(); + + return headCommit.amendWithSignature(null, null, null, null, null, null, onSignature); + }) + .then(function (oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function (commitResult) { + commit = commitResult; + return commit.getSignature("gpgsig"); + }) + .then(function (signatureInfo) { + assert.equal(signatureInfo.signature, signedData); + assert.equal(commit.message(), message); + assert.deepEqual(commit.parents(), parents); + }); }); - it("will respects overridden arguments", function() { - const signedData = "-----BEGIN PGP SIGNATURE-----\n" + - "\n" + - "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + - "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + - "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + - "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + - "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + - "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + - "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + - "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + - "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + - "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + - "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + - "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + - "ekgUBx+BX6nJOw==\n" + - "=4Hy5\n" + - "-----END PGP SIGNATURE-----"; + it("will respects overridden arguments", function () { + const signedData = + "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; const onSignature = () => ({ code: NodeGit.Error.CODE.OK, field: "gpgsig", - signedData + signedData, }); var repo; @@ -561,64 +505,46 @@ describe("Commit", function() { var parents; var commitTree; - var author = NodeGit.Signature.create( - "Scooby Doo", - "scoob@mystery.com", - 123456789, - 60 - ); - var committer = NodeGit.Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + var author = NodeGit.Signature.create("Scooby Doo", "scoob@mystery.com", 123456789, 60); + var committer = NodeGit.Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); var tree = Oid.fromString("f4661419a6fbbe865f78644fec722c023ce4b65f"); return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - message = headCommit.message() + "\n"; - parents = headCommit.parents(); - - return headCommit.amendWithSignature( - null, - author, - committer, - null, - null, - tree, - onSignature - ); - }) - .then(function(oidResult) { - oid = oidResult; - return NodeGit.Commit.lookup(repo, oid); - }) - .then(function(commitResult) { - commit = commitResult; - return commit.getTree(); - }) - .then(function(commitTreeResult) { - commitTree = commitTreeResult; - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signatureInfo.signature, signedData); - assert.equal(commit.message(), message); - assert.deepEqual(commit.parents(), parents); - assert.deepEqual(commitTree.id(), tree); - assert.deepEqual(commit.author(), author); - assert.deepEqual(commit.committer(), committer); - }); + .then(function (repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + message = headCommit.message() + "\n"; + parents = headCommit.parents(); + + return headCommit.amendWithSignature(null, author, committer, null, null, tree, onSignature); + }) + .then(function (oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function (commitResult) { + commit = commitResult; + return commit.getTree(); + }) + .then(function (commitTreeResult) { + commitTree = commitTreeResult; + return commit.getSignature("gpgsig"); + }) + .then(function (signatureInfo) { + assert.equal(signatureInfo.signature, signedData); + assert.equal(commit.message(), message); + assert.deepEqual(commit.parents(), parents); + assert.deepEqual(commitTree.id(), tree); + assert.deepEqual(commit.author(), author); + assert.deepEqual(commit.committer(), committer); + }); }); - it("can optionally skip signing process", function() { + it("can optionally skip signing process", function () { const onSignature = () => ({ - code: NodeGit.Error.CODE.PASSTHROUGH + code: NodeGit.Error.CODE.PASSTHROUGH, }); var repo; @@ -628,116 +554,105 @@ describe("Commit", function() { var parents; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - message = headCommit.message(); - parents = headCommit.parents(); - - return headCommit.amendWithSignature( - null, - null, - null, - null, - null, - null, - onSignature - ); - }) - .then(function(oidResult) { - oid = oidResult; - return NodeGit.Commit.lookup(repo, oid); - }) - .then(function(commitResult) { - commit = commitResult; - return commit.getSignature("gpgsig") - .then(function() { - assert.fail("Should not have a signature"); - }, function(error) { - if (error && error.message === "this commit is not signed") { - return; - } - throw error; + .then(function (repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + message = headCommit.message(); + parents = headCommit.parents(); + + return headCommit.amendWithSignature(null, null, null, null, null, null, onSignature); + }) + .then(function (oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function (commitResult) { + commit = commitResult; + return commit.getSignature("gpgsig").then( + function () { + assert.fail("Should not have a signature"); + }, + function (error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; + } + ); + }) + .then(function (_signatureInfo) { + assert.equal(commit.message(), message); + assert.deepEqual(commit.parents(), parents); }); - }) - .then(function(_signatureInfo) { - assert.equal(commit.message(), message); - assert.deepEqual(commit.parents(), parents); - }); }); - it("will throw if signing callback returns an error code", function() { + it("will throw if signing callback returns an error code", function () { const onSignature = () => ({ - code: NodeGit.Error.CODE.ERROR + code: NodeGit.Error.CODE.ERROR, }); return NodeGit.Repository.open(reposPath) - .then(function(repo) { - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - return headCommit.amendWithSignature( - null, - null, - null, - null, - null, - null, - onSignature + .then(function (repo) { + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + return headCommit.amendWithSignature(null, null, null, null, null, null, onSignature); + }) + .then( + function () { + assert.fail("amendWithSignature should have failed."); + }, + function (error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + } ); - }) - .then(function() { - assert.fail("amendWithSignature should have failed."); - }, function(error) { - if (error && error.errno === NodeGit.Error.CODE.ERROR) { - return; - } - throw error; - }); }); }); - it("has an owner", function() { + it("has an owner", function () { var owner = this.commit.owner(); assert.ok(owner instanceof Repository); }); - it("can walk its repository's history", function(done) { + it("can walk its repository's history", function (done) { var historyCount = 0; var expectedHistoryCount = 364; var history = this.commit.history(); - history.on("commit", function(_commit) { + history.on("commit", function (_commit) { historyCount++; }); - history.on("end", function(commits) { + history.on("end", function (commits) { assert.equal(historyCount, expectedHistoryCount); assert.equal(commits.length, expectedHistoryCount); done(); }); - history.on("error", function(_err) { + history.on("error", function (_err) { assert.ok(false); }); history.start(); }); - it("can fetch the master branch HEAD", function() { + it("can fetch the master branch HEAD", function () { var repository = this.repository; - return repository.getBranchCommit("master").then(function(commit) { + return repository.getBranchCommit("master").then(function (commit) { return repository.getCommit(commit.sha()); }); }); - it("can fetch all of its parents", function() { - return this.commit.getParents().then(function(parents) { + it("can fetch all of its parents", function () { + return this.commit.getParents().then(function (parents) { assert.equal(parents.length, 1); var sha = parents[0].sha(); @@ -745,68 +660,65 @@ describe("Commit", function() { }); }); - it("can specify a parents limit", function() { - return this.commit.getParents(0).then(function(parents) { + it("can specify a parents limit", function () { + return this.commit.getParents(0).then(function (parents) { assert.equal(parents.length, 0); }); }); - it("can specify limit higher than actual parents", function() { - return this.commit.getParents(2).then(function(parents) { + it("can specify limit higher than actual parents", function () { + return this.commit.getParents(2).then(function (parents) { assert.equal(parents.length, 1); }); }); it("can fetch parents of a merge commit", function () { return NodeGit.Repository.open(reposPath) - .then(function (repo) { - return repo.getCommit("bf1da765e357a9b936d6d511f2c7b78e0de53632"); - }) - .then(function (commit) { - return commit.getParents(); - }) - .then(function (parents) { - assert.equal(parents.length, 2); - }); + .then(function (repo) { + return repo.getCommit("bf1da765e357a9b936d6d511f2c7b78e0de53632"); + }) + .then(function (commit) { + return commit.getParents(); + }) + .then(function (parents) { + assert.equal(parents.length, 2); + }); }); - it("has a parent count", function() { + it("has a parent count", function () { assert.equal(1, this.commit.parentcount()); }); - it("can fetch a single parent", function() { - return this.commit.parent(0).then(function(parent) { - assert.strictEqual(parent.sha(), - "ecfd36c80a3e9081f200dfda2391acadb56dac27"); + it("can fetch a single parent", function () { + return this.commit.parent(0).then(function (parent) { + assert.strictEqual(parent.sha(), "ecfd36c80a3e9081f200dfda2391acadb56dac27"); // This used to crash due to a missing .repo property on the retrieved // parent. - return parent.getTree().then(tree => assert(tree)); + return parent.getTree().then((tree) => assert(tree)); }); }); - it("can retrieve and walk a commit tree", function() { + it("can retrieve and walk a commit tree", function () { var commitTreeEntryCount = 0; var expectedCommitTreeEntryCount = 198; - return this.commit.getTree().then(function(tree) { - return new Promise(function(resolve, fail) { - + return this.commit.getTree().then(function (tree) { + return new Promise(function (resolve, fail) { var treeWalker = tree.walk(); - treeWalker.on("entry", function(_entry) { + treeWalker.on("entry", function (_entry) { commitTreeEntryCount++; }); - treeWalker.on("error", function(error) { + treeWalker.on("error", function (error) { fail(error); }); - treeWalker.on("end", function(_entries) { + treeWalker.on("end", function (_entries) { try { assert.equal(commitTreeEntryCount, expectedCommitTreeEntryCount); resolve(); - } - catch (e) { + } catch (e) { fail(e); } }); @@ -816,223 +728,215 @@ describe("Commit", function() { }); }); - it("can get the commit diff", function() { - return this.commit.getDiff().then(function(diff) { + it("can get the commit diff", function () { + return this.commit.getDiff().then(function (diff) { assert.equal(diff.length, 1); }); }); // it("can get the commit diff in large context", function() { - // For displaying the full file we can set context_lines of options. - // Eventually this should work, but right now there is a - // comment in diff.c in libgit2 of "/* TODO: parse thresholds */" - // It will add the "--unified" but not with the "=x" part. - // options.context_lines = 20000; + // For displaying the full file we can set context_lines of options. + // Eventually this should work, but right now there is a + // comment in diff.c in libgit2 of "/* TODO: parse thresholds */" + // It will add the "--unified" but not with the "=x" part. + // options.context_lines = 20000; // }); - it("can get the commit diff without whitespace", function() { + it("can get the commit diff without whitespace", function () { var repo; var options = {}; - var GIT_DIFF_IGNORE_WHITESPACE = (1 << 22); + var GIT_DIFF_IGNORE_WHITESPACE = 1 << 22; options.flags = GIT_DIFF_IGNORE_WHITESPACE; var fileName = "whitespacetest.txt"; - var fileContent = "line a\nline b\nline c\nline d\n line e\nline f\n" + - "line g\nline h\nline i\n line j\nline k\nline l\n" + - "line m\nline n\n line o\nline p\nline q\n" + - "line r\nline s\nline t\nline u\nline v\nline w\n" + - "line x\nline y\nline z\n"; - var changedFileContent = "line a\nline b\n line c\nline d\n" + - "line e\nline f\nline g\n line h\nline i\nline j\n" + - "line k\nline l\nline m\nline n\nline o\nlinep\n" + - " line q\nline r\nline s\nline t\n\nline u\n" + - "line v1\nline w\nline x\n \nline y\nline z\n"; + var fileContent = + "line a\nline b\nline c\nline d\n line e\nline f\n" + + "line g\nline h\nline i\n line j\nline k\nline l\n" + + "line m\nline n\n line o\nline p\nline q\n" + + "line r\nline s\nline t\nline u\nline v\nline w\n" + + "line x\nline y\nline z\n"; + var changedFileContent = + "line a\nline b\n line c\nline d\n" + + "line e\nline f\nline g\n line h\nline i\nline j\n" + + "line k\nline l\nline m\nline n\nline o\nlinep\n" + + " line q\nline r\nline s\nline t\n\nline u\n" + + "line v1\nline w\nline x\n \nline y\nline z\n"; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return commitFile(repo, fileName, fileContent, "commit this"); - }) - .then(function(){ - return commitFile(repo, fileName, changedFileContent, "commit that"); - }) - .then (function() { - return repo.getHeadCommit(); - }) - .then (function(wsCommit) { - return wsCommit.getDiffWithOptions(options); - }) - .then(function(diff) { - assert.equal(diff.length, 1); - return diff[0].patches(); - }) - .then(function(patches) { - assert.equal(patches.length, 1); - var patch = patches[0]; + .then(function (repoResult) { + repo = repoResult; + return commitFile(repo, fileName, fileContent, "commit this"); + }) + .then(function () { + return commitFile(repo, fileName, changedFileContent, "commit that"); + }) + .then(function () { + return repo.getHeadCommit(); + }) + .then(function (wsCommit) { + return wsCommit.getDiffWithOptions(options); + }) + .then(function (diff) { + assert.equal(diff.length, 1); + return diff[0].patches(); + }) + .then(function (patches) { + assert.equal(patches.length, 1); + var patch = patches[0]; - assert.equal(patch.oldFile().path(), fileName); - assert.equal(patch.newFile().path(), fileName); - assert.ok(patch.isModified()); + assert.equal(patch.oldFile().path(), fileName); + assert.equal(patch.newFile().path(), fileName); + assert.ok(patch.isModified()); - return patch.hunks(); - }) - .then(function(hunks) { - return hunks[0].lines(); - }) - .then(function(lines) { - //check all hunk lines - assert.equal(lines.length, 12); - assert.equal(lines[0].origin(), Diff.LINE.CONTEXT); + return patch.hunks(); + }) + .then(function (hunks) { + return hunks[0].lines(); + }) + .then(function (lines) { + //check all hunk lines + assert.equal(lines.length, 12); + assert.equal(lines[0].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[1].content().length, 9); - assert.equal(lines[1].content(), "line s\n"); - assert.equal(lines[1].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[1].content().length, 9); + assert.equal(lines[1].content(), "line s\n"); + assert.equal(lines[1].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[2].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[2].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[3].content().length, 1); - assert.equal(lines[3].content(), "\n"); - assert.equal(lines[3].origin(), Diff.LINE.ADDITION); + assert.equal(lines[3].content().length, 1); + assert.equal(lines[3].content(), "\n"); + assert.equal(lines[3].origin(), Diff.LINE.ADDITION); - assert.equal(lines[4].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[4].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[5].content().length, 7); - assert.equal(lines[5].content(), "line v\n"); - assert.equal(lines[5].origin(), Diff.LINE.DELETION); + assert.equal(lines[5].content().length, 7); + assert.equal(lines[5].content(), "line v\n"); + assert.equal(lines[5].origin(), Diff.LINE.DELETION); - assert.equal(lines[6].content().length, 8); - assert.equal(lines[6].content(), "line v1\n"); - assert.equal(lines[6].origin(), Diff.LINE.ADDITION); + assert.equal(lines[6].content().length, 8); + assert.equal(lines[6].content(), "line v1\n"); + assert.equal(lines[6].origin(), Diff.LINE.ADDITION); - assert.equal(lines[7].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[7].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[8].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[8].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[9].content().length, 4); - assert.equal(lines[9].content(), "\t\t\t\n"); - assert.equal(lines[9].origin(), Diff.LINE.ADDITION); + assert.equal(lines[9].content().length, 4); + assert.equal(lines[9].content(), "\t\t\t\n"); + assert.equal(lines[9].origin(), Diff.LINE.ADDITION); - assert.equal(lines[10].origin(), Diff.LINE.CONTEXT); + assert.equal(lines[10].origin(), Diff.LINE.CONTEXT); - assert.equal(lines[11].origin(), Diff.LINE.CONTEXT); - }); + assert.equal(lines[11].origin(), Diff.LINE.CONTEXT); + }); }); - it("can get header fields", function() { + it("can get header fields", function () { var commit = this.commit; - return commit.headerField("parent").then(function(field) { - assert.equal(field, - "ecfd36c80a3e9081f200dfda2391acadb56dac27"); - return commit.headerField("author"); - }) - .then(function(field) { - assert.equal(field, - "Michael Robinson 1362012884 +1300"); - return commit.headerField("committer"); - }) - .then(function(field) { - assert.equal(field, - "Michael Robinson 1362012884 +1300"); - }); + return commit + .headerField("parent") + .then(function (field) { + assert.equal(field, "ecfd36c80a3e9081f200dfda2391acadb56dac27"); + return commit.headerField("author"); + }) + .then(function (field) { + assert.equal(field, "Michael Robinson 1362012884 +1300"); + return commit.headerField("committer"); + }) + .then(function (field) { + assert.equal(field, "Michael Robinson 1362012884 +1300"); + }); }); it("can lookup using a short id", function () { return NodeGit.Repository.open(reposPath) - .then(function (repo) { - return Commit.lookupPrefix(repo, Oid.fromString("bf1da765"), 8); - }) - .then(function (commit) { - assert.equal(commit.id().toString(), - "bf1da765e357a9b936d6d511f2c7b78e0de53632"); - }); + .then(function (repo) { + return Commit.lookupPrefix(repo, Oid.fromString("bf1da765"), 8); + }) + .then(function (commit) { + assert.equal(commit.id().toString(), "bf1da765e357a9b936d6d511f2c7b78e0de53632"); + }); }); it("can find nth gen ancestor", function () { return NodeGit.Repository.open(reposPath) - .then(function (repo) { - return repo.getCommit("b52067acaa755c3b3fc21b484ffed2bce4150f62"); - }) - .then(function (commit) { - return commit.nthGenAncestor(3); - }) - .then(function (commit) { - assert.equal(commit.id().toString(), - "9b2f3a37d46d47248d2704b6a46ec7e197bcd48c"); - }); + .then(function (repo) { + return repo.getCommit("b52067acaa755c3b3fc21b484ffed2bce4150f62"); + }) + .then(function (commit) { + return commit.nthGenAncestor(3); + }) + .then(function (commit) { + assert.equal(commit.id().toString(), "9b2f3a37d46d47248d2704b6a46ec7e197bcd48c"); + }); }); - describe("Commit's Author", function() { - before(function() { + describe("Commit's Author", function () { + before(function () { this.author = this.commit.author(); }); - it("is available", function() { + it("is available", function () { assert.ok(this.author instanceof NodeGit.Signature); }); - it("has a name", function() { + it("has a name", function () { assert.equal(this.author.name(), "Michael Robinson"); }); - it("has an email", function() { + it("has an email", function () { assert.equal(this.author.email(), "mike@panmedia.co.nz"); }); }); - describe("Commit's Committer", function() { - before(function() { + describe("Commit's Committer", function () { + before(function () { this.committer = this.commit.committer(); }); - it("is available", function() { + it("is available", function () { assert.ok(this.committer instanceof NodeGit.Signature); }); - it("has a name", function() { + it("has a name", function () { assert.equal(this.committer.name(), "Michael Robinson"); }); - it("has an email", function() { + it("has an email", function () { assert.equal(this.committer.email(), "mike@panmedia.co.nz"); }); }); - describe("Commit's Body", function() { - - it("null if only summary", function() { + describe("Commit's Body", function () { + it("null if only summary", function () { var test = this; - return NodeGit.Commit.lookup(test.repository, - "15315cf41ad76400d9189c85a5827b77b8c392f1") - .then(function(commit) { + return NodeGit.Commit.lookup(test.repository, "15315cf41ad76400d9189c85a5827b77b8c392f1").then(function (commit) { assert.equal(commit.body(), null); }); }); - it("non-null when body exists", function() { + it("non-null when body exists", function () { var test = this; - return NodeGit.Commit.lookup(test.repository, - "c82fb078a192ea221c9f1093c64321c60d64aa0d") - .then(function(commit) { - assert.equal(commit.body(), - "Added new methods in checkout and repository"); + return NodeGit.Commit.lookup(test.repository, "c82fb078a192ea221c9f1093c64321c60d64aa0d").then(function (commit) { + assert.equal(commit.body(), "Added new methods in checkout and repository"); }); }); }); - it("does not leak", function() { + it("does not leak", function () { var test = this; - return leakTest(NodeGit.Commit, function() { - return NodeGit.Commit.lookup(test.repository, oid); + return leakTest(NodeGit.Commit, function () { + return NodeGit.Commit.lookup(test.repository, oid); }); }); - it("duplicates signature", function() { + it("duplicates signature", function () { garbageCollect(); var Signature = NodeGit.Signature; var startSelfFreeingCount = Signature.getSelfFreeingInstanceCount(); - var startNonSelfFreeingCount = - Signature.getNonSelfFreeingConstructedCount(); + var startNonSelfFreeingCount = Signature.getNonSelfFreeingConstructedCount(); var signature = this.commit.author(); garbageCollect(); @@ -1050,9 +954,10 @@ describe("Commit", function() { assert.equal(startSelfFreeingCount, endSelfFreeingCount); }); - describe("Commit's Signature", function() { - it("Can create a signed commit in a repo", function() { - var signedData = "-----BEGIN PGP SIGNATURE-----\n" + + describe("Commit's Signature", function () { + it("Can create a signed commit in a repo", function () { + var signedData = + "-----BEGIN PGP SIGNATURE-----\n" + "Version: GnuPG v1.4.12 (Darwin)\n" + "\n" + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + @@ -1073,7 +978,7 @@ describe("Commit", function() { const onSignature = () => ({ code: NodeGit.Error.CODE.OK, field: "gpgsig", - signedData + signedData, }); var test = this; @@ -1087,74 +992,68 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; - return repo.createCommitWithSignature( - null, - author, - committer, - "message", - treeOid, - [parent], - onSignature + return repo.createCommitWithSignature(null, author, committer, "message", treeOid, [parent], onSignature); + }) + .then(function (commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function (commit) { + return commit.getSignature("gpgsig"); + }) + .then( + function (signatureInfo) { + assert.equal(signedData, signatureInfo.signature); + return reinitialize(test); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } ); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return NodeGit.Commit.lookup(repo, commitId); - }) - .then(function(commit) { - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signedData, signatureInfo.signature); - return reinitialize(test); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); }); - it("Can create a signed commit in a repo and update existing ref", - function() { - var signedData = "-----BEGIN PGP SIGNATURE-----\n" + + it("Can create a signed commit in a repo and update existing ref", function () { + var signedData = + "-----BEGIN PGP SIGNATURE-----\n" + "Version: GnuPG v1.4.12 (Darwin)\n" + "\n" + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + @@ -1175,7 +1074,7 @@ describe("Commit", function() { const onSignature = () => ({ code: NodeGit.Error.CODE.OK, field: "gpgsig", - signedData + signedData, }); var test = this; @@ -1189,80 +1088,74 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; - return repo.createCommitWithSignature( - "HEAD", - author, - committer, - "message", - treeOid, - [parent], - onSignature); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return NodeGit.Commit.lookup(repo, commitId); - }) - .then(function(commit) { - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signedData, signatureInfo.signature); - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - assert.equal(expectedCommitId, headCommit.id()); - return undoCommit() - .then(function(){ - return reinitialize(test); - }); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); + return repo.createCommitWithSignature("HEAD", author, committer, "message", treeOid, [parent], onSignature); + }) + .then(function (commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function (commit) { + return commit.getSignature("gpgsig"); + }) + .then(function (signatureInfo) { + assert.equal(signedData, signatureInfo.signature); + return repo.getHeadCommit(); + }) + .then( + function (headCommit) { + assert.equal(expectedCommitId, headCommit.id()); + return undoCommit().then(function () { + return reinitialize(test); + }); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } + ); }); - it("Can create a signed commit in bare a repo and update non-existent ref", - function() { - var signedData = "-----BEGIN PGP SIGNATURE-----\n" + + it("Can create a signed commit in bare a repo and update non-existent ref", function () { + var signedData = + "-----BEGIN PGP SIGNATURE-----\n" + "\n" + "iQIzBAABCAAdFiEEHYpzGBSIRCy6QrNr0R10kNTwiG8FAlxcuSoACgkQ0R10kNTw\n" + "iG9sZA//Z6mrX5l//gjtn7Fy3Cg5khasNMZA15JUPzfoSyVkaYM7g/iZrJr4uZmm\n" + @@ -1282,7 +1175,7 @@ describe("Commit", function() { const onSignature = () => ({ code: NodeGit.Error.CODE.OK, field: "gpgsig", - signedData + signedData, }); var expectedCommitId = "ef11571eb3590007712c7ee3b4a11cd9c6094e30"; @@ -1294,112 +1187,103 @@ describe("Commit", function() { var treeOid; return NodeGit.Repository.init(newRepoPath, 0) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; - return repo.createCommitWithSignature( - "HEAD", - author, - committer, - "message", - treeOid, - [], - onSignature); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return NodeGit.Commit.lookup(repo, commitId); - }) - .then(function(commit) { - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signedData, signatureInfo.signature); - return repo.getHeadCommit(); - }) - .then(function(headCommit) { - assert.equal(expectedCommitId, headCommit.id()); - }); + return repo.createCommitWithSignature("HEAD", author, committer, "message", treeOid, [], onSignature); + }) + .then(function (commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function (commit) { + return commit.getSignature("gpgsig"); + }) + .then(function (signatureInfo) { + assert.equal(signedData, signatureInfo.signature); + return repo.getHeadCommit(); + }) + .then(function (headCommit) { + assert.equal(expectedCommitId, headCommit.id()); + }); }); - it("Can create a signed commit raw", function() { + it("Can create a signed commit raw", function () { var expectedCommitId = "cc1401eaac4e9e77190e98a9353b305f0c6313d8"; - var signature = "-----BEGIN PGP SIGNATURE-----\n\n" + - "iQEcBAABCAAGBQJarBhIAAoJEE8pfTd/81lKQA4IAL8Mu5kc4B/MX9s4XB26Ahap\n" + - "n06kCx3RQ1KHMZIRomAjCnb48WieNVuy1y+Ut0RgfCxxrJ1ZnzFG3kF2bIKwIxNI\n" + - "tYIC76iWny+mrVnb2mjKYjn/3F4c4VJGENq9ITiV1WeE4yJ8dHw2ox2D+hACzTvQ\n" + - "KVroedk8BDFJxS6DFb20To35xbAVhwBnAGRcII4Wi5PPMFpqAhGLfq3Czv95ddSz\n" + - "BHlyp27+YWSpV0Og0dqOEhsdDYaPrOBGRcoRiqjue+l5tgK/QerLFZ4aovZzpuEP\n" + - "Xx1yZfqXIiy4Bo40qScSrdnmnp/kMq/NQGR3jYU+SleFHVKNFsya9UwurMaezY0=\n" + - "=eZzi\n-----END PGP SIGNATURE-----"; - - var commit_content = "tree f4661419a6fbbe865f78644fec722c023ce4b65f\n" + - "parent 32789a79e71fbc9e04d3eff7425e1771eb595150\n" + - "author Tyler Ang-Wanek 1521227848 -0700\n" + - "committer Tyler Ang-Wanek 1521227848 -0700\n\n" + - "GPG Signed commit\n"; + var signature = + "-----BEGIN PGP SIGNATURE-----\n\n" + + "iQEcBAABCAAGBQJarBhIAAoJEE8pfTd/81lKQA4IAL8Mu5kc4B/MX9s4XB26Ahap\n" + + "n06kCx3RQ1KHMZIRomAjCnb48WieNVuy1y+Ut0RgfCxxrJ1ZnzFG3kF2bIKwIxNI\n" + + "tYIC76iWny+mrVnb2mjKYjn/3F4c4VJGENq9ITiV1WeE4yJ8dHw2ox2D+hACzTvQ\n" + + "KVroedk8BDFJxS6DFb20To35xbAVhwBnAGRcII4Wi5PPMFpqAhGLfq3Czv95ddSz\n" + + "BHlyp27+YWSpV0Og0dqOEhsdDYaPrOBGRcoRiqjue+l5tgK/QerLFZ4aovZzpuEP\n" + + "Xx1yZfqXIiy4Bo40qScSrdnmnp/kMq/NQGR3jYU+SleFHVKNFsya9UwurMaezY0=\n" + + "=eZzi\n-----END PGP SIGNATURE-----"; + + var commit_content = + "tree f4661419a6fbbe865f78644fec722c023ce4b65f\n" + + "parent 32789a79e71fbc9e04d3eff7425e1771eb595150\n" + + "author Tyler Ang-Wanek 1521227848 -0700\n" + + "committer Tyler Ang-Wanek 1521227848 -0700\n\n" + + "GPG Signed commit\n"; var repo; var commit; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return Commit.createWithSignature( - repo, - commit_content, - signature, - "gpgsig"); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return NodeGit.Commit.lookup(repo, commitId); - }) - .then(function(commitResult) { - commit = commitResult; - return commit.getSignature(); - }) - .then(function(signatureInfoDefault) { - assert.equal(signature, signatureInfoDefault.signature); - assert.equal(commit_content, signatureInfoDefault.signedData); + .then(function (repoResult) { + repo = repoResult; + return Commit.createWithSignature(repo, commit_content, signature, "gpgsig"); + }) + .then(function (commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function (commitResult) { + commit = commitResult; + return commit.getSignature(); + }) + .then(function (signatureInfoDefault) { + assert.equal(signature, signatureInfoDefault.signature); + assert.equal(commit_content, signatureInfoDefault.signedData); - return commit.getSignature("gpgsig"); - }) - .then(function(signatureInfo) { - assert.equal(signature, signatureInfo.signature); - assert.equal(commit_content, signatureInfo.signedData); - }); + return commit.getSignature("gpgsig"); + }) + .then(function (signatureInfo) { + assert.equal(signature, signatureInfo.signature); + assert.equal(commit_content, signatureInfo.signedData); + }); }); - it("Can retrieve the gpg signature from a commit", function() { + it("Can retrieve the gpg signature from a commit", function () { var expectedSignedData = "tree f4661419a6fbbe865f78644fec722c023ce4b65f\n" + "parent 32789a79e71fbc9e04d3eff7425e1771eb595150\n" + @@ -1417,28 +1301,19 @@ describe("Commit", function() { "Xx1yZfqXIiy4Bo40qScSrdnmnp/kMq/NQGR3jYU+SleFHVKNFsya9UwurMaezY0=\n" + "=eZzi\n-----END PGP SIGNATURE-----"; - return NodeGit.Commit.lookup( - this.repository, - "cc1401eaac4e9e77190e98a9353b305f0c6313d8" - ) - .then(function(commit) { + return NodeGit.Commit.lookup(this.repository, "cc1401eaac4e9e77190e98a9353b305f0c6313d8") + .then(function (commit) { return commit.getSignature(); }) - .then(function(extractSignature) { - assert.equal( - extractSignature.signature, - expectedSignature - ); - assert.equal( - extractSignature.signedData, - expectedSignedData - ); + .then(function (extractSignature) { + assert.equal(extractSignature.signature, expectedSignature); + assert.equal(extractSignature.signedData, expectedSignedData); }); }); - it("Can be optionally skipped to create without signature", function() { + it("Can be optionally skipped to create without signature", function () { const onSignature = () => ({ - code: NodeGit.Error.CODE.PASSTHROUGH + code: NodeGit.Error.CODE.PASSTHROUGH, }); var test = this; @@ -1452,81 +1327,77 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; - return repo.createCommitWithSignature( - null, - author, - committer, - "message", - treeOid, - [parent], - onSignature - ); - }) - .then(function(commitId) { - assert.equal(expectedCommitId, commitId); - return NodeGit.Commit.lookup(repo, commitId); - }) - .then(function(commit) { - return commit.getSignature("gpgsig") - .then(function() { - assert.fail("Should not have been able to retrieve gpgsig"); - }, function(error) { - if (error && error.message === "this commit is not signed") { - return; + return repo.createCommitWithSignature(null, author, committer, "message", treeOid, [parent], onSignature); + }) + .then(function (commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function (commit) { + return commit.getSignature("gpgsig").then( + function () { + assert.fail("Should not have been able to retrieve gpgsig"); + }, + function (error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; } - throw error; - }); - }) - .then(function() { - return reinitialize(test); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); + ); + }) + .then( + function () { + return reinitialize(test); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } + ); }); - it("Will throw if the signing cb returns an error code", function() { + it("Will throw if the signing cb returns an error code", function () { const onSignature = () => ({ - code: NodeGit.Error.CODE.ERROR + code: NodeGit.Error.CODE.ERROR, }); var test = this; @@ -1539,69 +1410,66 @@ describe("Commit", function() { var parent; return NodeGit.Repository.open(reposPath) - .then(function(repoResult) { - repo = repoResult; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return repo.refreshIndex(); - }) - .then(function(indexResult) { - index = indexResult; - }) - .then(function() { - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }) - .then(function(oidResult) { - treeOid = oidResult; - return NodeGit.Reference.nameToId(repo, "HEAD"); - }) - .then(function(head) { - return repo.getCommit(head); - }) - .then(function(parentResult) { - parent = parentResult; - return Promise.all([ - NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) - ]); - }) - .then(function(signatures) { - var author = signatures[0]; - var committer = signatures[1]; + .then(function (repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return repo.refreshIndex(); + }) + .then(function (indexResult) { + index = indexResult; + }) + .then(function () { + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }) + .then(function (oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function (head) { + return repo.getCommit(head); + }) + .then(function (parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), + ]); + }) + .then(function (signatures) { + var author = signatures[0]; + var committer = signatures[1]; - return repo.createCommitWithSignature( - null, - author, - committer, - "message", - treeOid, - [parent], - onSignature + return repo.createCommitWithSignature(null, author, committer, "message", treeOid, [parent], onSignature); + }) + .then( + function () { + assert.fail("createCommitWithSignature should have failed."); + }, + function (error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + } + ) + .then( + function () { + return reinitialize(test); + }, + function (reason) { + return reinitialize(test).then(function () { + return Promise.reject(reason); + }); + } ); - }) - .then(function() { - assert.fail("createCommitWithSignature should have failed."); - }, function(error) { - if (error && error.errno === NodeGit.Error.CODE.ERROR) { - return; - } - throw error; - }) - .then(function() { - return reinitialize(test); - }, function(reason) { - return reinitialize(test) - .then(function() { - return Promise.reject(reason); - }); - }); }); }); }); diff --git a/test/tests/config.js b/test/tests/config.js index 8653fcc16..17a10a71f 100644 --- a/test/tests/config.js +++ b/test/tests/config.js @@ -4,37 +4,37 @@ var local = path.join.bind(path, __dirname); var exec = require("../../utils/execPromise"); -describe("Config", function() { +describe("Config", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Config = NodeGit.Config; var reposPath = local("../repos/workdir"); - describe("openOnDisk", function() { + describe("openOnDisk", function () { var configPath = path.join(reposPath, ".git/config"); - it("opens the same config as the repo", function() { + it("opens the same config as the repo", function () { var repo; var onDiskConfig; return Repository.open(reposPath) - .then(function(_repo) { + .then(function (_repo) { repo = _repo; return Config.openOndisk(configPath); }) - .then(function(config) { + .then(function (config) { onDiskConfig = config; return repo.config(); }) - .then(function(repoConfig) { + .then(function (repoConfig) { return Promise.all([ onDiskConfig.getString("core.filemode"), onDiskConfig.getString("core.bare"), repoConfig.getString("core.filemode"), - repoConfig.getString("core.bare") + repoConfig.getString("core.bare"), ]); }) - .then(function(results) { + .then(function (results) { var onDiskFileMode = results[0]; var onDiskBare = results[1]; var repoFileMode = results[2]; @@ -45,28 +45,25 @@ describe("Config", function() { }); }); - it("opens the config and can change a value", function() { + it("opens the config and can change a value", function () { var repo; var onDiskConfig; var repoConfig; var originalFileMode; return Repository.open(reposPath) - .then(function(_repo) { + .then(function (_repo) { repo = _repo; return Config.openOndisk(configPath); }) - .then(function(config) { + .then(function (config) { onDiskConfig = config; return repo.config(); }) - .then(function(_repoConfig) { + .then(function (_repoConfig) { repoConfig = _repoConfig; - return Promise.all([ - onDiskConfig.getString("core.filemode"), - repoConfig.getString("core.filemode") - ]); + return Promise.all([onDiskConfig.getString("core.filemode"), repoConfig.getString("core.filemode")]); }) - .then(function(results) { + .then(function (results) { var onDiskFileMode = results[0]; var repoFileMode = results[1]; @@ -74,73 +71,62 @@ describe("Config", function() { originalFileMode = onDiskFileMode; var oppositeFileMode = onDiskFileMode === "true" ? "false" : "true"; - return onDiskConfig.setString( - "core.filemode", - oppositeFileMode - ); + return onDiskConfig.setString("core.filemode", oppositeFileMode); }) - .then(function() { + .then(function () { return Config.openOndisk(configPath); }) - .then(function(config) { - return Promise.all([ - config.getString("core.filemode"), - repoConfig.getString("core.filemode") - ]); + .then(function (config) { + return Promise.all([config.getString("core.filemode"), repoConfig.getString("core.filemode")]); }) - .then(function(results) { + .then(function (results) { var onDiskFileMode = results[0]; var repoFileMode = results[1]; assert.notEqual(onDiskFileMode, originalFileMode); assert.equal(onDiskFileMode, repoFileMode); }) - .then(function() { + .then(function () { // cleanup - return onDiskConfig.setString( - "core.filemode", - originalFileMode - ); + return onDiskConfig.setString("core.filemode", originalFileMode); }); }); }); - it("can get and set a global value", function() { + it("can get and set a global value", function () { var savedUserName; function finallyFn() { - return exec("git config --global user.name \"" + savedUserName + "\""); + return exec('git config --global user.name "' + savedUserName + '"'); } return exec("git config --global user.name") - .then(function(userName) { + .then(function (userName) { savedUserName = userName.trim(); - return exec( - "git config --global user.name \"" + savedUserName + "-test\""); + return exec('git config --global user.name "' + savedUserName + '-test"'); }) - .then(function() { + .then(function () { return NodeGit.Config.openDefault(); }) - .then(function(config) { + .then(function (config) { return config.getString("user.name"); }) - .then(function(userNameFromNodeGit) { + .then(function (userNameFromNodeGit) { assert.equal(savedUserName + "-test", userNameFromNodeGit); }) .then(finallyFn) - .catch(function(e) { - return finallyFn() - .then(function() { - throw e; - }); + .catch(function (e) { + return finallyFn().then(function () { + throw e; + }); }); }); - it("will reject when getting value of non-existent config key", function() { + it("will reject when getting value of non-existent config key", function () { // Test initially for finding source of a segfault. There was a problem // where getting an empty config value crashes nodegit. return NodeGit.Config.openDefault() - .then(function(config) { + .then(function (config) { return config.getString("user.fakevalue"); }) .catch(function (_e) { @@ -148,59 +134,55 @@ describe("Config", function() { }); }); - it("can get and set a repo config value", function() { + it("can get and set a repo config value", function () { var savedUserName; function finallyFn() { - return exec("git config user.name \"" + savedUserName + "\"", { - cwd: reposPath + return exec('git config user.name "' + savedUserName + '"', { + cwd: reposPath, }); } return exec("git config user.name", { - cwd: reposPath + cwd: reposPath, }) - .then(function(userName) { - savedUserName = userName.trim(); + .then(function (userName) { + savedUserName = userName.trim(); - return exec("git config user.name \"" + savedUserName + "-test\"", { - cwd: reposPath - }); - }) - .then(function() { - return NodeGit.Repository.open(reposPath); - }) - .then(function(repo) { - return repo.config(); - }) - .then(function(config) { - return config.getString("user.name"); - }) - .then(function(userNameFromNodeGit) { - assert.equal(savedUserName + "-test", userNameFromNodeGit); - }) - .then(finallyFn) - .catch(function(e) { - return finallyFn() - .then(function() { + return exec('git config user.name "' + savedUserName + '-test"', { + cwd: reposPath, + }); + }) + .then(function () { + return NodeGit.Repository.open(reposPath); + }) + .then(function (repo) { + return repo.config(); + }) + .then(function (config) { + return config.getString("user.name"); + }) + .then(function (userNameFromNodeGit) { + assert.equal(savedUserName + "-test", userNameFromNodeGit); + }) + .then(finallyFn) + .catch(function (e) { + return finallyFn().then(function () { throw e; }); - }); + }); }); - describe("getPath", function() { - it("can get path for a given config", function() { + describe("getPath", function () { + it("can get path for a given config", function () { return NodeGit.Repository.open(reposPath) - .then(function(repo) { + .then(function (repo) { return repo.config(); }) - .then(function(config) { - return Promise.all([ - config.getPath("core.filemode"), - config.getString("core.filemode") - ]); + .then(function (config) { + return Promise.all([config.getPath("core.filemode"), config.getString("core.filemode")]); }) - .then(function(results) { + .then(function (results) { var localFilemode = results[0]; var repoFilemode = results[1]; assert.equal(localFilemode, repoFilemode); diff --git a/test/tests/convenient_line.js b/test/tests/convenient_line.js index 994041cb4..694989c37 100644 --- a/test/tests/convenient_line.js +++ b/test/tests/convenient_line.js @@ -4,63 +4,60 @@ var fse = require("fs-extra"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("ConvenientLine", function() { +describe("ConvenientLine", function () { var repoPath = local("../repos/convenientLineTest"); var unicodeLine = "Ťḥ𝖎ṧ ℓỈ𝓃ệ çǒ𝚗ẗảḭṋṦ Û𝐧ǐ𝗰ṓḍ𝔢\n"; var asciiLine = "but this line doesn't\n"; - beforeEach(function() { + beforeEach(function () { var test = this; - return repoSetup.createRepository(repoPath) - .then(function(repo) { - return repoSetup.commitFileToRepo( - repo, - "fileWithUnicodeChars", - unicodeLine + asciiLine - ); + return repoSetup + .createRepository(repoPath) + .then(function (repo) { + return repoSetup.commitFileToRepo(repo, "fileWithUnicodeChars", unicodeLine + asciiLine); }) - .then(function(commit) { + .then(function (commit) { return commit.getDiff(); }) - .then(function(diff) { + .then(function (diff) { return diff[0].patches(); }) - .then(function(patches) { + .then(function (patches) { return patches[0].hunks(); }) - .then(function(hunks) { + .then(function (hunks) { return hunks[0].lines(); }) - .then(function(lines) { + .then(function (lines) { test.unicodeLine = lines[0]; test.asciiLine = lines[1]; }); }); - after(function() { + after(function () { return fse.remove(repoPath); }); - it("can parse the byte length of a unicode string", function() { + it("can parse the byte length of a unicode string", function () { var line = this.unicodeLine; assert.equal(line.contentLen(), Buffer.byteLength(unicodeLine, "utf8")); }); - it("can get a line that contains unicode", function() { + it("can get a line that contains unicode", function () { var line = this.unicodeLine; assert.equal(line.content(), unicodeLine); }); - it("can parse the byte length of a ascii string", function() { + it("can parse the byte length of a ascii string", function () { var line = this.asciiLine; assert.equal(line.contentLen(), Buffer.byteLength(asciiLine, "utf8")); }); - it("can get a line that contains ascii", function() { + it("can get a line that contains ascii", function () { var line = this.asciiLine; assert.equal(line.content(), asciiLine); diff --git a/test/tests/cred.js b/test/tests/cred.js index eee98d69b..70b06d44e 100644 --- a/test/tests/cred.js +++ b/test/tests/cred.js @@ -3,70 +3,60 @@ var path = require("path"); var fs = require("fs"); var local = path.join.bind(path, __dirname); -describe("Cred", function() { +describe("Cred", function () { var NodeGit = require("../../"); var sshPublicKey = local("../id_rsa.pub"); var sshPrivateKey = local("../id_rsa"); - it("can create default credentials", function() { + it("can create default credentials", function () { var defaultCreds = NodeGit.Credential.defaultNew(); assert.ok(defaultCreds instanceof NodeGit.Credential); }); - it("can create ssh credentials using passed keys", function() { - var cred = NodeGit.Credential.sshKeyNew( - "username", - sshPublicKey, - sshPrivateKey, - ""); + it("can create ssh credentials using passed keys", function () { + var cred = NodeGit.Credential.sshKeyNew("username", sshPublicKey, sshPrivateKey, ""); assert.ok(cred instanceof NodeGit.Credential); }); - it("can create ssh credentials using passed keys in memory", function() { + it("can create ssh credentials using passed keys in memory", function () { var publicKeyContents = fs.readFileSync(sshPublicKey, { - encoding: "ascii" + encoding: "ascii", }); var privateKeyContents = fs.readFileSync(sshPrivateKey, { - encoding: "ascii" + encoding: "ascii", }); - return NodeGit.Credential.sshKeyMemoryNew( - "username", - publicKeyContents, - privateKeyContents, - "").then(function(cred) { - assert.ok(cred instanceof NodeGit.Credential); - }); + return NodeGit.Credential.sshKeyMemoryNew("username", publicKeyContents, privateKeyContents, "").then(function ( + cred + ) { + assert.ok(cred instanceof NodeGit.Credential); + }); }); - it("can create credentials using plaintext", function() { - var plaintextCreds = NodeGit.Credential.userpassPlaintextNew - ("username", "password"); + it("can create credentials using plaintext", function () { + var plaintextCreds = NodeGit.Credential.userpassPlaintextNew("username", "password"); assert.ok(plaintextCreds instanceof NodeGit.Credential); }); - it("can create credentials using agent", function() { - var fromAgentCreds = NodeGit.Credential.sshKeyFromAgent - ("username"); + it("can create credentials using agent", function () { + var fromAgentCreds = NodeGit.Credential.sshKeyFromAgent("username"); assert.ok(fromAgentCreds instanceof NodeGit.Credential); }); - it("can create credentials using username", function() { - return NodeGit.Credential.usernameNew - ("username").then(function(cred) { - assert.ok(cred instanceof NodeGit.Credential); - }); + it("can create credentials using username", function () { + return NodeGit.Credential.usernameNew("username").then(function (cred) { + assert.ok(cred instanceof NodeGit.Credential); + }); }); - it("can return 1 if a username exists", function() { - var plaintextCreds = NodeGit.Credential.userpassPlaintextNew - ("username", "password"); + it("can return 1 if a username exists", function () { + var plaintextCreds = NodeGit.Credential.userpassPlaintextNew("username", "password"); assert.ok(plaintextCreds.hasUsername() === 1); }); - it("can return 0 if a username does not exist", function() { + it("can return 0 if a username does not exist", function () { var defaultCreds = NodeGit.Credential.defaultNew(); assert.ok(defaultCreds.hasUsername() === 0); }); diff --git a/test/tests/diff.js b/test/tests/diff.js index a29e9e487..538df4d27 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -5,27 +5,32 @@ var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); function getLinesFromDiff(diff) { - return diff.patches() - .then(function(patches) { - return Promise.all(_.map(patches, function(patch) { - return patch.hunks(); - })); + return diff + .patches() + .then(function (patches) { + return Promise.all( + _.map(patches, function (patch) { + return patch.hunks(); + }) + ); }) - .then(function(listsOfHunks) { + .then(function (listsOfHunks) { var hunks = _.flatten(listsOfHunks); - return Promise.all(_.map(hunks, function(hunk) { - return hunk.lines(); - })); + return Promise.all( + _.map(hunks, function (hunk) { + return hunk.lines(); + }) + ); }) - .then(function(listsOfLines) { + .then(function (listsOfLines) { var lines = _.flatten(listsOfLines); - return _.map(lines, function(line) { + return _.map(lines, function (line) { return line.content(); }); }); } -describe("Diff", function() { +describe("Diff", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Diff = NodeGit.Diff; @@ -43,78 +48,76 @@ describe("Diff", function() { var moveFromPath = local("../repos/workdir", moveFromFile); var moveToPath = local("../repos/workdir", moveToFile); - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath).then(function(repository) { - test.repository = repository; + return Repository.open(reposPath) + .then(function (repository) { + test.repository = repository; - return repository.refreshIndex(); - }) - .then(function(index) { - test.index = index; + return repository.refreshIndex(); + }) + .then(function (index) { + test.index = index; - return test.repository.getBranchCommit("master"); - }) - .then(function(masterCommit) { - return masterCommit.getTree(); - }) - .then(function(tree) { - test.masterCommitTree = tree; + return test.repository.getBranchCommit("master"); + }) + .then(function (masterCommit) { + return masterCommit.getTree(); + }) + .then(function (tree) { + test.masterCommitTree = tree; - return test.repository.getCommit(oid); - }) - .then(function(commit) { - test.commit = commit; + return test.repository.getCommit(oid); + }) + .then(function (commit) { + test.commit = commit; - return commit.getDiff(); - }) - .then(function(diff) { - test.diff = diff; + return commit.getDiff(); + }) + .then(function (diff) { + test.diff = diff; - return fse.writeFile(diffFilepath, "1 line\n2 line\n3 line\n\n4"); - }) - .then(function() { - return fse.move(moveFromPath, moveToPath); - }) - .then(function() { - return Diff.treeToWorkdirWithIndex( - test.repository, - test.masterCommitTree, - { flags: Diff.OPTION.INCLUDE_UNTRACKED } - ); - }) - .then(function(workdirDiff) { - test.workdirDiff = workdirDiff; - }) - .then(function() { - var opts = { - flags: Diff.OPTION.INCLUDE_UNTRACKED | - Diff.OPTION.RECURSE_UNTRACKED_DIRS - }; + return fse.writeFile(diffFilepath, "1 line\n2 line\n3 line\n\n4"); + }) + .then(function () { + return fse.move(moveFromPath, moveToPath); + }) + .then(function () { + return Diff.treeToWorkdirWithIndex(test.repository, test.masterCommitTree, { + flags: Diff.OPTION.INCLUDE_UNTRACKED, + }); + }) + .then(function (workdirDiff) { + test.workdirDiff = workdirDiff; + }) + .then(function () { + var opts = { + flags: Diff.OPTION.INCLUDE_UNTRACKED | Diff.OPTION.RECURSE_UNTRACKED_DIRS, + }; - return Diff.indexToWorkdir(test.repository, test.index, opts); - }) - .then(function(diff) { - test.indexToWorkdirDiff = diff; - }) - .then(function() { - return fse.remove(diffFilepath); - }) - .then(function() { - return fse.move(moveToPath, moveFromPath); - }) - .catch(function(e) { - return fse.remove(diffFilepath) - .then(function() { + return Diff.indexToWorkdir(test.repository, test.index, opts); + }) + .then(function (diff) { + test.indexToWorkdirDiff = diff; + }) + .then(function () { + return fse.remove(diffFilepath); + }) + .then(function () { + return fse.move(moveToPath, moveFromPath); + }) + .catch(function (e) { + return fse.remove(diffFilepath).then(function () { return Promise.reject(e); }); - }); + }); }); - it("can walk an Array", function() { - return this.diff[0].patches() - .then(function(patches) { + it("can walk an Array", function () { + return this.diff[0] + .patches() + .then(function (patches) { var patch = patches[0]; assert.equal(patch.oldFile().path(), "README.md"); @@ -124,24 +127,25 @@ describe("Diff", function() { return patch.hunks(); }) - .then(function(hunks) { + .then(function (hunks) { var hunk = hunks[0]; assert.equal(hunk.size(), 5); return hunk.lines(); }) - .then(function(lines) { + .then(function (lines) { assert.equal(lines[0].origin(), Diff.LINE.CONTEXT); assert.equal(lines[1].origin(), Diff.LINE.CONTEXT); assert.equal(lines[2].origin(), Diff.LINE.CONTEXT); - var oldContent = "__Before submitting a pull request, please ensure " + - "both unit tests and lint checks pass.__\n"; + var oldContent = + "__Before submitting a pull request, please ensure " + "both unit tests and lint checks pass.__\n"; assert.equal(lines[3].content(), oldContent); assert.equal(lines[3].origin(), Diff.LINE.DELETION); assert.equal(lines[3].content().length, oldContent.length); - var newContent = "__Before submitting a pull request, please ensure " + + var newContent = + "__Before submitting a pull request, please ensure " + "both that you've added unit tests to cover your shiny new code, " + "and that all unit tests and lint checks pass.__\n"; assert.equal(lines[4].content(), newContent); @@ -150,137 +154,115 @@ describe("Diff", function() { }); }); - it("can diff the workdir with index", function() { - return this.workdirDiff.patches() - .then(function(patches) { - assert.equal(patches.length, 3); - assert(patches[2].isUntracked()); + it("can diff the workdir with index", function () { + return this.workdirDiff.patches().then(function (patches) { + assert.equal(patches.length, 3); + assert(patches[2].isUntracked()); - var oldFile = patches[2].oldFile(); - assert.equal(oldFile.path(), "wddiff.txt"); - assert.equal(oldFile.size(), 0); + var oldFile = patches[2].oldFile(); + assert.equal(oldFile.path(), "wddiff.txt"); + assert.equal(oldFile.size(), 0); - var newFile = patches[2].newFile(); - assert.equal(newFile.path(), "wddiff.txt"); - assert.equal(newFile.size(), 23); - }); + var newFile = patches[2].newFile(); + assert.equal(newFile.path(), "wddiff.txt"); + assert.equal(newFile.size(), 23); + }); }); - it("can resolve individual line changes from the patch hunks", function() { - return this.workdirDiff.patches() - .then(function(patches) { + it("can resolve individual line changes from the patch hunks", function () { + return this.workdirDiff + .patches() + .then(function (patches) { var result = []; var hunkPromises = []; - patches.forEach(function(patch) { - hunkPromises.push(patch.hunks() - .then(function(hunks) { + patches.forEach(function (patch) { + hunkPromises.push( + patch.hunks().then(function (hunks) { result = result.concat(hunks); }) ); }); - return Promise.all(hunkPromises) - .then(function() { - return result; - }); + return Promise.all(hunkPromises).then(function () { + return result; + }); }) - .then(function(hunks) { + .then(function (hunks) { var result = []; var linePromises = []; - hunks.forEach(function(hunk) { - linePromises.push(hunk.lines() - .then(function(lines) { + hunks.forEach(function (hunk) { + linePromises.push( + hunk.lines().then(function (lines) { result = result.concat(lines); }) ); }); - return Promise.all(linePromises) - .then(function() { - return result; - }); + return Promise.all(linePromises).then(function () { + return result; + }); }) - .then(function(lines) { - lines.forEach(function(line) { + .then(function (lines) { + lines.forEach(function (line) { assert(/\n/.exec(line.content())); assert(/\n/.exec(line.rawContent())); }); }); }); - it("can diff the contents of a file to a string", function(done) { - this.repository.getBranchCommit("master") - .then(function(commit) { + it("can diff the contents of a file to a string", function (done) { + this.repository + .getBranchCommit("master") + .then(function (commit) { return commit.getEntry("LICENSE"); }) - .then(function(entry) { + .then(function (entry) { var _entry = entry; return _entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { var buffer = "New Text"; - return Diff.blobToBuffer( - blob, - null, - buffer, - null, - null, - null, - null, - function(delta, hunk, _payload) { - assert.equal(hunk.oldStart(), 1); - assert.equal(hunk.oldLines(), 19); - assert.equal(hunk.newStart(), 1); - assert.equal(hunk.newLines(), 1); - assert.equal( - hunk.header().substring(0, hunk.headerLen() - 1), - "@@ -1,19 +1 @@" - ); - done(); - }); + return Diff.blobToBuffer(blob, null, buffer, null, null, null, null, function (delta, hunk, _payload) { + assert.equal(hunk.oldStart(), 1); + assert.equal(hunk.oldLines(), 19); + assert.equal(hunk.newStart(), 1); + assert.equal(hunk.newLines(), 1); + assert.equal(hunk.header().substring(0, hunk.headerLen() - 1), "@@ -1,19 +1 @@"); + done(); + }); }); }); - it("can diff the contents of a file to a string with unicode characters", - function(done) { + it("can diff the contents of a file to a string with unicode characters", function (done) { var evilString = "Unicode’s fun!\nAnd it’s good for you!\n"; var buffer = Buffer.from(evilString); var test = this; Blob.createFromBuffer(test.repository, buffer, buffer.length) - .then(function(oid) { + .then(function (oid) { return Blob.lookup(test.repository, oid); }) - .then(function(blob) { + .then(function (blob) { blob.repo = test.repository; - return Diff.blobToBuffer( - blob, - null, - evilString, - null, - null, - null, - null, - function(_delta, _hunk, _payload) { - assert.fail( - "There aren't any changes so this shouldn't be called."); - done(); - }); + return Diff.blobToBuffer(blob, null, evilString, null, null, null, null, function (_delta, _hunk, _payload) { + assert.fail("There aren't any changes so this shouldn't be called."); + done(); + }); }) - .then(function() { + .then(function () { done(); }); }); - it("can diff with a null tree", function() { + it("can diff with a null tree", function () { var repo = this.repository; var tree = this.masterCommitTree; return Diff.treeToTree(repo, null, tree, null) - .then(function(diff) { + .then(function (diff) { return diff.patches(); }) - .then(function(patches) { + .then(function (patches) { // Number of patches returned is 84 or 85 depending // on something unknown at this time. Hopefully we can // eventually resolve the root cause of the difference. @@ -289,113 +271,106 @@ describe("Diff", function() { }); }); - it("can diff the initial commit of a repository", function() { + it("can diff the initial commit of a repository", function () { var repo = this.repository; var oid = "99c88fd2ac9c5e385bd1fe119d89c83dce326219"; // First commit - return repo.getCommit(oid) - .then(function(commit) { + return repo + .getCommit(oid) + .then(function (commit) { return commit.getDiff(); }) - .then(function(diffs) { + .then(function (diffs) { return diffs[0].patches(); }) - .then(function(patches) { + .then(function (patches) { assert.equal(patches.length, 8); }); }); - it("can diff tree to index", function() { + it("can diff tree to index", function () { var repo = this.repository; var tree = this.masterCommitTree; var index = this.index; var opts = { flags: Diff.OPTION.INCLUDE_UNTRACKED }; return Diff.treeToIndex(repo, tree, index, opts) - .then(function(diff) { + .then(function (diff) { return diff.patches(); }) - .then(function(patches) { + .then(function (patches) { assert.equal(patches.length, 0); }); }); - it("can diff index to workdir", function() { - return this.indexToWorkdirDiff.patches() - .then(function(patches) { - assert.equal(patches.length, 3); - }); + it("can diff index to workdir", function () { + return this.indexToWorkdirDiff.patches().then(function (patches) { + assert.equal(patches.length, 3); + }); }); - it("can pass undefined pathspec as option to indexToWorkdir", function() { + it("can pass undefined pathspec as option to indexToWorkdir", function () { var test = this; - return Repository.open(reposPath).then(function(repository) { - test.repository = repository; + return Repository.open(reposPath) + .then(function (repository) { + test.repository = repository; - return repository.refreshIndex(); - }) - .then(function(index) { - test.index = index; + return repository.refreshIndex(); + }) + .then(function (index) { + test.index = index; - return test.repository.getBranchCommit("master"); - }) - .then(function() { - var opts = { - flags: Diff.OPTION.INCLUDE_UNTRACKED | - Diff.OPTION.RECURSE_UNTRACKED_DIRS, - pathspec: undefined - }; - - // should not segfault - return Diff.indexToWorkdir(test.repository, test.index, opts); - }); + return test.repository.getBranchCommit("master"); + }) + .then(function () { + var opts = { + flags: Diff.OPTION.INCLUDE_UNTRACKED | Diff.OPTION.RECURSE_UNTRACKED_DIRS, + pathspec: undefined, + }; + + // should not segfault + return Diff.indexToWorkdir(test.repository, test.index, opts); + }); }); - - it("can merge two commit diffs", function() { + it("can merge two commit diffs", function () { var linesOfFirstDiff; var linesOfSecondDiff; var firstDiff = this.diff[0]; var secondDiff; var oid = "c88d39e70585199425b111c6a2c7fa7b4bc617ad"; - return this.repository.getCommit(oid) - .then(function(testCommit) { + return this.repository + .getCommit(oid) + .then(function (testCommit) { return testCommit.getDiff(); }) - .then(function(_secondDiff) { + .then(function (_secondDiff) { secondDiff = _secondDiff[0]; - return Promise.all([ - getLinesFromDiff(firstDiff), - getLinesFromDiff(secondDiff) - ]); + return Promise.all([getLinesFromDiff(firstDiff), getLinesFromDiff(secondDiff)]); }) - .then(function(listOfLines) { + .then(function (listOfLines) { linesOfFirstDiff = listOfLines[0]; linesOfSecondDiff = listOfLines[1]; return firstDiff.merge(secondDiff); }) - .then(function() { + .then(function () { return getLinesFromDiff(firstDiff); }) - .then(function(linesOfMergedDiff) { - var allDiffLines = _.flatten([ - linesOfFirstDiff, - linesOfSecondDiff - ]); - _.forEach(allDiffLines, function(diffLine) { + .then(function (linesOfMergedDiff) { + var allDiffLines = _.flatten([linesOfFirstDiff, linesOfSecondDiff]); + _.forEach(allDiffLines, function (diffLine) { assert.ok(_.includes(linesOfMergedDiff, diffLine)); }); }); }); - describe("merge between commit diff and workdir and index diff", function() { - beforeEach(function() { + describe("merge between commit diff and workdir and index diff", function () { + beforeEach(function () { var test = this; - return fse.writeFile( - path.join(test.repository.workdir(), "newFile.txt"), "some line\n" - ) - .then(function() { - return test.index.addAll(undefined, undefined, function() { + return fse + .writeFile(path.join(test.repository.workdir(), "newFile.txt"), "some line\n") + .then(function () { + return test.index.addAll(undefined, undefined, function () { // ensure that there is no deadlock if we call // a sync libgit2 function from the callback test.repository.path(); @@ -403,27 +378,24 @@ describe("Diff", function() { return 0; // confirm add }); }) - .then(function() { + .then(function () { return test.repository.getHeadCommit(); }) - .then(function(headCommit) { - return Promise.all([ - headCommit.getTree(), - test.repository.index() - ]); + .then(function (headCommit) { + return Promise.all([headCommit.getTree(), test.repository.index()]); }) - .then(function([headTree, index]) { + .then(function ([headTree, index]) { const diffOptions = new NodeGit.DiffOptions(); - if (index.caps() & Index.CAPABILITY.IGNORE_CASE !== 0) { + if (index.caps() & (Index.CAPABILITY.IGNORE_CASE !== 0)) { diffOptions.flags |= Diff.OPTION.IGNORE_CASE; } return Promise.all([ Diff.treeToWorkdirWithIndex(test.repository, headTree, diffOptions), - test.commit.getDiffWithOptions(diffOptions) + test.commit.getDiffWithOptions(diffOptions), ]); }) - .then(function(diffs) { + .then(function (diffs) { test.workDirWithIndexDiff = diffs[0]; // The second item in `diffs` is the commit diff which contains and // array of diffs, one for each parent @@ -431,83 +403,68 @@ describe("Diff", function() { }); }); - it("can merge a diff from a commit into a diff from a work dir and index", - function() { - var test = this; - var linesOfWorkDirWithIndexDiff; - var linesOfCommitDiff; - return Promise.all([ - getLinesFromDiff(test.workDirWithIndexDiff), - getLinesFromDiff(test.commitDiff) - ]) - .then(function(linesOfDiffs) { - linesOfWorkDirWithIndexDiff = linesOfDiffs[0]; - linesOfCommitDiff = linesOfDiffs[1]; - return test.workDirWithIndexDiff.merge(test.commitDiff); - }) - .then(function() { - return getLinesFromDiff(test.workDirWithIndexDiff); - }) - .then(function(linesOfMergedDiff) { - var allDiffLines = _.flatten([ - linesOfWorkDirWithIndexDiff, - linesOfCommitDiff - ]); - _.forEach(allDiffLines, function(diffLine) { - assert.ok(_.includes(linesOfMergedDiff, diffLine)); - }); + it("can merge a diff from a commit into a diff from a work dir and index", function () { + var test = this; + var linesOfWorkDirWithIndexDiff; + var linesOfCommitDiff; + return Promise.all([getLinesFromDiff(test.workDirWithIndexDiff), getLinesFromDiff(test.commitDiff)]) + .then(function (linesOfDiffs) { + linesOfWorkDirWithIndexDiff = linesOfDiffs[0]; + linesOfCommitDiff = linesOfDiffs[1]; + return test.workDirWithIndexDiff.merge(test.commitDiff); + }) + .then(function () { + return getLinesFromDiff(test.workDirWithIndexDiff); + }) + .then(function (linesOfMergedDiff) { + var allDiffLines = _.flatten([linesOfWorkDirWithIndexDiff, linesOfCommitDiff]); + _.forEach(allDiffLines, function (diffLine) { + assert.ok(_.includes(linesOfMergedDiff, diffLine)); }); - }); + }); + }); - it("can merge a diff from a workdir and index into a diff from a commit", - function() { - var test = this; - var linesOfWorkDirWithIndexDiff; - var linesOfCommitDiff; - return Promise.all([ - getLinesFromDiff(test.workDirWithIndexDiff), - getLinesFromDiff(test.commitDiff) - ]) - .then(function(linesOfDiffs) { - linesOfWorkDirWithIndexDiff = linesOfDiffs[0]; - linesOfCommitDiff = linesOfDiffs[1]; - return test.commitDiff.merge(test.workDirWithIndexDiff); - }) - .then(function() { - return getLinesFromDiff(test.commitDiff); - }) - .then(function(linesOfMergedDiff) { - var allDiffLines = _.flatten([ - linesOfWorkDirWithIndexDiff, - linesOfCommitDiff - ]); - _.forEach(allDiffLines, function(diffLine) { - assert.ok(_.includes(linesOfMergedDiff, diffLine)); - }); - }); + it("can merge a diff from a workdir and index into a diff from a commit", function () { + var test = this; + var linesOfWorkDirWithIndexDiff; + var linesOfCommitDiff; + return Promise.all([getLinesFromDiff(test.workDirWithIndexDiff), getLinesFromDiff(test.commitDiff)]) + .then(function (linesOfDiffs) { + linesOfWorkDirWithIndexDiff = linesOfDiffs[0]; + linesOfCommitDiff = linesOfDiffs[1]; + return test.commitDiff.merge(test.workDirWithIndexDiff); + }) + .then(function () { + return getLinesFromDiff(test.commitDiff); + }) + .then(function (linesOfMergedDiff) { + var allDiffLines = _.flatten([linesOfWorkDirWithIndexDiff, linesOfCommitDiff]); + _.forEach(allDiffLines, function (diffLine) { + assert.ok(_.includes(linesOfMergedDiff, diffLine)); + }); }); + }); }); // This wasn't working before. It was only passing because the promise chain // was broken - it.skip("can find similar files in a diff", function() { + it.skip("can find similar files in a diff", function () { var diff = this.indexToWorkdirDiff; var opts = { - flags: Diff.FIND.RENAMES | - Diff.FIND.RENAMES_FROM_REWRITES | - Diff.FIND.FOR_UNTRACKED + flags: Diff.FIND.RENAMES | Diff.FIND.RENAMES_FROM_REWRITES | Diff.FIND.FOR_UNTRACKED, }; - return diff.patches() - .then(function(patches) { + return diff + .patches() + .then(function (patches) { assert.equal(patches.length, 3); return diff.findSimilar(opts); }) - .then(function() { + .then(function () { return diff.patches(); }) - .then(function(patches) { + .then(function (patches) { // Renamed file now treated as one diff, so 3 patches -> 2 assert.equal(patches.length, 2); }); diff --git a/test/tests/filter.js b/test/tests/filter.js index 5bd67d271..235da5cbf 100644 --- a/test/tests/filter.js +++ b/test/tests/filter.js @@ -4,7 +4,7 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var garbageCollect = require("../utils/garbage_collect.js"); -describe("Filter", function() { +describe("Filter", function () { var NodeGit = require("../../"); var emptyRepoPath = local("../repos/empty"); @@ -19,8 +19,8 @@ describe("Filter", function() { var readmePath = path.join(reposPath, "README.md"); var mockFilter = { - apply: function() {}, - check: function() {} + apply: function () {}, + check: function () {}, }; function commitFile(repo, fileName, fileContent, commitMessage) { @@ -28,155 +28,142 @@ describe("Filter", function() { let treeOid; let parent; - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent) - .then(function() { + return fse + .writeFile(path.join(repo.workdir(), fileName), fileContent) + .then(function () { return repo.refreshIndex(); }) - .then(function(indexResult) { + .then(function (indexResult) { index = indexResult; }) - .then(function() { + .then(function () { return index.addByPath(fileName); }) - .then(function() { + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }) - .then(function(oidResult) { + .then(function (oidResult) { treeOid = oidResult; return NodeGit.Reference.nameToId(repo, "HEAD"); }) - .then(function(head) { + .then(function (head) { return repo.getCommit(head); }) - .then(function(parentResult) { + .then(function (parentResult) { parent = parentResult; return Promise.all([ NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), - NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90), ]); }) - .then(function(signatures) { - let author = signatures[0]; - let committer = signatures[1]; - - return repo.createCommit( - "HEAD", - author, - committer, - commitMessage, - treeOid, - [parent] - ); + .then(function (signatures) { + const author = signatures[0]; + const committer = signatures[1]; + + return repo.createCommit("HEAD", author, committer, commitMessage, treeOid, [parent]); }); } - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return Repository.open(emptyRepoPath); }) - .then(function(emptyRepo) { + .then(function (emptyRepo) { test.emptyRepo = emptyRepo; - return fse.writeFile( - path.join(reposPath, ".gitattributes"), - "*.md filter=" + filterName + " -text", - { encoding: "utf-8" } - ); + return fse.writeFile(path.join(reposPath, ".gitattributes"), "*.md filter=" + filterName + " -text", { + encoding: "utf-8", + }); }); }); - afterEach(function() { - return Registry.unregister(filterName) - .catch(function(error) { - if (error === NodeGit.Error.CODE.ERROR) { - throw new Error("Cannot unregister filter"); - } - }); + afterEach(function () { + return Registry.unregister(filterName).catch(function (error) { + if (error === NodeGit.Error.CODE.ERROR) { + throw new Error("Cannot unregister filter"); + } + }); }); - describe("Register", function() { + describe("Register", function () { var secondFilter = "hellofilter"; - after(function(done) { - Registry.unregister(secondFilter) - .then(function() { - done(); - }); + after(function (done) { + Registry.unregister(secondFilter).then(function () { + done(); + }); }); - it("can register a filter", function() { - return Registry.register(filterName, mockFilter, 0) - .then(function(result) { - assert.strictEqual(result, NodeGit.Error.CODE.OK); - }); + it("can register a filter", function () { + return Registry.register(filterName, mockFilter, 0).then(function (result) { + assert.strictEqual(result, NodeGit.Error.CODE.OK); + }); }); - it("can register multiple filters", function() { + it("can register multiple filters", function () { return Registry.register(filterName, mockFilter, 0) - .then(function(result) { + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); return Registry.register(secondFilter, mockFilter, 1); }) - .then(function(result) { + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); }); }); - it("cannot register the same filter twice", function() { + it("cannot register the same filter twice", function () { return Registry.register(filterName, mockFilter, 0) - .then(function(result) { + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); return Registry.register(filterName, mockFilter, 0); }) - .catch(function(error) { + .catch(function (error) { assert.strictEqual(error.errno, NodeGit.Error.CODE.EEXISTS); }); }); }); - describe("Unregister", function() { - beforeEach(function() { + describe("Unregister", function () { + beforeEach(function () { return Registry.register(filterName, mockFilter, 0); }); - it("can unregister the filter", function() { - return Registry.unregister(filterName) - .then(function(result) { - assert.strictEqual(result, NodeGit.Error.CODE.OK); - }); + it("can unregister the filter", function () { + return Registry.unregister(filterName).then(function (result) { + assert.strictEqual(result, NodeGit.Error.CODE.OK); + }); }); - it("cannot unregister the filter twice", function() { + it("cannot unregister the filter twice", function () { return Registry.unregister(filterName) - .then(function(result) { + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); return Registry.unregister(filterName); }) - .then(function(_result) { + .then(function (_result) { assert.fail("Should not have unregistered successfully"); }) - .catch(function(error) { + .catch(function (error) { assert.strictEqual(error.errno, NodeGit.Error.CODE.ENOTFOUND); }); }); }); - describe("Apply", function() { - before(function() { + describe("Apply", function () { + before(function () { var test = this; - return fse.readFile(readmePath, "utf8") - .then((function(content) { - test.originalReadmeContent = content; - })); + return fse.readFile(readmePath, "utf8").then(function (content) { + test.originalReadmeContent = content; + }); }); - afterEach(function() { + afterEach(function () { this.timeout(15000); return fse.writeFile(readmePath, this.originalReadmeContent); }); @@ -186,181 +173,175 @@ describe("Filter", function() { var tempBuffer = Buffer.from(message, "utf-8"); var largeBufferSize = 500000000; - it("should not apply when check returns GIT_PASSTHROUGH", function(){ + it("should not apply when check returns GIT_PASSTHROUGH", function () { var test = this; var applied = false; - return Registry.register(filterName, { - apply: function() { - applied = true; + return Registry.register( + filterName, + { + apply: function () { + applied = true; + }, + check: function () { + return NodeGit.Error.CODE.PASSTHROUGH; + }, }, - check: function() { - return NodeGit.Error.CODE.PASSTHROUGH; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout", - { encoding: "utf-8" } - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout", { encoding: "utf-8" }); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { + .then(function () { assert.notStrictEqual(applied, true); }); }); - it("should apply filter when check succeeds", function() { + it("should apply filter when check succeeds", function () { var test = this; var applied = false; - return Registry.register(filterName, { - apply: function() { - applied = true; + return Registry.register( + filterName, + { + apply: function () { + applied = true; + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout", - { encoding: "utf-8" } - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout", { encoding: "utf-8" }); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { + .then(function () { assert.strictEqual(applied, true); }); }); - it("does not apply when GIT_PASSTHROUGH is returned", function() { + it("does not apply when GIT_PASSTHROUGH is returned", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.PASSTHROUGH; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.PASSTHROUGH; + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); }) - .then(function() { - var readmeContent = fse.readFileSync( - packageJsonPath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(packageJsonPath, "utf-8"); assert.notStrictEqual(readmeContent, message); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout" - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout"); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { - var postInitializeReadmeContents = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var postInitializeReadmeContents = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(postInitializeReadmeContents, message); }); }); - it("applies the filter data on checkout", function() { + it("applies the filter data on checkout", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, 0); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: ["README.md"] + paths: ["README.md"], }; return Checkout.head(test.repository, opts); }) - .then(function() { - var postInitializeReadmeContents = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var postInitializeReadmeContents = fse.readFileSync(readmePath, "utf-8"); assert.strictEqual(postInitializeReadmeContents, message); }); }); - it("can run sync callback on checkout without deadlocking", function() { // jshint ignore:line + it("can run sync callback on checkout without deadlocking", function () { + // jshint ignore:line var test = this; var syncCallbackResult = 1; - return Registry.register(filterName, { - apply: function() { - syncCallbackResult = test.repository.isEmpty(); + return Registry.register( + filterName, + { + apply: function () { + syncCallbackResult = test.repository.isEmpty(); + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout", - { encoding: "utf-8" } - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout", { encoding: "utf-8" }); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { + .then(function () { assert.strictEqual(syncCallbackResult, 0); }); }); @@ -369,42 +350,43 @@ describe("Filter", function() { // To activate when reverting workaround. // 'Checkout.head' and 'Submodule.lookup' do work with the repo locked. // They should work together without deadlocking. - it.skip("can run async callback on checkout without deadlocking", function() { // jshint ignore:line + it.skip("can run async callback on checkout without deadlocking", function () { + // jshint ignore:line var test = this; var submoduleNameIn = "vendor/libgit2"; var asyncCallbackResult = ""; - return Registry.register(filterName, { - apply: function() { - return NodeGit.Submodule.lookup(test.repository, submoduleNameIn) - .then(function(submodule) { - return submodule.name(); - }) - .then(function(name) { - asyncCallbackResult = name; - return NodeGit.Error.CODE.OK; - }); + return Registry.register( + filterName, + { + apply: function () { + return NodeGit.Submodule.lookup(test.repository, submoduleNameIn) + .then(function (submodule) { + return submodule.name(); + }) + .then(function (name) { + asyncCallbackResult = name; + return NodeGit.Error.CODE.OK; + }); + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout", - { encoding: "utf-8" } - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout", { encoding: "utf-8" }); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { + .then(function () { assert.equal(asyncCallbackResult, submoduleNameIn); }); }); @@ -412,231 +394,202 @@ describe("Filter", function() { // this test is useless on 32 bit CI, because we cannot construct // a buffer big enough to test anything of significance :)... if (process.arch === "x64") { - it("applies the massive filter data on checkout", function() { + it("applies the massive filter data on checkout", function () { this.timeout(350000); var test = this; var largeBuffer = Buffer.alloc(largeBufferSize, "a"); - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(largeBuffer, largeBufferSize); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(largeBuffer, largeBufferSize); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { - assert.strictEqual(result, 0); - }) - .then(function() { - var fd = fse.openSync(readmePath, "r"); - var readBuf = Buffer.allocUnsafe(largeBufferSize); - var readLength = fse.readSync( - fd, - readBuf, - 0, - largeBufferSize, - 0 - ); - fse.closeSync(fd); - - assert.notStrictEqual(readLength, largeBufferSize); - fse.writeFileSync(readmePath, "whoa", "utf8"); - - var opts = { - checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: ["README.md"] - }; - return Checkout.head(test.repository, opts); - }) - .then(function() { - var fd = fse.openSync(readmePath, "r"); - var readBuf = Buffer.allocUnsafe(largeBufferSize); - var readLength = fse.readSync( - fd, - readBuf, - 0, - largeBufferSize, - 0 - ); - fse.closeSync(fd); - - assert.strictEqual( - readLength, - largeBufferSize - ); - }); + 0 + ) + .then(function (result) { + assert.strictEqual(result, 0); + }) + .then(function () { + var fd = fse.openSync(readmePath, "r"); + var readBuf = Buffer.allocUnsafe(largeBufferSize); + var readLength = fse.readSync(fd, readBuf, 0, largeBufferSize, 0); + fse.closeSync(fd); + + assert.notStrictEqual(readLength, largeBufferSize); + fse.writeFileSync(readmePath, "whoa", "utf8"); + + var opts = { + checkoutStrategy: Checkout.STRATEGY.FORCE, + paths: ["README.md"], + }; + return Checkout.head(test.repository, opts); + }) + .then(function () { + var fd = fse.openSync(readmePath, "r"); + var readBuf = Buffer.allocUnsafe(largeBufferSize); + var readLength = fse.readSync(fd, readBuf, 0, largeBufferSize, 0); + fse.closeSync(fd); + + assert.strictEqual(readLength, largeBufferSize); + }); }); } - it("applies the filter data on checkout with gc", function() { + it("applies the filter data on checkout with gc", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); garbageCollect(); var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: ["README.md"] + paths: ["README.md"], }; return Checkout.head(test.repository, opts); }) - .then(function() { - var postInitializeReadmeContents = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var postInitializeReadmeContents = fse.readFileSync(readmePath, "utf-8"); assert.strictEqual(postInitializeReadmeContents, message); }); }); - it("applies the filter data on commit", function() { + it("applies the filter data on commit", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (src, _attr) { + return src.path() === "README.md" ? 0 : NodeGit.Error.CODE.PASSTHROUGH; + }, }, - check: function(src, _attr) { - return src.path() === "README.md" ? - 0 : NodeGit.Error.CODE.PASSTHROUGH; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, "testing commit contents"); }) - .then(function() { - return commitFile(test.repository, "README.md", - "testing commit contents", - "test commit" - ); + .then(function () { + return commitFile(test.repository, "README.md", "testing commit contents", "test commit"); }) - .then(function(_oid) { + .then(function (_oid) { return test.repository.getHeadCommit(); }) - .then(function(commit) { - var postInitializeReadmeContents = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function (commit) { + var postInitializeReadmeContents = fse.readFileSync(readmePath, "utf-8"); - assert.strictEqual( - postInitializeReadmeContents, "testing commit contents" - ); + assert.strictEqual(postInitializeReadmeContents, "testing commit contents"); assert.strictEqual(commit.message(), "test commit"); return commit.getEntry("README.md"); }) - .then(function(entry) { + .then(function (entry) { assert.strictEqual(entry.isBlob(), true); return entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { assert.strictEqual(blob.toString(), message); }); }); - it("applies the filter data on commit with gc", function() { + it("applies the filter data on commit with gc", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (src, _attr) { + return src.path() === "README.md" ? 0 : NodeGit.Error.CODE.PASSTHROUGH; + }, }, - check: function(src, _attr) { - return src.path() === "README.md" ? - 0 : NodeGit.Error.CODE.PASSTHROUGH; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { garbageCollect(); assert.strictEqual(result, NodeGit.Error.CODE.OK); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, "testing commit contents"); }) - .then(function() { - return commitFile(test.repository, "README.md", - "testing commit contents", - "test commit" - ); + .then(function () { + return commitFile(test.repository, "README.md", "testing commit contents", "test commit"); }) - .then(function(_oid) { + .then(function (_oid) { garbageCollect(); return test.repository.getHeadCommit(); }) - .then(function(commit) { - var postInitializeReadmeContents = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function (commit) { + var postInitializeReadmeContents = fse.readFileSync(readmePath, "utf-8"); - assert.strictEqual( - postInitializeReadmeContents, "testing commit contents" - ); + assert.strictEqual(postInitializeReadmeContents, "testing commit contents"); assert.strictEqual(commit.message(), "test commit"); garbageCollect(); return commit.getEntry("README.md"); }) - .then(function(entry) { + .then(function (entry) { assert.strictEqual(entry.isBlob(), true); return entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { assert.strictEqual(blob.toString(), message); }); }); }); - describe("Manually Apply", function() { - beforeEach(function() { + describe("Manually Apply", function () { + beforeEach(function () { var test = this; var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "README.md" + paths: "README.md", }; return Checkout.head(test.repository, opts) .then(() => fse.readFile(readmePath, "utf8")) - .then((function(content) { + .then(function (content) { test.originalReadmeContent = content; - })); + }); }); - afterEach(function() { + afterEach(function () { this.timeout(15000); return fse.writeFile(readmePath, this.originalReadmeContent); }); @@ -645,26 +598,27 @@ describe("Filter", function() { var length = message.length; var tempBuffer = Buffer.from(message, "utf-8"); - it("applies the filters for a path on demand", function() { + it("applies the filters for a path on demand", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, 0); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); @@ -676,34 +630,35 @@ describe("Filter", function() { NodeGit.Filter.FLAG.DEFAULT ); }) - .then(function(list) { + .then(function (list) { return list.applyToFile(test.repository, "README.md"); }) - .then(function(content) { + .then(function (content) { assert.equal(content, message); }); }); - it("applies the filters to a buffer on demand", function() { + it("applies the filters to a buffer on demand", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, 0); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); @@ -715,37 +670,38 @@ describe("Filter", function() { NodeGit.Filter.FLAG.DEFAULT ); }) - .then(function(list) { + .then(function (list) { /* jshint ignore:start */ return list.applyToData(new String("garbo garbo garbo garbo")); /* jshint ignore:end */ }) - .then(function(content) { + .then(function (content) { assert.equal(content, message); }); }); - it("applies the filters to a blob on demand", function() { + it("applies the filters to a blob on demand", function () { var test = this; var list; - return Registry.register(filterName, { - apply: function(to, _from, _source) { - to.set(tempBuffer, length); - return NodeGit.Error.CODE.OK; + return Registry.register( + filterName, + { + apply: function (to, _from, _source) { + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; + }, + check: function (_src, _attr) { + return NodeGit.Error.CODE.OK; + }, }, - check: function(_src, _attr) { - return NodeGit.Error.CODE.OK; - } - }, 0) - .then(function(result) { + 0 + ) + .then(function (result) { assert.strictEqual(result, 0); }) - .then(function() { - var readmeContent = fse.readFileSync( - readmePath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(readmePath, "utf-8"); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); @@ -757,86 +713,81 @@ describe("Filter", function() { NodeGit.Filter.FLAG.DEFAULT ); }) - .then(function(_list) { + .then(function (_list) { list = _list; return test.repository.getHeadCommit(); }) - .then(function(commit) { + .then(function (commit) { return commit.getTree(); }) - .then(function(tree) { + .then(function (tree) { return tree.entryByPath("README.md"); }) - .then(function(entry) { + .then(function (entry) { return test.repository.getBlob(entry.id()); }) - .then(function(blob) { + .then(function (blob) { return list.applyToBlob(blob); }) - .then(function(content) { + .then(function (content) { assert.equal(content, message); list = null; }); }); }); - describe("FilterSource", function() { + describe("FilterSource", function () { var message = "some new fancy filter"; - before(function() { + before(function () { var test = this; - return fse.readFile(readmePath, "utf8") - .then((function(content) { - test.originalReadmeContent = content; - })); + return fse.readFile(readmePath, "utf8").then(function (content) { + test.originalReadmeContent = content; + }); }); - afterEach(function() { + afterEach(function () { this.timeout(15000); return fse.writeFile(readmePath, this.originalReadmeContent); }); - it("a FilterSource has an async repo getter", function() { + it("a FilterSource has an async repo getter", function () { var test = this; - return Registry.register(filterName, { - apply: function(to, from, source) { - return source.repo() - .then(function() { + return Registry.register( + filterName, + { + apply: function (to, from, source) { + return source.repo().then(function () { return NodeGit.Error.CODE.PASSTHROUGH; }); - }, - check: function(source) { - return source.repo() - .then(function() { + }, + check: function (source) { + return source.repo().then(function () { return NodeGit.Error.CODE.OK; }); - } - }, 0) - .then(function(result) { + }, + }, + 0 + ) + .then(function (result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); }) - .then(function() { - var readmeContent = fse.readFileSync( - packageJsonPath, - "utf-8" - ); + .then(function () { + var readmeContent = fse.readFileSync(packageJsonPath, "utf-8"); assert.notStrictEqual(readmeContent, message); - return fse.writeFile( - packageJsonPath, - "Changing content to trigger checkout" - ); + return fse.writeFile(packageJsonPath, "Changing content to trigger checkout"); }) - .then(function() { + .then(function () { var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, - paths: "package.json" + paths: "package.json", }; return Checkout.head(test.repository, opts); }) - .then(function() { + .then(function () { garbageCollect(); }); }); diff --git a/test/tests/graph.js b/test/tests/graph.js index 87dcfda54..dd02f34e0 100644 --- a/test/tests/graph.js +++ b/test/tests/graph.js @@ -2,77 +2,68 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Graph", function() { +describe("Graph", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Graph = NodeGit.Graph; var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("can get commits ahead/behind for 2 different commits", function() { + it("can get commits ahead/behind for 2 different commits", function () { return Graph.aheadBehind( this.repository, "32789a79e71fbc9e04d3eff7425e1771eb595150", - "1729c73906bb8467f4095c2f4044083016b4dfde") - .then(function(result) { + "1729c73906bb8467f4095c2f4044083016b4dfde" + ).then(function (result) { assert.equal(result.ahead, 1); assert.equal(result.behind, 1); }); }); - it("can tell if a commit is a descendant of another", function() { + it("can tell if a commit is a descendant of another", function () { return Graph.descendantOf( this.repository, "32789a79e71fbc9e04d3eff7425e1771eb595150", "e0aeedcff0584ebe00aed2c03c8ecd10839df908" - ) - .then(function(result) { - assert.equal(result, 1); - }); + ).then(function (result) { + assert.equal(result, 1); + }); }); - it("can tell if a commit is not a descendant of another", function() { + it("can tell if a commit is not a descendant of another", function () { return Graph.descendantOf( this.repository, "1528a019c504c9b5a68dc7d83bb2a887eb2473af", "32789a79e71fbc9e04d3eff7425e1771eb595150" - ) - .then(function(result) { - assert.equal(result, 0); - }); + ).then(function (result) { + assert.equal(result, 0); + }); }); - it("descendantOf will error if provided bad commits", function() { + it("descendantOf will error if provided bad commits", function () { return Graph.descendantOf( this.repository, "81b06facd90fe7a6e9bbd9cee59736a79105b7be", "26744fc697849d370246749b67ac43b792a4af0c" - ) - .catch(function(result) { - assert(~result.message.indexOf("object not found - no match for id")); - }); + ).catch(function (result) { + assert(~result.message.indexOf("object not found - no match for id")); + }); }); - it("can tell if a commit is reachable from any of a list of commits", function() { - return Graph.reachableFromAny( - this.repository, - "32789a79e71fbc9e04d3eff7425e1771eb595150", - [ - "1729c73906bb8467f4095c2f4044083016b4dfde", - "e0aeedcff0584ebe00aed2c03c8ecd10839df908" - ] - ) - .then(function(result) { - assert.equal(result, 0); - }); + it("can tell if a commit is reachable from any of a list of commits", function () { + return Graph.reachableFromAny(this.repository, "32789a79e71fbc9e04d3eff7425e1771eb595150", [ + "1729c73906bb8467f4095c2f4044083016b4dfde", + "e0aeedcff0584ebe00aed2c03c8ecd10839df908", + ]).then(function (result) { + assert.equal(result, 0); + }); }); }); diff --git a/test/tests/ignore.js b/test/tests/ignore.js index f834b28d0..6c4fed932 100644 --- a/test/tests/ignore.js +++ b/test/tests/ignore.js @@ -2,32 +2,31 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Ignore", function() { +describe("Ignore", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Ignore = NodeGit.Ignore; var reposPath = local("../repos/workdir"); - before(function() { + before(function () { var test = this; - return Repository.open(reposPath).then(function(repository) { + return Repository.open(reposPath).then(function (repository) { test.repository = repository; }); }); - it("can determine if a path is ignored", function() { + it("can determine if a path is ignored", function () { function expectIgnoreState(repo, fileName, expected) { - return Ignore.pathIsIgnored(repo, fileName) - .then(function(ignored) { - assert.equal(ignored, expected); - }); + return Ignore.pathIsIgnored(repo, fileName).then(function (ignored) { + assert.equal(ignored, expected); + }); } return Promise.all([ expectIgnoreState(this.repository, ".git", true), - expectIgnoreState(this.repository, "LICENSE", false) + expectIgnoreState(this.repository, "LICENSE", false), ]); }); }); diff --git a/test/tests/index.js b/test/tests/index.js index 283f64d69..8967a8aed 100644 --- a/test/tests/index.js +++ b/test/tests/index.js @@ -3,7 +3,7 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); -describe("Index", function() { +describe("Index", function () { var IndexUtils = require("../utils/index_setup"); var RepoUtils = require("../utils/repository_setup"); var NodeGit = require("../../"); @@ -12,172 +12,176 @@ describe("Index", function() { var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repo) { + .then(function (repo) { test.repository = repo; return repo.refreshIndex(); }) - .then(function(index) { + .then(function (index) { test.index = index; }); }); - after(function() { + after(function () { this.index.clear(); }); - it("can get the index of a repo and examine entries", function() { + it("can get the index of a repo and examine entries", function () { var entries = this.index.entries(); assert.equal(entries[0].path, ".gitignore"); }); - it("can add all entries to the index", function() { + it("can add all entries to the index", function () { var repo = this.repository; var index = this.index; var fileContent = { newFile1: "this has some content", - newFile2: "and this will have more content" + newFile2: "and this will have more content", }; var fileNames = Object.keys(fileContent); var test = this; var addCallbacksCount = 0; - return Promise.all(fileNames.map(function(fileName) { - return fse.writeFile( - path.join(repo.workdir(), fileName), - fileContent[fileName], {}); - })) - .then(function() { - return index.addAll(undefined, undefined, function() { - addCallbacksCount++; - // ensure that there is no deadlock if we call - // a sync libgit2 function from the callback - test.repository.path(); - - return 0; // confirm add - }); - }) - .then(function() { - assert.equal(addCallbacksCount, 2); + return Promise.all( + fileNames.map(function (fileName) { + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent[fileName], {}); + }) + ) + .then(function () { + return index.addAll(undefined, undefined, function () { + addCallbacksCount++; + // ensure that there is no deadlock if we call + // a sync libgit2 function from the callback + test.repository.path(); + + return 0; // confirm add + }); + }) + .then(function () { + assert.equal(addCallbacksCount, 2); - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); - assert.equal(newFiles.length, 2); - }) - .then(function() { - return Promise.all(fileNames.map(function(fileName) { - return fse.remove(path.join(repo.workdir(), fileName)); - })); - }) - .then(function() { - return index.clear(); - }); + assert.equal(newFiles.length, 2); + }) + .then(function () { + return Promise.all( + fileNames.map(function (fileName) { + return fse.remove(path.join(repo.workdir(), fileName)); + }) + ); + }) + .then(function () { + return index.clear(); + }); }); - it("can remove entries from the index", function() { + it("can remove entries from the index", function () { var repo = this.repository; var index = this.index; var fileContent = { newFile1: "this has some content", newFile2: "and this will have more content", - differentFileName: "this has a different name and shouldn't be deleted" + differentFileName: "this has a different name and shouldn't be deleted", }; var fileNames = Object.keys(fileContent); var removeCallbacksCount = 0; - return Promise.all(fileNames.map(function(fileName) { - return fse.writeFile( - path.join(repo.workdir(), fileName), - fileContent[fileName], {}); - })) - .then(function() { - return index.addAll(); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); + return Promise.all( + fileNames.map(function (fileName) { + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent[fileName], {}); + }) + ) + .then(function () { + return index.addAll(); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); - assert.equal(newFiles.length, 3); + assert.equal(newFiles.length, 3); - return index.removeAll("newFile*", function() { - removeCallbacksCount++; + return index.removeAll("newFile*", function () { + removeCallbacksCount++; - return 0; // confirm remove - }); - }) - .then(function() { - assert.equal(removeCallbacksCount, 2); + return 0; // confirm remove + }); + }) + .then(function () { + assert.equal(removeCallbacksCount, 2); - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); - assert.equal(newFiles.length, 1); - }) - .then(function() { - return Promise.all(fileNames.map(function(fileName) { - return fse.remove(path.join(repo.workdir(), fileName)); - })); - }) - .then(function() { - return index.clear(); - }); + assert.equal(newFiles.length, 1); + }) + .then(function () { + return Promise.all( + fileNames.map(function (fileName) { + return fse.remove(path.join(repo.workdir(), fileName)); + }) + ); + }) + .then(function () { + return index.clear(); + }); }); - it("can update entries in the index", function() { + it("can update entries in the index", function () { var repo = this.repository; var index = this.index; var fileContent = { newFile1: "this has some content", - newFile2: "and this will have more content" + newFile2: "and this will have more content", }; var fileNames = Object.keys(fileContent); var updateCallbacksCount = 0; - return Promise.all(fileNames.map(function(fileName) { - return fse.writeFile( - path.join(repo.workdir(), fileName), - fileContent[fileName], {}); - })) - .then(function() { - return index.addAll(); - }) - .then(function() { - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); + return Promise.all( + fileNames.map(function (fileName) { + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent[fileName], {}); + }) + ) + .then(function () { + return index.addAll(); + }) + .then(function () { + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); - assert.equal(newFiles.length, 2); + assert.equal(newFiles.length, 2); - return fse.remove(path.join(repo.workdir(), fileNames[0])); - }) - .then(function() { - return index.updateAll("newFile*", function() { - updateCallbacksCount++; + return fse.remove(path.join(repo.workdir(), fileNames[0])); + }) + .then(function () { + return index.updateAll("newFile*", function () { + updateCallbacksCount++; - return 0; // confirm update - }); - }) - .then(function() { - assert.equal(updateCallbacksCount, 1); + return 0; // confirm update + }); + }) + .then(function () { + assert.equal(updateCallbacksCount, 1); - var newFiles = index.entries().filter(function(entry) { - return ~fileNames.indexOf(entry.path); - }); + var newFiles = index.entries().filter(function (entry) { + return ~fileNames.indexOf(entry.path); + }); - assert.equal(newFiles.length, 1); - return fse.remove(path.join(repo.workdir(), fileNames[1])); - }); + assert.equal(newFiles.length, 1); + return fse.remove(path.join(repo.workdir(), fileNames[1])); + }); }); - it("can get a conflict from the index", function() { + it("can get a conflict from the index", function () { var fileName = "everyonesFile.txt"; var rebaseReposPath = local("../repos/rebase"); var ourBranchName = "ours"; @@ -187,10 +191,8 @@ describe("Index", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!\n"; var theirFileContent = "I'm skeptical about Toll Roads\n"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository; var ourCommit; @@ -198,113 +200,109 @@ describe("Index", function() { var theirBranch; return Repository.init(rebaseReposPath, 0) - .then(function(repo) { + .then(function (repo) { repository = repo; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "044704f62399fecbe22da6d7d47b14e52625630e"); + .then(function (oid) { + assert.equal(oid.toString(), "044704f62399fecbe22da6d7d47b14e52625630e"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "80111c46ac73b857a3493b24c81df08639b5de99"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function (commitOid) { + assert.equal(commitOid.toString(), "80111c46ac73b857a3493b24c81df08639b5de99"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + theirFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); + .then(function (oid) { + assert.equal(oid.toString(), "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + ourFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); + .then(function (oid) { + assert.equal(oid.toString(), "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, }; return NodeGit.Checkout.head(repository, opts); }) - .then(function() { + .then(function () { return repository.mergeBranches(ourBranchName, theirBranchName); }) - .then(function(commit) { - assert.fail(commit, undefined, - "The index should have been thrown due to merge conflicts"); + .then(function (commit) { + assert.fail(commit, undefined, "The index should have been thrown due to merge conflicts"); }) - .catch(function(index) { + .catch(function (index) { assert.ok(index); assert.ok(index.hasConflicts()); return index.conflictGet(fileName); }) - .then(function(conflict) { + .then(function (conflict) { var promises = []; - promises.push(repository.getBlob(conflict.ancestor_out.id) - .then(function(blob) { + promises.push( + repository.getBlob(conflict.ancestor_out.id).then(function (blob) { assert.equal(blob.toString(), baseFileContent); - })); + }) + ); - promises.push(repository.getBlob(conflict.our_out.id) - .then(function(blob) { + promises.push( + repository.getBlob(conflict.our_out.id).then(function (blob) { assert.equal(blob.toString(), baseFileContent + ourFileContent); - })); + }) + ); - promises.push(repository.getBlob(conflict.their_out.id) - .then(function(blob) { + promises.push( + repository.getBlob(conflict.their_out.id).then(function (blob) { assert.equal(blob.toString(), baseFileContent + theirFileContent); - })); + }) + ); return Promise.all(promises); }); }); - it("can add a conflict to the index", function() { + it("can add a conflict to the index", function () { var repo; var repoPath = local("../repos/index"); var ourBranchName = "ours"; @@ -315,20 +313,15 @@ describe("Index", function() { var theirIndexEntry; return RepoUtils.createRepository(repoPath) - .then(function(_repo) { + .then(function (_repo) { repo = _repo; - return IndexUtils.createConflict( - repo, - ourBranchName, - theirBranchName, - fileName - ); + return IndexUtils.createConflict(repo, ourBranchName, theirBranchName, fileName); }) - .then(function(index) { + .then(function (index) { assert.ok(index.hasConflicts()); return index.conflictGet(fileName); }) - .then(function(indexEntries) { + .then(function (indexEntries) { // Store all indexEntries for conflict ancestorIndexEntry = indexEntries.ancestor_out; ourIndexEntry = indexEntries.our_out; @@ -337,85 +330,81 @@ describe("Index", function() { // Stage conflicted file return RepoUtils.addFileToIndex(repo, fileName); }) - .then(function() { + .then(function () { return repo.index(); }) - .then(function(index) { + .then(function (index) { assert.ok(!index.hasConflicts()); - return index.conflictAdd( - ancestorIndexEntry, - ourIndexEntry, - theirIndexEntry - ); + return index.conflictAdd(ancestorIndexEntry, ourIndexEntry, theirIndexEntry); }) - .then(function() { + .then(function () { return repo.index(); }) - .then(function(index) { + .then(function (index) { assert(index.hasConflicts()); }); }); - it("can find the specified file in the index", function() { + it("can find the specified file in the index", function () { var test = this; - return test.index.find("src/wrapper.cc") - .then(function(position) { - assert.notEqual(position, null); - }); + return test.index.find("src/wrapper.cc").then(function (position) { + assert.notEqual(position, null); + }); }); - it("cannot find the specified file in the index", function() { + it("cannot find the specified file in the index", function () { var test = this; - return test.index.find("src/thisisfake.cc") - .then(function(_position) { + return test.index + .find("src/thisisfake.cc") + .then(function (_position) { assert.fail("the item should not be found"); }) - .catch(function(error) { + .catch(function (error) { assert.strictEqual(error.errno, ErrorCodes.ENOTFOUND); }); }); - it("cannot find the directory in the index", function() { + it("cannot find the directory in the index", function () { var test = this; - return test.index.find("src") - .then(function(_position) { + return test.index + .find("src") + .then(function (_position) { assert.fail("the item should not be found"); }) - .catch(function(error) { + .catch(function (error) { assert.strictEqual(error.errno, ErrorCodes.ENOTFOUND); }); }); - it("can find the specified prefix in the index", function() { + it("can find the specified prefix in the index", function () { var test = this; - return test.index.findPrefix("src/") - .then(function(position) { - assert.notEqual(position, null); - }); + return test.index.findPrefix("src/").then(function (position) { + assert.notEqual(position, null); + }); }); - it("cannot find the specified prefix in the index", function() { + it("cannot find the specified prefix in the index", function () { var test = this; - return test.index.find("testing123/") - .then(function(_position) { + return test.index + .find("testing123/") + .then(function (_position) { assert.fail("the item should not be found"); }) - .catch(function(error) { + .catch(function (error) { assert.strictEqual(error.errno, ErrorCodes.ENOTFOUND); }); }); - it("can find the prefix when a file shares the name", function() { + it("can find the prefix when a file shares the name", function () { var test = this; - return test.index.find("LICENSE") - .then(function(position) { - assert.notEqual(position, null); - }); + return test.index.find("LICENSE").then(function (position) { + assert.notEqual(position, null); + }); }); }); diff --git a/test/tests/merge.js b/test/tests/merge.js index d77d08655..1e4aaddbc 100644 --- a/test/tests/merge.js +++ b/test/tests/merge.js @@ -4,7 +4,7 @@ var path = require("path"); var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); -describe("Merge", function() { +describe("Merge", function () { var NodeGit = require("../../"); var RepoUtils = require("../utils/repository_setup"); @@ -12,25 +12,22 @@ describe("Merge", function() { var ourBranchName = "ours"; var theirBranchName = "theirs"; - beforeEach(function() { + beforeEach(function () { var test = this; - return RepoUtils.createRepository(reposPath) - .then(function(repo) { - test.repository = repo; - }); + return RepoUtils.createRepository(reposPath).then(function (repo) { + test.repository = repo; + }); }); - it("can cleanly merge 2 files", function() { + it("can cleanly merge 2 files", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -38,106 +35,109 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - return NodeGit.Merge.commits(repository, ourCommit, theirCommit); - }) - .then(function(index) { - assert(!index.hasConflicts()); - return index.writeTreeTo(repository); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + return NodeGit.Merge.commits(repository, ourCommit, theirCommit); + }) + .then(function (index) { + assert(!index.hasConflicts()); + return index.writeTreeTo(repository); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we merged their commit", oid, - [ourCommit, theirCommit]); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "eedee554af34dd4001d8abc799cb55bb7e56a58b"); - }); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we merged their commit", oid, [ + ourCommit, + theirCommit, + ]); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "eedee554af34dd4001d8abc799cb55bb7e56a58b"); + }) + ); }); - it("can fast-forward using the convenience method", function() { + it("can fast-forward using the convenience method", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -145,115 +145,112 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - - return repository.getBranchCommit(ourBranchName) - .then(function(branchCommit) { - assert.equal(oid.toString(), branchCommit.toString()); - }); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches(ourBranchName, theirBranchName, ourSignature); + }) + .then(function (oid) { + assert.equal(oid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + + return repository.getBranchCommit(ourBranchName).then(function (branchCommit) { + assert.equal(oid.toString(), branchCommit.toString()); + }); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); }); - it("can merge --no-ff a fast-forward using the convenience method", - function() { + it("can merge --no-ff a fast-forward using the convenience method", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -261,109 +258,111 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | - NodeGit.Checkout.STRATEGY.RECREATE_MISSING - }; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.NO_FASTFORWARD); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "65516eb7b20f51d275096cd28f132ff606a09e07"); - - return repository.getBranchCommit(ourBranchName) - .then(function(branchCommit) { - assert.equal(oid.toString(), branchCommit.toString()); - }); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { + checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING, + }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.NO_FASTFORWARD + ); + }) + .then(function (oid) { + assert.equal(oid.toString(), "65516eb7b20f51d275096cd28f132ff606a09e07"); + + return repository.getBranchCommit(ourBranchName).then(function (branchCommit) { + assert.equal(oid.toString(), branchCommit.toString()); + }); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); }); - it("can merge --no-ff a non-fast-forward using the convenience method", - function() { + it("can merge --no-ff a non-fast-forward using the convenience method", function () { var initialFileName = "initialFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -372,10 +371,8 @@ describe("Merge", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -384,136 +381,140 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), initialFileName), - initialFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(initialFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "21a553813e2f670815b649eef51eeadb253a5d0c"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "af66a9c799a10a23319ee4318c8bb2021521f539"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "af60aa06b3537f75b427f6268a130c842c84a137"); - - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "f007361737a2ca00a0e80fc2daf55064463173b4"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b588f0eef1809226f8f7db542940749da15ae1de"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.NO_FASTFORWARD); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "96d6f1d0704eb3ef9121a13348d17c1d672c28aa"); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), initialFileName), initialFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(initialFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "21a553813e2f670815b649eef51eeadb253a5d0c"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "af66a9c799a10a23319ee4318c8bb2021521f539"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "af60aa06b3537f75b427f6268a130c842c84a137"); + + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "f007361737a2ca00a0e80fc2daf55064463173b4"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [initialCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b588f0eef1809226f8f7db542940749da15ae1de"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.NO_FASTFORWARD + ); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "96d6f1d0704eb3ef9121a13348d17c1d672c28aa"); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); }); it( "can merge --no-ff a non-fast-forward using the convenience method " + - "with custom merge message via sync callback", - function() { + "with custom merge message via sync callback", + function () { var initialFileName = "initialFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -522,10 +523,8 @@ describe("Merge", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -534,145 +533,148 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), initialFileName), - initialFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(initialFileName) - .then(function() { - return index.write(); + return ( + fse + .writeFile(path.join(repository.workdir(), initialFileName), initialFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "21a553813e2f670815b649eef51eeadb253a5d0c"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "af66a9c799a10a23319ee4318c8bb2021521f539"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); + .then(function (index) { + return index + .addByPath(initialFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "af60aa06b3537f75b427f6268a130c842c84a137"); + .then(function (oid) { + assert.equal(oid.toString(), "21a553813e2f670815b649eef51eeadb253a5d0c"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "af66a9c799a10a23319ee4318c8bb2021521f539"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "af60aa06b3537f75b427f6268a130c842c84a137"); - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "f007361737a2ca00a0e80fc2daf55064463173b4"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b588f0eef1809226f8f7db542940749da15ae1de"); + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "f007361737a2ca00a0e80fc2daf55064463173b4"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [initialCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b588f0eef1809226f8f7db542940749da15ae1de"); - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, - null, - { - processMergeMessageCallback: function(message) { - assert(message === "Merge branch 'theirs' into ours"); - return "We manipulated the message, HAH."; - } - } - ); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "5b49a43be0ba95e7767dd9a2880bab4795c6db70"); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, + null, + { + processMergeMessageCallback: function (message) { + assert(message === "Merge branch 'theirs' into ours"); + return "We manipulated the message, HAH."; + }, + } + ); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "5b49a43be0ba95e7767dd9a2880bab4795c6db70"); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); } ); it( "can merge --no-ff a non-fast-forward using the convenience method " + - "with custom merge message via async callback", - function() { + "with custom merge message via async callback", + function () { var initialFileName = "initialFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -681,10 +683,8 @@ describe("Merge", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -693,153 +693,153 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), initialFileName), - initialFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(initialFileName) - .then(function() { - return index.write(); + return ( + fse + .writeFile(path.join(repository.workdir(), initialFileName), initialFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "21a553813e2f670815b649eef51eeadb253a5d0c"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "af66a9c799a10a23319ee4318c8bb2021521f539"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); + .then(function (index) { + return index + .addByPath(initialFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "af60aa06b3537f75b427f6268a130c842c84a137"); + .then(function (oid) { + assert.equal(oid.toString(), "21a553813e2f670815b649eef51eeadb253a5d0c"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "af66a9c799a10a23319ee4318c8bb2021521f539"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "af60aa06b3537f75b427f6268a130c842c84a137"); - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "f007361737a2ca00a0e80fc2daf55064463173b4"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b588f0eef1809226f8f7db542940749da15ae1de"); + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "f007361737a2ca00a0e80fc2daf55064463173b4"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [initialCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b588f0eef1809226f8f7db542940749da15ae1de"); - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, - null, - { - processMergeMessageCallback: function(message) { - assert(message === "Merge branch 'theirs' into ours"); - return Promise.resolve("We manipulated the message, HAH."); - } - } - ); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "5b49a43be0ba95e7767dd9a2880bab4795c6db70"); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, + null, + { + processMergeMessageCallback: function (message) { + assert(message === "Merge branch 'theirs' into ours"); + return Promise.resolve("We manipulated the message, HAH."); + }, + } + ); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "5b49a43be0ba95e7767dd9a2880bab4795c6db70"); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); } ); - it("can merge --ff-only a fast-forward using the convenience method", - function() { + it("can merge --ff-only a fast-forward using the convenience method", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -847,106 +847,109 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - - return repository.getBranchCommit(ourBranchName) - .then(function(branchCommit) { - assert.equal(oid.toString(), branchCommit.toString()); - }); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY + ); + }) + .then(function (oid) { + assert.equal(oid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + + return repository.getBranchCommit(ourBranchName).then(function (branchCommit) { + assert.equal(oid.toString(), branchCommit.toString()); + }); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); }); - it("doesn't merge --ff-only a non-fast-forward using the convenience method", - function() { + it("doesn't merge --ff-only a non-fast-forward using the convenience method", function () { var initialFileName = "initialFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -955,10 +958,8 @@ describe("Merge", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -967,133 +968,137 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), initialFileName), - initialFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(initialFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "21a553813e2f670815b649eef51eeadb253a5d0c"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "af66a9c799a10a23319ee4318c8bb2021521f539"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "af60aa06b3537f75b427f6268a130c842c84a137"); - - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "f007361737a2ca00a0e80fc2daf55064463173b4"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b588f0eef1809226f8f7db542940749da15ae1de"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - var opts = {checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE}; - return repository.checkoutBranch(ourBranchName, opts); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourSignature, - NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - }) - .then(function() { - return repository.getStatus(); - }) - .then(function(statuses) { - // make sure we didn't change the index - assert.equal(statuses.length, 0); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), initialFileName), initialFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(initialFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "21a553813e2f670815b649eef51eeadb253a5d0c"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "af66a9c799a10a23319ee4318c8bb2021521f539"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "af60aa06b3537f75b427f6268a130c842c84a137"); + + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "f007361737a2ca00a0e80fc2daf55064463173b4"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [initialCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b588f0eef1809226f8f7db542940749da15ae1de"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE }; + return repository.checkoutBranch(ourBranchName, opts); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourSignature, + NodeGit.Merge.PREFERENCE.FASTFORWARD_ONLY + ); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + }) + .then(function () { + return repository.getStatus(); + }) + .then(function (statuses) { + // make sure we didn't change the index + assert.equal(statuses.length, 0); + }) + ); }); - it("can merge cleanly using the convenience method", function() { + it("can merge cleanly using the convenience method", function () { var initialFileName = "initialFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -1102,10 +1107,8 @@ describe("Merge", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -1114,131 +1117,129 @@ describe("Merge", function() { var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), initialFileName), - initialFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(initialFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "21a553813e2f670815b649eef51eeadb253a5d0c"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "af66a9c799a10a23319ee4318c8bb2021521f539"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(ourFileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "af60aa06b3537f75b427f6268a130c842c84a137"); - - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return repository.refreshIndex(); - }) - .then(function(index) { - return index.addByPath(theirFileName) - .then(function() { - return index.write(); - }) - .then(function(){ - return index.writeTree(); - }); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "f007361737a2ca00a0e80fc2daf55064463173b4"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b588f0eef1809226f8f7db542940749da15ae1de"); - - return repository.getCommit(commitOid).then(function(commit) { - theirCommit = commit; - }); - }) - .then(function() { - return repository.mergeBranches(ourBranchName, theirBranchName, - ourSignature); - }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "96d6f1d0704eb3ef9121a13348d17c1d672c28aa"); - }); + return ( + fse + .writeFile(path.join(repository.workdir(), initialFileName), initialFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(initialFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "21a553813e2f670815b649eef51eeadb253a5d0c"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "af66a9c799a10a23319ee4318c8bb2021521f539"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(ourFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "af60aa06b3537f75b427f6268a130c842c84a137"); + + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); + + return repository.getCommit(commitOid).then(function (commit) { + ourCommit = commit; + }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return repository.refreshIndex(); + }) + .then(function (index) { + return index + .addByPath(theirFileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + assert.equal(oid.toString(), "f007361737a2ca00a0e80fc2daf55064463173b4"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [initialCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b588f0eef1809226f8f7db542940749da15ae1de"); + + return repository.getCommit(commitOid).then(function (commit) { + theirCommit = commit; + }); + }) + .then(function () { + return repository.mergeBranches(ourBranchName, theirBranchName, ourSignature); + }) + .then(function (commitId) { + assert.equal(commitId.toString(), "96d6f1d0704eb3ef9121a13348d17c1d672c28aa"); + }) + ); }); it("can merge 2 branchs with conflicts on a single file", function () { var baseFileContent = "All Bobs are created equal. ish.\n"; var ourFileContent = "Big Bobs are best, IMHO.\n"; var theirFileContent = "Nobody expects the small Bobquisition!\n"; - var finalFileContent = - "Big Bobs are beautiful, and the small are unexpected!\n"; + var finalFileContent = "Big Bobs are beautiful, and the small are unexpected!\n"; - var baseSignature = NodeGit.Signature.create - ("Peaceful Bob", "justchill@bob.net", 123456789, 60); - var ourSignature = NodeGit.Signature.create - ("Big Bob", "impressive@bob.net", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Small Bob", "underestimated@bob.net", 123456789, 60); + var baseSignature = NodeGit.Signature.create("Peaceful Bob", "justchill@bob.net", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Big Bob", "impressive@bob.net", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Small Bob", "underestimated@bob.net", 123456789, 60); var repository = this.repository; var baseCommit; @@ -1249,152 +1250,147 @@ describe("Merge", function() { var theirBranch; var fileName = "newFile.txt"; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent) - .then(function() { + return fse + .writeFile(path.join(repository.workdir(), fileName), baseFileContent) + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "ea2f6521fb8097a881f43796946ac1603e1f4d75"); + .then(function (oid) { + assert.equal(oid.toString(), "ea2f6521fb8097a881f43796946ac1603e1f4d75"); - return repository.createCommit("HEAD", baseSignature, - baseSignature, "bobs are all ok", oid, []); + return repository.createCommit("HEAD", baseSignature, baseSignature, "bobs are all ok", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "a9b202f7612273fb3a68f718304298704eaeb735"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "a9b202f7612273fb3a68f718304298704eaeb735"); baseCommitOid = commitOid; - return repository.getCommit(commitOid).then(function(commit) { + return repository.getCommit(commitOid).then(function (commit) { baseCommit = commit; }); }) - .then(function() { - return repository.createBranch(ourBranchName, baseCommitOid) - .then(function(branch) { - ourBranch = branch; - }); + .then(function () { + return repository.createBranch(ourBranchName, baseCommitOid).then(function (branch) { + ourBranch = branch; + }); }) - .then(function() { - return repository.createBranch(theirBranchName, baseCommitOid) - .then(function(branch) { - theirBranch = branch; - }); + .then(function () { + return repository.createBranch(theirBranchName, baseCommitOid).then(function (branch) { + theirBranch = branch; + }); }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), fileName), - ourFileContent); + .then(function () { + return fse.writeFile(path.join(repository.workdir(), fileName), ourFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "c39b1e38b09085856cec7e7ff33e90f5a537d8a5"); + .then(function (oid) { + assert.equal(oid.toString(), "c39b1e38b09085856cec7e7ff33e90f5a537d8a5"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "lol big bobs :yesway:", oid, [baseCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "lol big bobs :yesway:", oid, [ + baseCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "935a89c09ad757a9dde2c0257f6f1e379f71816f"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "935a89c09ad757a9dde2c0257f6f1e379f71816f"); - return repository.getCommit(commitOid).then(function(commit) { + return repository.getCommit(commitOid).then(function (commit) { ourCommit = commit; }); }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), fileName), - theirFileContent); + .then(function () { + return fse.writeFile(path.join(repository.workdir(), fileName), theirFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "d1a894a9a4a8c820eb66c82cdd7e6b76c8f713cb"); + .then(function (oid) { + assert.equal(oid.toString(), "d1a894a9a4a8c820eb66c82cdd7e6b76c8f713cb"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "lol big bobs :poop:", oid, [baseCommit]); + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "lol big bobs :poop:", oid, [ + baseCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "bebb9ec2e0684c7cb7c1e1601c7d5a8f52b8b123"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "bebb9ec2e0684c7cb7c1e1601c7d5a8f52b8b123"); - return repository.getCommit(commitOid).then(function(commit) { + return repository.getCommit(commitOid).then(function (commit) { theirCommit = commit; }); }) - .then(function() { - return NodeGit.Reference.lookup(repository, "HEAD") - .then(function(head) { - return head.symbolicSetTarget(ourBranch.name(), ""); - }); + .then(function () { + return NodeGit.Reference.lookup(repository, "HEAD").then(function (head) { + return head.symbolicSetTarget(ourBranch.name(), ""); + }); }) - .then(function() { + .then(function () { return NodeGit.Merge.commits(repository, ourCommit, theirCommit, null); }) - .then(function(index) { + .then(function (index) { assert(index.hasConflicts()); - fse.writeFileSync(path.join(repository.workdir(), fileName), - finalFileContent); + fse.writeFileSync(path.join(repository.workdir(), fileName), finalFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b1cd49a27cd33b99ab6dad2fb82b3174812a8b47"); + .then(function (oid) { + assert.equal(oid.toString(), "b1cd49a27cd33b99ab6dad2fb82b3174812a8b47"); - return repository.createCommit(ourBranch.name(), baseSignature, - baseSignature, "Stop this bob sized fued", oid, - [ourCommit, theirCommit]); + return repository.createCommit( + ourBranch.name(), + baseSignature, + baseSignature, + "Stop this bob sized fued", + oid, + [ourCommit, theirCommit] + ); }) - .then(function(commitId) { - assert.equal(commitId.toString(), - "49014ccabf5125f9b69316acde36f891dfdb8b5c"); + .then(function (commitId) { + assert.equal(commitId.toString(), "49014ccabf5125f9b69316acde36f891dfdb8b5c"); }); }); - it("leaves repo in MERGE state after a standard merge with conflicts fails", - function() { + it("leaves repo in MERGE state after a standard merge with conflicts fails", function () { var fileName = "everyonesFile.txt"; var baseFileContent = "How do you feel about Toll Roads?\n"; @@ -1414,10 +1410,8 @@ describe("Merge", function() { "He's skeptical about Toll Roads,\n" + "but I like Toll Roads. I have an EZ-Pass!\n"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var initialCommit; @@ -1429,121 +1423,117 @@ describe("Merge", function() { repoGitPath = path.join(repoGitPath, ".git"); } - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent) - .then(function() { + return fse + .writeFile(path.join(repository.workdir(), fileName), baseFileContent) + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "044704f62399fecbe22da6d7d47b14e52625630e"); + .then(function (oid) { + assert.equal(oid.toString(), "044704f62399fecbe22da6d7d47b14e52625630e"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "80111c46ac73b857a3493b24c81df08639b5de99"); - - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function (commitOid) { + assert.equal(commitOid.toString(), "80111c46ac73b857a3493b24c81df08639b5de99"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + theirFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + theirFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); + .then(function (oid) { + assert.equal(oid.toString(), "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + initialCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + ourFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - assert.equal(oid.toString(), - "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); + .then(function (oid) { + assert.equal(oid.toString(), "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); //return repository.getCommit(commitOid) var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, }; return repository.checkoutBranch(ourBranchName, opts); }) - .then(function() { + .then(function () { return repository.getHeadCommit(); }) - .then(function(commit) { - assert.equal(commit.id().toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + .then(function (commit) { + assert.equal(commit.id().toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); return repository.getReference(theirBranchName); }) - .then(function(theirRef) { + .then(function (theirRef) { return NodeGit.AnnotatedCommit.fromRef(repository, theirRef); }) - .then(function(theirAnnotatedCommit) { + .then(function (theirAnnotatedCommit) { return NodeGit.Merge(repository, theirAnnotatedCommit); }) - .then(function() { - assert.equal(repository.state(), - NodeGit.Repository.STATE.MERGE); + .then(function () { + assert.equal(repository.state(), NodeGit.Repository.STATE.MERGE); // verify the convenience method assert.ok(repository.isMerging()); @@ -1553,47 +1543,44 @@ describe("Merge", function() { return fse.readFile(path.join(repoGitPath, "MERGE_HEAD"), "utf-8"); }) - .then(function(mergeHeadContents) { - assert.equal(mergeHeadContents, - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0\n"); + .then(function (mergeHeadContents) { + assert.equal(mergeHeadContents, "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0\n"); return fse.readFile(path.join(repository.workdir(), fileName), "utf-8"); }) - .then(function(fileContent) { + .then(function (fileContent) { assert.equal(fileContent, expectedConflictedFileContent); - return fse.writeFile(path.join(repository.workdir(), fileName), - conflictSolvedFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), conflictSolvedFileContent); }) - .then(function() { + .then(function () { return repository.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileName) - .then(function() { + .then(function (index) { + return index + .addByPath(fileName) + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oid) { - return Promise.all([ - repository.getBranchCommit(ourBranchName), - repository.getBranchCommit("MERGE_HEAD") - ]) - .then(function(commits) { - var msg = fse.readFileSync(path.join(repoGitPath, "MERGE_MSG"), - "utf-8"); + .then(function (oid) { + return Promise.all([repository.getBranchCommit(ourBranchName), repository.getBranchCommit("MERGE_HEAD")]).then( + function (commits) { + var msg = fse.readFileSync(path.join(repoGitPath, "MERGE_MSG"), "utf-8"); assert.ok(msg); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, msg, oid, [commits[0], commits[1]]); - }); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, msg, oid, [ + commits[0], + commits[1], + ]); + } + ); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "03ba156a7a1660f179b6b2dbc6a542fcf88d022d"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "03ba156a7a1660f179b6b2dbc6a542fcf88d022d"); // merge isn't cleaned up automatically assert.ok(fse.existsSync(path.join(repoGitPath, "MERGE_HEAD"))); @@ -1606,33 +1593,33 @@ describe("Merge", function() { assert.ok(!fse.existsSync(path.join(repoGitPath, "MERGE_MSG"))); assert.ok(!fse.existsSync(path.join(repoGitPath, "MERGE_MODE"))); - assert.equal(repository.state(), - NodeGit.Repository.STATE.NONE); + assert.equal(repository.state(), NodeGit.Repository.STATE.NONE); // verify the convenience method assert.ok(repository.isDefaultState()); }); }); - it("can retrieve error code on if common merge base not found", function() { + it("can retrieve error code on if common merge base not found", function () { var repo; return NodeGit.Repository.open(local("../repos/workdir")) - .then(function(r) { - repo = r; - return repo.getCommit("4bd806114ce26503c103c85dcc985021951bbc18"); - }) - .then(function(commit) { - return commit.getParents(commit.parentcount()); - }) - .then(function(parents) { - return NodeGit.Merge.base(repo, parents[0], parents[1]) - .then(function() { - return Promise.reject(new Error( - "should not be able to retrieve common merge base")); - }, function(err) { - assert.equal("no merge base found", err.message); - assert.equal("Merge.base", err.errorFunction); - assert.equal(NodeGit.Error.CODE.ENOTFOUND, err.errno); + .then(function (r) { + repo = r; + return repo.getCommit("4bd806114ce26503c103c85dcc985021951bbc18"); + }) + .then(function (commit) { + return commit.getParents(commit.parentcount()); + }) + .then(function (parents) { + return NodeGit.Merge.base(repo, parents[0], parents[1]).then( + function () { + return Promise.reject(new Error("should not be able to retrieve common merge base")); + }, + function (err) { + assert.equal("no merge base found", err.message); + assert.equal("Merge.base", err.errorFunction); + assert.equal(NodeGit.Error.CODE.ENOTFOUND, err.errno); + } + ); }); - }); }); }); diff --git a/test/tests/note.js b/test/tests/note.js index ea9d5d190..405284379 100644 --- a/test/tests/note.js +++ b/test/tests/note.js @@ -2,25 +2,25 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Note", function() { +describe("Note", function () { var NodeGit = require("../../"); var Note = NodeGit.Note; var Signature = NodeGit.Signature; var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; - return NodeGit.Repository.open(reposPath).then(function(repository) { + return NodeGit.Repository.open(reposPath).then(function (repository) { test.repository = repository; - return repository.getMasterCommit().then(function(commit) { + return repository.getMasterCommit().then(function (commit) { test.commit = commit; }); }); }); - it("can be created", function() { + it("can be created", function () { var sha = this.commit.id(); var sig = Signature.create("John", "john@doe.com", Date.now(), 0); var noteRef = "refs/notes/commits"; @@ -28,31 +28,30 @@ describe("Note", function() { return Note.create(this.repository, noteRef, sig, sig, sha, "Testing!", 1); }); - it("can be read", function() { + it("can be read", function () { var sha = this.commit.id(); var noteRef = "refs/notes/commits"; - return Note.read(this.repository, noteRef, sha).then(function(note) { + return Note.read(this.repository, noteRef, sha).then(function (note) { assert.equal(note.message(), "Testing!"); }); }); - it("can iterate all notes", function() { + it("can iterate all notes", function () { var test = this; var noteRef = "refs/notes/commits"; var ref = null; - return Note.foreach(this.repository, noteRef, function(blobId, objectId) { + return Note.foreach(this.repository, noteRef, function (blobId, objectId) { ref = objectId; - }).then(function() { - return NodeGit.Note.read(test.repository, noteRef, ref) - .then(function(note) { - assert.equal(note.message(), "Testing!"); - }); + }).then(function () { + return NodeGit.Note.read(test.repository, noteRef, ref).then(function (note) { + assert.equal(note.message(), "Testing!"); + }); }); }); - it("can be removed", function(done) { + it("can be removed", function (done) { var test = this; var sha = this.commit.id(); var noteRef = "refs/notes/commits"; @@ -60,8 +59,8 @@ describe("Note", function() { Note.create(this.repository, noteRef, sig, sig, sha, "Testing!", 1) .then((_noteSha) => Note.remove(this.repository, noteRef, sig, sig, sha)) - .then(function() { - return Note.read(test.repository, noteRef, sha).catch(function(ex) { + .then(function () { + return Note.read(test.repository, noteRef, sha).catch(function (ex) { assert.equal(ex.message, "note could not be found"); done(); }); diff --git a/test/tests/odb.js b/test/tests/odb.js index 67a00c1bc..3e2d71c5b 100644 --- a/test/tests/odb.js +++ b/test/tests/odb.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Odb", function() { +describe("Odb", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Oid = NodeGit.Oid; @@ -10,49 +10,51 @@ describe("Odb", function() { var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath).then(function(repo) { - test.repo = repo; + return Repository.open(reposPath) + .then(function (repo) { + test.repo = repo; - return repo; - }).then(function(repo) { - return repo.odb(); - }).then(function(odb) { - test.odb = odb; + return repo; + }) + .then(function (repo) { + return repo.odb(); + }) + .then(function (odb) { + test.odb = odb; - return odb; - }); + return odb; + }); }); - it("can read raw objects directly from the odb using an OID", function() { + it("can read raw objects directly from the odb using an OID", function () { var oid = Oid.fromString("32789a79e71fbc9e04d3eff7425e1771eb595150"); - return this.odb.read(oid) - .then(function (object) { - assert.equal(object.type(), Obj.TYPE.COMMIT); - }); + return this.odb.read(oid).then(function (object) { + assert.equal(object.type(), Obj.TYPE.COMMIT); + }); }); - it("can read objects directly from the odb using a string", function() { - return this.odb.read("32789a79e71fbc9e04d3eff7425e1771eb595150") - .then(function (object) { - assert.equal(object.type(), Obj.TYPE.COMMIT); - }); + it("can read objects directly from the odb using a string", function () { + return this.odb.read("32789a79e71fbc9e04d3eff7425e1771eb595150").then(function (object) { + assert.equal(object.type(), Obj.TYPE.COMMIT); + }); }); - it("can write raw objects to git", function() { + it("can write raw objects to git", function () { var obj = "test data"; var odb = this.odb; - return odb.write(obj, obj.length, Obj.TYPE.BLOB) - .then(function(oid) { + return odb + .write(obj, obj.length, Obj.TYPE.BLOB) + .then(function (oid) { assert.ok(oid instanceof Oid); return odb.read(oid); }) - .then(function(object) { + .then(function (object) { assert.equal(object.type(), Obj.TYPE.BLOB); assert.equal(object.toString(), obj); assert.equal(object.size(), obj.length); diff --git a/test/tests/oid.js b/test/tests/oid.js index 4c2fbcdad..a5377db50 100644 --- a/test/tests/oid.js +++ b/test/tests/oid.js @@ -4,36 +4,36 @@ var local = path.join.bind(path, __dirname); var leakTest = require("../utils/leak_test"); -describe("Oid", function() { +describe("Oid", function () { var NodeGit = require("../../"); var Oid = NodeGit.Oid; var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; - before(function() { + before(function () { this.oid = Oid.fromString(oid); }); - it("can convert a string to an oid", function() { + it("can convert a string to an oid", function () { assert.ok(this.oid instanceof Oid); }); - it("can convert an oid to a string", function() { + it("can convert an oid to a string", function () { var string = this.oid.allocfmt(); assert.equal(string, oid); assert.equal(this.oid.toString(), oid); }); - it("provides a custom inspect method to improve debugging", function() { + it("provides a custom inspect method to improve debugging", function () { var inspect = this.oid.inspect(); assert.equal(inspect, "[Oid " + oid + "]"); }); - it("can convert strings to oids in parameters", function() { + it("can convert strings to oids in parameters", function () { return NodeGit.Repository.open(local("../repos/workdir")) - .then(function(repo) { + .then(function (repo) { var revwalk = repo.createRevWalk(); revwalk.sorting(NodeGit.Revwalk.SORT.TIME); @@ -41,53 +41,51 @@ describe("Oid", function() { return revwalk.getCommits(1); }) - .then(function(commits) { + .then(function (commits) { assert.equal(commits[0].toString(), oid); }); }); - it("can compare two identical oids", function() { + it("can compare two identical oids", function () { assert.equal(this.oid.cmp(this.oid), 0); }); - it("can compare two different oids", function() { + it("can compare two different oids", function () { var oid2 = Oid.fromString("13c633665257696a3800b0a39ff636b4593f918f"); assert.notEqual(this.oid.cmp(oid2), 0); }); - it("can compare the first chunk of two identical oids", function() { + it("can compare the first chunk of two identical oids", function () { assert.equal(this.oid.ncmp(this.oid, 5), 0); }); - it("can compare the first chunk of two different oids", function() { + it("can compare the first chunk of two different oids", function () { var oid2 = Oid.fromString("13c633665257696a3800b0a39ff636b4593f918f"); assert.notEqual(this.oid.ncmp(oid2, 5), 0); }); - it("can check the equality of two identical oids", function() { + it("can check the equality of two identical oids", function () { assert(this.oid.equal(this.oid)); }); - it("can check the equality of two different oids", function() { + it("can check the equality of two different oids", function () { var oid2 = Oid.fromString("13c633665257696a3800b0a39ff636b4593f918f"); assert(!this.oid.equal(oid2)); }); - it("does not leak constructed Oid", function() { - return leakTest(Oid, function() { - return Promise.resolve( - Oid.fromString("13c633665257696a3800b0a39ff636b4593f918f") - ); + it("does not leak constructed Oid", function () { + return leakTest(Oid, function () { + return Promise.resolve(Oid.fromString("13c633665257696a3800b0a39ff636b4593f918f")); }); }); - it("does not leak owned Oid", function() { - return leakTest(Oid, function() { + it("does not leak owned Oid", function () { + return leakTest(Oid, function () { return NodeGit.Repository.open(local("../repos/workdir")) - .then(function(repo) { + .then(function (repo) { return NodeGit.Commit.lookup(repo, oid); }) - .then(function(commit) { + .then(function (commit) { return commit.id(); }); }); diff --git a/test/tests/packbuilder.js b/test/tests/packbuilder.js index cfd193238..e83ffaad3 100644 --- a/test/tests/packbuilder.js +++ b/test/tests/packbuilder.js @@ -2,22 +2,22 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Packbuilder", function() { +describe("Packbuilder", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Packbuilder = NodeGit.Packbuilder; var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath).then(function(repository) { + return Repository.open(reposPath).then(function (repository) { test.repository = repository; }); }); - it("can be initialized", function() { + it("can be initialized", function () { var packBuilder = Packbuilder.create(this.repository); assert(packBuilder instanceof Packbuilder); diff --git a/test/tests/patch.js b/test/tests/patch.js index fe7fe3734..117c4463e 100644 --- a/test/tests/patch.js +++ b/test/tests/patch.js @@ -2,108 +2,95 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Patch", function() { +describe("Patch", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var reposPath = local("../repos/workdir"); var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath).then(function(repository) { + return Repository.open(reposPath) + .then(function (repository) { test.repository = repository; return repository.refreshIndex(); }) - .then(function(index) { + .then(function (index) { test.index = index; return test.repository.getBranchCommit("master"); }) - .then(function(masterCommit) { + .then(function (masterCommit) { return masterCommit.getTree(); }) - .then(function(tree) { + .then(function (tree) { test.masterCommitTree = tree; return test.repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.commit = commit; return commit.getDiff(); }) - .then(function(diff) { + .then(function (diff) { test.diff = diff; return diff[0].patches(); }) - .catch(function(e) { - return Promise.reject(e); + .catch(function (e) { + return Promise.reject(e); }); }); - it("retrieve the line stats of a patch", function() { - return this.diff[0].patches() - .then(function(patches) { - var patch = patches[0]; - var lineStats = patch.lineStats(); - - assert.equal(patch.oldFile().path(), "README.md"); - assert.equal(patch.newFile().path(), "README.md"); - assert.equal(patch.size(), 1); - assert.ok(patch.isModified()); - assert.equal(lineStats.total_context, 3); - assert.equal(lineStats.total_additions, 1); - assert.equal(lineStats.total_deletions, 1); - }); - + it("retrieve the line stats of a patch", function () { + return this.diff[0].patches().then(function (patches) { + var patch = patches[0]; + var lineStats = patch.lineStats(); + + assert.equal(patch.oldFile().path(), "README.md"); + assert.equal(patch.newFile().path(), "README.md"); + assert.equal(patch.size(), 1); + assert.ok(patch.isModified()); + assert.equal(lineStats.total_context, 3); + assert.equal(lineStats.total_additions, 1); + assert.equal(lineStats.total_deletions, 1); + }); }); - it("can generate patch from blobs", function() { + it("can generate patch from blobs", function () { // Generates a patch for README.md from commit // fce88902e66c72b5b93e75bdb5ae717038b221f6 const file = "README.md"; - return NodeGit.Blob.lookup( - this.repository, - "b252f396b17661462372f78b7bcfc403b8731aaa" - ).then(blob => { - return NodeGit.Blob.lookup( - this.repository, - "b8d014998072c3f9e4b7eba8486011e80d8de98a" - ).then(oldBlob => { - return NodeGit.Patch.fromBlobs(oldBlob, file, blob, file) - .then(patch => { - assert.strictEqual(patch.size(0, 0, 0), 254); - }); + return NodeGit.Blob.lookup(this.repository, "b252f396b17661462372f78b7bcfc403b8731aaa").then((blob) => { + return NodeGit.Blob.lookup(this.repository, "b8d014998072c3f9e4b7eba8486011e80d8de98a").then((oldBlob) => { + return NodeGit.Patch.fromBlobs(oldBlob, file, blob, file).then((patch) => { + assert.strictEqual(patch.size(0, 0, 0), 254); }); + }); }); }); - it("can generate patch from blobs without 'old_blob'", function() { - // Generates a patch for README.md from commit + it("can generate patch from blobs without 'old_blob'", function () { + // Generates a patch for README.md from commit // fce88902e66c72b5b93e75bdb5ae717038b221f6 without // old_blob. Should show all lines as additions. const file = "README.md"; - return NodeGit.Blob.lookup( - this.repository, - "b252f396b17661462372f78b7bcfc403b8731aaa" - ).then(blob => { - return NodeGit.Patch.fromBlobs(null, file, blob, file) - .then(patch => { - assert.strictEqual(patch.size(0, 0, 0), 8905); - }); + return NodeGit.Blob.lookup(this.repository, "b252f396b17661462372f78b7bcfc403b8731aaa").then((blob) => { + return NodeGit.Patch.fromBlobs(null, file, blob, file).then((patch) => { + assert.strictEqual(patch.size(0, 0, 0), 8905); + }); }); }); - it("can generate patch from blobs without arguments", function() { - return NodeGit.Patch.fromBlobs() - .then(patch => { - assert.strictEqual(patch.size(0, 0, 0), 0); - }); + it("can generate patch from blobs without arguments", function () { + return NodeGit.Patch.fromBlobs().then((patch) => { + assert.strictEqual(patch.size(0, 0, 0), 0); + }); }); }); diff --git a/test/tests/pathspec.js b/test/tests/pathspec.js index 28741b068..3b7cd0715 100644 --- a/test/tests/pathspec.js +++ b/test/tests/pathspec.js @@ -1,31 +1,31 @@ var assert = require("assert"); -describe("Pathspec", function() { +describe("Pathspec", function () { var NodeGit = require("../../"); var Pathspec = NodeGit.Pathspec; - it("can accept just about anything against a * pathspec", function() { + it("can accept just about anything against a * pathspec", function () { var pathspec = Pathspec.create("*"); assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); }); - it("can take a * in an array", function() { + it("can take a * in an array", function () { var pathspec = Pathspec.create("*"); assert.equal(pathspec.matchesPath(0, "burritoooo"), 1); assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 1); }); - it("can take a single file", function() { + it("can take a single file", function () { var pathspec = Pathspec.create(["myDir/burritoSupreme.mp4"]); assert.equal(pathspec.matchesPath(0, "myDir/burritoSupreme.mp4"), 1); assert.equal(pathspec.matchesPath(0, "bob/ted/yoghurt.mp3"), 0); }); - it("can take files in an array", function() { + it("can take files in an array", function () { var pathspec = Pathspec.create(["gwendoline.txt", "sausolito.ogg"]); assert.equal(pathspec.matchesPath(0, "gwendoline.txt"), 1); @@ -33,7 +33,7 @@ describe("Pathspec", function() { assert.equal(pathspec.matchesPath(0, "sausolito.txt"), 0); }); - it("can handle dirs", function() { + it("can handle dirs", function () { var pathspec = Pathspec.create(["myDir/", "bob.js"]); assert.equal(pathspec.matchesPath(0, "bob.js"), 1); diff --git a/test/tests/rebase.js b/test/tests/rebase.js index 1ee3d04cc..4704cce78 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -7,7 +7,7 @@ var garbageCollect = require("../utils/garbage_collect.js"); const isNode8 = process.versions.node.split(".")[0] === "8"; -describe("Rebase", function() { +describe("Rebase", function () { var NodeGit = require("../../"); var Checkout = NodeGit.Checkout; var Merge = NodeGit.Merge; @@ -17,139 +17,133 @@ describe("Rebase", function() { var ourBranchName = "ours"; var theirBranchName = "theirs"; - var removeFileFromIndex = function(repository, fileName) { - return repository.refreshIndex() - .then(function(index) { - return index.removeByPath(fileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }); + var removeFileFromIndex = function (repository, fileName) { + return repository.refreshIndex().then(function (index) { + return index + .removeByPath(fileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }); }; - beforeEach(function() { + beforeEach(function () { var test = this; - return RepoUtils.createRepository(repoPath) - .then(function(repo) { - test.repository = repo; - }); + return RepoUtils.createRepository(repoPath).then(function (repo) { + test.repository = repo; + }); }); - after(function() { + after(function () { return fse.remove(repoPath); }); - it("can cleanly fast-forward via rebase", function() { + it("can cleanly fast-forward via rebase", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; var theirBranch; - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(_branch) { - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - }) - .then(function() { - // unstage changes so that we can begin a rebase - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (_branch) { + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + }) + .then(function () { + // unstage changes so that we can begin a rebase + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - assert.equal(theirAnnotatedCommit.id().toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); + assert.equal(ourAnnotatedCommit.id().toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + assert.equal(theirAnnotatedCommit.id().toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, theirAnnotatedCommit); - }) - .then(function(rebase) { - assert.equal(rebase.operationEntrycount(), 0); + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, theirAnnotatedCommit); + }) + .then(function (rebase) { + assert.equal(rebase.operationEntrycount(), 0); - return rebase.finish(ourSignature); - }) - .then(function() { - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - assert.equal(commit.id().toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - }); + return rebase.finish(ourSignature); + }) + .then(function () { + return repository.getBranchCommit(ourBranchName); + }) + .then(function (commit) { + assert.equal(commit.id().toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + }) + ); }); - it("can cleanly rebase a branch in-memory", function() { + it("can cleanly rebase a branch in-memory", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -158,10 +152,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -169,168 +161,158 @@ describe("Rebase", function() { var theirBranch; var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + var rebaseOptions = new NodeGit.RebaseOptions(); + rebaseOptions.inmemory = 1; - var rebaseOptions = new NodeGit.RebaseOptions(); - rebaseOptions.inmemory = 1; + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, undefined, rebaseOptions); + }) + .then(function (newRebase) { + rebase = newRebase; - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, undefined, rebaseOptions); - }) - .then(function(newRebase) { - rebase = newRebase; + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + return rebase.next(); + }) + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return rebase.commit(null, ourSignature); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); - // git_rebase_operation_current returns the index of the rebase - // operation that was last applied, so after the first operation, it - // should be 0. - assert.equal(rebase.operationCurrent(), 0); + return rebase.finish(ourSignature, {}); + }) + .then(function (result) { + assert.equal(result, 0); - return rebase.finish(ourSignature, {}); - }) - .then(function(result) { - assert.equal(result, 0); + return repository.getBranchCommit(ourBranchName); + }) + .then(function (commit) { + // verify that the "ours" branch has NOT moved. + // In-memory rebase does not touch refs. + assert.equal(commit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - // verify that the "ours" branch has NOT moved. - // In-memory rebase does not touch refs. - assert.equal(commit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - - // Lookup the new commit - return NodeGit.Commit.lookup(repository, - "b937100ee0ea17ef20525306763505a7fe2be29e"); - }) - .then(function(commit) { - // Lookup the parent of our new commit - return commit.parent(0); - }) - .then(function(commit) { - // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - }); + // Lookup the new commit + return NodeGit.Commit.lookup(repository, "b937100ee0ea17ef20525306763505a7fe2be29e"); + }) + .then(function (commit) { + // Lookup the parent of our new commit + return commit.parent(0); + }) + .then(function (commit) { + // verify that we are on top of "their commit" + assert.equal(commit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + }) + ); }); - it("can cleanly rebase a branch onto another branch", function() { + it("can cleanly rebase a branch onto another branch", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -339,10 +321,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -350,158 +330,149 @@ describe("Rebase", function() { var theirBranch; var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null); + }) + .then(function (newRebase) { + rebase = newRebase; - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null); - }) - .then(function(newRebase) { - rebase = newRebase; + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + return rebase.next(); + }) + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + return rebase.commit(null, ourSignature); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); - // git_rebase_operation_current returns the index of the rebase - // operation that was last applied, so after the first operation, it - // should be 0. - assert.equal(rebase.operationCurrent(), 0); + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); - return rebase.finish(ourSignature, {}); - }) - .then(function(result) { - assert.equal(result, 0); + return rebase.finish(ourSignature, {}); + }) + .then(function (result) { + assert.equal(result, 0); - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + return repository.getBranchCommit(ourBranchName); + }) + .then(function (commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); - return commit.parent(0); - }) - .then(function(commit) { - // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - }); + return commit.parent(0); + }) + .then(function (commit) { + // verify that we are on top of "their commit" + assert.equal(commit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + }) + ); }); - it("can rebase 2 branches with conflicts on a single file", function() { + it("can rebase 2 branches with conflicts on a single file", function () { var fileName = "everyonesFile.txt"; var baseFileContent = "How do you feel about Toll Roads?\n"; @@ -521,10 +492,8 @@ describe("Rebase", function() { "He's skeptical about Toll Roads,\n" + "but I like Toll Roads. I have an EZ-Pass!\n"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -532,103 +501,92 @@ describe("Rebase", function() { var theirBranch; var rebase; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent) - .then(function() { + return fse + .writeFile(path.join(repository.workdir(), fileName), baseFileContent) + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "044704f62399fecbe22da6d7d47b14e52625630e"); + .then(function (oid) { + assert.equal(oid.toString(), "044704f62399fecbe22da6d7d47b14e52625630e"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "80111c46ac73b857a3493b24c81df08639b5de99"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function (commitOid) { + assert.equal(commitOid.toString(), "80111c46ac73b857a3493b24c81df08639b5de99"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + theirFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); + .then(function (oid) { + assert.equal(oid.toString(), "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + ourFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); + .then(function (oid) { + assert.equal(oid.toString(), "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, }; return NodeGit.Checkout.head(repository, opts); }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); }) - .then(function(refs) { + .then(function (refs) { assert.equal(refs.length, 2); return Promise.all([ NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), ]); }) - .then(function(annotatedCommits) { + .then(function (annotatedCommits) { assert.equal(annotatedCommits.length, 2); var ourAnnotatedCommit = annotatedCommits[0]; var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); - assert.equal(theirAnnotatedCommit.id().toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + assert.equal(ourAnnotatedCommit.id().toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + assert.equal(theirAnnotatedCommit.id().toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null); + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null); }) - .then(function(newRebase) { + .then(function (newRebase) { rebase = newRebase; // there should only be 1 rebase operation to perform @@ -636,63 +594,54 @@ describe("Rebase", function() { return rebase.next(); }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); - - return repository.refreshIndex() - .then(function(index) { - assert.ok(index.hasConflicts()); - }); + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + + return repository.refreshIndex().then(function (index) { + assert.ok(index.hasConflicts()); + }); }) - .then(function() { - return fse.readFile(path.join(repository.workdir(), fileName), "utf8") - .then(function(fileContent) { - assert.equal(fileContent, expectedConflictedFileContent); + .then(function () { + return fse.readFile(path.join(repository.workdir(), fileName), "utf8").then(function (fileContent) { + assert.equal(fileContent, expectedConflictedFileContent); - return fse.writeFile(path.join(repository.workdir(), fileName), - conflictSolvedFileContent); - }); + return fse.writeFile(path.join(repository.workdir(), fileName), conflictSolvedFileContent); + }); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(_oid) { - return repository.refreshIndex() - .then(function(index) { - assert.ok(!index.hasConflicts()); + .then(function (_oid) { + return repository.refreshIndex().then(function (index) { + assert.ok(!index.hasConflicts()); - return rebase.commit(null, ourSignature); - }); + return rebase.commit(null, ourSignature); + }); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); return rebase.finish(ourSignature); }) - .then(function(result) { + .then(function (result) { assert.equal(result, 0); return repository.getBranchCommit(ourBranchName); }) - .then(function(commit) { + .then(function (commit) { // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); + assert.equal(commit.id().toString(), "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); return commit.parent(0); }) - .then(function(commit) { + .then(function (commit) { // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + assert.equal(commit.id().toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); }); }); - it("can abort an in-progress rebase", function() { + it("can abort an in-progress rebase", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -701,10 +650,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -712,433 +659,402 @@ describe("Rebase", function() { var theirBranch; var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null); - }) - .then(function(newRebase) { - rebase = newRebase; + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null); + }) + .then(function (newRebase) { + rebase = newRebase; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return rebase.next(); + }) + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + return rebase.commit(null, ourSignature); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); - return repository.getBranchCommit("HEAD") - .then(function(commit) { + return repository.getBranchCommit("HEAD").then(function (commit) { // verify that HEAD is on the rebased commit assert.equal(commit.id().toString(), commitOid.toString()); }); - }) - .then(function() { - return rebase.abort(); - }) - .then(function() { - return NodeGit.Rebase.open(repository) - .then(function(existingRebase) { - assert.fail(existingRebase, undefined, - "There should not be a rebase in progress"); - }) - .catch(function(e) { - assert.equal(e.message, "there is no rebase in progress"); - }); - }) - .then(function() { - return Promise.all([ - repository.getBranchCommit("HEAD"), - repository.getBranchCommit(ourBranchName) - ]); - }) - .then(function(commits) { - assert.equal(commits.length, 2); - - // verify that 'HEAD' and 'ours' are back to their pre-rebase state - assert.equal(commits[0].id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(commits[1].id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - }); + }) + .then(function () { + return rebase.abort(); + }) + .then(function () { + return NodeGit.Rebase.open(repository) + .then(function (existingRebase) { + assert.fail(existingRebase, undefined, "There should not be a rebase in progress"); + }) + .catch(function (e) { + assert.equal(e.message, "there is no rebase in progress"); + }); + }) + .then(function () { + return Promise.all([repository.getBranchCommit("HEAD"), repository.getBranchCommit(ourBranchName)]); + }) + .then(function (commits) { + assert.equal(commits.length, 2); + + // verify that 'HEAD' and 'ours' are back to their pre-rebase state + assert.equal(commits[0].id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(commits[1].id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + }) + ); }); - it("can fast-forward via rebase using the convenience methods", - function() { + it("can fast-forward via rebase using the convenience methods", function () { var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; var theirBranch; - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(_branch) { - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - }) - .then(function() { - // unstage changes so that we can begin a rebase - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (_branch) { + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + }) + .then(function () { + // unstage changes so that we can begin a rebase + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - assert.equal(theirAnnotatedCommit.id().toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); + assert.equal(ourAnnotatedCommit.id().toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + assert.equal(theirAnnotatedCommit.id().toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return repository.rebaseBranches(ourBranchName, theirBranchName, null, - ourSignature); - }) - .then(function(commit) { - assert.equal(commit.id().toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - }); + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return repository.rebaseBranches(ourBranchName, theirBranchName, null, ourSignature); + }) + .then(function (commit) { + assert.equal(commit.id().toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + }) + ); }); it( - "can fast-forward a merge commit via rebase using the " + - "convenience methods that has a beforeFinishFn", - function() { - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; - var theirOtherFileName = "antherNewFile.txt"; - - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; - var theirOtherFileContent = "This is some more content, guys!"; + "can fast-forward a merge commit via rebase using the " + "convenience methods that has a beforeFinishFn", + function () { + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; + var theirOtherFileName = "antherNewFile.txt"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var theirOtherSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456999, 60); - var ourMergeSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456889, 60); + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; + var theirOtherFileContent = "This is some more content, guys!"; - var repository = this.repository; - var ourCommit; - var theirCommit; - var theirBranch; - var ourBranch; + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var theirOtherSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456999, 60); + var ourMergeSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456889, 60); - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + var repository = this.repository; + var ourCommit; + var theirCommit; + var theirBranch; + var ourBranch; - return repository.createCommit("HEAD", ourSignature, - ourSignature, "we made a commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - theirCommit = commitOid; - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - }) - .then(function() { - return repository.checkoutBranch( - ourBranch, - { checkoutStrategy: Checkout.STRATEGY.FORCE } - ); - }) - .then(function() { - return repository.mergeBranches( - ourBranchName, - theirBranchName, - ourMergeSignature, - Merge.PREFERENCE.NO_FASTFORWARD - ); - }) - .then(function() { - return repository.getHeadCommit(); - }) - .then(function(headCommit) { - assert.notEqual(ourCommit.id().toString(), headCommit.id().toString()); - }) - .then(function() { - return repository.checkoutBranch( - theirBranch, - { checkoutStrategy: Checkout.STRATEGY.FORCE } - ); - }) - .then(function() { - return fse.writeFile( - path.join(repository.workdir(), theirOtherFileName), - theirOtherFileContent - ); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirOtherFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "c242b53f2c9446544cf9bdac7e8ed6ce583226cb"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); - return repository.createCommit(theirBranch.name(), theirOtherSignature, - theirOtherSignature, "they made another commit", oid, [theirCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "8fa0ce25a2accf464b004ddeeb63add7b816b627"); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + theirCommit = commitOid; + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + }) + .then(function () { + return repository.checkoutBranch(ourBranch, { checkoutStrategy: Checkout.STRATEGY.FORCE }); + }) + .then(function () { + return repository.mergeBranches( + ourBranchName, + theirBranchName, + ourMergeSignature, + Merge.PREFERENCE.NO_FASTFORWARD + ); + }) + .then(function () { + return repository.getHeadCommit(); + }) + .then(function (headCommit) { + assert.notEqual(ourCommit.id().toString(), headCommit.id().toString()); + }) + .then(function () { + return repository.checkoutBranch(theirBranch, { checkoutStrategy: Checkout.STRATEGY.FORCE }); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), theirOtherFileName), theirOtherFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirOtherFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "c242b53f2c9446544cf9bdac7e8ed6ce583226cb"); + + return repository.createCommit( + theirBranch.name(), + theirOtherSignature, + theirOtherSignature, + "they made another commit", + oid, + [theirCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "8fa0ce25a2accf464b004ddeeb63add7b816b627"); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "0d1d322b59df68bac6eea6a2a189f974cb590368"); - assert.equal(theirAnnotatedCommit.id().toString(), - "8fa0ce25a2accf464b004ddeeb63add7b816b627"); - - return repository.rebaseBranches( - ourBranchName, - theirBranchName, - null, - ourSignature, - null, - function(rebaseData) { - assert.equal(rebaseData.rewritten, null); - } - ); - }) - .then(function(commit) { - assert.equal(commit.id().toString(), - "8fa0ce25a2accf464b004ddeeb63add7b816b627"); - }); - }); + assert.equal(ourAnnotatedCommit.id().toString(), "0d1d322b59df68bac6eea6a2a189f974cb590368"); + assert.equal(theirAnnotatedCommit.id().toString(), "8fa0ce25a2accf464b004ddeeb63add7b816b627"); + + return repository.rebaseBranches( + ourBranchName, + theirBranchName, + null, + ourSignature, + null, + function (rebaseData) { + assert.equal(rebaseData.rewritten, null); + } + ); + }) + .then(function (commit) { + assert.equal(commit.id().toString(), "8fa0ce25a2accf464b004ddeeb63add7b816b627"); + }) + ); + } + ); - it("can rebase using the convenience method", function() { + it("can rebase using the convenience method", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -1147,10 +1063,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -1159,111 +1073,110 @@ describe("Rebase", function() { var nextCalls = 0; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return repository.rebaseBranches(ourBranchName, theirBranchName, - null, ourSignature, function(rebase) { + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return repository.rebaseBranches(ourBranchName, theirBranchName, null, ourSignature, function (rebase) { assert.ok(rebase instanceof NodeGit.Rebase); nextCalls++; return Promise.resolve(); }); - }) - .then(function(commit) { - // verify that the beforeNextFn callback was called - assert.equal(nextCalls, 2); - - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + }) + .then(function (commit) { + // verify that the beforeNextFn callback was called + assert.equal(nextCalls, 2); - return commit.parent(0); - }) - .then(function(commit) { - // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - }); + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); + + return commit.parent(0); + }) + .then(function (commit) { + // verify that we are on top of "their commit" + assert.equal(commit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + }) + ); }); - it("beforeFinishFn sync callback receives correct rebase data", function() { + it("beforeFinishFn sync callback receives correct rebase data", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -1272,10 +1185,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -1289,129 +1200,130 @@ describe("Rebase", function() { var calledBeforeFinishFn = false; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - theirBranchSha = commitOid.toString(); - assert.equal(theirBranchSha, - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + theirBranchSha = commitOid.toString(); + assert.equal(theirBranchSha, "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - ourBranchShaPreRebase = commitOid.toString(); - assert.equal(ourBranchShaPreRebase, - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + ourBranchShaPreRebase = commitOid.toString(); + assert.equal(ourBranchShaPreRebase, "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return repository.rebaseBranches(ourBranchName, theirBranchName, - null, ourSignature, function(rebase) { - assert.ok(rebase instanceof NodeGit.Rebase); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return repository.rebaseBranches( + ourBranchName, + theirBranchName, + null, + ourSignature, + function (rebase) { + assert.ok(rebase instanceof NodeGit.Rebase); - nextCalls++; + nextCalls++; - return Promise.resolve(); - }, function(rebaseMetadata) { - calledBeforeFinishFn = true; - - assert.equal(rebaseMetadata.ontoName, theirBranchName); - assert.equal(rebaseMetadata.ontoSha, theirBranchSha); - assert.equal(rebaseMetadata.originalHeadName, ourBranchName); - assert.equal( - rebaseMetadata.originalHeadSha, - ourBranchShaPreRebase - ); - assert.deepEqual( - rebaseMetadata.rewritten, - [[ourBranchShaPreRebase, ourBranchShaPostRebase]] - ); - }); - }) - .then(function(commit) { - // verify that the beforeNextFn callback was called - assert.equal(nextCalls, 2); + return Promise.resolve(); + }, + function (rebaseMetadata) { + calledBeforeFinishFn = true; + + assert.equal(rebaseMetadata.ontoName, theirBranchName); + assert.equal(rebaseMetadata.ontoSha, theirBranchSha); + assert.equal(rebaseMetadata.originalHeadName, ourBranchName); + assert.equal(rebaseMetadata.originalHeadSha, ourBranchShaPreRebase); + assert.deepEqual(rebaseMetadata.rewritten, [[ourBranchShaPreRebase, ourBranchShaPostRebase]]); + } + ); + }) + .then(function (commit) { + // verify that the beforeNextFn callback was called + assert.equal(nextCalls, 2); - // verify that the beforeFinishFn callback was called - assert(calledBeforeFinishFn, "beforeFinishFn was not called"); + // verify that the beforeFinishFn callback was called + assert(calledBeforeFinishFn, "beforeFinishFn was not called"); - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), ourBranchShaPostRebase); + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), ourBranchShaPostRebase); - return commit.parent(0); - }) - .then(function(commit) { - // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - }); + return commit.parent(0); + }) + .then(function (commit) { + // verify that we are on top of "their commit" + assert.equal(commit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + }) + ); }); - it("beforeFinishFn async callback receives correct rebase data", function() { + it("beforeFinishFn async callback receives correct rebase data", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -1420,10 +1332,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -1437,131 +1347,132 @@ describe("Rebase", function() { var calledBeforeFinishFn = false; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + theirBranchSha = commitOid.toString(); + assert.equal(theirBranchSha, "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - theirBranchSha = commitOid.toString(); - assert.equal(theirBranchSha, - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + ourBranchShaPreRebase = commitOid.toString(); + assert.equal(ourBranchShaPreRebase, "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - ourBranchShaPreRebase = commitOid.toString(); - assert.equal(ourBranchShaPreRebase, - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return repository.rebaseBranches( + ourBranchName, + theirBranchName, + null, + ourSignature, + function (rebase) { + assert.ok(rebase instanceof NodeGit.Rebase); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return repository.rebaseBranches(ourBranchName, theirBranchName, - null, ourSignature, function(rebase) { - assert.ok(rebase instanceof NodeGit.Rebase); + nextCalls++; - nextCalls++; + return Promise.resolve(); + }, + function (rebaseMetadata) { + calledBeforeFinishFn = true; - return Promise.resolve(); - }, function(rebaseMetadata) { - calledBeforeFinishFn = true; - - assert.equal(rebaseMetadata.ontoName, theirBranchName); - assert.equal(rebaseMetadata.ontoSha, theirBranchSha); - assert.equal(rebaseMetadata.originalHeadName, ourBranchName); - assert.equal( - rebaseMetadata.originalHeadSha, - ourBranchShaPreRebase - ); - assert.deepEqual( - rebaseMetadata.rewritten, - [[ourBranchShaPreRebase, ourBranchShaPostRebase]] - ); + assert.equal(rebaseMetadata.ontoName, theirBranchName); + assert.equal(rebaseMetadata.ontoSha, theirBranchSha); + assert.equal(rebaseMetadata.originalHeadName, ourBranchName); + assert.equal(rebaseMetadata.originalHeadSha, ourBranchShaPreRebase); + assert.deepEqual(rebaseMetadata.rewritten, [[ourBranchShaPreRebase, ourBranchShaPostRebase]]); - return Promise.resolve(); - }); - }) - .then(function(commit) { - // verify that the beforeNextFn callback was called - assert.equal(nextCalls, 2); + return Promise.resolve(); + } + ); + }) + .then(function (commit) { + // verify that the beforeNextFn callback was called + assert.equal(nextCalls, 2); - // verify that the beforeFinishFn callback was called - assert(calledBeforeFinishFn, "beforeFinishFn was not called"); + // verify that the beforeFinishFn callback was called + assert(calledBeforeFinishFn, "beforeFinishFn was not called"); - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), ourBranchShaPostRebase); + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), ourBranchShaPostRebase); - return commit.parent(0); - }) - .then(function(commit) { - // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - }); + return commit.parent(0); + }) + .then(function (commit) { + // verify that we are on top of "their commit" + assert.equal(commit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + }) + ); }); - it("can rebase with conflicts using the convenience methods", function() { + it("can rebase with conflicts using the convenience methods", function () { var fileName = "everyonesFile.txt"; var baseFileContent = "How do you feel about Toll Roads?\n"; @@ -1581,147 +1492,134 @@ describe("Rebase", function() { "He's skeptical about Toll Roads,\n" + "but I like Toll Roads. I have an EZ-Pass!\n"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; var ourBranch; var theirBranch; - var nextCalls=0; + var nextCalls = 0; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent) - .then(function() { + return fse + .writeFile(path.join(repository.workdir(), fileName), baseFileContent) + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "044704f62399fecbe22da6d7d47b14e52625630e"); + .then(function (oid) { + assert.equal(oid.toString(), "044704f62399fecbe22da6d7d47b14e52625630e"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "80111c46ac73b857a3493b24c81df08639b5de99"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function (commitOid) { + assert.equal(commitOid.toString(), "80111c46ac73b857a3493b24c81df08639b5de99"); + + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + theirFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); + .then(function (oid) { + assert.equal(oid.toString(), "b826e989aca7647bea64810f0a2a38acbbdd4c1a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + ourFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); + .then(function (oid) { + assert.equal(oid.toString(), "e7fe41bf7c0c28766887a63ffe2f03f624276fbe"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "28cfeb17f66132edb3c4dacb7ff38e8dd48a1844"); var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, }; return NodeGit.Checkout.head(repository, opts); }) - .then(function() { - return repository.rebaseBranches(ourBranchName, theirBranchName, - null, ourSignature) - .then(function(commit) { - assert.fail(commit, undefined, - "The index should have been thrown due to merge conflicts"); - }) - .catch(function(index) { + .then(function () { + return repository + .rebaseBranches(ourBranchName, theirBranchName, null, ourSignature) + .then(function (commit) { + assert.fail(commit, undefined, "The index should have been thrown due to merge conflicts"); + }) + .catch(function (index) { assert.ok(index); assert.ok(index.hasConflicts()); assert.ok(repository.isRebasing()); }); }) - .then(function() { - return fse.readFile(path.join(repository.workdir(), fileName), "utf8") - .then(function(fileContent) { - assert.equal(fileContent, expectedConflictedFileContent); + .then(function () { + return fse.readFile(path.join(repository.workdir(), fileName), "utf8").then(function (fileContent) { + assert.equal(fileContent, expectedConflictedFileContent); - return fse.writeFile(path.join(repository.workdir(), fileName), - conflictSolvedFileContent); - }); + return fse.writeFile(path.join(repository.workdir(), fileName), conflictSolvedFileContent); + }); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(_oid) { - return repository.refreshIndex() - .then(function(index) { - assert.ok(!index.hasConflicts()); + .then(function (_oid) { + return repository.refreshIndex().then(function (index) { + assert.ok(!index.hasConflicts()); - return repository.continueRebase(ourSignature, function(rebase) { - assert.ok(rebase instanceof NodeGit.Rebase); + return repository.continueRebase(ourSignature, function (rebase) { + assert.ok(rebase instanceof NodeGit.Rebase); - nextCalls++; + nextCalls++; - return Promise.resolve(); - }); + return Promise.resolve(); }); + }); }) - .then(function(commit) { + .then(function (commit) { // verify that the beforeNextFn callback was called assert.equal(nextCalls, 1); // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); + assert.equal(commit.id().toString(), "ef6d0e95167435b3d58f51ab165948c72f6f94b6"); assert.ok(!repository.isRebasing()); assert.ok(repository.isDefaultState()); return commit.parent(0); }) - .then(function(commit) { + .then(function (commit) { // verify that we are on top of "their commit" - assert.equal(commit.id().toString(), - "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); + assert.equal(commit.id().toString(), "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); }); }); if (!isNode8) { - it("can sign commits during the rebase", function() { + it("can sign commits during the rebase", function () { var baseFileName = "baseNewFile.txt"; var ourFileName = "ourNewFile.txt"; var theirFileName = "theirNewFile.txt"; @@ -1730,10 +1628,8 @@ describe("Rebase", function() { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var repository = this.repository; var ourCommit; @@ -1741,305 +1637,285 @@ describe("Rebase", function() { var theirBranch; var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null, { - signingCb: (_commitContent) => ({ - code: NodeGit.Error.CODE.OK, - field: "moose-sig", - signedData: "A moose was here." - }) - }); - }) - .then(function(newRebase) { - rebase = newRebase; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { + signingCb: (_commitContent) => ({ + code: NodeGit.Error.CODE.OK, + field: "moose-sig", + signedData: "A moose was here.", + }), + }); + }) + .then(function (newRebase) { + rebase = newRebase; - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "617cd03370dd799f372e9dcfcd0b097aede1bd7f"); + return rebase.next(); + }) + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - // git_rebase_operation_current returns the index of the rebase - // operation that was last applied, so after the first operation, it - // should be 0. - assert.equal(rebase.operationCurrent(), 0); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); - return rebase.finish(ourSignature, {}); - }) - .then(function(result) { - assert.equal(result, 0); + return rebase.commit(null, ourSignature); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "617cd03370dd799f372e9dcfcd0b097aede1bd7f"); - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "617cd03370dd799f372e9dcfcd0b097aede1bd7f"); + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); - return Promise.all([ - commit.parent(0), - NodeGit.Commit.extractSignature( - repository, - "617cd03370dd799f372e9dcfcd0b097aede1bd7f", - "moose-sig" - ) - ]); - }) - .then(function([parent, { signature }]) { - // verify that we are on top of "their commit" - assert.equal(parent.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - assert.equal(signature, "A moose was here."); - }); - }); + return rebase.finish(ourSignature, {}); + }) + .then(function (result) { + assert.equal(result, 0); - it("can optionally skip signing commits", function() { - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; + return repository.getBranchCommit(ourBranchName); + }) + .then(function (commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), "617cd03370dd799f372e9dcfcd0b097aede1bd7f"); - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; + return Promise.all([ + commit.parent(0), + NodeGit.Commit.extractSignature(repository, "617cd03370dd799f372e9dcfcd0b097aede1bd7f", "moose-sig"), + ]); + }) + .then(function ([parent, { signature }]) { + // verify that we are on top of "their commit" + assert.equal(parent.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + assert.equal(signature, "A moose was here."); + }) + ); + }); - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + it("can optionally skip signing commits", function () { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; - var repository = this.repository; - var ourCommit; - var ourBranch; - var theirBranch; - var rebase; + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function () { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function (branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); + }) + .then(function () { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function () { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function () { + return repository.checkoutBranch(ourBranchName); + }) + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); + }) + .then(function (refs) { + assert.equal(refs.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), + ]); + }) + .then(function (annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null, { + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { signingCb: () => ({ - code: NodeGit.Error.CODE.PASSTHROUGH - }) + code: NodeGit.Error.CODE.PASSTHROUGH, + }), }); }) - .then(function(newRebase) { + .then(function (newRebase) { rebase = newRebase; // there should only be 1 rebase operation to perform @@ -2047,11 +1923,9 @@ describe("Rebase", function() { return rebase.next(); }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); // Make sure we don't crash calling the signature CB // after collecting garbage. @@ -2059,9 +1933,8 @@ describe("Rebase", function() { return rebase.commit(null, ourSignature); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); // git_rebase_operation_current returns the index of the rebase // operation that was last applied, so after the first operation, it @@ -2070,310 +1943,292 @@ describe("Rebase", function() { return rebase.finish(ourSignature, {}); }) - .then(function(result) { + .then(function (result) { assert.equal(result, 0); return repository.getBranchCommit(ourBranchName); }) - .then(function(commit) { + .then(function (commit) { // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + assert.equal(commit.id().toString(), "b937100ee0ea17ef20525306763505a7fe2be29e"); return commit.parent(0); }) - .then(function(parent) { + .then(function (parent) { // verify that we are on top of "their commit" - assert.equal(parent.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + assert.equal(parent.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); return NodeGit.Commit.extractSignature( repository, "b937100ee0ea17ef20525306763505a7fe2be29e", "moose-sig" - ) - .then(function() { - assert.fail("This commit should not be signed."); - }, function (error) { - if (error && error.message === "this commit is not signed") { - return; + ).then( + function () { + assert.fail("This commit should not be signed."); + }, + function (error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; } - throw error; - }); - }); - }); + ); + }) + ); + }); - it("will throw if commit signing cb returns an error code", function() { - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; + it("will throw if commit signing cb returns an error code", function () { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var repository = this.repository; - var ourCommit; - var ourBranch; - var theirBranch; - var rebase; + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) // Load up the repository index and make our initial commit to HEAD - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, baseFileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, theirFileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit( + theirBranch.name(), + theirSignature, + theirSignature, + "they made a commit", + oid, + [ourCommit] + ); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); return removeFileFromIndex(repository, theirFileName); }) - .then(function() { + .then(function () { return fse.remove(path.join(repository.workdir(), theirFileName)); }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); + .then(function () { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, ourFileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); return removeFileFromIndex(repository, ourFileName); }) - .then(function() { + .then(function () { return fse.remove(path.join(repository.workdir(), ourFileName)); }) - .then(function() { + .then(function () { return repository.checkoutBranch(ourBranchName); }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); }) - .then(function(refs) { + .then(function (refs) { assert.equal(refs.length, 2); return Promise.all([ NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), ]); }) - .then(function(annotatedCommits) { + .then(function (annotatedCommits) { assert.equal(annotatedCommits.length, 2); var ourAnnotatedCommit = annotatedCommits[0]; var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null, { - signingCb: () => ({ - code: NodeGit.Error.CODE.ERROR - }) - }); - }) - .then(function(newRebase) { - rebase = newRebase; + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { + signingCb: () => ({ + code: NodeGit.Error.CODE.ERROR, + }), + }); + }) + .then(function (newRebase) { + rebase = newRebase; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return rebase.next(); + }) + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); - return rebase.commit(null, ourSignature); - }) - .then(function() { + return rebase.commit(null, ourSignature); + }) + .then( + function () { assert.fail("rebase.commit should have failed"); - }, function(error) { + }, + function (error) { if (error && error.errno === NodeGit.Error.CODE.ERROR) { return; } throw error; - }); - }); + } + ) + ); + }); } - it("will not throw on patch already applied errors", function() { - var baseFileName = "baseNewFile.txt"; - var theirFileName = "myFile.txt"; + it("will not throw on patch already applied errors", function () { + var baseFileName = "baseNewFile.txt"; + var theirFileName = "myFile.txt"; - var baseFileContent = "How do you feel about Toll Roads?"; - var theirFileContent = "Hello there"; + var baseFileContent = "How do you feel about Toll Roads?"; + var theirFileContent = "Hello there"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var repository = this.repository; - var initialCommit; - var ourBranch; - var theirBranch; - var rebase; + var repository = this.repository; + var initialCommit; + var ourBranch; + var theirBranch; + var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) + return ( + fse + .writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) // Load up the repository index and make our initial commit to HEAD - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, baseFileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.getCommit(commitOid).then(function(commit) { - initialCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + return repository + .getCommit(commitOid) + .then(function (commit) { + initialCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile( - path.join(repository.workdir(), theirFileName), - theirFileContent - ); + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, theirFileName); }) - .then(function(oid) { - assert.equal(oid.toString(), - "6f14d06b24fa8ea26f511dd8a94a003fd37eadc5"); - - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }); + .then(function (oid) { + assert.equal(oid.toString(), "6f14d06b24fa8ea26f511dd8a94a003fd37eadc5"); + + return repository + .createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + initialCommit, + ]) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); + }); }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + .then(function (commitOid) { + assert.equal(commitOid.toString(), "5814ffa17b8a677191d89d5372f1e46d50d976ae"); return removeFileFromIndex(repository, theirFileName); }) - .then(function() { + .then(function () { return fse.remove(path.join(repository.workdir(), theirFileName)); }) - .then(function() { + .then(function () { return repository.checkoutBranch(ourBranchName); }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); + .then(function () { + return Promise.all([repository.getReference(ourBranchName), repository.getReference(theirBranchName)]); }) - .then(function(refs) { + .then(function (refs) { assert.equal(refs.length, 2); return Promise.all([ NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]), ]); }) - .then(function(annotatedCommits) { + .then(function (annotatedCommits) { assert.equal(annotatedCommits.length, 2); var ourAnnotatedCommit = annotatedCommits[0]; var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), - "5814ffa17b8a677191d89d5372f1e46d50d976ae"); - assert.equal(theirAnnotatedCommit.id().toString(), - "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); + assert.equal(ourAnnotatedCommit.id().toString(), "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + assert.equal(theirAnnotatedCommit.id().toString(), "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); - return NodeGit.Rebase.init( - repository, - ourAnnotatedCommit, - theirAnnotatedCommit - ); + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit); }) - .then(function(newRebase) { + .then(function (newRebase) { rebase = newRebase; // there should only be 1 rebase operation to perform @@ -2381,41 +2236,42 @@ describe("Rebase", function() { return rebase.next(); }) - .catch(function(error) { + .catch(function (error) { assert.fail(error); throw error; }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + .then(function (rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), "5814ffa17b8a677191d89d5372f1e46d50d976ae"); return rebase.commit(null, ourSignature); }) - .then(function() { - assert.fail("Rebase should have failed."); - }, function (error) { - if (error && error.errno === NodeGit.Error.CODE.EAPPLIED) { - return; + .then( + function () { + assert.fail("Rebase should have failed."); + }, + function (error) { + if (error && error.errno === NodeGit.Error.CODE.EAPPLIED) { + return; + } + + assert.fail(error); + + throw error; } - - assert.fail(error); - - throw error; - }) - .then(function() { + ) + .then(function () { return repository.continueRebase(); }) - .then(function() { + .then(function () { return rebase.next(); }) - .catch(function(error) { + .catch(function (error) { assert.equal(error.errno, NodeGit.Error.CODE.ITEROVER); - }); - }); - + }) + ); + }); it("rebase signs correctly if rebaseOptions are re-used", function () { const ourFileName = "ourNewFile.txt"; @@ -2424,10 +2280,8 @@ describe("Rebase", function() { const ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; const theirFileContent = "I'm skeptical about Toll Roads"; - const ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - const theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + const ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + const theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); let ourCommit; let theirCommit; @@ -2439,105 +2293,93 @@ describe("Rebase", function() { signingCb: () => ({ code: NodeGit.Error.CODE.OK, field: "moose-sig", - signedData: "A moose was here." - }) + signedData: "A moose was here.", + }), }; const repository = this.repository; // Create two commits on master // one - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent) - .then(() => RepoUtils.addFileToIndex(repository, ourFileName)) - .then((oid) => { - assert.equal(oid.toString(), - "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); - return repository.createCommit("HEAD", ourSignature, ourSignature, - "we made a commit", oid, []); - }) - .then((commitOid) => { - assert.equal(commitOid.toString(), - "91a183f87842ebb7a9b08dad8bc2473985796844"); - return repository.getCommit(commitOid); - }) - .then((_ourCommit) => { - ourCommit = _ourCommit; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(() => RepoUtils.addFileToIndex(repository, theirFileName)) - .then((oid) => { - assert.equal(oid.toString(), - "76631cb5a290dafe2959152626bb90f2a6d8ec94"); - return repository.createCommit("HEAD", theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then((commitOid) => { - assert.equal(commitOid.toString(), - "0e9231d489b3f4303635fc4b0397830da095e7e7"); - return repository.getCommit(commitOid); - - }) - .then((_theirCommit) => { - theirCommit = _theirCommit; - return Promise.all([ - NodeGit.AnnotatedCommit.lookup( - repository, - ourCommit.id() - ), - NodeGit.AnnotatedCommit.lookup( + return ( + fse + .writeFile(path.join(repository.workdir(), ourFileName), ourFileContent) + .then(() => RepoUtils.addFileToIndex(repository, ourFileName)) + .then((oid) => { + assert.equal(oid.toString(), "11ead82b1135b8e240fb5d61e703312fb9cc3d6a"); + return repository.createCommit("HEAD", ourSignature, ourSignature, "we made a commit", oid, []); + }) + .then((commitOid) => { + assert.equal(commitOid.toString(), "91a183f87842ebb7a9b08dad8bc2473985796844"); + return repository.getCommit(commitOid); + }) + .then((_ourCommit) => { + ourCommit = _ourCommit; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); + }) + .then(() => RepoUtils.addFileToIndex(repository, theirFileName)) + .then((oid) => { + assert.equal(oid.toString(), "76631cb5a290dafe2959152626bb90f2a6d8ec94"); + return repository.createCommit("HEAD", theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); + }) + .then((commitOid) => { + assert.equal(commitOid.toString(), "0e9231d489b3f4303635fc4b0397830da095e7e7"); + return repository.getCommit(commitOid); + }) + .then((_theirCommit) => { + theirCommit = _theirCommit; + return Promise.all([ + NodeGit.AnnotatedCommit.lookup(repository, ourCommit.id()), + NodeGit.AnnotatedCommit.lookup(repository, theirCommit.id()), + ]); + }) + // rebase latest commit + .then(([ourAnnotatedCommit, theirAnnotatedCommit]) => + NodeGit.Rebase.init( repository, - theirCommit.id() + // branch, upstream, onto + theirAnnotatedCommit, + ourAnnotatedCommit, + null, + rebaseOptions // use once ) - ]); - }) - // rebase latest commit - .then(([ourAnnotatedCommit, theirAnnotatedCommit]) => - NodeGit.Rebase.init( - repository, - // branch, upstream, onto - theirAnnotatedCommit, ourAnnotatedCommit, null, - rebaseOptions // use once - )) - .then(() => { - return NodeGit.Rebase.open( - repository, - rebaseOptions // use twice - ); - }) - .then((_rebase) => { - rebase = _rebase; - return rebase.next(); - }) - .then(() => { - const operationCurrentIndex = rebase.operationCurrent(); - assert(operationCurrentIndex === 0); - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); - return rebase.commit(null, ourSignature); - }) - .then((_newCommitOid) => { - newCommitOid = _newCommitOid; - assert.strictEqual(newCommitOid.toString(), - "9909e435b52322a71dc341d747b29c392a34c745"); - return rebase.next(); - }) - .then(() => { - assert.fail("should throw"); - }) - .catch((error) => { - assert(error.errno === NodeGit.Error.CODE.ITEROVER); - assert.strictEqual(rebase.finish(ourSignature), 0); - return NodeGit.Commit.extractSignature( - repository, - newCommitOid.toString(), - "moose-sig" - ); - }) - .then((sig) => { - assert.strictEqual(sig.signature, "A moose was here."); - }); -}); + ) + .then(() => { + return NodeGit.Rebase.open( + repository, + rebaseOptions // use twice + ); + }) + .then((_rebase) => { + rebase = _rebase; + return rebase.next(); + }) + .then(() => { + const operationCurrentIndex = rebase.operationCurrent(); + assert(operationCurrentIndex === 0); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); + return rebase.commit(null, ourSignature); + }) + .then((_newCommitOid) => { + newCommitOid = _newCommitOid; + assert.strictEqual(newCommitOid.toString(), "9909e435b52322a71dc341d747b29c392a34c745"); + return rebase.next(); + }) + .then(() => { + assert.fail("should throw"); + }) + .catch((error) => { + assert(error.errno === NodeGit.Error.CODE.ITEROVER); + assert.strictEqual(rebase.finish(ourSignature), 0); + return NodeGit.Commit.extractSignature(repository, newCommitOid.toString(), "moose-sig"); + }) + .then((sig) => { + assert.strictEqual(sig.signature, "A moose was here."); + }) + ); + }); }); diff --git a/test/tests/refs.js b/test/tests/refs.js index 68b114e85..43cd58ed7 100644 --- a/test/tests/refs.js +++ b/test/tests/refs.js @@ -4,7 +4,7 @@ var local = path.join.bind(path, __dirname); var exec = require("../../utils/execPromise"); -describe("Reference", function() { +describe("Reference", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Reference = NodeGit.Reference; @@ -13,110 +13,106 @@ describe("Reference", function() { var reposPath = local("../repos/workdir"); var refName = "refs/heads/master"; - before(function() { + before(function () { var test = this; - return exec("git reset --hard origin/master", {cwd: reposPath}) - .then(function() { + return exec("git reset --hard origin/master", { cwd: reposPath }) + .then(function () { return Repository.open(reposPath); }) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return repository.getReference(refName); }) - .then(function(reference) { + .then(function (reference) { test.reference = reference; }); }); - it("can look up a reference", function() { + it("can look up a reference", function () { assert.ok(this.reference instanceof Reference); }); - it("can determine if the reference is symbolic", function() { + it("can determine if the reference is symbolic", function () { assert.equal(this.reference.isSymbolic(), false); }); - it("can determine if the reference is not symbolic", function() { + it("can determine if the reference is not symbolic", function () { assert.ok(this.reference.isConcrete()); }); - it("can check that reference is valid", function() { + it("can check that reference is valid", function () { assert.ok(this.reference.isValid()); }); - it("can return refName when casting toString", function() { + it("can return refName when casting toString", function () { assert.equal(this.reference.toString(), refName); }); - it("can compare two identical references", function() { + it("can compare two identical references", function () { assert.equal(this.reference.cmp(this.reference), 0); }); - it("can compare two different references", function() { + it("can compare two different references", function () { var ref = this.reference; - return this.repository.getReference("checkout-test") - .then(function(otherRef) { - assert.notEqual(ref.cmp(otherRef), 0); - }); + return this.repository.getReference("checkout-test").then(function (otherRef) { + assert.notEqual(ref.cmp(otherRef), 0); + }); }); - it("will return undefined looking up the symbolic target if not symbolic", - function() { - assert(this.reference.symbolicTarget() === undefined); - }); + it("will return undefined looking up the symbolic target if not symbolic", function () { + assert(this.reference.symbolicTarget() === undefined); + }); - it("can look up the HEAD sha", function() { - return Reference.nameToId(this.repository, "HEAD") - .then(function(oid) { - var sha = oid.allocfmt(); - assert.equal(sha, "32789a79e71fbc9e04d3eff7425e1771eb595150"); - }); + it("can look up the HEAD sha", function () { + return Reference.nameToId(this.repository, "HEAD").then(function (oid) { + var sha = oid.allocfmt(); + assert.equal(sha, "32789a79e71fbc9e04d3eff7425e1771eb595150"); + }); }); - it("can rename a reference", function() { + it("can rename a reference", function () { var newRefName = "refs/heads/chasta-boran"; var ref = this.reference; var repo = this.repository; var reflogMessage = "reflog message"; var refExistsMessage = "Renamed ref still exists"; - return repo.getReference(newRefName) - .then(function() { + return repo + .getReference(newRefName) + .then(function () { // The new ref name should not exist yet throw new Error(refExistsMessage); }) - .catch(function(err) { + .catch(function (err) { // Should throw an error explaining that the ref // does not exist assert.ok(err.message.includes(newRefName)); return ref.rename(newRefName, 0, reflogMessage); }) - .then(function(reference) { + .then(function (reference) { // The ref should be renamed at this point assert.equal(reference.name(), newRefName); return repo.getReference(refName); }) - .then(function() { + .then(function () { // The original ref name should not be found throw new Error(refExistsMessage); }) - .catch(function(err) { + .catch(function (err) { assert.ok(err.message.includes(refName)); return Reflog.read(repo, newRefName); }) - .then(function(reflog) { - var refEntryMessage = reflog - .entryByIndex(reflog.entrycount() - 1) - .message(); + .then(function (reflog) { + var refEntryMessage = reflog.entryByIndex(reflog.entrycount() - 1).message(); // The reflog should have the message passed to // the rename assert.equal(refEntryMessage, reflogMessage); return repo.getReference(newRefName); }) - .then(function(newRef) { + .then(function (newRef) { // Set the ref name back to `master` return newRef.rename(refName, 0, "another reflog message"); }); diff --git a/test/tests/remote.js b/test/tests/remote.js index bcb56a8ad..21c2b3383 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -9,7 +9,7 @@ var RepoUtils = require("../utils/repository_setup"); const isNode8 = process.versions.node.split(".")[0] === "8"; -describe("Remote", function() { +describe("Remote", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Remote = NodeGit.Remote; @@ -21,198 +21,194 @@ describe("Remote", function() { var privateUrl = "git@github.com:nodegit/private"; function removeNonOrigins(repo) { - return repo.getRemoteNames() - .then(function(remotes) { - return remotes.reduce(function(promise, remote) { - if (remote !== "origin") { - promise = promise.then(function() { - return Remote.delete(repo, remote); - }); - } + return repo.getRemoteNames().then(function (remotes) { + return remotes.reduce(function (promise, remote) { + if (remote !== "origin") { + promise = promise.then(function () { + return Remote.delete(repo, remote); + }); + } - return promise; - }, Promise.resolve()); - }); + return promise; + }, Promise.resolve()); + }); } - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return Remote.lookup(repository, "origin"); }) - .then(function(remote) { + .then(function (remote) { test.remote = remote; return removeNonOrigins(test.repository); }) - .then(function() { + .then(function () { return RepoUtils.createRepository(bareReposPath, 1); }); }); - after(function() { + after(function () { return removeNonOrigins(this.repository); }); - it("can load a remote", function() { + it("can load a remote", function () { assert.ok(this.remote instanceof Remote); }); - it("can read the remote url", function() { + it("can read the remote url", function () { assert.equal(this.remote.url().replace(".git", ""), url); }); - it("has an empty pushurl by default", function() { + it("has an empty pushurl by default", function () { assert.equal(this.remote.pushurl(), undefined); }); - it("can set a remote", function() { + it("can set a remote", function () { var repository = this.repository; return Remote.create(repository, "origin1", url) - .then(function() { + .then(function () { return Remote.setPushurl(repository, "origin1", "https://google.com/"); }) - .then(function() { + .then(function () { return Remote.lookup(repository, "origin1"); }) - .then(function(remote) { + .then(function (remote) { assert.equal(remote.pushurl(), "https://google.com/"); }); }); - it("can read the remote name", function() { + it("can read the remote name", function () { assert.equal(this.remote.name(), "origin"); }); - it("can create and load a new remote", function() { + it("can create and load a new remote", function () { var repository = this.repository; return Remote.create(repository, "origin2", url) - .then(function() { + .then(function () { return Remote.lookup(repository, "origin2"); }) - .then(function(remote) { + .then(function (remote) { assert(remote.url(), url); }); }); - it("can rename a remote", function() { + it("can rename a remote", function () { var repository = this.repository; return Remote.list(repository) - .then(function(remoteNames) { + .then(function (remoteNames) { assert.deepEqual(remoteNames, ["origin"]); return Remote.rename(repository, "origin", "origin2"); }) - .then(function(problems) { + .then(function (problems) { assert.deepEqual(problems, []); return Remote.list(repository); }) - .then(function(remoteNames) { + .then(function (remoteNames) { assert.deepEqual(remoteNames, ["origin2"]); return Remote.rename(repository, "origin2", "origin"); }) - .then(function(problems) { + .then(function (problems) { assert.deepEqual(problems, []); return Remote.list(repository); }) - .then(function(remoteNames) { + .then(function (remoteNames) { assert.deepEqual(remoteNames, ["origin"]); }); }); - it("can delete a remote", function() { + it("can delete a remote", function () { var repository = this.repository; return Remote.create(repository, "origin3", url) - .then(function() { + .then(function () { return Remote.delete(repository, "origin3"); }) - .then(function() { - return Remote.lookup(repository, "origin3") - // We only want to catch the failed lookup - .then(Promise.reject.bind(Promise), Promise.resolve.bind(Promise)); + .then(function () { + return ( + Remote.lookup(repository, "origin3") + // We only want to catch the failed lookup + .then(Promise.reject.bind(Promise), Promise.resolve.bind(Promise)) + ); }); }); - it("can download from a remote", function() { + it("can download from a remote", function () { var repo = this.repository; var remoteCallbacks; - return repo.getRemote("origin") - .then(function(remote) { - remoteCallbacks = { - certificateCheck: () => 0 - }; + return repo.getRemote("origin").then(function (remote) { + remoteCallbacks = { + certificateCheck: () => 0, + }; - return remote.connect(NodeGit.Enums.DIRECTION.FETCH, remoteCallbacks) - .then(function() { + return remote + .connect(NodeGit.Enums.DIRECTION.FETCH, remoteCallbacks) + .then(function () { return remote.download(null); - }).then(function() { + }) + .then(function () { return remote.disconnect(); }); - }); + }); }); - it("can monitor transfer progress while pushing", function() { + it("can monitor transfer progress while pushing", function () { var repo = this.repository; var wasCalled = false; - return Remote.create(repo, "bare", bareReposPath) - .then(function(remote) { - var fetchOpts = { - callbacks: { - pushTransferProgress: function() { - wasCalled = true; - } - } - }; + return Remote.create(repo, "bare", bareReposPath).then(function (remote) { + var fetchOpts = { + callbacks: { + pushTransferProgress: function () { + wasCalled = true; + }, + }, + }; - var ref = "refs/heads/master"; - var refs = [ref + ":" + ref]; + var ref = "refs/heads/master"; + var refs = [ref + ":" + ref]; - return remote.push(refs, fetchOpts) - .then(function(_res) { - assert.ok(wasCalled); - }); + return remote.push(refs, fetchOpts).then(function (_res) { + assert.ok(wasCalled); }); + }); }); - it("can monitor transfer progress while pushing with throttling", - function() { - var repo = this.repository; - var wasCalled = false; + it("can monitor transfer progress while pushing with throttling", function () { + var repo = this.repository; + var wasCalled = false; - return Remote.create(repo, "bare", bareReposPath) - .then(function(remote) { - var fetchOpts = { - callbacks: { - pushTransferProgress: { - throttle: 200, - callback: function() { - wasCalled = true; - }, - } - } - }; + return Remote.create(repo, "bare", bareReposPath).then(function (remote) { + var fetchOpts = { + callbacks: { + pushTransferProgress: { + throttle: 200, + callback: function () { + wasCalled = true; + }, + }, + }, + }; - var ref = "refs/heads/master"; - var refs = [ref + ":" + ref]; + var ref = "refs/heads/master"; + var refs = [ref + ":" + ref]; - return remote.push(refs, fetchOpts) - .then(function(_res) { - assert.ok(wasCalled); - }); - }); - } - ); + return remote.push(refs, fetchOpts).then(function (_res) { + assert.ok(wasCalled); + }); + }); + }); - it("can monitor transfer progress while downloading", function() { + it("can monitor transfer progress while downloading", function () { // Set a reasonable timeout here now that our repository has grown. this.timeout(600000); @@ -220,59 +216,62 @@ describe("Remote", function() { var wasCalled = false; return Remote.create(repo, "test2", url2) - .then(function(remote) { + .then(function (remote) { var fetchOpts = { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); }, certificateCheck: () => 0, - transferProgress: function() { + transferProgress: function () { wasCalled = true; - } - } + }, + }, }; return remote.fetch(null, fetchOpts, null); }) - .then(function() { + .then(function () { assert.ok(wasCalled); return Remote.delete(repo, "test2"); }); }); - it("can get the default branch of a remote", function() { + it("can get the default branch of a remote", function () { var remoteCallbacks = { - certificateCheck: () => 0 + certificateCheck: () => 0, }; var remote = this.remote; - return remote.connect(NodeGit.Enums.DIRECTION.FETCH, remoteCallbacks) - .then(function() { return remote.defaultBranch(); }) - .then(function(branchName) { + return remote + .connect(NodeGit.Enums.DIRECTION.FETCH, remoteCallbacks) + .then(function () { + return remote.defaultBranch(); + }) + .then(function (branchName) { assert.equal("refs/heads/master", branchName); }); }); - it("can fetch from a remote", function() { + it("can fetch from a remote", function () { return this.repository.fetch("origin", { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); }, - certificateCheck: () => 0 - } + certificateCheck: () => 0, + }, }); }); - it("can fetch from a private repository", function() { + it("can fetch from a private repository", function () { var repo = this.repository; var fetchOptions = { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyNew( userName, path.resolve("./test/nodegit-test-rsa.pub"), @@ -280,201 +279,201 @@ describe("Remote", function() { "" ); }, - certificateCheck: () => 0 - } + certificateCheck: () => 0, + }, }; return Remote.create(repo, "private", privateUrl) - .then(function(remote) { + .then(function (remote) { return remote.fetch(null, fetchOptions, "Fetch from private"); }) - .catch(function() { + .catch(function () { assert.fail("Unable to fetch from private repository"); }); }); - it("can reject fetching from private repository without valid credentials", - function() { - var repo = this.repository; - var firstPass = true; - var fetchOptions = { - callbacks: { - credentials: function(url, userName) { - if (firstPass) { - firstPass = false; - return NodeGit.Credential.sshKeyFromAgent(userName); - } - }, - certificateCheck: () => 0 - } - }; + it("can reject fetching from private repository without valid credentials", function () { + var repo = this.repository; + var firstPass = true; + var fetchOptions = { + callbacks: { + credentials: function (url, userName) { + if (firstPass) { + firstPass = false; + return NodeGit.Credential.sshKeyFromAgent(userName); + } + }, + certificateCheck: () => 0, + }, + }; - return Remote.create(repo, "private", privateUrl) - .then(function(remote) { - return remote.fetch(null, fetchOptions, "Fetch from private"); - }) - .then(function () { - assert.fail("Should not be able to fetch from repository"); - }) - .catch(function(error) { - assert.equal( - error.message.trim(), - "ERROR: Repository not found.", - "Should not be able to find repository." - ); - }); + return Remote.create(repo, "private", privateUrl) + .then(function (remote) { + return remote.fetch(null, fetchOptions, "Fetch from private"); + }) + .then(function () { + assert.fail("Should not be able to fetch from repository"); + }) + .catch(function (error) { + assert.equal(error.message.trim(), "ERROR: Repository not found.", "Should not be able to find repository."); + }); }); - it("can fetch from all remotes", function() { + it("can fetch from all remotes", function () { var repository = this.repository; return Remote.create(repository, "test1", url) - .then(function() { + .then(function () { return Remote.create(repository, "test2", url2); }) - .then(function() { + .then(function () { return repository.fetchAll({ callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { return NodeGit.Credential.sshKeyFromAgent(userName); }, - certificateCheck: () => 0 - } + certificateCheck: () => 0, + }, }); }); }); if (!isNode8) { - it("will reject if credentials promise rejects", function() { + it("will reject if credentials promise rejects", function () { var repo = this.repository; var branch = "should-not-exist"; return Remote.lookup(repo, "origin") - .then(function(remote) { - var ref = "refs/heads/" + branch; - var refs = [ref + ":" + ref]; - var options = { - callbacks: { - credentials: function(_url, _userName) { - var test = Promise.resolve("test") - .then(function() { return; }) - .then(function() { return; }) - .then(function() { return; }) - .then(function() { - return Promise.reject(new Error("failure case")); - }); - return test; + .then(function (remote) { + var ref = "refs/heads/" + branch; + var refs = [ref + ":" + ref]; + var options = { + callbacks: { + credentials: function (_url, _userName) { + var test = Promise.resolve("test") + .then(function () { + return; + }) + .then(function () { + return; + }) + .then(function () { + return; + }) + .then(function () { + return Promise.reject(new Error("failure case")); + }); + return test; + }, + certificateCheck: () => 0, }, - certificateCheck: () => 0 - } - }; - return remote.push(refs, options); - }) - .then(function() { - return Promise.reject( - new Error("should not be able to push to the repository")); - }, function(err) { - if (err.message === "failure case") - { - return Promise.resolve(); - } else { - throw err; - } + }; + return remote.push(refs, options); }) - .then(function() { + .then( + function () { + return Promise.reject(new Error("should not be able to push to the repository")); + }, + function (err) { + if (err.message === "failure case") { + return Promise.resolve(); + } else { + throw err; + } + } + ) + .then(function () { return Remote.lookup(repo, "origin"); }) - .then(function(remote) { + .then(function (remote) { var ref = "refs/heads/" + branch; var refs = [ref + ":" + ref]; var options = { callbacks: { - credentials: function(_url, _userName) { + credentials: function (_url, _userName) { var test = Promise.resolve() - .then(Promise.resolve.bind(Promise)) - .then(Promise.resolve.bind(Promise)) - .then(Promise.resolve.bind(Promise)) - .then(Promise.reject.bind(Promise)); + .then(Promise.resolve.bind(Promise)) + .then(Promise.resolve.bind(Promise)) + .then(Promise.resolve.bind(Promise)) + .then(Promise.reject.bind(Promise)); return test; }, - certificateCheck: () => 0 - } + certificateCheck: () => 0, + }, }; return remote.push(refs, options); }) - .then(function() { - return Promise.reject( - new Error("should not be able to push to the repository")); - }, function(err) { - if (err.message === "Method push has thrown an error.") - { + .then( + function () { + return Promise.reject(new Error("should not be able to push to the repository")); + }, + function (err) { + if (err.message === "Method push has thrown an error.") { return Promise.resolve(); } else { throw err; } - }); - }); + } + ); + }); - it("cannot push to a repository with invalid credentials", function() { - var repo = this.repository; - var branch = "should-not-exist"; - return Remote.lookup(repo, "origin") - .then(function(remote) { + it("cannot push to a repository with invalid credentials", function () { + var repo = this.repository; + var branch = "should-not-exist"; + return ( + Remote.lookup(repo, "origin") + .then(function (remote) { var ref = "refs/heads/" + branch; var refs = [ref + ":" + ref]; var firstPass = true; var options = { callbacks: { - credentials: function(url, userName) { + credentials: function (url, userName) { if (firstPass) { firstPass = false; if (url.indexOf("https") === -1) { return NodeGit.Credential.sshKeyFromAgent(userName); } else { - return NodeGit.Credential - .userpassPlaintextNew(userName, ""); + return NodeGit.Credential.userpassPlaintextNew(userName, ""); } } else { return Promise.reject(); } }, - certificateCheck: () => 0 - } + certificateCheck: () => 0, + }, }; return remote.push(refs, options); }) // takes care of windows bug, see the .catch for the proper pathway // that this flow should take (cred cb doesn't run twice -> // throws error) - .then(function() { - return Promise.reject( - new Error("should not be able to push to the repository")); - }, function(err) { + .then( + function () { + return Promise.reject(new Error("should not be able to push to the repository")); + }, + function (err) { if (err.message.indexOf(401) === -1) { throw err; } else { return Promise.resolve(); } - }) - // catches linux / osx failure to use anonymous credentials - // stops callback infinite loop - .catch(function (reason) { - const messageWithoutNewlines = reason.message.replace( - /\n|\r/g, - "" - ); - const validErrors = [ - "Method push has thrown an error.", - "failed to set credentials: The parameter is incorrect." - ]; - assert.ok( - _.includes(validErrors, messageWithoutNewlines), - "Unexpected error: " + reason.message - ); - }); - }); + } + ) + // catches linux / osx failure to use anonymous credentials + // stops callback infinite loop + .catch(function (reason) { + const messageWithoutNewlines = reason.message.replace(/\n|\r/g, ""); + const validErrors = [ + "Method push has thrown an error.", + "failed to set credentials: The parameter is incorrect.", + ]; + assert.ok(_.includes(validErrors, messageWithoutNewlines), "Unexpected error: " + reason.message); + }) + ); + }); } - it("is kept alive by refspec", function() { + it("is kept alive by refspec", function () { var repo = this.repository; var Remote = NodeGit.Remote; @@ -483,144 +482,139 @@ describe("Remote", function() { var startNonSelfFreeingCount = Remote.getNonSelfFreeingConstructedCount(); var resolve; - var promise = new Promise(function(_resolve) { resolve = _resolve; }); + var promise = new Promise(function (_resolve) { + resolve = _resolve; + }); var remote; - repo.getRemote("origin") - .then(function(_remote) { - remote = _remote; - setTimeout(resolve, 0); - }); + repo.getRemote("origin").then(function (_remote) { + remote = _remote; + setTimeout(resolve, 0); + }); - return promise - .then(function() { - // make sure we have created one self-freeing remote - assert.equal(startSelfFreeingCount + 1, - Remote.getSelfFreeingInstanceCount()); - assert.equal(startNonSelfFreeingCount, - Remote.getNonSelfFreeingConstructedCount()); - var refspec = remote.getRefspec(0); - assert.equal("refs/heads/*", refspec.src()); - remote = null; - garbageCollect(); - // the refspec should be holding on to the remote - assert.equal(startSelfFreeingCount + 1, - Remote.getSelfFreeingInstanceCount()); - - assert.equal("refs/heads/*", refspec.src()); - - refspec = null; - garbageCollect(); - // the remote should be freed now - assert.equal(startSelfFreeingCount, - Remote.getSelfFreeingInstanceCount()); - }); + return promise.then(function () { + // make sure we have created one self-freeing remote + assert.equal(startSelfFreeingCount + 1, Remote.getSelfFreeingInstanceCount()); + assert.equal(startNonSelfFreeingCount, Remote.getNonSelfFreeingConstructedCount()); + var refspec = remote.getRefspec(0); + assert.equal("refs/heads/*", refspec.src()); + remote = null; + garbageCollect(); + // the refspec should be holding on to the remote + assert.equal(startSelfFreeingCount + 1, Remote.getSelfFreeingInstanceCount()); + + assert.equal("refs/heads/*", refspec.src()); + + refspec = null; + garbageCollect(); + // the remote should be freed now + assert.equal(startSelfFreeingCount, Remote.getSelfFreeingInstanceCount()); + }); }); - it("can retrieve the list of references advertised by a remote", function() { + it("can retrieve the list of references advertised by a remote", function () { var expectedRemoteHeads = { HEAD: { local: 0, oid: "32789a79e71fbc9e04d3eff7425e1771eb595150", loid: "0000000000000000000000000000000000000000", name: "HEAD", - symrefTarget: "refs/heads/master" + symrefTarget: "refs/heads/master", }, "refs/heads/checkout-test": { local: 0, oid: "1729c73906bb8467f4095c2f4044083016b4dfde", loid: "0000000000000000000000000000000000000000", name: "refs/heads/checkout-test", - symrefTarget: null + symrefTarget: null, }, "refs/heads/master": { local: 0, oid: "32789a79e71fbc9e04d3eff7425e1771eb595150", loid: "0000000000000000000000000000000000000000", name: "refs/heads/master", - symrefTarget: null + symrefTarget: null, }, "refs/heads/rev-walk": { local: 0, oid: "32789a79e71fbc9e04d3eff7425e1771eb595150", loid: "0000000000000000000000000000000000000000", name: "refs/heads/rev-walk", - symrefTarget: null + symrefTarget: null, }, "refs/tags/annotated-tag": { local: 0, oid: "dc800017566123ff3c746b37284a24a66546667e", loid: "0000000000000000000000000000000000000000", name: "refs/tags/annotated-tag", - symrefTarget: null + symrefTarget: null, }, "refs/tags/annotated-tag^{}": { local: 0, oid: "32789a79e71fbc9e04d3eff7425e1771eb595150", loid: "0000000000000000000000000000000000000000", name: "refs/tags/annotated-tag^{}", - symrefTarget: null + symrefTarget: null, }, "refs/tags/light-weight-tag": { local: 0, oid: "32789a79e71fbc9e04d3eff7425e1771eb595150", loid: "0000000000000000000000000000000000000000", name: "refs/tags/light-weight-tag", - symrefTarget: null - } + symrefTarget: null, + }, }; - return this.repository.getRemote("origin") - .then(function(remote) { - return Promise.all([ - remote, - remote.connect(NodeGit.Enums.DIRECTION.FETCH) - ]); + return this.repository + .getRemote("origin") + .then(function (remote) { + return Promise.all([remote, remote.connect(NodeGit.Enums.DIRECTION.FETCH)]); }) - .then(function(results) { + .then(function (results) { var remote = results[0]; return Promise.all([remote, remote.referenceList()]); }) - .then(function(results) { + .then(function (results) { var remote = results[0]; var remoteHeads = results[1]; var remoteHeadsBySha = fp.flow([ - fp.map(function(remoteHead) { + fp.map(function (remoteHead) { return { local: remoteHead.local(), oid: remoteHead.oid().toString(), loid: remoteHead.loid().toString(), name: remoteHead.name(), - symrefTarget: remoteHead.symrefTarget() + symrefTarget: remoteHead.symrefTarget(), }; }), - fp.keyBy("name") + fp.keyBy("name"), ])(remoteHeads); fp.flow([ fp.keys, - fp.forEach(function(remoteHeadName) { - assert(fp.isEqual( - expectedRemoteHeads[remoteHeadName], - remoteHeadsBySha[remoteHeadName] - ), "Expectations for head " + remoteHeadName + " were not met."); - }) + fp.forEach(function (remoteHeadName) { + assert( + fp.isEqual(expectedRemoteHeads[remoteHeadName], remoteHeadsBySha[remoteHeadName]), + "Expectations for head " + remoteHeadName + " were not met." + ); + }), ])(expectedRemoteHeads); return remote.disconnect(); }); }); - it("will error when retrieving reference list if not connected", function() { - return this.repository.getRemote("origin") - .then(function(remote) { + it("will error when retrieving reference list if not connected", function () { + return this.repository + .getRemote("origin") + .then(function (remote) { return remote.referenceList(); }) - .then(function() { + .then(function () { assert.fail("Unconnected remote should have no reference list."); }) - .catch(function(notConnectedError) { + .catch(function (notConnectedError) { assert(notConnectedError.message === "this remote has never connected"); }); }); diff --git a/test/tests/repository.js b/test/tests/repository.js index 3332fffd4..1ff0b42c9 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -5,7 +5,7 @@ var local = path.join.bind(path, __dirname); var IndexUtils = require("../utils/index_setup"); var RepoUtils = require("../utils/repository_setup"); -describe("Repository", function() { +describe("Repository", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Index = NodeGit.Index; @@ -16,271 +16,247 @@ describe("Repository", function() { var newRepoPath = local("../repos/newrepo"); var emptyRepoPath = local("../repos/empty"); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(constReposPath) - .then(function(constRepository) { + .then(function (constRepository) { test.constRepository = constRepository; }) - .then(function() { + .then(function () { return Repository.open(reposPath); }) - .then(function(repository) { + .then(function (repository) { test.repository = repository; }) - .then(function() { + .then(function () { return Repository.open(emptyRepoPath); }) - .then(function(emptyRepo) { + .then(function (emptyRepo) { test.emptyRepo = emptyRepo; }); }); - it("cannot instantiate a repository", function() { + it("cannot instantiate a repository", function () { assert.throws( - function() { new Repository(); }, + function () { + new Repository(); + }, undefined, "hello" ); }); - it("can open a valid repository", function() { + it("can open a valid repository", function () { assert.ok(this.repository instanceof Repository); }); - it("cannot open an invalid repository", function() { - return Repository.open("repos/nonrepo") - .then(null, function(err) { - assert.ok(err instanceof Error); - }); + it("cannot open an invalid repository", function () { + return Repository.open("repos/nonrepo").then(null, function (err) { + assert.ok(err instanceof Error); + }); }); - it("does not try to open paths that don't exist", function() { + it("does not try to open paths that don't exist", function () { var missingPath = "/surely/this/directory/does/not/exist/on/this/machine"; - return Repository.open(missingPath) - .then(null, function(err) { - assert.ok(err instanceof Error); - }); + return Repository.open(missingPath).then(null, function (err) { + assert.ok(err instanceof Error); + }); }); - it("can initialize a repository into a folder", function() { - return Repository.init(newRepoPath, 1) - .then(function(_path, _isBare) { - return Repository.open(newRepoPath); - }); + it("can initialize a repository into a folder", function () { + return Repository.init(newRepoPath, 1).then(function (_path, _isBare) { + return Repository.open(newRepoPath); + }); }); - it("can utilize repository init options", function() { - return fse.remove(newRepoPath) - .then(function() { - return Repository.initExt(newRepoPath, { - flags: Repository.INIT_FLAG.MKPATH - }); + it("can utilize repository init options", function () { + return fse.remove(newRepoPath).then(function () { + return Repository.initExt(newRepoPath, { + flags: Repository.INIT_FLAG.MKPATH, }); + }); }); - it("can be cleaned", function() { + it("can be cleaned", function () { this.repository.cleanup(); // try getting a commit after cleanup (to test that the repo is usable) - return this.repository.getHeadCommit() - .then(function(commit) { - assert.equal( - commit.toString(), - "32789a79e71fbc9e04d3eff7425e1771eb595150" - ); - }); + return this.repository.getHeadCommit().then(function (commit) { + assert.equal(commit.toString(), "32789a79e71fbc9e04d3eff7425e1771eb595150"); + }); }); - it("can read the index", function() { - return this.repository.index() - .then(function(index) { - assert.ok(index instanceof Index); - }); + it("can read the index", function () { + return this.repository.index().then(function (index) { + assert.ok(index instanceof Index); + }); }); - it("can list remotes", function() { - return this.repository.getRemoteNames() - .then(function(remotes) { - assert.equal(remotes.length, 1); - assert.equal(remotes[0], "origin"); - }); + it("can list remotes", function () { + return this.repository.getRemoteNames().then(function (remotes) { + assert.equal(remotes.length, 1); + assert.equal(remotes[0], "origin"); + }); }); - it("can get the current branch", function() { - return this.repository.getCurrentBranch() - .then(function(branch) { - assert.equal(branch.shorthand(), "master"); - }); + it("can get the current branch", function () { + return this.repository.getCurrentBranch().then(function (branch) { + assert.equal(branch.shorthand(), "master"); + }); }); - it("can get a reference commit", function() { - return this.repository.getReferenceCommit("master") - .then(function(commit) { - assert.equal( - "32789a79e71fbc9e04d3eff7425e1771eb595150", - commit.toString() - ); - }); + it("can get a reference commit", function () { + return this.repository.getReferenceCommit("master").then(function (commit) { + assert.equal("32789a79e71fbc9e04d3eff7425e1771eb595150", commit.toString()); + }); }); - it("can get the default signature", function() { - this.repository.defaultSignature() - .then((sig) => { - assert(sig instanceof Signature); - }); + it("can get the default signature", function () { + this.repository.defaultSignature().then((sig) => { + assert(sig instanceof Signature); + }); }); - it("gets statuses with StatusFile", function() { + it("gets statuses with StatusFile", function () { var fileName = "my-new-file-that-shouldnt-exist.file"; var fileContent = "new file from repository test"; var repo = this.repository; var filePath = path.join(repo.workdir(), fileName); - return fse.writeFile(filePath, fileContent) - .then(function() { - return repo.getStatus().then(function(statuses) { + return fse + .writeFile(filePath, fileContent) + .then(function () { + return repo.getStatus().then(function (statuses) { assert.equal(statuses.length, 1); assert.equal(statuses[0].path(), fileName); assert.ok(statuses[0].isNew()); }); }) - .then(function() { + .then(function () { return fse.remove(filePath); }) .catch(function (e) { - return fse.remove(filePath) - .then(function() { - return Promise.reject(e); - }); + return fse.remove(filePath).then(function () { + return Promise.reject(e); + }); }); }); - it("gets extended statuses", function() { + it("gets extended statuses", function () { var fileName = "my-new-file-that-shouldnt-exist.file"; var fileContent = "new file from repository test"; var repo = this.repository; var filePath = path.join(repo.workdir(), fileName); - return fse.writeFile(filePath, fileContent) - .then(function() { + return fse + .writeFile(filePath, fileContent) + .then(function () { return repo.getStatusExt(); }) - .then(function(statuses) { + .then(function (statuses) { assert.equal(statuses.length, 1); assert.equal(statuses[0].path(), fileName); assert.equal(statuses[0].indexToWorkdir().newFile().path(), fileName); assert.ok(statuses[0].isNew()); }) - .then(function() { + .then(function () { return fse.remove(filePath); }) .catch(function (e) { - return fse.remove(filePath) - .then(function() { - return Promise.reject(e); - }); + return fse.remove(filePath).then(function () { + return Promise.reject(e); + }); }); }); - it("gets fetch-heads", function() { + it("gets fetch-heads", function () { var repo = this.repository; var foundMaster; - return repo.fetch("origin", { - credentials: function(url, userName) { - return NodeGit.Credential.sshKeyFromAgent(userName); - }, - certificateCheck: () => 0 - }) - .then(function() { - return repo.fetchheadForeach(function(refname, remoteUrl, oid, isMerge) { - if (refname == "refs/heads/master") { - foundMaster = true; - assert.equal(refname, "refs/heads/master"); - assert.equal(remoteUrl, "https://github.com/nodegit/test"); - assert.equal( - oid.toString(), - "32789a79e71fbc9e04d3eff7425e1771eb595150"); - assert.equal(isMerge, 1); + return repo + .fetch("origin", { + credentials: function (url, userName) { + return NodeGit.Credential.sshKeyFromAgent(userName); + }, + certificateCheck: () => 0, + }) + .then(function () { + return repo.fetchheadForeach(function (refname, remoteUrl, oid, isMerge) { + if (refname == "refs/heads/master") { + foundMaster = true; + assert.equal(refname, "refs/heads/master"); + assert.equal(remoteUrl, "https://github.com/nodegit/test"); + assert.equal(oid.toString(), "32789a79e71fbc9e04d3eff7425e1771eb595150"); + assert.equal(isMerge, 1); + } + }); + }) + .then(function () { + if (!foundMaster) { + throw new Error("Couldn't find master in iteration of fetch heads"); } }); - }) - .then(function() { - if (!foundMaster) { - throw new Error("Couldn't find master in iteration of fetch heads"); - } - }); }); function discover(ceiling) { var testPath = path.join(reposPath, "lib", "util", "normalize_oid.js"); var expectedPath = path.join(reposPath, ".git"); - return NodeGit.Repository.discover(testPath, 0, ceiling) - .then(function(foundPath) { - assert.equal(expectedPath, foundPath); - }); + return NodeGit.Repository.discover(testPath, 0, ceiling).then(function (foundPath) { + assert.equal(expectedPath, foundPath); + }); } - it("can discover if a path is part of a repository, null ceiling", - function() { + it("can discover if a path is part of a repository, null ceiling", function () { return discover(null); }); - it("can discover if a path is part of a repository, empty ceiling", - function() { + it("can discover if a path is part of a repository, empty ceiling", function () { return discover(""); }); - it("can create a repo using initExt", function() { - var initFlags = NodeGit.Repository.INIT_FLAG.NO_REINIT | - NodeGit.Repository.INIT_FLAG.MKPATH | - NodeGit.Repository.INIT_FLAG.MKDIR; - return fse.remove(newRepoPath) - .then(function() { + it("can create a repo using initExt", function () { + var initFlags = + NodeGit.Repository.INIT_FLAG.NO_REINIT | NodeGit.Repository.INIT_FLAG.MKPATH | NodeGit.Repository.INIT_FLAG.MKDIR; + return fse + .remove(newRepoPath) + .then(function () { return NodeGit.Repository.initExt(newRepoPath, { flags: initFlags }); }) - .then(function() { + .then(function () { return NodeGit.Repository.open(newRepoPath); }); }); - it("will throw when a repo cannot be initialized using initExt", function() { - var initFlags = NodeGit.Repository.INIT_FLAG.NO_REINIT | - NodeGit.Repository.INIT_FLAG.MKPATH | - NodeGit.Repository.INIT_FLAG.MKDIR; + it("will throw when a repo cannot be initialized using initExt", function () { + var initFlags = + NodeGit.Repository.INIT_FLAG.NO_REINIT | NodeGit.Repository.INIT_FLAG.MKPATH | NodeGit.Repository.INIT_FLAG.MKDIR; var nonsensePath = "gibberish"; return NodeGit.Repository.initExt(nonsensePath, { flags: initFlags }) - .then(function() { + .then(function () { assert.fail("Should have thrown an error."); }) - .catch(function(error) { + .catch(function (error) { assert(error, "Should have thrown an error."); }); }); - it("can get the head commit", function() { - return this.repository.getHeadCommit() - .then(function(commit) { - assert.equal( - commit.toString(), - "32789a79e71fbc9e04d3eff7425e1771eb595150" - ); - }); + it("can get the head commit", function () { + return this.repository.getHeadCommit().then(function (commit) { + assert.equal(commit.toString(), "32789a79e71fbc9e04d3eff7425e1771eb595150"); + }); }); - it("returns null if there is no head commit", function() { - return this.emptyRepo.getHeadCommit() - .then(function(commit) { - assert(!commit); - }); + it("returns null if there is no head commit", function () { + return this.emptyRepo.getHeadCommit().then(function (commit) { + assert(!commit); + }); }); - it("can commit on head on a empty repo with createCommitOnHead", function() { + it("can commit on head on a empty repo with createCommitOnHead", function () { const fileName = "my-new-file-that-shouldnt-exist.file"; const fileContent = "new file from repository test"; const repo = this.emptyRepo; @@ -289,32 +265,24 @@ describe("Repository", function() { let authSig; let commitSig; - return repo.defaultSignature() + return repo + .defaultSignature() .then((sig) => { authSig = sig; commitSig = sig; return fse.writeFile(filePath, fileContent); }) .then(() => { - return repo.createCommitOnHead( - [fileName], - authSig, - commitSig, - commitMsg - ); + return repo.createCommitOnHead([fileName], authSig, commitSig, commitMsg); }) .then((oidResult) => { - return repo.getHeadCommit() - .then(function(commit) { - assert.equal( - commit.toString(), - oidResult.toString() - ); - }); + return repo.getHeadCommit().then(function (commit) { + assert.equal(commit.toString(), oidResult.toString()); + }); }); }); - it("can get all merge heads in a repo with mergeheadForeach", function() { + it("can get all merge heads in a repo with mergeheadForeach", function () { var repo; var repoPath = local("../repos/merge-head"); var ourBranchName = "ours"; @@ -328,40 +296,28 @@ describe("Repository", function() { }; return RepoUtils.createRepository(repoPath) - .then(function(_repo) { + .then(function (_repo) { repo = _repo; - return IndexUtils.createConflict( - repo, - ourBranchName, - theirBranchName, - fileName - ); + return IndexUtils.createConflict(repo, ourBranchName, theirBranchName, fileName); }) - .then(function() { + .then(function () { return repo.getBranch(theirBranchName); }) - .then(function(_theirBranch) { + .then(function (_theirBranch) { // Write the MERGE_HEAD file manually since createConflict does not theirBranch = _theirBranch; - return fse.writeFile( - path.join(repoPath, ".git", "MERGE_HEAD"), - theirBranch.target().toString() + "\n" - ); + return fse.writeFile(path.join(repoPath, ".git", "MERGE_HEAD"), theirBranch.target().toString() + "\n"); }) - .then(function() { - return repo.mergeheadForeach( - assertBranchTargetIs.bind(this, theirBranch) - ); + .then(function () { + return repo.mergeheadForeach(assertBranchTargetIs.bind(this, theirBranch)); }) - .then(function() { + .then(function () { assert.equal(numMergeHeads, 1); }); }); - it("can obtain statistics from a valid constant repository", function() { - return this.constRepository.statistics() - .then(function(analysisReport) { - + it("can obtain statistics from a valid constant repository", function () { + return this.constRepository.statistics().then(function (analysisReport) { assert.equal(analysisReport.repositorySize.commits.count, 992); assert.equal(analysisReport.repositorySize.commits.size, 265544); assert.equal(analysisReport.repositorySize.trees.count, 2416); diff --git a/test/tests/reset.js b/test/tests/reset.js index 214bf08fd..85df56aea 100644 --- a/test/tests/reset.js +++ b/test/tests/reset.js @@ -3,7 +3,7 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); -describe("Reset", function() { +describe("Reset", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Reset = NodeGit.Reset; @@ -14,129 +14,127 @@ describe("Reset", function() { var previousCommitOid = "c82fb078a192ea221c9f1093c64321c60d64aa0d"; var filePath = "package.json"; - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repo = repository; return test.repo.getCommit(currentCommitOid); }) - .then(function(commit) { + .then(function (commit) { test.currentCommit = commit; return commit.getEntry(filePath); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { test.currentCommitBlob = blob; return test.repo.getCommit(previousCommitOid); }) - .then(function(commit) { + .then(function (commit) { test.previousCommit = commit; return commit.getEntry(filePath); }) - .then(function(entry) { + .then(function (entry) { return entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { test.previousCommitBlob = blob; }); }); - it("can reset a file to a previous commit", function() { + it("can reset a file to a previous commit", function () { var test = this; return Reset.default(test.repo, test.previousCommit, filePath) - .then(function() { - return test.repo.refreshIndex(); - }) - .then(function(index) { - return index.writeTree(); - }) - .then(function(oid) { - return test.repo.getTree(oid); - }) - .then(function(tree) { - return tree.getEntry(filePath); - }) - .then(function(entry) { - return entry.getBlob(); - }) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + .then(function () { + return test.repo.refreshIndex(); + }) + .then(function (index) { + return index.writeTree(); + }) + .then(function (oid) { + return test.repo.getTree(oid); + }) + .then(function (tree) { + return tree.getEntry(filePath); + }) + .then(function (entry) { + return entry.getBlob(); + }) + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - assert(resetContents != currentCommitContents); - assert(resetContents == previousCommitContents); - }) - .then(function() { - return Reset.default(test.repo, test.currentCommit, filePath); - }) - .then(function() { - return test.repo.refreshIndex(); - }) - .then(function(index) { - return index.writeTree(); - }) - .then(function(oid) { - return test.repo.getTree(oid); - }) - .then(function(tree) { - return tree.getEntry(filePath); - }) - .then(function(entry) { - return entry.getBlob(); - }) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + assert(resetContents != currentCommitContents); + assert(resetContents == previousCommitContents); + }) + .then(function () { + return Reset.default(test.repo, test.currentCommit, filePath); + }) + .then(function () { + return test.repo.refreshIndex(); + }) + .then(function (index) { + return index.writeTree(); + }) + .then(function (oid) { + return test.repo.getTree(oid); + }) + .then(function (tree) { + return tree.getEntry(filePath); + }) + .then(function (entry) { + return entry.getBlob(); + }) + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - assert(resetContents == currentCommitContents); - assert(resetContents != previousCommitContents); - }); + assert(resetContents == currentCommitContents); + assert(resetContents != previousCommitContents); + }); }); function resetFrom(repo, commit, resetType, annotated) { var promise = null; if (annotated) { - promise = AnnotatedCommit.lookup(repo, commit.id()) - .then(function(annotatedCommit) { + promise = AnnotatedCommit.lookup(repo, commit.id()).then(function (annotatedCommit) { return Reset.fromAnnotated(repo, annotatedCommit, resetType); }); } else { promise = Reset.reset(repo, commit, resetType); } return promise - .then(function() { - return repo.refreshIndex(); - }) - .then(function(index) { - return index.writeTree(); - }) - .then(function(oid) { - return repo.getTree(oid); - }) - .then(function(tree) { - return tree.getEntry(filePath); - }) - .then(function(entry) { - return entry.getBlob(); - }); + .then(function () { + return repo.refreshIndex(); + }) + .then(function (index) { + return index.writeTree(); + }) + .then(function (oid) { + return repo.getTree(oid); + }) + .then(function (tree) { + return tree.getEntry(filePath); + }) + .then(function (entry) { + return entry.getBlob(); + }); } - it("can perform a soft reset", function() { + it("can perform a soft reset", function () { var test = this; - return resetFrom(test.repo, test.previousCommit, Reset.TYPE.SOFT, false) - .then(function(blob) { + return resetFrom(test.repo, test.previousCommit, Reset.TYPE.SOFT, false).then(function (blob) { var currentCommitContents = test.currentCommitBlob.toString(); var previousCommitContents = test.previousCommitBlob.toString(); var resetContents = blob.toString(); @@ -151,11 +149,10 @@ describe("Reset", function() { }); }); - it("can perform an annotated soft reset", function() { + it("can perform an annotated soft reset", function () { var test = this; - return resetFrom(test.repo, test.previousCommit, Reset.TYPE.SOFT, true) - .then(function(blob) { + return resetFrom(test.repo, test.previousCommit, Reset.TYPE.SOFT, true).then(function (blob) { var currentCommitContents = test.currentCommitBlob.toString(); var previousCommitContents = test.previousCommitBlob.toString(); var resetContents = blob.toString(); @@ -170,142 +167,135 @@ describe("Reset", function() { }); }); - it("can perform a mixed reset", function() { + it("can perform a mixed reset", function () { var test = this; return resetFrom(test.repo, test.previousCommit, Reset.TYPE.MIXED, false) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - // With a mixed reset all of the changes should removed from the index - // but still in the working directory. (i.e. unstaged) - assert(resetContents != currentCommitContents); - assert(resetContents == previousCommitContents); + // With a mixed reset all of the changes should removed from the index + // but still in the working directory. (i.e. unstaged) + assert(resetContents != currentCommitContents); + assert(resetContents == previousCommitContents); - return fse.readFile(path.join(test.repo.workdir(), filePath)); - }) - .then(function(fileContents) { - var currentCommitContents = test.currentCommitBlob.toString(); + return fse.readFile(path.join(test.repo.workdir(), filePath)); + }) + .then(function (fileContents) { + var currentCommitContents = test.currentCommitBlob.toString(); - assert(fileContents == currentCommitContents); + assert(fileContents == currentCommitContents); - return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); - }); + return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); + }); }); - it("can perform an annotated mixed reset", function() { + it("can perform an annotated mixed reset", function () { var test = this; return resetFrom(test.repo, test.previousCommit, Reset.TYPE.MIXED, true) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - // With a mixed reset all of the changes should removed from the index - // but still in the working directory. (i.e. unstaged) - assert(resetContents != currentCommitContents); - assert(resetContents == previousCommitContents); + // With a mixed reset all of the changes should removed from the index + // but still in the working directory. (i.e. unstaged) + assert(resetContents != currentCommitContents); + assert(resetContents == previousCommitContents); - return fse.readFile(path.join(test.repo.workdir(), filePath)); - }) - .then(function(fileContents) { - var currentCommitContents = test.currentCommitBlob.toString(); + return fse.readFile(path.join(test.repo.workdir(), filePath)); + }) + .then(function (fileContents) { + var currentCommitContents = test.currentCommitBlob.toString(); - assert(fileContents == currentCommitContents); + assert(fileContents == currentCommitContents); - return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); - }); + return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); + }); }); - it("can perform a hard reset", function() { + it("can perform a hard reset", function () { var test = this; return resetFrom(test.repo, test.previousCommit, Reset.TYPE.HARD, false) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - // With a hard reset all of the changes should removed from the index - // and also removed from the working directory - assert(resetContents != currentCommitContents); - assert(resetContents == previousCommitContents); + // With a hard reset all of the changes should removed from the index + // and also removed from the working directory + assert(resetContents != currentCommitContents); + assert(resetContents == previousCommitContents); - return fse.readFile(path.join(test.repo.workdir(), filePath)); - }) - .then(function(fileContents) { - var previousCommitContents = test.previousCommitBlob.toString(); + return fse.readFile(path.join(test.repo.workdir(), filePath)); + }) + .then(function (fileContents) { + var previousCommitContents = test.previousCommitBlob.toString(); - assert(fileContents == previousCommitContents); + assert(fileContents == previousCommitContents); - return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); - }); + return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); + }); }); - it("can perform an annotated hard reset", function() { + it("can perform an annotated hard reset", function () { var test = this; return resetFrom(test.repo, test.previousCommit, Reset.TYPE.HARD, true) - .then(function(blob) { - var currentCommitContents = test.currentCommitBlob.toString(); - var previousCommitContents = test.previousCommitBlob.toString(); - var resetContents = blob.toString(); + .then(function (blob) { + var currentCommitContents = test.currentCommitBlob.toString(); + var previousCommitContents = test.previousCommitBlob.toString(); + var resetContents = blob.toString(); - // With a hard reset all of the changes should removed from the index - // and also removed from the working directory - assert(resetContents != currentCommitContents); - assert(resetContents == previousCommitContents); + // With a hard reset all of the changes should removed from the index + // and also removed from the working directory + assert(resetContents != currentCommitContents); + assert(resetContents == previousCommitContents); - return fse.readFile(path.join(test.repo.workdir(), filePath)); - }) - .then(function(fileContents) { - var previousCommitContents = test.previousCommitBlob.toString(); + return fse.readFile(path.join(test.repo.workdir(), filePath)); + }) + .then(function (fileContents) { + var previousCommitContents = test.previousCommitBlob.toString(); - assert(fileContents == previousCommitContents); + assert(fileContents == previousCommitContents); - return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); - }); + return Reset.reset(test.repo, test.currentCommit, Reset.TYPE.HARD); + }); }); - it("reset fails if parameter is not a Commit object", function() { + it("reset fails if parameter is not a Commit object", function () { var test = this; var commit = test.repo.getReferenceCommit("master"); try { Reset.reset(test.repo, commit, Reset.TYPE.HARD); - assert.fail( - "Should not be able to pass a Promise (Commit) into the function" - ); + assert.fail("Should not be able to pass a Promise (Commit) into the function"); } catch (err) { // ok - assert.equal( - "Repository and target commit's repository does not match", - err.message - ); + assert.equal("Repository and target commit's repository does not match", err.message); } }); - it("reset fails if originating repository is not the same", function() { + it("reset fails if originating repository is not the same", function () { var test = this; var testCommit = null; - return test.repo.getReferenceCommit("master") - .then(function(commit) { - testCommit = commit; - return Repository.open(reposPath); - }) - .then(function(repo) { - return Reset.reset(repo, testCommit, Reset.TYPE.HARD); - }) - .then(function() { - assert.fail("Different source repository instance should fail"); - }) - .catch(function(err) { - assert.equal( - "Repository and target commit's repository does not match", - err.message - ); - }); + return test.repo + .getReferenceCommit("master") + .then(function (commit) { + testCommit = commit; + return Repository.open(reposPath); + }) + .then(function (repo) { + return Reset.reset(repo, testCommit, Reset.TYPE.HARD); + }) + .then(function () { + assert.fail("Different source repository instance should fail"); + }) + .catch(function (err) { + assert.equal("Repository and target commit's repository does not match", err.message); + }); }); }); diff --git a/test/tests/revert.js b/test/tests/revert.js index accb529ca..1a354084f 100644 --- a/test/tests/revert.js +++ b/test/tests/revert.js @@ -5,7 +5,7 @@ var path = require("path"); var fs = require("fs"); var local = path.join.bind(path, __dirname); -describe("Revert", function() { +describe("Revert", function () { var NodeGit = require("../../"); var Revert = NodeGit.Revert; @@ -16,42 +16,37 @@ describe("Revert", function() { var fileName = "foobar.js"; var repoPath = local("../repos/revertRepo"); - beforeEach(function() { + beforeEach(function () { test = this; return RepoUtils.createRepository(repoPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; - return RepoUtils.commitFileToRepo( - repository, - fileName, - "line1\nline2\nline3" - ); + return RepoUtils.commitFileToRepo(repository, fileName, "line1\nline2\nline3"); }) - .then(function(firstCommit) { + .then(function (firstCommit) { test.firstCommit = firstCommit; }); }); - it("revert modifies the working directoy", function() { + it("revert modifies the working directoy", function () { var fileStats = fs.statSync(path.join(repoPath, fileName)); assert.ok(fileStats.isFile()); - return Revert.revert(test.repository, test.firstCommit, new RevertOptions()) - .then(function() { - try { - fs.statSync(path.join(repoPath, fileName)); - } catch (e) { - // we expect this not to exist - return; - } + return Revert.revert(test.repository, test.firstCommit, new RevertOptions()).then(function () { + try { + fs.statSync(path.join(repoPath, fileName)); + } catch (e) { + // we expect this not to exist + return; + } - assert.fail("Working directory was not reverted"); - }); + assert.fail("Working directory was not reverted"); + }); }); - it("revert modifies the index", function() { + it("revert modifies the index", function () { return Revert.revert(test.repository, test.firstCommit, new RevertOptions()) .then(() => test.repository.getStatus()) .then((status) => { @@ -61,24 +56,21 @@ describe("Revert", function() { }); }); - it("RevertOptions is optional (unspecified)", function() { - return Revert.revert(test.repository, test.firstCommit) - .catch(function(error) { - throw error; - }); + it("RevertOptions is optional (unspecified)", function () { + return Revert.revert(test.repository, test.firstCommit).catch(function (error) { + throw error; + }); }); - it("RevertOptions is optional (null)", function() { - return Revert.revert(test.repository, test.firstCommit, null) - .catch(function(error) { - throw error; - }); + it("RevertOptions is optional (null)", function () { + return Revert.revert(test.repository, test.firstCommit, null).catch(function (error) { + throw error; + }); }); - it("RevertOptions without MergeOptions should not segfault", function() { - return Revert.revert(test.repository, test.firstCommit, {}) - .catch(function(error) { - throw error; - }); + it("RevertOptions without MergeOptions should not segfault", function () { + return Revert.revert(test.repository, test.firstCommit, {}).catch(function (error) { + throw error; + }); }); }); diff --git a/test/tests/revparse.js b/test/tests/revparse.js index 84ed44ca8..28377d009 100644 --- a/test/tests/revparse.js +++ b/test/tests/revparse.js @@ -2,65 +2,57 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Revparse", function() { +describe("Revparse", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Revparse = NodeGit.Revparse; var reposPath = local("../repos/workdir"); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return test.repository.getHeadCommit(); }) - .then(function(commit) { + .then(function (commit) { test.commit = commit; }); }); - it("can revparse HEAD commit with single method", function() { + it("can revparse HEAD commit with single method", function () { var test = this; - return Revparse.single(this.repository, "HEAD") - .then(function(headCommit) { - assert.ok(headCommit.isCommit()); - assert.equal(headCommit.id().toString(), test.commit.id().toString()); - }); + return Revparse.single(this.repository, "HEAD").then(function (headCommit) { + assert.ok(headCommit.isCommit()); + assert.equal(headCommit.id().toString(), test.commit.id().toString()); + }); }); - it("will fail on invalid spec", function() { + it("will fail on invalid spec", function () { return Revparse.single(this.repository, "INVALID") - .then(function() { - - }) - .catch(function(error) { + .then(function () {}) + .catch(function (error) { assert.ok(error instanceof Error); assert.equal(error.message, "revspec 'INVALID' not found"); }); }); - it("will fail without repo", function() { + it("will fail without repo", function () { return Revparse.single("", "INVALID") - .then(function() { - - }) - .catch(function(error) { + .then(function () {}) + .catch(function (error) { assert.ok(error instanceof Error); assert.equal(error.message, "Repository repo is required."); }); }); - it("will fail without spec", function() { + it("will fail without spec", function () { return Revparse.single(this.repository) - .then(function() { - - }) - .catch(function(error) { + .then(function () {}) + .catch(function (error) { assert.ok(error instanceof Error); assert.equal(error.message, "String spec is required."); }); }); - }); diff --git a/test/tests/revwalk.js b/test/tests/revwalk.js index 79b830248..0805d0e95 100644 --- a/test/tests/revwalk.js +++ b/test/tests/revwalk.js @@ -6,7 +6,7 @@ var local = path.join.bind(path, __dirname); var leakTest = require("../utils/leak_test"); -describe("Revwalk", function() { +describe("Revwalk", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Revwalk = NodeGit.Revwalk; @@ -17,14 +17,14 @@ describe("Revwalk", function() { // Set a reasonable timeout here now that our repository has grown. this.timeout(120000); - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return test.repository.getBranchCommit("rev-walk"); }) - .then(function(commit) { + .then(function (commit) { test.commit = commit; }) .then(function () { @@ -34,60 +34,55 @@ describe("Revwalk", function() { }); }); - it("can create a walker", function() { + it("can create a walker", function () { assert.ok(this.walker instanceof Revwalk); }); - it("can push an object", function() { + it("can push an object", function () { var sha = this.commit.sha(); - return this.walker.next() - .then(function(commit) { - assert.equal(sha, commit); - }); + return this.walker.next().then(function (commit) { + assert.equal(sha, commit); + }); }); - it("can hide an object", function() { + it("can hide an object", function () { var test = this; return next(test.walker, 4) - .then(function(commit) { - assert.equal(commit.toString(), - "b8a94aefb22d0534cc0e5acf533989c13d8725dc"); + .then(function (commit) { + assert.equal(commit.toString(), "b8a94aefb22d0534cc0e5acf533989c13d8725dc"); test.walker = test.repository.createRevWalk(); test.walker.push(test.commit.id()); - test.walker.hide( - Oid.fromString("b8a94aefb22d0534cc0e5acf533989c13d8725dc")); + test.walker.hide(Oid.fromString("b8a94aefb22d0534cc0e5acf533989c13d8725dc")); return next(test.walker, 3); }) - .then(function(commit) { - assert.equal(commit.toString(), - "95f695136203a372751c19b6353aeb5ae32ea40e"); - return next(test.walker, 1); + .then(function (commit) { + assert.equal(commit.toString(), "95f695136203a372751c19b6353aeb5ae32ea40e"); + return next(test.walker, 1); }) - .then(function(commit) { + .then(function (commit) { assert.equal(commit, undefined); }); }); - it("can simplify to first parent", function() { + it("can simplify to first parent", function () { var test = this; test.walker.simplifyFirstParent(); - return next(test.walker, 3) - .then(function(commit) { - assert.equal(commit.toString(), - "b8a94aefb22d0534cc0e5acf533989c13d8725dc"); - }); + return next(test.walker, 3).then(function (commit) { + assert.equal(commit.toString(), "b8a94aefb22d0534cc0e5acf533989c13d8725dc"); + }); }); - it("can get a specified number of commits", function() { + it("can get a specified number of commits", function () { var test = this; var storedCommits; - return test.walker.getCommits(10) - .then(function(commits) { + return test.walker + .getCommits(10) + .then(function (commits) { assert.equal(commits.length, 10); storedCommits = commits; test.walker = test.repository.createRevWalk(); @@ -95,7 +90,7 @@ describe("Revwalk", function() { return test.walker.getCommits(8); }) - .then(function(commits) { + .then(function (commits) { assert.equal(commits.length, 8); for (var i = 0; i < 8; i++) { assert.equal(commits[i].toString(), storedCommits[i].toString()); @@ -103,20 +98,18 @@ describe("Revwalk", function() { }); }); - it("can get the largest number of commits within a specified range", - function() { - var test = this; - var _storedCommits; - return test.walker.getCommits(991) - .then(function(commits) { - assert.equal(commits.length, 990); - _storedCommits = commits; - test.walker = test.repository.createRevWalk(); - test.walker.push(test.commit.id()); - }); + it("can get the largest number of commits within a specified range", function () { + var test = this; + var _storedCommits; + return test.walker.getCommits(991).then(function (commits) { + assert.equal(commits.length, 990); + _storedCommits = commits; + test.walker = test.repository.createRevWalk(); + test.walker.push(test.commit.id()); }); + }); - it("will return all commits from the revwalk if nothing matches", function() { + it("will return all commits from the revwalk if nothing matches", function () { var test = this; var magicSha = "notintherepoatallwhatsoeverisntthatcool"; @@ -124,13 +117,12 @@ describe("Revwalk", function() { return commit.toString() != magicSha; } - return test.walker.getCommitsUntil(checkCommit) - .then(function(commits) { - assert.equal(commits.length, 990); - }); + return test.walker.getCommitsUntil(checkCommit).then(function (commits) { + assert.equal(commits.length, 990); + }); }); - it("can get commits until you tell it not to", function() { + it("can get commits until you tell it not to", function () { var test = this; var magicSha = "b8a94aefb22d0534cc0e5acf533989c13d8725dc"; @@ -138,25 +130,23 @@ describe("Revwalk", function() { return commit.toString() != magicSha; } - return test.walker.getCommitsUntil(checkCommit) - .then(function(commits) { - assert.equal(commits.length, 4); - assert.equal(commits[commits.length-1].toString(), magicSha); - }); + return test.walker.getCommitsUntil(checkCommit).then(function (commits) { + assert.equal(commits.length, 4); + assert.equal(commits[commits.length - 1].toString(), magicSha); + }); }); - it("can do a fast walk", function() { + it("can do a fast walk", function () { var test = this; var magicSha = "b8a94aefb22d0534cc0e5acf533989c13d8725dc"; - return test.walker.fastWalk(10) - .then(function(commitOids) { - assert.equal(commitOids.length, 10); - assert.equal(commitOids[3].toString(), magicSha); - }); + return test.walker.fastWalk(10).then(function (commitOids) { + assert.equal(commitOids.length, 10); + assert.equal(commitOids[3].toString(), magicSha); + }); }); - it("can get the history of a file", function() { + it("can get the history of a file", function () { var test = this; var magicShas = [ "6ed3027eda383d417457b99b38c73f88f601c368", @@ -165,22 +155,21 @@ describe("Revwalk", function() { "96f077977eb1ffcb63f9ce766cdf110e9392fdf5", "694adc5369687c47e02642941906cfc5cb21e6c2", "eebd0ead15d62eaf0ba276da53af43bbc3ce43ab", - "1273fff13b3c28cfdb13ba7f575d696d2a8902e1" + "1273fff13b3c28cfdb13ba7f575d696d2a8902e1", ]; - return test.walker.fileHistoryWalk("include/functions/copy.h", 1000) - .then(function(results) { - var shas = results.map(function(result) { - return result.commit.sha(); - }); - assert.equal(magicShas.length, shas.length); - magicShas.forEach(function(sha, i) { - assert.equal(sha, shas[i]); - }); + return test.walker.fileHistoryWalk("include/functions/copy.h", 1000).then(function (results) { + var shas = results.map(function (result) { + return result.commit.sha(); }); + assert.equal(magicShas.length, shas.length); + magicShas.forEach(function (sha, i) { + assert.equal(sha, shas[i]); + }); + }); }); - it("can get the history of a dir", function() { + it("can get the history of a dir", function () { var test = this; var magicShas = [ "6ed3027eda383d417457b99b38c73f88f601c368", @@ -195,40 +184,36 @@ describe("Revwalk", function() { "1c71929a905da9faab64472d53815d46ff4391dd", "3947245612ae27077517038704b7a679e742658e", "a44c81558d0f72ccf6c1facbe2ba0b9b711586a9", - "01d469416b26340ee4922d5171ef8dbe46c879f4" + "01d469416b26340ee4922d5171ef8dbe46c879f4", ]; - return test.walker.fileHistoryWalk("include/functions", 1000) - .then(function(results) { - var shas = results.map(function(result) { - return result.commit.sha(); - }); - assert.equal(magicShas.length, shas.length); - magicShas.forEach(function(sha, i) { - assert.equal(sha, shas[i]); - }); + return test.walker.fileHistoryWalk("include/functions", 1000).then(function (results) { + var shas = results.map(function (result) { + return result.commit.sha(); }); + assert.equal(magicShas.length, shas.length); + magicShas.forEach(function (sha, i) { + assert.equal(sha, shas[i]); + }); + }); }); - it("can get the history of a file while ignoring parallel branches", - function() { + it("can get the history of a file while ignoring parallel branches", function () { var test = this; - var magicShas = [ - "f80e085e3118bbd6aad49dad7c53bdc37088bf9b", - "907b29d8a3b765570435c922a59cd849836a7b51" - ]; + var magicShas = ["f80e085e3118bbd6aad49dad7c53bdc37088bf9b", "907b29d8a3b765570435c922a59cd849836a7b51"]; var shas; var walker = test.repository.createRevWalk(); walker.sorting(NodeGit.Revwalk.SORT.TIME); walker.push("115d114e2c4d5028c7a78428f16a4528c51be7dd"); - return walker.fileHistoryWalk("README.md", 15) - .then(function(results) { - shas = results.map(function(result) { + return walker + .fileHistoryWalk("README.md", 15) + .then(function (results) { + shas = results.map(function (result) { return result.commit.sha(); }); assert.equal(magicShas.length, shas.length); - magicShas.forEach(function(sha, i) { + magicShas.forEach(function (sha, i) { assert.equal(sha, shas[i]); }); @@ -237,7 +222,7 @@ describe("Revwalk", function() { "4a34168b80fe706f52417106821c9cbfec630e47", "f80e085e3118bbd6aad49dad7c53bdc37088bf9b", "694b2d703a02501f288269bea7d1a5d643a83cc8", - "907b29d8a3b765570435c922a59cd849836a7b51" + "907b29d8a3b765570435c922a59cd849836a7b51", ]; walker = test.repository.createRevWalk(); @@ -246,104 +231,95 @@ describe("Revwalk", function() { return walker.fileHistoryWalk("README.md", 50); }) - .then(function(results) { - shas = results.map(function(result) { + .then(function (results) { + shas = results.map(function (result) { return result.commit.sha(); }); assert.equal(magicShas.length, shas.length); - magicShas.forEach(function(sha, i) { + magicShas.forEach(function (sha, i) { assert.equal(sha, shas[i]); }); }); }); - it("can yield information about renames in a file history walk", - function() { + it("can yield information about renames in a file history walk", function () { var treeOid; var repo; var fileNameA = "a.txt"; var fileNameB = "b.txt"; var repoPath = local("../repos/renamedFileRepo"); - var signature = NodeGit.Signature.create("Foo bar", - "foo@bar.com", 123456789, 60); + var signature = NodeGit.Signature.create("Foo bar", "foo@bar.com", 123456789, 60); var headCommit; return RepoUtils.createRepository(repoPath) - .then(function(r) { + .then(function (r) { repo = r; - return RepoUtils.commitFileToRepo( - repo, - fileNameA, - "line1\nline2\nline3\n" - ); + return RepoUtils.commitFileToRepo(repo, fileNameA, "line1\nline2\nline3\n"); }) - .then(function() { - return fse.move( - path.join(repoPath, fileNameA), - path.join(repoPath, fileNameB) - ); + .then(function () { + return fse.move(path.join(repoPath, fileNameA), path.join(repoPath, fileNameB)); }) - .then(function() { + .then(function () { return repo.refreshIndex(); }) - .then(function(index) { - return index.addByPath(fileNameB) - .then(function() { + .then(function (index) { + return index + .addByPath(fileNameB) + .then(function () { return index.removeByPath(fileNameA); }) - .then(function() { + .then(function () { return index.write(); }) - .then(function() { + .then(function () { return index.writeTree(); }); }) - .then(function(oidResult) { + .then(function (oidResult) { treeOid = oidResult; return NodeGit.Reference.nameToId(repo, "HEAD"); }) - .then(function(head) { + .then(function (head) { return repo.getCommit(head); }) - .then(function(head) { - return repo.createCommit("HEAD", signature, signature, - "renamed commit", treeOid, [head]); + .then(function (head) { + return repo.createCommit("HEAD", signature, signature, "renamed commit", treeOid, [head]); }) - .then(function() { + .then(function () { return NodeGit.Reference.nameToId(repo, "HEAD"); }) - .then(function(commitOid) { + .then(function (commitOid) { headCommit = commitOid.tostrS(); var walker = repo.createRevWalk(); walker.sorting(NodeGit.Revwalk.SORT.TIME); walker.push(commitOid.tostrS()); return walker.fileHistoryWalk(fileNameB, 5); }) - .then(function(results) { + .then(function (results) { assert.equal(results[0].status, NodeGit.Diff.DELTA.RENAMED); assert.equal(results[0].newName, fileNameB); assert.equal(results[0].oldName, fileNameA); }) - .then(function() { + .then(function () { var walker = repo.createRevWalk(); walker.sorting(NodeGit.Revwalk.SORT.TIME); walker.push(headCommit); return walker.fileHistoryWalk(fileNameA, 5); }) - .then(function(results) { + .then(function (results) { assert.equal(results[0].status, NodeGit.Diff.DELTA.RENAMED); assert.equal(results[0].newName, fileNameB); assert.equal(results[0].oldName, fileNameA); }) - .then(function() { + .then(function () { return fse.remove(repoPath); }); }); - it("does not leak", function() { + it("does not leak", function () { var test = this; - return leakTest(NodeGit.Revwalk, function() { + return leakTest(NodeGit.Revwalk, function () { const walker = test.repository.createRevWalk(); walker.push("115d114e2c4d5028c7a78428f16a4528c51be7dd"); return walker.next(); @@ -355,12 +331,12 @@ describe("Revwalk", function() { // [testglob]` var testGC = global.gc ? it : it.skip; - testGC("doesnt segfault when accessing .author() twice", function(done) { - Repository.open(reposPath).then(function(repository) { + testGC("doesnt segfault when accessing .author() twice", function (done) { + Repository.open(reposPath).then(function (repository) { var walker = repository.createRevWalk(); - repository.getMasterCommit().then(function(firstCommitOnMaster) { - walker.walk(firstCommitOnMaster.id(), function(err, commit) { + repository.getMasterCommit().then(function (firstCommitOnMaster) { + walker.walk(firstCommitOnMaster.id(), function (err, commit) { if (err && err.errno === NodeGit.Error.CODE.ITEROVER) { return done(); } @@ -369,7 +345,7 @@ describe("Revwalk", function() { commit.author().name(); commit.author().email(); - if ( i % 250 === 0) { + if (i % 250 === 0) { global.gc(); } } @@ -383,12 +359,11 @@ describe("Revwalk", function() { for (var i = 0; i < count; i++) { if (!promise) { promise = walker.next(); - } - else { + } else { promise = promise.then(getNext); } } - return promise.catch(function(error) { + return promise.catch(function (error) { if (error && error.errno === NodeGit.Error.CODE.ITEROVER) { return Promise.resolve(); } else { diff --git a/test/tests/signature.js b/test/tests/signature.js index b785fcfee..3fafdd69f 100644 --- a/test/tests/signature.js +++ b/test/tests/signature.js @@ -5,7 +5,7 @@ var local = path.join.bind(path, __dirname); var garbageCollect = require("../utils/garbage_collect.js"); var exec = require("../../utils/execPromise"); -describe("Signature", function() { +describe("Signature", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Signature = NodeGit.Signature; @@ -17,7 +17,7 @@ describe("Signature", function() { var arbitraryDate = 123456789; var timezoneOffset = 60; - it("can be created at an arbitrary time", function() { + it("can be created at an arbitrary time", function () { var create = Signature.create; var signature = create(name, email, arbitraryDate, timezoneOffset); @@ -27,11 +27,11 @@ describe("Signature", function() { assert.equal(signature.when().offset(), 60); }); - it("can be created now", function() { + it("can be created now", function () { var signature = Signature.now(name, email); var now = new Date(); var when = signature.when(); - var diff = Math.abs(when.time() - now/1000); + var diff = Math.abs(when.time() - now / 1000); assert.equal(signature.name(), name); assert.equal(signature.email(), email); @@ -41,56 +41,53 @@ describe("Signature", function() { assert.equal(when.offset(), -now.getTimezoneOffset()); }); - it("can get a default signature when no user name is set", function() { + it("can get a default signature when no user name is set", function () { var savedUserName; var savedUserEmail; var cleanUp = () => { - return exec("git config --global user.name \"" + savedUserName + "\"") - .then(() => { - exec("git config --global user.email \"" + savedUserEmail + "\""); + return exec('git config --global user.name "' + savedUserName + '"').then(() => { + exec('git config --global user.email "' + savedUserEmail + '"'); }); }; return exec("git config --global user.name") - .then((userName) => { - savedUserName = userName.trim(); - - return exec("git config --global user.email"); - }) - .then((userEmail) => { - savedUserEmail = userEmail.trim(); - - return exec("git config --global --unset user.name"); - }) - .then(() => { - return exec("git config --global --unset user.email"); - }) - .then(() => { - return Repository.open(reposPath); - }) - .then((repo) => { - return repo.defaultSignature(); - }) - .then((sig) => { - assert.equal(sig.name(), "unknown"); - assert.equal(sig.email(), "unknown@example.com"); - }) - .then(cleanUp) - .catch((e) => { - return cleanUp() - .then(function() { - return Promise.reject(e); + .then((userName) => { + savedUserName = userName.trim(); + + return exec("git config --global user.email"); + }) + .then((userEmail) => { + savedUserEmail = userEmail.trim(); + + return exec("git config --global --unset user.name"); + }) + .then(() => { + return exec("git config --global --unset user.email"); + }) + .then(() => { + return Repository.open(reposPath); + }) + .then((repo) => { + return repo.defaultSignature(); + }) + .then((sig) => { + assert.equal(sig.name(), "unknown"); + assert.equal(sig.email(), "unknown@example.com"); + }) + .then(cleanUp) + .catch((e) => { + return cleanUp().then(function () { + return Promise.reject(e); + }); }); - }); }); - it("duplicates time", function() { + it("duplicates time", function () { garbageCollect(); var Time = NodeGit.Time; var startSelfFreeingCount = Time.getSelfFreeingInstanceCount(); - var startNonSelfFreeingCount = - Time.getNonSelfFreeingConstructedCount(); + var startNonSelfFreeingCount = Time.getNonSelfFreeingConstructedCount(); var time = Signature.now(name, email).when(); garbageCollect(); @@ -109,27 +106,14 @@ describe("Signature", function() { }); it("toString does not provide a timestamp by default", function () { - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); assert.equal(signature.toString(), "Shaggy Rogers "); }); - it("toString provides the correct timestamp when requested", function() { - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); - - assert.equal( - signature.toString(true), - "Shaggy Rogers 987654321 +0130" - ); + it("toString provides the correct timestamp when requested", function () { + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); + + assert.equal(signature.toString(true), "Shaggy Rogers 987654321 +0130"); }); }); diff --git a/test/tests/stage.js b/test/tests/stage.js index 99dd7b0e5..12cfc5141 100644 --- a/test/tests/stage.js +++ b/test/tests/stage.js @@ -5,235 +5,211 @@ var fse = require("fs-extra"); var exec = require("../../utils/execPromise"); -describe("Stage", function() { +describe("Stage", function () { var RepoUtils = require("../utils/repository_setup"); var NodeGit = require("../../"); - var test; + var test; - beforeEach(function() { + beforeEach(function () { test = this; - var repoDir = "../repos/stagingRepo/"; + var repoDir = "../repos/stagingRepo/"; var repoPath = path.resolve(__dirname, repoDir); - return RepoUtils.createRepository(repoPath) - .then(function(repo) { - test.repository = repo; - }); + return RepoUtils.createRepository(repoPath).then(function (repo) { + test.repository = repo; + }); }); - after(function() { - return fse.remove(test.repository.workdir()); + after(function () { + return fse.remove(test.repository.workdir()); }); function stagingTest(isUnstaged, newFileContent, discarding) { - var fileContent = newFileContent || - "One line of text\n" + - "Two lines of text\n"+ - "Three lines of text\n"+ - "Four lines of text\n"+ - "Five lines of text\n"+ - "Six lines of text\n"+ - "Seven lines of text\n"+ - "Eight lines of text\n"+ - "Nine lines of text\n"+ - "Ten lines of text\n"+ - "Eleven lines of text\n"+ - "Twelve lines of text\n"+ - "Thirteen lines of text\n"+ - "Fourteen lines of text\n"+ - "Fifteen lines of text\n"+ - "Sixteen lines of text\n"+ - "Seventeen lines of text\n"+ - "Eighteen lines of text\n"+ - "Nineteen lines of text\n"+ - "Twenty lines of text\n"; + var fileContent = + newFileContent || + "One line of text\n" + + "Two lines of text\n" + + "Three lines of text\n" + + "Four lines of text\n" + + "Five lines of text\n" + + "Six lines of text\n" + + "Seven lines of text\n" + + "Eight lines of text\n" + + "Nine lines of text\n" + + "Ten lines of text\n" + + "Eleven lines of text\n" + + "Twelve lines of text\n" + + "Thirteen lines of text\n" + + "Fourteen lines of text\n" + + "Fifteen lines of text\n" + + "Sixteen lines of text\n" + + "Seventeen lines of text\n" + + "Eighteen lines of text\n" + + "Nineteen lines of text\n" + + "Twenty lines of text\n"; var fileName = "stagedLinesTest.txt"; var expectedContent; var workingDirFile; var getDiffFunction; if (!isUnstaged || discarding) { - expectedContent = fileContent.replace("Three", "Changed three") - .replace("Seventeen", "Changed seventeen"); + expectedContent = fileContent.replace("Three", "Changed three").replace("Seventeen", "Changed seventeen"); workingDirFile = expectedContent.replace("Fifteen", "Changed fifteen"); - } - else { + } else { expectedContent = fileContent.replace("Fifteen", "Changed fifteen"); - workingDirFile = expectedContent.replace("Three", "Changed three") - .replace("Seventeen", "Changed seventeen"); + workingDirFile = expectedContent.replace("Three", "Changed three").replace("Seventeen", "Changed seventeen"); } if (isUnstaged) { - getDiffFunction = function() { - return test.repository.refreshIndex() - .then(function(index) { - return NodeGit.Diff.indexToWorkdir( - test.repository, - index, - { - flags: - NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | - NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS - } - ); + getDiffFunction = function () { + return test.repository.refreshIndex().then(function (index) { + return NodeGit.Diff.indexToWorkdir(test.repository, index, { + flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS, }); + }); }; - } - else { - getDiffFunction = function() { + } else { + getDiffFunction = function () { return RepoUtils.addFileToIndex(test.repository, fileName) - .then(function() { + .then(function () { return test.repository.getBranchCommit("master"); }) - .then(function(masterCommit) { + .then(function (masterCommit) { var treePromise = masterCommit.getTree(); var indexPromise = test.repository.refreshIndex(); return Promise.all([treePromise, indexPromise]); }) - .then(function(treeAndIndex) { + .then(function (treeAndIndex) { var masterTree = treeAndIndex[0]; var index = treeAndIndex[1]; - return NodeGit.Diff.treeToIndex( - test.repository, - masterTree, - index, - { - flags: - NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | - NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS - } - ); + return NodeGit.Diff.treeToIndex(test.repository, masterTree, index, { + flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS, + }); }); }; } return RepoUtils.commitFileToRepo(test.repository, fileName, fileContent) - .then(function() { - return fse.writeFile(path.join(test.repository.workdir(), fileName), - workingDirFile); - }) - .then(function() { - return getDiffFunction(); - }) - .then(function(fileDiff) { - return fileDiff.patches(); - }) - .then(function(patches) { - var pathPatch = patches.filter(function(patch) { - return patch.newFile().path() === fileName; - }); - return pathPatch[0].hunks(); - }) - .then(function(pathHunks) { - var linePromises = []; + .then(function () { + return fse.writeFile(path.join(test.repository.workdir(), fileName), workingDirFile); + }) + .then(function () { + return getDiffFunction(); + }) + .then(function (fileDiff) { + return fileDiff.patches(); + }) + .then(function (patches) { + var pathPatch = patches.filter(function (patch) { + return patch.newFile().path() === fileName; + }); + return pathPatch[0].hunks(); + }) + .then(function (pathHunks) { + var linePromises = []; - pathHunks.forEach(function(pathHunk) { - linePromises.push(pathHunk.lines()); - }); + pathHunks.forEach(function (pathHunk) { + linePromises.push(pathHunk.lines()); + }); - return Promise.all(linePromises); - }) - .then(function(lines) { - var linesToStage = []; - lines.forEach(function(hunkLines) { - hunkLines.forEach(function(line) { - if (line.content().toLowerCase().indexOf("fifteen") >= 0){ - linesToStage.push(line); - } + return Promise.all(linePromises); + }) + .then(function (lines) { + var linesToStage = []; + lines.forEach(function (hunkLines) { + hunkLines.forEach(function (line) { + if (line.content().toLowerCase().indexOf("fifteen") >= 0) { + linesToStage.push(line); + } + }); }); - }); - if (discarding) { - return test.repository.discardLines(fileName, linesToStage); - } + if (discarding) { + return test.repository.discardLines(fileName, linesToStage); + } - return test.repository.stageLines(fileName, linesToStage, !isUnstaged); - }) - .then(function() { - if (discarding) { - return fse.readFile( - path.join(test.repository.workdir(), fileName), "utf8" - ); - } + return test.repository.stageLines(fileName, linesToStage, !isUnstaged); + }) + .then(function () { + if (discarding) { + return fse.readFile(path.join(test.repository.workdir(), fileName), "utf8"); + } - return test.repository.refreshIndex() - .then(function(reloadedIndex) { + return test.repository.refreshIndex().then(function (reloadedIndex) { var pathOid = reloadedIndex.getByPath(fileName).id; return test.repository.getBlob(pathOid); }); - }) - .then(function(resultFileContents) { - assert.equal(resultFileContents.toString(), expectedContent); - }); + }) + .then(function (resultFileContents) { + assert.equal(resultFileContents.toString(), expectedContent); + }); } - it("can stage selected lines", function() { + it("can stage selected lines", function () { return stagingTest(true); }); - it("can unstage selected lines", function() { + it("can unstage selected lines", function () { return stagingTest(false); }); //This is used to test cases where there are no newline at EOF var newlineEofTestFileContent = - "One line of text\n" + - "Two lines of text\n"+ - "Three lines of text\n"+ - "Four lines of text\n"+ - "Five lines of text\n"+ - "Six lines of text\n"+ - "Seven lines of text\n"+ - "Eight lines of text\n"+ - "Nine lines of text\n"+ - "Ten lines of text\n"+ - "Eleven lines of text\n"+ - "Twelve lines of text\n"+ - "Thirteen lines of text\n"+ - "Fourteen lines of text\n"+ - "Fifteen lines of text"; - it("can stage last line with no newline at EOF", function() { + "One line of text\n" + + "Two lines of text\n" + + "Three lines of text\n" + + "Four lines of text\n" + + "Five lines of text\n" + + "Six lines of text\n" + + "Seven lines of text\n" + + "Eight lines of text\n" + + "Nine lines of text\n" + + "Ten lines of text\n" + + "Eleven lines of text\n" + + "Twelve lines of text\n" + + "Thirteen lines of text\n" + + "Fourteen lines of text\n" + + "Fifteen lines of text"; + it("can stage last line with no newline at EOF", function () { return stagingTest(true, newlineEofTestFileContent); }); - it("can unstage last line with no newline at EOF", function() { + it("can unstage last line with no newline at EOF", function () { return stagingTest(false, newlineEofTestFileContent); }); - it("can stage second to last line with no newline at EOF", function() { - var newlineEofTestFileContent2 = newlineEofTestFileContent + - "\nSixteen lines of text\nSeventeen lines of text\nEighteen lines of text"; + it("can stage second to last line with no newline at EOF", function () { + var newlineEofTestFileContent2 = + newlineEofTestFileContent + "\nSixteen lines of text\nSeventeen lines of text\nEighteen lines of text"; return stagingTest(true, newlineEofTestFileContent2); }); - it("can unstage second to last line with no newline at EOF", function() { - var newlineEofTestFileContent2 = newlineEofTestFileContent + - "\nSixteen lines of text\nSeventeen lines of text\nEighteen lines of text"; + it("can unstage second to last line with no newline at EOF", function () { + var newlineEofTestFileContent2 = + newlineEofTestFileContent + "\nSixteen lines of text\nSeventeen lines of text\nEighteen lines of text"; return stagingTest(false, newlineEofTestFileContent2); }); //This is used to test case where the last hunk is staged. var lastHunkStagedFileContent = - "Thirteen lines of text\n"+ - "Fourteen lines of text\n"+ - "Fifteen lines of text\n"+ - "Sixteen lines of text\n"+ - "Shforteenteen lines of text\n"; + "Thirteen lines of text\n" + + "Fourteen lines of text\n" + + "Fifteen lines of text\n" + + "Sixteen lines of text\n" + + "Shforteenteen lines of text\n"; - it("staging last hunk stages whole file if no filemode changes", function() { + it("staging last hunk stages whole file if no filemode changes", function () { return stagingTest(true, lastHunkStagedFileContent) - .then(function() { + .then(function () { return test.repository.refreshIndex(); }) - .then(function(index) { + .then(function (index) { return NodeGit.Diff.indexToWorkdir(test.repository, index, { - flags: - NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | - NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS - }); + flags: NodeGit.Diff.OPTION.SHOW_UNTRACKED_CONTENT | NodeGit.Diff.OPTION.RECURSE_UNTRACKED_DIRS, + }); }) - .then(function(diff) { - assert.equal(Object.keys(diff).length, 0); //Empty diff + .then(function (diff) { + assert.equal(Object.keys(diff).length, 0); //Empty diff return diff.patches(); }) - .then(function(patches) { + .then(function (patches) { //patches will have at least one item if there is something unstaged assert.equal(patches.length, 0); }); @@ -245,30 +221,30 @@ describe("Stage", function() { //staging tests for which this helper fn was written. //index - index to use (vsWorkdir is unset) //fileModeDifference - expected (newfilemode) - (oldfilemode) - return test.repository.getHeadCommit() - .then(function(commit) { + return test.repository + .getHeadCommit() + .then(function (commit) { return commit.getTree(); }) - .then(function(tree) { + .then(function (tree) { if (vsWorkdir) { return NodeGit.Diff.treeToWorkdir(test.repository, tree); } else { return NodeGit.Diff.treeToIndex(test.repository, tree, index); } }) - .then(function(diff) { + .then(function (diff) { return diff.getDelta(0); }) - .then(function(delta) { + .then(function (delta) { if (fileModeDifference === 0) { if (!delta) { return true; } else { - throw ("File change when no file change expected."); + throw "File change when no file change expected."; } } else { - assert(delta.newFile().mode() - delta.oldFile().mode() === - fileModeDifference); + assert(delta.newFile().mode() - delta.oldFile().mode() === fileModeDifference); } return true; }); @@ -276,249 +252,228 @@ describe("Stage", function() { function createAndCommitFiles(repo, filePaths, fileContent, afterWriteFn) { filePaths = filePaths instanceof Array ? filePaths : [filePaths]; - var filePromises = filePaths.map(function(fileName) { + var filePromises = filePaths.map(function (fileName) { return RepoUtils.commitFileToRepo(repo, fileName, fileContent) - .then(function() { - //First, create a file, have the same file in both the repo and workdir. - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); - }) - .then(function() { - return afterWriteFn(repo, fileName); - }); + .then(function () { + //First, create a file, have the same file in both the repo and workdir. + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function () { + return afterWriteFn(repo, fileName); + }); }); return Promise.all(filePromises); } if (process.platform == "linux" || process.platform == "darwin") { - it("can stage filemode changes for one file", function() { + it("can stage filemode changes for one file", function () { var fileContent = "Blek"; var fileName = "stageFilemodeTest.txt"; var index; function afterWriteFn(repo, fileName) { - return fse.chmod(path.join(repo.workdir(), fileName), - 0755 /* new filemode */); + return fse.chmod(path.join(repo.workdir(), fileName), 0755 /* new filemode */); } - return createAndCommitFiles( - test.repository, fileName, fileContent, afterWriteFn - ) - //Then, diff between head commit and workdir should have filemode change - .then(function() { - return compareFilemodes(true, null, 0111 /* expect +x */) - .then(function() { - return test.repository.stageFilemode(fileName, true); - }); - }) - //Now lets do a commit... - .then(function() { - return test.repository.refreshIndex(); - }) - .then(function(_index) { - index = _index; - return index.writeTree(); - }) - .then(function (oid) { - return test.repository.getHeadCommit() - .then(function(parent) { - var signature = NodeGit.Signature.create("Foo bar", - "foo@bar.com", 123456789, 60); - return test.repository.createCommit("HEAD", signature, signature, - "initial commit", oid, [parent]); - }); - //... alright, we did a commit. - }) - // Now if we compare head commit to the workdir, - // there shouldn't be a filemode change - .then(function() { - return compareFilemodes(true, null, 0); - }); + return ( + createAndCommitFiles(test.repository, fileName, fileContent, afterWriteFn) + //Then, diff between head commit and workdir should have filemode change + .then(function () { + return compareFilemodes(true, null, 0111 /* expect +x */).then(function () { + return test.repository.stageFilemode(fileName, true); + }); + }) + //Now lets do a commit... + .then(function () { + return test.repository.refreshIndex(); + }) + .then(function (_index) { + index = _index; + return index.writeTree(); + }) + .then(function (oid) { + return test.repository.getHeadCommit().then(function (parent) { + var signature = NodeGit.Signature.create("Foo bar", "foo@bar.com", 123456789, 60); + return test.repository.createCommit("HEAD", signature, signature, "initial commit", oid, [parent]); + }); + //... alright, we did a commit. + }) + // Now if we compare head commit to the workdir, + // there shouldn't be a filemode change + .then(function () { + return compareFilemodes(true, null, 0); + }) + ); }); - it("can unstage filemode changes", function() { + it("can unstage filemode changes", function () { var fileContent = "Blek"; var fileName = "stageFilemodeTest2.txt"; var index; function afterWriteFn(repo, fileName) { - return fse.chmod(path.join(repo.workdir(), fileName), - 0755 /* new filemode */); + return fse.chmod(path.join(repo.workdir(), fileName), 0755 /* new filemode */); } - return createAndCommitFiles( - test.repository, - fileName, - fileContent, - afterWriteFn - ) - //Then, diff between head commit and workdir should have filemode change - .then(function() { - return compareFilemodes(true, null, 0111 /* expect +x */); - }) - .then(function() { - return test.repository.refreshIndex(); - }) - .then(function(repoIndex) { - //Now we stage the whole file... - index = repoIndex; - return index.addByPath(fileName); - }) - .then(function() { - return index.write(); - }) - .then(function() { - //We expect the Index to have the filemode changes now. - return compareFilemodes(false, index, 0111 /* expect +x */) - .then(function() { - //...then we attempt to unstage filemode - return test.repository.stageFilemode(fileName, false /* unstage */); - }); - }) - .then(function() { - return test.repository.refreshIndex(); - }) - //We expect the Index to have no filemode changes, since we unstaged. - .then(function(freshIndex) { - return compareFilemodes(false, freshIndex, 0 /* expect +x */); - }) - //We also expect the workdir to now have the filemode change. - .then(function() { - return compareFilemodes(true, null, 0111 /* expect +x */); - }); + return ( + createAndCommitFiles(test.repository, fileName, fileContent, afterWriteFn) + //Then, diff between head commit and workdir should have filemode change + .then(function () { + return compareFilemodes(true, null, 0111 /* expect +x */); + }) + .then(function () { + return test.repository.refreshIndex(); + }) + .then(function (repoIndex) { + //Now we stage the whole file... + index = repoIndex; + return index.addByPath(fileName); + }) + .then(function () { + return index.write(); + }) + .then(function () { + //We expect the Index to have the filemode changes now. + return compareFilemodes(false, index, 0111 /* expect +x */).then(function () { + //...then we attempt to unstage filemode + return test.repository.stageFilemode(fileName, false /* unstage */); + }); + }) + .then(function () { + return test.repository.refreshIndex(); + }) + //We expect the Index to have no filemode changes, since we unstaged. + .then(function (freshIndex) { + return compareFilemodes(false, freshIndex, 0 /* expect +x */); + }) + //We also expect the workdir to now have the filemode change. + .then(function () { + return compareFilemodes(true, null, 0111 /* expect +x */); + }) + ); }); } else if (process.platform == "win32") { - it("can stage/unstage filemode changes for one file", function() { + it("can stage/unstage filemode changes for one file", function () { var fileContent = "Blek"; var fileName = "stageFilemodeTest.txt"; var index; function afterWriteFn(repo, fileName) { //change the permission on index - return exec("git update-index --chmod=+x " + fileName, - {cwd: repo.workdir()}) - .then(function() { - //Commit the change with execute bit set - return exec("git commit -m 'test'", - {cwd: repo.workdir()}); + return exec("git update-index --chmod=+x " + fileName, { cwd: repo.workdir() }) + .then(function () { + //Commit the change with execute bit set + return exec("git commit -m 'test'", { cwd: repo.workdir() }); + }) + .then(function () { + //Then, change the permission on index + return exec("git update-index --chmod=-x " + fileName, { cwd: repo.workdir() }); + }); + } + + return createAndCommitFiles(test.repository, fileName, fileContent, afterWriteFn) + .then(function () { + return test.repository.refreshIndex(); + }) + .then(function (repoIndex) { + index = repoIndex; + //Head commit vs index + //We expect the Index to have +x + return compareFilemodes(false, index, -0111 /* expect +x */); }) - .then(function() { - //Then, change the permission on index - return exec("git update-index --chmod=-x " + fileName, - {cwd: repo.workdir()}); + .then(function () { + //...then we attempt to unstage filemode + return test.repository.stageFilemode(fileName, false /* unstage */); + }) + .then(function () { + return test.repository.refreshIndex(); + }) + .then(function (freshIndex) { + return compareFilemodes(false, freshIndex, 0 /* expect nochange */); }); - } + }); + } - return createAndCommitFiles( - test.repository, fileName, fileContent, afterWriteFn - ) - .then(function() { + it("can stage/unstage filemode changes for multiple files", function () { + var fileContent = "Blek"; + var fileName = ["stageFilemodeTest.txt", "stageFilemodeTest2.txt"]; + var index; + + var repoWorkDir = test.repository.workdir(); + var signature = NodeGit.Signature.create("Foo bar", "foo@bar.com", 123456789, 60); + + return Promise.all( + fileName.map(function (file) { + return fse.writeFile(path.join(repoWorkDir, file), fileContent); + }) + ) + .then(function () { + // Initial commit return test.repository.refreshIndex(); }) - .then(function(repoIndex) { + .then(function (index) { + return fileName + .reduce(function (lastPromise, file) { + return lastPromise.then(function () { + return index.addByPath(file); + }); + }, Promise.resolve()) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }) + .then(function (oid) { + return test.repository.createCommit("HEAD", signature, signature, "initial commit", oid, []); + }) + .then(function (commitOid) { + return test.repository.getCommit(commitOid); + }) + .then(function () { + //change the permission on index + return exec("git update-index --chmod=+x " + fileName[0], { cwd: test.repository.workdir() }); + }) + .then(function () { + //change the permission on index + return exec("git update-index --chmod=+x " + fileName[1], { cwd: test.repository.workdir() }); + }) + .then(function () { + //Commit the change with execute bit set + return exec("git commit -m 'test'", { cwd: test.repository.workdir() }); + }) + .then(function () { + //Then, change the permission on index back to -x + return exec("git update-index --chmod=-x " + fileName[0], { cwd: test.repository.workdir() }); + }) + .then(function () { + //Then, change the permission on index back to -x + return exec("git update-index --chmod=-x " + fileName[1], { cwd: test.repository.workdir() }); + }) + .then(function () { + return test.repository.refreshIndex(); + }) + .then(function (repoIndex) { index = repoIndex; //Head commit vs index //We expect the Index to have +x return compareFilemodes(false, index, -0111 /* expect +x */); }) - .then(function() { + .then(function () { //...then we attempt to unstage filemode return test.repository.stageFilemode(fileName, false /* unstage */); }) - .then(function() { + .then(function () { return test.repository.refreshIndex(); }) - .then(function(freshIndex) { + .then(function (freshIndex) { return compareFilemodes(false, freshIndex, 0 /* expect nochange */); }); - }); - } - - it("can stage/unstage filemode changes for multiple files", function() { - var fileContent = "Blek"; - var fileName = ["stageFilemodeTest.txt", "stageFilemodeTest2.txt"]; - var index; - - var repoWorkDir = test.repository.workdir(); - var signature = NodeGit.Signature.create("Foo bar", - "foo@bar.com", 123456789, 60); - - return Promise.all(fileName.map(function(file) { - return fse.writeFile(path.join(repoWorkDir, file), fileContent); - })) - .then(function() { - // Initial commit - return test.repository.refreshIndex(); - }) - .then(function(index) { - return fileName - .reduce(function(lastPromise, file) { - return lastPromise - .then(function() { - return index.addByPath(file); - }); - }, Promise.resolve()) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }) - .then(function(oid) { - return test.repository.createCommit("HEAD", signature, signature, - "initial commit", oid, []); - }) - .then(function(commitOid) { - return test.repository.getCommit(commitOid); - }) - .then(function() { - //change the permission on index - return exec("git update-index --chmod=+x " + fileName[0], - {cwd: test.repository.workdir()}); - }) - .then(function() { - //change the permission on index - return exec("git update-index --chmod=+x " + fileName[1], - {cwd: test.repository.workdir()}); - }) - .then(function() { - //Commit the change with execute bit set - return exec("git commit -m 'test'", - {cwd: test.repository.workdir()}); - }) - .then(function() { - //Then, change the permission on index back to -x - return exec("git update-index --chmod=-x " + fileName[0], - {cwd: test.repository.workdir()}); - }) - .then(function() { - //Then, change the permission on index back to -x - return exec("git update-index --chmod=-x " + fileName[1], - {cwd: test.repository.workdir()}); - }) - .then(function() { - return test.repository.refreshIndex(); - }) - .then(function(repoIndex) { - index = repoIndex; - //Head commit vs index - //We expect the Index to have +x - return compareFilemodes(false, index, -0111 /* expect +x */); - }) - .then(function() { - //...then we attempt to unstage filemode - return test.repository.stageFilemode(fileName, false /* unstage */); - }) - .then(function() { - return test.repository.refreshIndex(); - }) - .then(function(freshIndex) { - return compareFilemodes(false, freshIndex, 0 /* expect nochange */); - }); }); - it("can discard selected lines", function() { + it("can discard selected lines", function () { return stagingTest(true, null, true); }); }); diff --git a/test/tests/stash.js b/test/tests/stash.js index 7bfa7e9a4..5021e6a91 100644 --- a/test/tests/stash.js +++ b/test/tests/stash.js @@ -3,31 +3,29 @@ var path = require("path"); var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); -describe("Stash", function() { +describe("Stash", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Stash = NodeGit.Stash; var reposPath = local("../repos/workdir"); - before(function() { + before(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("gets no stashes on clean working directory", function() { + it("gets no stashes on clean working directory", function () { var stashes = []; - var stashCb = function(index, message, oid) { - stashes.push({index: index, message: message, oid: oid}); + var stashCb = function (index, message, oid) { + stashes.push({ index: index, message: message, oid: oid }); }; - return Stash.foreach(this.repository, stashCb) - .then(function() { - assert.equal(stashes.length, 0); - }); + return Stash.foreach(this.repository, stashCb).then(function () { + assert.equal(stashes.length, 0); + }); }); function saveDropStash(repo, stashMessage) { @@ -38,7 +36,8 @@ describe("Stash", function() { let stashes = []; let stashOid; - return fse.readFile(filePath) + return fse + .readFile(filePath) .then((content) => { oldContent = content; return fse.writeFile(filePath, fileContent); @@ -49,8 +48,8 @@ describe("Stash", function() { }) .then((oid) => { stashOid = oid; - var stashCb = function(index, message, oid) { - stashes.push({index: index, message: message, oid: oid}); + var stashCb = function (index, message, oid) { + stashes.push({ index: index, message: message, oid: oid }); }; return Stash.foreach(repo, stashCb); @@ -58,9 +57,9 @@ describe("Stash", function() { .then(() => { assert.equal(stashes.length, 1); assert.equal(stashes[0].index, 0); - const expectedMessage = !stashMessage ? - "WIP on master: 32789a7 Fixes EJS not being installed via NPM" : - "On master: " + stashMessage; + const expectedMessage = !stashMessage + ? "WIP on master: 32789a7 Fixes EJS not being installed via NPM" + : "On master: " + stashMessage; assert.equal(stashes[0].message, expectedMessage); assert.equal(stashes[0].oid.toString(), stashOid.toString()); @@ -69,7 +68,7 @@ describe("Stash", function() { .then(() => { stashes = []; var stashCb = (index, message, oid) => { - stashes.push({index: index, message: message, oid: oid}); + stashes.push({ index: index, message: message, oid: oid }); }; return Stash.foreach(repo, stashCb); @@ -78,22 +77,21 @@ describe("Stash", function() { assert.equal(stashes.length, 0); }) .catch((e) => { - return fse.writeFile(filePath, oldContent) - .then(() => { - return Promise.reject(e); - }); + return fse.writeFile(filePath, oldContent).then(() => { + return Promise.reject(e); + }); }); } - it("can save and drop a stash", function() { + it("can save and drop a stash", function () { return saveDropStash(this.repository, "stash test"); }); - it("can save a stash with no message and drop it", function() { + it("can save a stash with no message and drop it", function () { return saveDropStash(this.repository, null); }); - it("can save and pop a stash", function() { + it("can save and pop a stash", function () { const fileNameA = "README.md"; const fileNameB = "install.js"; let oldContentA; @@ -104,7 +102,8 @@ describe("Stash", function() { const filePathB = path.join(repo.workdir(), fileNameB); const stashMessage = "stash test"; - return fse.readFile(filePathA, "utf-8") + return fse + .readFile(filePathA, "utf-8") .then((content) => { oldContentA = content; return fse.writeFile(filePathA, fileContent); @@ -143,84 +142,88 @@ describe("Stash", function() { }); }); - it("can save a stash, change files, and fail to pop stash", function() { - const fileName = "README.md"; - const fileContent = "Cha-cha-cha-chaaaaaangessssss"; - const fileContent2 = "Somewhere over the repo, changes were made."; - const repo = this.repository; - const filePath = path.join(repo.workdir(), fileName); - // eslint-disable-next-line no-unused-vars - let oldContent; - const stashMessage = "stash test"; + it("can save a stash, change files, and fail to pop stash", function () { + const fileName = "README.md"; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const fileContent2 = "Somewhere over the repo, changes were made."; + const repo = this.repository; + const filePath = path.join(repo.workdir(), fileName); + // eslint-disable-next-line no-unused-vars + let oldContent; + const stashMessage = "stash test"; - return fse.readFile(filePath) - .then((content) => { - // eslint-disable-next-line no-unused-vars - oldContent = content; - return fse.writeFile(filePath, fileContent); - }) - .then(() => repo.defaultSignature()) - .then((signature) => { - return Stash.save(repo, signature, stashMessage, 0); - }) - .then(() => { - return fse.writeFile(filePath, fileContent2); - }) - .then(() => { - return Stash.pop(repo, 0); - }) - .catch((reason) => { - if (reason.message !== "1 conflict prevents checkout") { - throw reason; - } else { - return Promise.resolve(); - } - }); + return fse + .readFile(filePath) + .then((content) => { + // eslint-disable-next-line no-unused-vars + oldContent = content; + return fse.writeFile(filePath, fileContent); + }) + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); + }) + .then(() => { + return fse.writeFile(filePath, fileContent2); + }) + .then(() => { + return Stash.pop(repo, 0); + }) + .catch((reason) => { + if (reason.message !== "1 conflict prevents checkout") { + throw reason; + } else { + return Promise.resolve(); + } + }); }); - it("can save, apply, then drop the stash", function() { - const fileName = "README.md"; - const fileContent = "Cha-cha-cha-chaaaaaangessssss"; - const repo = this.repository; - const filePath = path.join(repo.workdir(), fileName); - // eslint-disable-next-line no-unused-vars - let oldContent; - const stashMessage = "stash test"; + it("can save, apply, then drop the stash", function () { + const fileName = "README.md"; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const repo = this.repository; + const filePath = path.join(repo.workdir(), fileName); + // eslint-disable-next-line no-unused-vars + let oldContent; + const stashMessage = "stash test"; - return fse.readFile(filePath) - .then((content) => { - // eslint-disable-next-line no-unused-vars - oldContent = content; - return fse.writeFile(filePath, fileContent); - }) - .then(() => repo.defaultSignature()) - .then((signature) => { - return Stash.save(repo, signature, stashMessage, 0); - }) - .then(() => { - return Stash.apply(repo, 0); - }) - .then(() => { + return fse + .readFile(filePath) + .then((content) => { + // eslint-disable-next-line no-unused-vars + oldContent = content; + return fse.writeFile(filePath, fileContent); + }) + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); + }) + .then(() => { + return Stash.apply(repo, 0); + }) + .then( + () => { return Stash.drop(repo, 0); - }, () => { + }, + () => { throw new Error("Unable to drop stash after apply."); - }) - .then(() => { - return Stash.drop(repo, 0); - }) - .catch((reason) => { - if (reason.message !== "reference 'refs/stash' not found") { - throw reason; - } - }); + } + ) + .then(() => { + return Stash.drop(repo, 0); + }) + .catch((reason) => { + if (reason.message !== "reference 'refs/stash' not found") { + throw reason; + } + }); }); - it("can save multiple stashes and pop an arbitrary stash", function() { + it("can save multiple stashes and pop an arbitrary stash", function () { const fileName = "README.md"; const fileContentA = "Hi. It's me. I'm the dog. My name is the dog."; const fileContentB = "Everyone likes me. I'm cute."; - const fileContentC = - "I think I will bark at nothing now. Ba. Ba. Baba Baba."; + const fileContentC = "I think I will bark at nothing now. Ba. Ba. Baba Baba."; const repo = this.repository; const filePath = path.join(repo.workdir(), fileName); let oldContent; @@ -229,14 +232,16 @@ describe("Stash", function() { const stashMessageC = "stash test C"; const writeAndStash = (path, content, message) => { - return fse.writeFile(path, content) + return fse + .writeFile(path, content) .then(() => repo.defaultSignature()) .then((signature) => { return Stash.save(repo, signature, message, 0); }); }; - return fse.readFile(filePath, "utf-8") + return fse + .readFile(filePath, "utf-8") .then((content) => { oldContent = content; return writeAndStash(filePath, fileContentA, stashMessageA); @@ -262,9 +267,9 @@ describe("Stash", function() { }); }); - it("can partial stash the workdir and pop it", function() { + it("can partial stash the workdir and pop it", function () { const repo = this.repository; - + const fileName1 = "README.md"; const fileName2 = "install.js"; const fileName3 = "LICENSE"; @@ -283,10 +288,11 @@ describe("Stash", function() { const options = { flags: 0, message: "stast test", - paths: [fileName1, fileName2] + paths: [fileName1, fileName2], }; - return fse.readFile(filePath1, "utf-8") + return fse + .readFile(filePath1, "utf-8") .then((content) => { oldContentA = content; return fse.readFile(filePath2, "utf-8"); diff --git a/test/tests/status.js b/test/tests/status.js index f3caeb7bf..fa99a6238 100644 --- a/test/tests/status.js +++ b/test/tests/status.js @@ -4,34 +4,32 @@ var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); var exec = require("../../utils/execPromise"); -describe("Status", function() { +describe("Status", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Status = NodeGit.Status; var reposPath = local("../repos/workdir"); - before(function() { + before(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("gets no statuses on clean working directory", function() { + it("gets no statuses on clean working directory", function () { var statuses = []; - var statusCallback = function(path, status) { - statuses.push({path: path, status: status}); + var statusCallback = function (path, status) { + statuses.push({ path: path, status: status }); }; - return Status.foreach(this.repository, statusCallback) - .then(function() { - assert.equal(statuses.length, 0); - }); + return Status.foreach(this.repository, statusCallback).then(function () { + assert.equal(statuses.length, 0); + }); }); - it("gets a status on changing file directory", function() { + it("gets a status on changing file directory", function () { var fileName = "README.md"; var fileContent = "Cha-cha-cha-chaaaaaangessssss"; var repo = this.repository; @@ -39,18 +37,19 @@ describe("Status", function() { var oldContent; var statuses = []; - return fse.readFile(filePath) - .then(function(content) { + return fse + .readFile(filePath) + .then(function (content) { oldContent = content; return fse.writeFile(filePath, fileContent); }) - .then(function() { - var statusCallback = function(path, status) { - statuses.push({path: path, status: status}); + .then(function () { + var statusCallback = function (path, status) { + statuses.push({ path: path, status: status }); }; return Status.foreach(repo, statusCallback); }) - .then(function() { + .then(function () { assert.equal(statuses.length, 1); assert.equal(statuses[0].path, fileName); assert.equal(statuses[0].status, 256); @@ -58,70 +57,64 @@ describe("Status", function() { .then(function () { return fse.writeFile(filePath, oldContent); }) - .catch(function(e) { - return fse.writeFile(filePath, oldContent) - .then(function() { - return Promise.reject(e); - }); + .catch(function (e) { + return fse.writeFile(filePath, oldContent).then(function () { + return Promise.reject(e); + }); }); }); - it("gets status with options", function() { + it("gets status with options", function () { var fileName = "my-new-file-that-shouldnt-exist.file"; var fileContent = "new file from status tests"; var repo = this.repository; var filePath = path.join(repo.workdir(), fileName); - return exec("git clean -xdf", {cwd: reposPath}) - .then(function() { + return exec("git clean -xdf", { cwd: reposPath }) + .then(function () { return fse.writeFile(filePath, fileContent); }) - .then(function() { + .then(function () { var statuses = []; - var statusCallback = function(path, status) { - statuses.push({path: path, status: status}); + var statusCallback = function (path, status) { + statuses.push({ path: path, status: status }); }; var opts = { - flags: Status.OPT.INCLUDE_UNTRACKED + - Status.OPT.RECURSE_UNTRACKED_DIRS + flags: Status.OPT.INCLUDE_UNTRACKED + Status.OPT.RECURSE_UNTRACKED_DIRS, }; - return Status.foreachExt(repo, opts, statusCallback) - .then(function() { - assert.equal(statuses.length, 1); - assert.equal(statuses[0].path, fileName); - assert.equal(statuses[0].status, 128); - }); + return Status.foreachExt(repo, opts, statusCallback).then(function () { + assert.equal(statuses.length, 1); + assert.equal(statuses[0].path, fileName); + assert.equal(statuses[0].status, 128); + }); }) - .then(function() { + .then(function () { return fse.remove(filePath); }) - .catch(function(e) { - return fse.remove(filePath) - .then(function() { - return Promise.reject(e); - }); + .catch(function (e) { + return fse.remove(filePath).then(function () { + return Promise.reject(e); + }); }); }); - it("gets status on non-existent file results in error", function() { + it("gets status on non-existent file results in error", function () { var fileName = "non-existent-Status.file-test.txt"; var repo = this.repository; var filePath = path.join(repo.workdir(), fileName); - return exec("git clean -xdf", {cwd: reposPath}) - .then(function() { - assert.equal(false, fse.existsSync(filePath)); - return Status.file(repo, filePath) - .then(function() { + return exec("git clean -xdf", { cwd: reposPath }).then(function () { + assert.equal(false, fse.existsSync(filePath)); + return Status.file(repo, filePath).then( + function () { assert.fail("Non-existent file should throw error on Status.file"); - }, function(err) { + }, + function (err) { assert.equal(NodeGit.Error.CODE.ENOTFOUND, err.errno); assert.equal("Status.file", err.errorFunction); - assert.equal( - "attempt to get status of nonexistent file '" + filePath + "'", - err.message - ); - }); - }); + assert.equal("attempt to get status of nonexistent file '" + filePath + "'", err.message); + } + ); + }); }); }); diff --git a/test/tests/status_file.js b/test/tests/status_file.js index 039296aac..fd10943fe 100644 --- a/test/tests/status_file.js +++ b/test/tests/status_file.js @@ -1,6 +1,6 @@ var assert = require("assert"); -describe("StatusFile", function() { +describe("StatusFile", function () { var NodeGit = require("../../"); var Status = NodeGit.Status; var StatusFile = NodeGit.StatusFile; @@ -10,12 +10,10 @@ describe("StatusFile", function() { function testStatusFile(status) { var statusFile = new StatusFile({ path: pathName, - status: Status.STATUS[status] + status: Status.STATUS[status], }); var specialFunction = status.replace(/^(WT|INDEX)_/, ""); - specialFunction = "is" + - specialFunction[0] + - specialFunction.substring(1).toLowerCase(); + specialFunction = "is" + specialFunction[0] + specialFunction.substring(1).toLowerCase(); if (/^WT_/.test(status)) { assert.ok(statusFile.inWorkingTree()); assert.ok(!statusFile.inIndex()); @@ -30,56 +28,55 @@ describe("StatusFile", function() { assert.ok(statusFile[specialFunction]()); } - it.skip("identifies the proper statuses for CURRENT", function() { + it.skip("identifies the proper statuses for CURRENT", function () { testStatusFile("CURRENT"); }); - it.skip("identifies the proper statuses for WT_UNREADABLE", function() { + it.skip("identifies the proper statuses for WT_UNREADABLE", function () { testStatusFile("WT_UNREADABLE"); }); - it("identifies the proper statuses for WT_NEW", function() { + it("identifies the proper statuses for WT_NEW", function () { testStatusFile("WT_NEW"); }); - it("identifies the proper statuses for WT_MODIFIED", function() { + it("identifies the proper statuses for WT_MODIFIED", function () { testStatusFile("WT_MODIFIED"); }); - it("identifies the proper statuses for WT_DELETED", function() { + it("identifies the proper statuses for WT_DELETED", function () { testStatusFile("WT_DELETED"); }); - it("identifies the proper statuses for WT_TYPECHANGE", function() { + it("identifies the proper statuses for WT_TYPECHANGE", function () { testStatusFile("WT_TYPECHANGE"); }); - it("identifies the proper statuses for WT_RENAMED", function() { + it("identifies the proper statuses for WT_RENAMED", function () { testStatusFile("WT_RENAMED"); }); - it("identifies the proper statuses for IGNORED", function() { + it("identifies the proper statuses for IGNORED", function () { testStatusFile("IGNORED"); }); - it("identifies the proper statuses for INDEX_NEW", function() { + it("identifies the proper statuses for INDEX_NEW", function () { testStatusFile("INDEX_NEW"); }); - it("identifies the proper statuses for INDEX_MODIFIED", function() { + it("identifies the proper statuses for INDEX_MODIFIED", function () { testStatusFile("INDEX_MODIFIED"); }); - it("identifies the proper statuses for INDEX_DELETED", function() { + it("identifies the proper statuses for INDEX_DELETED", function () { testStatusFile("INDEX_DELETED"); }); - it("identifies the proper statuses for INDEX_TYPECHANGE", function() { + it("identifies the proper statuses for INDEX_TYPECHANGE", function () { testStatusFile("INDEX_TYPECHANGE"); }); - it("identifies the proper statuses for INDEX_RENAMED", function() { + it("identifies the proper statuses for INDEX_RENAMED", function () { testStatusFile("INDEX_RENAMED"); }); - }); diff --git a/test/tests/status_list.js b/test/tests/status_list.js index 68a08910e..b7e650640 100644 --- a/test/tests/status_list.js +++ b/test/tests/status_list.js @@ -4,7 +4,7 @@ var fse = require("fs-extra"); var local = path.join.bind(path, __dirname); var exec = require("../../utils/execPromise"); -describe("StatusList", function() { +describe("StatusList", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Status = NodeGit.Status; @@ -12,32 +12,30 @@ describe("StatusList", function() { var reposPath = local("../repos/workdir"); - before(function() { + before(function () { var test = this; - return Repository.open(reposPath) - .then(function(repository) { - test.repository = repository; - }); + return Repository.open(reposPath).then(function (repository) { + test.repository = repository; + }); }); - it("gets status with deltas", function() { + it("gets status with deltas", function () { var fileName = "my-new-file-that-shouldnt-exist.file"; var fileContent = "new file from status tests"; var repo = this.repository; var filePath = path.join(repo.workdir(), fileName); - return exec("git clean -xdf", {cwd: reposPath}) - .then(function() { + return exec("git clean -xdf", { cwd: reposPath }) + .then(function () { return fse.writeFile(filePath, fileContent); }) - .then(function() { + .then(function () { var opts = { - flags: Status.OPT.INCLUDE_UNTRACKED + - Status.OPT.RECURSE_UNTRACKED_DIRS + flags: Status.OPT.INCLUDE_UNTRACKED + Status.OPT.RECURSE_UNTRACKED_DIRS, }; return StatusList.create(repo, opts); }) - .then(function(list) { + .then(function (list) { assert.equal(list.entrycount(), 1); for (var i = 0; i < list.entrycount(); i++) { @@ -45,15 +43,13 @@ describe("StatusList", function() { assert.equal(entry.indexToWorkdir().newFile().path(), fileName); } }) - .then(function() { + .then(function () { return fse.remove(filePath); }) - .catch(function(e) { - return fse.remove(filePath) - .then(function() { - return Promise.reject(e); - }); - + .catch(function (e) { + return fse.remove(filePath).then(function () { + return Promise.reject(e); + }); }); }); }); diff --git a/test/tests/submodule.js b/test/tests/submodule.js index 107b14095..84b50a026 100644 --- a/test/tests/submodule.js +++ b/test/tests/submodule.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Submodule", function() { +describe("Submodule", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var RepoUtils = require("../utils/repository_setup"); @@ -10,103 +10,103 @@ describe("Submodule", function() { var repoPath = local("../repos/submodule"); - beforeEach(function() { + beforeEach(function () { var test = this; return RepoUtils.createRepository(repoPath) - .then(function(repo) { + .then(function (repo) { test.repository = repo; return Repository.open(local("../repos/workdir")); }) - .then(function(repo) { + .then(function (repo) { test.workdirRepository = repo; }); }); - it("can walk over the submodules", function() { + it("can walk over the submodules", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; - return repo.getSubmoduleNames() - .then(function(submodules) { + return repo + .getSubmoduleNames() + .then(function (submodules) { assert.equal(submodules.length, 1); var submodule = submodules[0]; assert.equal(submodule, submoduleName); return submodule; }) - .then(function(submodule) { + .then(function (submodule) { return Submodule.lookup(repo, submodule); }) - .then(function(submodule) { + .then(function (submodule) { assert.equal(submodule.name(), submoduleName); }); }); - it("can get submodule status", function() { + it("can get submodule status", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; - return Submodule.status(repo, submoduleName, Submodule.IGNORE.NONE) - .then(function(status) { - assert.equal(Submodule.STATUS.IN_CONFIG, status); - }); + return Submodule.status(repo, submoduleName, Submodule.IGNORE.NONE).then(function (status) { + assert.equal(Submodule.STATUS.IN_CONFIG, status); + }); }); - it("can get submodule location", function() { + it("can get submodule location", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; return Submodule.lookup(repo, submoduleName) - .then(function(submodule) { + .then(function (submodule) { return submodule.location(); }) - .then(function(status) { + .then(function (status) { assert.equal(Submodule.STATUS.IN_CONFIG, status); }); }); - it("can set submodule ignore", function() { + it("can set submodule ignore", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; return Submodule.setIgnore(repo, submoduleName, Submodule.IGNORE.ALL) - .then(function() { + .then(function () { return Submodule.lookup(repo, submoduleName); }) - .then(function(submodule) { + .then(function (submodule) { assert.equal(Submodule.IGNORE.ALL, submodule.ignore()); }); }); - it("can set submodule url", function() { + it("can set submodule url", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; var submoduleUrl = "https://github.com/githubtraining/hellogitworld.git"; return Submodule.setUrl(repo, submoduleName, submoduleUrl) - .then(function() { + .then(function () { return Submodule.lookup(repo, submoduleName); }) - .then(function(submodule) { + .then(function (submodule) { assert.equal(submoduleUrl, submodule.url()); }); }); - it("can set submodule update", function() { + it("can set submodule update", function () { var repo = this.workdirRepository; var submoduleName = "vendor/libgit2"; return Submodule.setUpdate(repo, submoduleName, Submodule.UPDATE.NONE) - .then(function() { + .then(function () { return Submodule.lookup(repo, submoduleName); }) - .then(function(submodule) { + .then(function (submodule) { assert.equal(Submodule.UPDATE.NONE, submodule.updateStrategy()); }); }); - it("can setup and finalize submodule add", function() { + it("can setup and finalize submodule add", function () { this.timeout(30000); var repo = this.repository; @@ -117,40 +117,40 @@ describe("Submodule", function() { var submoduleRepo; return NodeGit.Submodule.addSetup(repo, submoduleUrl, submodulePath, 0) - .then(function(_submodule) { + .then(function (_submodule) { submodule = _submodule; return submodule.init(0); }) - .then(function() { + .then(function () { return submodule.open(); }) - .then(function(_submoduleRepo) { + .then(function (_submoduleRepo) { submoduleRepo = _submoduleRepo; return submoduleRepo.fetch("origin", null, null); }) - .then(function() { + .then(function () { return submoduleRepo.getReference("origin/master"); }) - .then(function(reference) { + .then(function (reference) { return reference.peel(NodeGit.Object.TYPE.COMMIT); }) - .then(function(commit) { + .then(function (commit) { return submoduleRepo.createBranch("master", commit.id()); }) - .then(function() { + .then(function () { return submodule.addFinalize(); }) - .then(function() { + .then(function () { // check whether the submodule exists return Submodule.lookup(repo, submodulePath); }) - .then(function(submodule) { + .then(function (submodule) { assert.equal(submodule.name(), submodulePath); // check whether .gitmodules and the submodule are in the index return repo.refreshIndex(); }) - .then(function(index) { + .then(function (index) { var entries = index.entries(); assert.equal(entries.length, 2); assert.equal(entries[0].path, ".gitmodules"); @@ -158,36 +158,35 @@ describe("Submodule", function() { }); }); - it("can run sync callback without deadlocking", function() { + it("can run sync callback without deadlocking", function () { var repo = this.workdirRepository; var submodules = []; - var submoduleCallback = function(submodule, name, _payload) { + var submoduleCallback = function (submodule, name, _payload) { var submoduleName = submodule.name(); assert.equal(submoduleName, name); submodules.push(name); }; - return Submodule.foreach(repo, submoduleCallback).then(function() { + return Submodule.foreach(repo, submoduleCallback).then(function () { assert.equal(submodules.length, 1); }); }); // 'Submodule.foreach' and 'Submodule.lookup' do work with the repo locked. // They should work together without deadlocking. - it("can run async callback without deadlocking", function() { + it("can run async callback without deadlocking", function () { var repo = this.workdirRepository; var submodules = []; - var submoduleCallback = function(submodule, name, _payload) { + var submoduleCallback = function (submodule, name, _payload) { var owner = submodule.owner(); - return Submodule.lookup(owner, name) - .then(function(submodule) { - assert.equal(submodule.name(), name); - submodules.push(name); - }); + return Submodule.lookup(owner, name).then(function (submodule) { + assert.equal(submodule.name(), name); + submodules.push(name); + }); }; - return Submodule.foreach(repo, submoduleCallback).then(function() { + return Submodule.foreach(repo, submoduleCallback).then(function () { assert.equal(submodules.length, 1); }); }); diff --git a/test/tests/tag.js b/test/tests/tag.js index 0478aa491..fad591911 100644 --- a/test/tests/tag.js +++ b/test/tests/tag.js @@ -2,7 +2,7 @@ var assert = require("assert"); var path = require("path"); var local = path.join.bind(path, __dirname); -describe("Tag", function() { +describe("Tag", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Tag = NodeGit.Tag; @@ -25,138 +25,140 @@ describe("Tag", function() { assert.equal(tag.targetType(), Obj.TYPE.COMMIT); assert.equal(tag.message(), tagMessage); - return tag.target() - .then(function(target) { - assert.ok(target.isCommit()); - assert.equal(target.id().toString(), commitPointedTo); - }); + return tag.target().then(function (target) { + assert.ok(target.isCommit()); + assert.equal(target.id().toString(), commitPointedTo); + }); } - beforeEach(function() { + beforeEach(function () { var test = this; - return Repository.open(reposPath) - .then(function(repo) { - test.repository = repo; - }); + return Repository.open(reposPath).then(function (repo) { + test.repository = repo; + }); }); - it("can get a tag from a repo via the tag name", function() { - return this.repository.getTagByName(tagName) - .then(function(tag) { - return testTag(tag); - }); + it("can get a tag from a repo via the tag name", function () { + return this.repository.getTagByName(tagName).then(function (tag) { + return testTag(tag); + }); }); - it("can get a tag from a repo via the long tag name", function() { - return this.repository.getTagByName(tagFullName) - .then(function(tag) { - return testTag(tag); - }); + it("can get a tag from a repo via the long tag name", function () { + return this.repository.getTagByName(tagFullName).then(function (tag) { + return testTag(tag); + }); }); - it("can get a tag from a repo via the tag's OID as a string", function() { - return this.repository.getTag(tagOid) - .then(function(tag) { - return testTag(tag); - }); + it("can get a tag from a repo via the tag's OID as a string", function () { + return this.repository.getTag(tagOid).then(function (tag) { + return testTag(tag); + }); }); - it("can get a tag from a repo via the tag's OID object", function() { + it("can get a tag from a repo via the tag's OID object", function () { var oid = Oid.fromString(tagOid); - return this.repository.getTag(oid) - .then(function(tag) { - return testTag(tag); - }); + return this.repository.getTag(oid).then(function (tag) { + return testTag(tag); + }); }); - it("can list tags in a repo", function() { - return Tag.list(this.repository) - .then(function(tagNames) { - tagNames = tagNames.filter(function(tagNameTest) { - return tagNameTest == tagName; - }); - - assert.equal(tagNames.length, 1); + it("can list tags in a repo", function () { + return Tag.list(this.repository).then(function (tagNames) { + tagNames = tagNames.filter(function (tagNameTest) { + return tagNameTest == tagName; }); + + assert.equal(tagNames.length, 1); + }); }); - it("can list tags of a pattern in a repo", function() { - return Tag.listMatch(tagPattern, this.repository) - .then(function(tagNames) { - assert.equal(tagNames.length, 1); - }); + it("can list tags of a pattern in a repo", function () { + return Tag.listMatch(tagPattern, this.repository).then(function (tagNames) { + assert.equal(tagNames.length, 1); + }); }); - it("can create a new annotated tag in a repo and delete it", function() { + it("can create a new annotated tag in a repo and delete it", function () { var oid = Oid.fromString(commitPointedTo); var name = "created-annotated-tag"; var repository = this.repository; - return repository.createTag(oid, name, tagMessage) - .then(function(tag) { + return repository + .createTag(oid, name, tagMessage) + .then(function (tag) { return testTag(tag, name); }) - .then(function() { + .then(function () { return repository.createTag(oid, name, tagMessage); }) - .then(function() { - return Promise.reject(new Error("should not be able to create the '" + - name + "' tag twice")); - }, function() { - return Promise.resolve(); - }) - .then(function() { + .then( + function () { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + function () { + return Promise.resolve(); + } + ) + .then(function () { return repository.deleteTagByName(name); }) - .then(function() { + .then(function () { return Reference.lookup(repository, "refs/tags/" + name); }) - .then(function() { - return Promise.reject(new Error("the tag '" + name + - "' should not exist")); - }, function() { - return Promise.resolve(); - }); + .then( + function () { + return Promise.reject(new Error("the tag '" + name + "' should not exist")); + }, + function () { + return Promise.resolve(); + } + ); }); - it("can create a new lightweight tag in a repo and delete it", function() { + it("can create a new lightweight tag in a repo and delete it", function () { var oid = Oid.fromString(commitPointedTo); var name = "created-lightweight-tag"; var repository = this.repository; - return repository.createLightweightTag(oid, name) - .then(function(reference) { + return repository + .createLightweightTag(oid, name) + .then(function (reference) { return reference.target(); }) - .then(function(refOid) { + .then(function (refOid) { assert.equal(refOid.toString(), oid.toString()); }) - .then(function() { + .then(function () { return repository.createLightweightTag(oid, name); }) - .then(function() { - return Promise.reject(new Error("should not be able to create the '" + - name + "' tag twice")); - }, function() { - return Promise.resolve(); - }) - .then(function() { + .then( + function () { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + function () { + return Promise.resolve(); + } + ) + .then(function () { return repository.deleteTagByName(name); }) - .then(function() { + .then(function () { return Reference.lookup(repository, "refs/tags/" + name); }) - .then(function() { - return Promise.reject(new Error("the tag '" + name + - "' should not exist")); - }, function() { - return Promise.resolve(); - }); + .then( + function () { + return Promise.reject(new Error("the tag '" + name + "' should not exist")); + }, + function () { + return Promise.resolve(); + } + ); }); - it("can create a new signed tag with Tag.create and delete it", function() { + it("can create a new signed tag with Tag.create and delete it", function () { var name = "created-signed-tag-create"; var repository = this.repository; var signature = null; @@ -164,119 +166,98 @@ describe("Tag", function() { var commit2 = null; return Signature.default(repository) - .then(function(signatureResult) { + .then(function (signatureResult) { signature = signatureResult; return repository.getCommit(commitPointedTo); }) - .then(function(theCommit) { + .then(function (theCommit) { commit = theCommit; return repository.getCommit(commitPointedTo2); }) - .then(function(theCommit2) { + .then(function (theCommit2) { commit2 = theCommit2; return Tag.create(repository, name, commit, signature, tagMessage, 1); }) - .then(function(oid) { + .then(function (oid) { return repository.getTag(oid); }) - .then(function(tag) { + .then(function (tag) { assert(tag.tagger(), signature); return testTag(tag, name); }) - .then(function() { + .then(function () { // overwriting is okay return Tag.create(repository, name, commit2, signature, tagMessage, 1); }) - .then(function() { + .then(function () { // overwriting is not okay return Tag.create(repository, name, commit, signature, tagMessage, 0); }) - .then(function() { - return Promise.reject(new Error("should not be able to create the '" + - name + "' tag twice")); - }, function() { - return Promise.resolve() - .then(function() { - return repository.deleteTagByName(name); - }) - .then(function() { - return Reference.lookup(repository, "refs/tags/" + name); - }) - .then(function() { - return Promise.reject(new Error("the tag '" + name + - "' should not exist")); - }, function() { - return Promise.resolve(); - }); - }); + .then( + function () { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + function () { + return Promise.resolve() + .then(function () { + return repository.deleteTagByName(name); + }) + .then(function () { + return Reference.lookup(repository, "refs/tags/" + name); + }) + .then( + function () { + return Promise.reject(new Error("the tag '" + name + "' should not exist")); + }, + function () { + return Promise.resolve(); + } + ); + } + ); }); - it("can create a Tag buffer", function() { + it("can create a Tag buffer", function () { const targetOid = Oid.fromString(commitPointedTo); const name = "created-signed-tag-annotationCreate"; const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); const message = "I'm a teapot"; - return Tag.createBuffer(repository, name, targetOid, signature, message) - .then((tagBuffer) => { - const lines = tagBuffer.split("\n"); - assert.equal(7, lines.length); - assert.equal(lines[0], `object ${commitPointedTo}`); - assert.equal(lines[1], "type commit"); - assert.equal(lines[2], `tag ${name}`); - assert.equal( - lines[3], - "tagger Shaggy Rogers 987654321 +0130" - ); - assert.equal(lines[4], ""); - assert.equal(lines[5], message); - assert.equal(lines[6], ""); - }); + return Tag.createBuffer(repository, name, targetOid, signature, message).then((tagBuffer) => { + const lines = tagBuffer.split("\n"); + assert.equal(7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal(lines[3], "tagger Shaggy Rogers 987654321 +0130"); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + assert.equal(lines[6], ""); + }); }); - it("can create a Tag from a Tag buffer", function() { + it("can create a Tag from a Tag buffer", function () { const targetOid = Oid.fromString(commitPointedTo); const otherTargetOid = Oid.fromString(commitPointedTo2); const name = "created-signed-tag-annotationCreate"; const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); const message = "I'm a teapot"; let odb; let buffer; let otherBuffer; - return repository.odb() + return repository + .odb() .then((odbResult) => { odb = odbResult; - return Tag.createBuffer( - repository, - name, - targetOid, - signature, - message - ); + return Tag.createBuffer(repository, name, targetOid, signature, message); }) .then((bufferResult) => { buffer = bufferResult; - return Tag.createBuffer( - repository, - name, - otherTargetOid, - signature, - message - ); + return Tag.createBuffer(repository, name, otherTargetOid, signature, message); }) .then((bufferResult) => { otherBuffer = bufferResult; @@ -292,10 +273,7 @@ describe("Tag", function() { assert.equal(lines[0], `object ${commitPointedTo}`); assert.equal(lines[1], "type commit"); assert.equal(lines[2], `tag ${name}`); - assert.equal( - lines[3], - "tagger Shaggy Rogers 987654321 +0130" - ); + assert.equal(lines[3], "tagger Shaggy Rogers 987654321 +0130"); assert.equal(lines[4], ""); assert.equal(lines[5], message); assert.equal(lines[6], ""); @@ -308,75 +286,64 @@ describe("Tag", function() { // overwriting is not okay return Tag.createFromBuffer(repository, buffer, 0); }) - .then(() => { - return Promise.reject( - new Error("should not be able to create the '" + name + "' tag twice") - ); - }, - () => { - return Promise.resolve(); - }); + .then( + () => { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + () => { + return Promise.resolve(); + } + ); }); - describe("createWithSignature and extractSignature", function() { - it( - "can create a tag with a signature and extract the signature", - function() { - var targetCommit; - var otherTargetCommit; - const name = "created-signed-tag-annotationCreate"; - const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); - const signatureLines = [ - "-----BEGIN PGP SIGNATURE-----", - "iQIzBAABCAAdFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxR4JUACgkQURjJKedO", - "fEN+8A//cXmkRmhzQMdTEdrxty7tVKQ7lVhL7r7e+cB84hO7WrDn8549c7/Puflu", - "idanWfyoAEMSNWDgY84lx/t3I3YYKXsLDPT93HiMhCXmPVZcfLxlARRL1rrNZV4q", - "L9hhqb9bFrRNBn6YebhygeLXLHlDKEZzx8W9jnDLU8Px8UTkwdQIDnPDfT7UOPPU", - "MYDgP3OwWwoG8dUlZXaHjtFz29wPlJo177MwdLYwn4zpEIysoY1ev5IKWD+LPW4g", - "vdQnaK1x3dozmG8YLUZw5iW7ap9DpahbAGQgdy1z1ypiNUjNuhaP8zkG1ci6X88N", - "6MIoQ+YqfowRJJTIr1lzssxsRI1syjfS6smnI4ZNE6S+6mIKN96ES2OZF+rn4xnD", - "PofR9Qh2gPq++ULriPE/cX7ZkZ0/ZDZGDfIGvricB8JEJhISZn/VMX/KScJs+rFq", - "KWN5Au6Uc2pEqeq5OP4y2k0QUmKQT9sh9OepnPmfqF8hG6wI8nM67jT/FEOcpr0v", - "qoN2NRXrcq3iZAp07AGq9IdpYhBcEW7MFmOcNt+Zb8SbTMp6DawnREg9xzz1SIkZ", - "Cdp1XoJ6mkVvzBB4T/Esp7j1VztinTX2PpX7C1CE5LC76UfCiEjEWOmWrVuPuA5a", - "oRrJvgPJg8gpVj04r2m8nvUK1gwhxg9ZB+SK+nd3OAd0dnbJwTE=", - "=dW3g", - "-----END PGP SIGNATURE-----" - ]; - const message = "I'm a teapot"; - const signingCallback = (_message) => ({ - code: NodeGit.Error.CODE.OK, - signedData: signatureLines.join("\n") - }); - - let odb; - let oid; - let object; - - return repository.getCommit(commitPointedTo).then((commit) => { + describe("createWithSignature and extractSignature", function () { + it("can create a tag with a signature and extract the signature", function () { + var targetCommit; + var otherTargetCommit; + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); + const signatureLines = [ + "-----BEGIN PGP SIGNATURE-----", + "iQIzBAABCAAdFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxR4JUACgkQURjJKedO", + "fEN+8A//cXmkRmhzQMdTEdrxty7tVKQ7lVhL7r7e+cB84hO7WrDn8549c7/Puflu", + "idanWfyoAEMSNWDgY84lx/t3I3YYKXsLDPT93HiMhCXmPVZcfLxlARRL1rrNZV4q", + "L9hhqb9bFrRNBn6YebhygeLXLHlDKEZzx8W9jnDLU8Px8UTkwdQIDnPDfT7UOPPU", + "MYDgP3OwWwoG8dUlZXaHjtFz29wPlJo177MwdLYwn4zpEIysoY1ev5IKWD+LPW4g", + "vdQnaK1x3dozmG8YLUZw5iW7ap9DpahbAGQgdy1z1ypiNUjNuhaP8zkG1ci6X88N", + "6MIoQ+YqfowRJJTIr1lzssxsRI1syjfS6smnI4ZNE6S+6mIKN96ES2OZF+rn4xnD", + "PofR9Qh2gPq++ULriPE/cX7ZkZ0/ZDZGDfIGvricB8JEJhISZn/VMX/KScJs+rFq", + "KWN5Au6Uc2pEqeq5OP4y2k0QUmKQT9sh9OepnPmfqF8hG6wI8nM67jT/FEOcpr0v", + "qoN2NRXrcq3iZAp07AGq9IdpYhBcEW7MFmOcNt+Zb8SbTMp6DawnREg9xzz1SIkZ", + "Cdp1XoJ6mkVvzBB4T/Esp7j1VztinTX2PpX7C1CE5LC76UfCiEjEWOmWrVuPuA5a", + "oRrJvgPJg8gpVj04r2m8nvUK1gwhxg9ZB+SK+nd3OAd0dnbJwTE=", + "=dW3g", + "-----END PGP SIGNATURE-----", + ]; + const message = "I'm a teapot"; + const signingCallback = (_message) => ({ + code: NodeGit.Error.CODE.OK, + signedData: signatureLines.join("\n"), + }); + + let odb; + let oid; + let object; + + return repository + .getCommit(commitPointedTo) + .then((commit) => { targetCommit = commit; return repository.getCommit(commitPointedTo2); - }).then((commit) => { + }) + .then((commit) => { otherTargetCommit = commit; return repository.odb(); - }).then((odbResult) => { + }) + .then((odbResult) => { odb = odbResult; - return Tag.createWithSignature( - repository, - name, - targetCommit, - signature, - message, - 1, - signingCallback - ); + return Tag.createWithSignature(repository, name, targetCommit, signature, message, 1, signingCallback); }) .then((oidResult) => { oid = oidResult; @@ -390,10 +357,7 @@ describe("Tag", function() { assert.equal(lines[0], `object ${commitPointedTo}`); assert.equal(lines[1], "type commit"); assert.equal(lines[2], `tag ${name}`); - assert.equal( - lines[3], - "tagger Shaggy Rogers 987654321 +0130" - ); + assert.equal(lines[3], "tagger Shaggy Rogers 987654321 +0130"); assert.equal(lines[4], ""); assert.equal(lines[5], message); for (let i = 6; i < 6 + signatureLines.length; i++) { @@ -411,276 +375,217 @@ describe("Tag", function() { }) .then(() => { // overwriting is okay - return Tag.createWithSignature( - repository, - name, - targetCommit, - signature, - message, - 1, - signingCallback - ); + return Tag.createWithSignature(repository, name, targetCommit, signature, message, 1, signingCallback); }) .then(() => { // overwriting is not okay - return Tag.createWithSignature( - repository, - name, - otherTargetCommit, - signature, - message, - 0, - signingCallback - ); + return Tag.createWithSignature(repository, name, otherTargetCommit, signature, message, 0, signingCallback); }) - .then(() => { - return Promise.reject( - new Error( - "should not be able to create the '" + name + "' tag twice" - ) - ); - }, - () => { - return Promise.resolve(); - }); - } - ); + .then( + () => { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + () => { + return Promise.resolve(); + } + ); + }); - it("can optionally skip the signing process", function() { + it("can optionally skip the signing process", function () { var targetCommit; var otherTargetCommit; const name = "created-signed-tag-annotationCreate"; const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); const message = "I'm a teapot"; const signingCallback = () => ({ - code: NodeGit.Error.CODE.PASSTHROUGH + code: NodeGit.Error.CODE.PASSTHROUGH, }); let odb; let oid; let object; - return repository.getCommit(commitPointedTo).then((commit) => { - targetCommit = commit; - return repository.getCommit(commitPointedTo2); - }).then((commit) => { - otherTargetCommit = commit; - return repository.odb(); - }).then((odbResult) => { - odb = odbResult; - - return Tag.createWithSignature( - repository, - name, - targetCommit, - signature, - message, - 1, - signingCallback - ); - }) - .then((oidResult) => { - oid = oidResult; - return odb.read(oid); - }) - .then((objectResult) => { - object = objectResult; - const lines = object.toString().split("\n"); - assert(object.type(), Obj.TYPE.TAG); - assert.equal(7, lines.length); - assert.equal(lines[0], `object ${commitPointedTo}`); - assert.equal(lines[1], "type commit"); - assert.equal(lines[2], `tag ${name}`); - assert.equal( - lines[3], - "tagger Shaggy Rogers 987654321 +0130" - ); - assert.equal(lines[4], ""); - assert.equal(lines[5], message); - assert.equal(lines[6], ""); + return repository + .getCommit(commitPointedTo) + .then((commit) => { + targetCommit = commit; + return repository.getCommit(commitPointedTo2); + }) + .then((commit) => { + otherTargetCommit = commit; + return repository.odb(); + }) + .then((odbResult) => { + odb = odbResult; - return Tag.lookup(repository, oid); - }) - .then((tag) => { - return tag.extractSignature(); - }) - .then(function() { - assert.fail("Tag should not have been signed."); - }, function(error) { - if (error && error.message === "this tag is not signed") { - return; - } + return Tag.createWithSignature(repository, name, targetCommit, signature, message, 1, signingCallback); + }) + .then((oidResult) => { + oid = oidResult; + return odb.read(oid); + }) + .then((objectResult) => { + object = objectResult; + const lines = object.toString().split("\n"); + assert(object.type(), Obj.TYPE.TAG); + assert.equal(7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal(lines[3], "tagger Shaggy Rogers 987654321 +0130"); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + assert.equal(lines[6], ""); - throw error; - }) - .then(() => { - // overwriting is okay - return Tag.createWithSignature( - repository, - name, - targetCommit, - signature, - message, - 1, - signingCallback - ); - }) - .then(() => { - // overwriting is not okay - return Tag.createWithSignature( - repository, - name, - otherTargetCommit, - signature, - message, - 0, - signingCallback - ); - }) - .then(() => { - return Promise.reject( - new Error("should not be able to create the '" + name + "' tag twice") + return Tag.lookup(repository, oid); + }) + .then((tag) => { + return tag.extractSignature(); + }) + .then( + function () { + assert.fail("Tag should not have been signed."); + }, + function (error) { + if (error && error.message === "this tag is not signed") { + return; + } + + throw error; + } + ) + .then(() => { + // overwriting is okay + return Tag.createWithSignature(repository, name, targetCommit, signature, message, 1, signingCallback); + }) + .then(() => { + // overwriting is not okay + return Tag.createWithSignature(repository, name, otherTargetCommit, signature, message, 0, signingCallback); + }) + .then( + () => { + return Promise.reject(new Error("should not be able to create the '" + name + "' tag twice")); + }, + () => { + return Promise.resolve(); + } ); - }, - () => { - return Promise.resolve(); - }); }); - it("will throw if signing callback returns an error code", function() { + it("will throw if signing callback returns an error code", function () { var targetCommit; const name = "created-signed-tag-annotationCreate"; const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); const message = "I'm a teapot"; const signingCallback = () => ({ - code: NodeGit.Error.CODE.ERROR + code: NodeGit.Error.CODE.ERROR, }); - - return repository.getCommit(commitPointedTo).then((commit) => { - targetCommit = commit; - return Tag.createWithSignature( - repository, - name, - targetCommit, - signature, - message, - 1, - signingCallback - ); - }).then(function() { - assert.fail("Should not have been able to create tag"); - }, function(error) { - if (error && error.errno === NodeGit.Error.CODE.ERROR) { - return; + return repository + .getCommit(commitPointedTo) + .then((commit) => { + targetCommit = commit; + return Tag.createWithSignature(repository, name, targetCommit, signature, message, 1, signingCallback); + }) + .then( + function () { + assert.fail("Should not have been able to create tag"); + }, + function (error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; } - throw error; - }); + ); }); }); - it("will show a deprecation warning if createWithSignature use oid instead object", function() { + it("will show a deprecation warning if createWithSignature use oid instead object", function () { var targetCommit; const name = "created-signed-tag-annotationCreate"; const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); + const signature = Signature.create("Shaggy Rogers", "shaggy@mystery.com", 987654321, 90); const message = "I'm a teapot"; const signingCallback = () => ({ - code: NodeGit.Error.CODE.ERROR + code: NodeGit.Error.CODE.ERROR, }); - - return repository.getCommit(commitPointedTo).then((commit) => { - targetCommit = commit; - return Tag.createWithSignature( - repository, - name, - targetCommit.id(), - signature, - message, - 1, - signingCallback - ); - }).then(function() { - assert.fail("Should not have been able to create tag"); - }, function(error) { - if (error && error.errno === NodeGit.Error.CODE.ERROR) { - return; + return repository + .getCommit(commitPointedTo) + .then((commit) => { + targetCommit = commit; + return Tag.createWithSignature(repository, name, targetCommit.id(), signature, message, 1, signingCallback); + }) + .then( + function () { + assert.fail("Should not have been able to create tag"); + }, + function (error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; } - throw error; - }); + ); }); - it("can create a new signed tag with Tag.annotationCreate", function() { + it("can create a new signed tag with Tag.annotationCreate", function () { var targetCommit; var name = "created-signed-tag-annotationCreate"; var repository = this.repository; var signature = null; var odb = null; - return repository.getCommit(commitPointedTo).then((commit) => { - targetCommit = commit; - return Signature.default(repository); - }).then(function(signatureResult) { + return repository + .getCommit(commitPointedTo) + .then((commit) => { + targetCommit = commit; + return Signature.default(repository); + }) + .then(function (signatureResult) { signature = signatureResult; return repository.odb(); }) - .then(function(theOdb) { + .then(function (theOdb) { odb = theOdb; }) - .then(function() { - return Tag.annotationCreate( - repository, name, targetCommit, signature, tagMessage); + .then(function () { + return Tag.annotationCreate(repository, name, targetCommit, signature, tagMessage); }) - .then(function(oid) { + .then(function (oid) { return odb.read(oid); }) - .then(function(object) { + .then(function (object) { assert(object.type(), Obj.TYPE.TAG); }); }); - it("can peel a tag", function() { - return this.repository.getTagByName(tagName) - .then(function(tag) { + it("can peel a tag", function () { + return this.repository + .getTagByName(tagName) + .then(function (tag) { return tag.peel(); }) - .then(function(object) { + .then(function (object) { assert.equal(object.isCommit(), true); }); }); - it("can get tag's target id", function() { - return this.repository.getTagByName(tagName) - .then(function(tag) { - assert.equal(commitPointedTo, tag.targetId()); - }); + it("can get tag's target id", function () { + return this.repository.getTagByName(tagName).then(function (tag) { + assert.equal(commitPointedTo, tag.targetId()); + }); }); - it("can get tag's owner", function() { + it("can get tag's owner", function () { var repository = this.repository; - return this.repository.getTagByName(tagName) - .then(function(tag) { - var owner = tag.owner(); - assert.ok(owner instanceof Repository); - assert.equal(repository.path(), owner.path()); - }); + return this.repository.getTagByName(tagName).then(function (tag) { + var owner = tag.owner(); + assert.ok(owner instanceof Repository); + assert.equal(repository.path(), owner.path()); + }); }); }); diff --git a/test/tests/tree.js b/test/tests/tree.js index 052459a80..13d3e908a 100644 --- a/test/tests/tree.js +++ b/test/tests/tree.js @@ -3,7 +3,7 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); -describe("Tree", function() { +describe("Tree", function () { var NodeGit = require("../../"); var RepoUtils = require("../utils/repository_setup"); @@ -11,30 +11,32 @@ describe("Tree", function() { var existingPath = local("../repos/workdir"); var oid = "5716e9757886eaf38d51c86b192258c960d9cfea"; - beforeEach(function() { + beforeEach(function () { var test = this; return RepoUtils.createRepository(repoPath) - .then(function(repo) { + .then(function (repo) { test.repository = repo; - }).then(function() { + }) + .then(function () { return NodeGit.Repository.open(existingPath); - }).then(function(repository) { + }) + .then(function (repository) { test.existingRepo = repository; return repository.getCommit(oid); - }).then(function(commit) { + }) + .then(function (commit) { test.commit = commit; }); }); - after(function() { + after(function () { return fse.remove(repoPath); }); - it("gets an entry by name", - function() { - return this.commit.getTree().then(function(tree) { + it("gets an entry by name", function () { + return this.commit.getTree().then(function (tree) { var entry = tree.entryByName("README.md"); - assert(entry); + assert(entry); }); }); @@ -43,21 +45,22 @@ describe("Tree", function() { var update = new NodeGit.TreeUpdate(); update.action = NodeGit.Tree.UPDATE.REMOVE; update.path = "README.md"; - return this.commit.getTree().then(function(tree) { + return this.commit + .getTree() + .then(function (tree) { return tree.createUpdated(repo, 1, [update]); }) - .then(function(treeOid) { + .then(function (treeOid) { return repo.getTree(treeOid); }) - .then(function(updatedTree) { + .then(function (updatedTree) { assert.throws(function () { updatedTree.entryByName("README.md"); }); }); }); - it("walks its entries and returns the same entries on both progress and end", - function() { + it("walks its entries and returns the same entries on both progress and end", function () { var repo = this.repository; var file1 = "test.txt"; var file2 = "foo/bar.txt"; @@ -66,22 +69,22 @@ describe("Tree", function() { var endEntries; return RepoUtils.commitFileToRepo(repo, file1, "") - .then(function(commit) { + .then(function (commit) { return RepoUtils.commitFileToRepo(repo, file2, "", commit); }) - .then(function(commit) { + .then(function (commit) { return commit.getTree(); }) - .then(function(tree) { + .then(function (tree) { assert(tree); return new Promise(function (resolve, reject) { var walker = tree.walk(); - walker.on("entry", function(entry) { + walker.on("entry", function (entry) { progressEntries.push(entry); }); - walker.on("end", function(entries) { + walker.on("end", function (entries) { endEntries = entries; resolve(); }); @@ -90,7 +93,7 @@ describe("Tree", function() { walker.start(); }); }) - .then(function() { + .then(function () { assert(progressEntries.length); assert(endEntries && endEntries.length); @@ -101,15 +104,9 @@ describe("Tree", function() { var progressFilePaths = progressEntries.map(getEntryPath); var endFilePaths = endEntries.map(getEntryPath); - assert.deepEqual( - expectedPaths, progressFilePaths, - "progress entry paths do not match expected paths" - ); + assert.deepEqual(expectedPaths, progressFilePaths, "progress entry paths do not match expected paths"); - assert.deepEqual( - expectedPaths, endFilePaths, - "end entry paths do not match expected paths" - ); + assert.deepEqual(expectedPaths, endFilePaths, "end entry paths do not match expected paths"); }); }); @@ -120,5 +117,4 @@ describe("Tree", function() { assert.equal(paths[0], ".gitignore"); assert.equal(paths[511], "wscript"); }); - }); diff --git a/test/tests/tree_entry.js b/test/tests/tree_entry.js index f62f374f0..246361a29 100644 --- a/test/tests/tree_entry.js +++ b/test/tests/tree_entry.js @@ -4,7 +4,7 @@ var local = path.join.bind(path, __dirname); var leakTest = require("../utils/leak_test"); -describe("TreeEntry", function() { +describe("TreeEntry", function () { var NodeGit = require("../../"); var Repository = NodeGit.Repository; var Tree = NodeGit.Tree; @@ -12,60 +12,55 @@ describe("TreeEntry", function() { var reposPath = local("../repos/workdir"); var oid = "5716e9757886eaf38d51c86b192258c960d9cfea"; - beforeEach(function() { + beforeEach(function () { var test = this; return Repository.open(reposPath) - .then(function(repository) { + .then(function (repository) { test.repository = repository; return repository.getCommit(oid); }) - .then(function(commit) { + .then(function (commit) { test.commit = commit; }); }); - it("will fail on a missing file", function() { - return this.commit.getEntry("test/-entry.js") - .then(null, function(err) { - assert.ok(err instanceof Error); - }); + it("will fail on a missing file", function () { + return this.commit.getEntry("test/-entry.js").then(null, function (err) { + assert.ok(err instanceof Error); + }); }); - it("provides the correct sha for a file", function() { - return this.commit.getEntry("README.md") - .then(function(entry) { - assert.equal(entry.sha(), "6cb45ba5d32532bf0d1310dc31ca4f20f59964bc"); - }); + it("provides the correct sha for a file", function () { + return this.commit.getEntry("README.md").then(function (entry) { + assert.equal(entry.sha(), "6cb45ba5d32532bf0d1310dc31ca4f20f59964bc"); + }); }); - it("provides the correct length for a file", function() { - return this.commit.getEntry("README.md") - .then(function(entry) { - assert.equal(entry.name().length, 9); - }); + it("provides the correct length for a file", function () { + return this.commit.getEntry("README.md").then(function (entry) { + assert.equal(entry.name().length, 9); + }); }); - it("provides the filename", function() { - return this.commit.getEntry("test/raw-commit.js") - .then(function(entry) { - assert.equal(entry.name(), "raw-commit.js"); + it("provides the filename", function () { + return this.commit.getEntry("test/raw-commit.js").then(function (entry) { + assert.equal(entry.name(), "raw-commit.js"); }); }); - it("provides the full path", function() { - return this.commit.getEntry("test/raw-commit.js") - .then(function(entry) { - assert.equal(entry.path(), "test/raw-commit.js"); - }); + it("provides the full path", function () { + return this.commit.getEntry("test/raw-commit.js").then(function (entry) { + assert.equal(entry.path(), "test/raw-commit.js"); + }); }); - it("provides the full path when the entry came from a tree", function() { - var testTree = function(tree, _dir) { + it("provides the full path when the entry came from a tree", function () { + var testTree = function (tree, _dir) { var dir = _dir || "", testPromises = []; - tree.entries().forEach(function(entry) { + tree.entries().forEach(function (entry) { var currentPath = path.posix.join(dir, entry.name()); if (entry.isTree()) { testPromises.push( @@ -81,108 +76,103 @@ describe("TreeEntry", function() { return Promise.all(testPromises); }; - return this.commit.getTree() - .then(testTree); + return this.commit.getTree().then(testTree); }); - it("provides the blob representation of the entry", function() { - return this.commit.getEntry("test/raw-commit.js") - .then(function(entry) { + it("provides the blob representation of the entry", function () { + return this.commit + .getEntry("test/raw-commit.js") + .then(function (entry) { return entry.getBlob(); }) - .then(function(blob) { + .then(function (blob) { assert.equal(blob.rawsize(), 2736); }); }); - it("provides the blob representation via callback", function() { - return this.commit.getEntry("test/raw-commit.js") - .then(function(entry) { - entry.getBlob(function (error, blob) { - assert.equal(blob.rawsize(), 2736); - }); + it("provides the blob representation via callback", function () { + return this.commit.getEntry("test/raw-commit.js").then(function (entry) { + entry.getBlob(function (error, blob) { + assert.equal(blob.rawsize(), 2736); }); + }); }); - it("provides the tree the entry is part of", function() { - return this.commit.getEntry("test") - .then(function(entry) { + it("provides the tree the entry is part of", function () { + return this.commit + .getEntry("test") + .then(function (entry) { return entry.getTree(); }) - .then(function(tree) { + .then(function (tree) { assert.ok(tree instanceof Tree); }); }); - it("can determine if an entry is a file", function() { - return this.commit.getEntry("README.md") - .then(function(entry) { - assert.ok(entry.isFile()); - }); + it("can determine if an entry is a file", function () { + return this.commit.getEntry("README.md").then(function (entry) { + assert.ok(entry.isFile()); + }); }); - it("can determine if an entry is not a file", function() { - return this.commit.getEntry("example") - .then(function(entry) { - assert.equal(entry.isFile(), false); - }); + it("can determine if an entry is not a file", function () { + return this.commit.getEntry("example").then(function (entry) { + assert.equal(entry.isFile(), false); + }); }); - it("can determine if an entry is a directory", function() { - return this.commit.getEntry("example") - .then(function(entry) { - assert.equal(entry.isDirectory(), true); - }); + it("can determine if an entry is a directory", function () { + return this.commit.getEntry("example").then(function (entry) { + assert.equal(entry.isDirectory(), true); + }); }); - it("can determine if an entry is a submodule", function() { + it("can determine if an entry is a submodule", function () { var repo = this.repository; - return repo.getCommit("878ef6efbc5f85c4f63aeedf41addc262a621308") - .then(function(commit) { - return commit.getEntry("vendor/libgit2") - .then(function(entry) { - assert.equal(entry.isSubmodule(), true); + return repo.getCommit("878ef6efbc5f85c4f63aeedf41addc262a621308").then(function (commit) { + return commit.getEntry("vendor/libgit2").then(function (entry) { + assert.equal(entry.isSubmodule(), true); }); }); }); - it("can determine if an entry is not a submodule", function() { - return this.commit.getEntry("example") - .then(function(entry) { - assert.equal(entry.isSubmodule(), false); - }); + it("can determine if an entry is not a submodule", function () { + return this.commit.getEntry("example").then(function (entry) { + assert.equal(entry.isSubmodule(), false); + }); }); - it("can convert entry into a blob", function() { + it("can convert entry into a blob", function () { var repo = this.repository; - return this.commit.getEntry("README.md") - .then(function(entry) { + return this.commit + .getEntry("README.md") + .then(function (entry) { return entry.toObject(repo); }) - .then(function(object) { + .then(function (object) { assert.equal(object.isBlob(), true); }); }); - it("can convert entry into a tree", function() { + it("can convert entry into a tree", function () { var repo = this.repository; - return this.commit.getEntry("example") - .then(function(entry) { + return this.commit + .getEntry("example") + .then(function (entry) { return entry.toObject(repo); }) - .then(function(object) { + .then(function (object) { assert.equal(object.isTree(), true); }); }); - it("does not leak", function() { + it("does not leak", function () { var test = this; - return leakTest(NodeGit.TreeEntry, function() { - return test.commit.getTree() - .then(function(tree) { - return tree.entryByPath("example"); - }); + return leakTest(NodeGit.TreeEntry, function () { + return test.commit.getTree().then(function (tree) { + return tree.entryByPath("example"); + }); }); }); }); diff --git a/test/tests/treebuilder.js b/test/tests/treebuilder.js index 6462fd934..6f9b901e5 100644 --- a/test/tests/treebuilder.js +++ b/test/tests/treebuilder.js @@ -5,94 +5,100 @@ var local = path.join.bind(path, __dirname); var leakTest = require("../utils/leak_test"); -describe("TreeBuilder", function(){ +describe("TreeBuilder", function () { + var Git = require("../../"); + var reposPath = local("../repos/workdir"); + var oid = "111dd657329797f6165f52f5085f61ac976dcf04"; - var Git = require("../../"); - var reposPath = local("../repos/workdir"); - var oid = "111dd657329797f6165f52f5085f61ac976dcf04"; + //setup test repo each test + beforeEach(function () { + var test = this; - //setup test repo each test - beforeEach(function() { - var test = this; - - return Git.Repository.open(reposPath) - .then(function(repo) { - test.repo = repo; - }); - }); - //treebuilder created with no source when creating a new folder - // (each folder in git is a tree) - // or the root folder for a root commit - it("Can create a new treebuilder with no source", function(){ - - return Git.Treebuilder.create(this.repo, null); - }); - //treebuilder created with a source tree can add / read from tree - it("Can create a treebuilder from the latest commit tree", function(){ - - var test = this; - //get latest commit - return test.repo.getHeadCommit() - //get tree of commit - .then(function(commit){ return commit.getTree(); }) - //make treebuilder from tree - .then(function(tree){ return Git.Treebuilder.create(test.repo, tree); }) - //verify treebuilder can do stuff - .then(function(treeBuilder){ - //check - //count how many entries we should have - return fse.readdir(reposPath) - //treebuilder should have all entries in the clean working dir - //(minus .git folder) - .then(function(dirEntries) { - return assert.equal(dirEntries.length-1, treeBuilder.entrycount()); - }); - }); + return Git.Repository.open(reposPath).then(function (repo) { + test.repo = repo; }); - //adding a tree is adding a folder - it("Can add a new tree to an existing tree", function(){ - - var test = this; - //get latest commit - return test.repo.getHeadCommit() - //get tree of commit - .then(function(commit){ return commit.getTree(); }) - //make treebuilder from tree - .then(function(tree){ return Git.Treebuilder.create(test.repo, tree); }) - //verify treebuilder can do stuff - .then(function(rootTreeBuilder){ - //new dir builder - return Git.Treebuilder.create(test.repo, null) - .then(function(newTreeBuilder) { - return newTreeBuilder.write(); + }); + //treebuilder created with no source when creating a new folder + // (each folder in git is a tree) + // or the root folder for a root commit + it("Can create a new treebuilder with no source", function () { + return Git.Treebuilder.create(this.repo, null); + }); + //treebuilder created with a source tree can add / read from tree + it("Can create a treebuilder from the latest commit tree", function () { + var test = this; + //get latest commit + return ( + test.repo + .getHeadCommit() + //get tree of commit + .then(function (commit) { + return commit.getTree(); + }) + //make treebuilder from tree + .then(function (tree) { + return Git.Treebuilder.create(test.repo, tree); }) - .then(function(oid) { - return rootTreeBuilder.insert( - "mynewfolder", - oid, - Git.TreeEntry.FILEMODE.TREE + //verify treebuilder can do stuff + .then(function (treeBuilder) { + //check + //count how many entries we should have + return ( + fse + .readdir(reposPath) + //treebuilder should have all entries in the clean working dir + //(minus .git folder) + .then(function (dirEntries) { + return assert.equal(dirEntries.length - 1, treeBuilder.entrycount()); + }) ); - }); - }) - .then(function(newTreeEntry){ - assert(newTreeEntry.isTree(), - "Created a tree (new folder) that is a tree"); - return Git.Tree.lookup(test.repo, newTreeEntry.oid()); - }); - }); + }) + ); + }); + //adding a tree is adding a folder + it("Can add a new tree to an existing tree", function () { + var test = this; + //get latest commit + return ( + test.repo + .getHeadCommit() + //get tree of commit + .then(function (commit) { + return commit.getTree(); + }) + //make treebuilder from tree + .then(function (tree) { + return Git.Treebuilder.create(test.repo, tree); + }) + //verify treebuilder can do stuff + .then(function (rootTreeBuilder) { + //new dir builder + return Git.Treebuilder.create(test.repo, null) + .then(function (newTreeBuilder) { + return newTreeBuilder.write(); + }) + .then(function (oid) { + return rootTreeBuilder.insert("mynewfolder", oid, Git.TreeEntry.FILEMODE.TREE); + }); + }) + .then(function (newTreeEntry) { + assert(newTreeEntry.isTree(), "Created a tree (new folder) that is a tree"); + return Git.Tree.lookup(test.repo, newTreeEntry.oid()); + }) + ); + }); - it("does not leak inserts", function() { - var test = this; + it("does not leak inserts", function () { + var test = this; - // The underlying C++ git_tree_entry is owned by the treebuilder that - // creates it. But since git_tree_entry is duplicable the generator will - // duplicate it and mark it as self freeing. - // Validate this with the leakTest. - return leakTest(Git.TreeEntry, function() { - return Git.Treebuilder.create(test.repo, null) - .then(function(builder) { - return builder.insert("test", oid, Git.TreeEntry.FILEMODE.BLOB); - }); + // The underlying C++ git_tree_entry is owned by the treebuilder that + // creates it. But since git_tree_entry is duplicable the generator will + // duplicate it and mark it as self freeing. + // Validate this with the leakTest. + return leakTest(Git.TreeEntry, function () { + return Git.Treebuilder.create(test.repo, null).then(function (builder) { + return builder.insert("test", oid, Git.TreeEntry.FILEMODE.BLOB); }); }); + }); }); diff --git a/test/tests/worker.js b/test/tests/worker.js index 1d1b14993..0f5cbd73e 100644 --- a/test/tests/worker.js +++ b/test/tests/worker.js @@ -4,7 +4,7 @@ const fse = require("fs-extra"); const local = path.join.bind(path, __dirname); const NodeGit = require("../../"); -let filterName = "psuedo_filter"; +const filterName = "psuedo_filter"; let Worker; try { @@ -14,36 +14,35 @@ try { } if (Worker) { - describe("Worker", function() { + describe("Worker", function () { const clonePath = local("../repos/clone"); // Set a reasonable timeout here now that our repository has grown. this.timeout(30000); - beforeEach(function() { - return fse.remove(clonePath).catch(function(err) { + beforeEach(function () { + return fse.remove(clonePath).catch(function (err) { console.log(err); throw err; }); }); - afterEach(function() { - return NodeGit.FilterRegistry.unregister(filterName) - .catch(function(error) { - if (error === NodeGit.Error.CODE.ERROR) { - throw new Error("Cannot unregister filter"); - } - }); + afterEach(function () { + return NodeGit.FilterRegistry.unregister(filterName).catch(function (error) { + if (error === NodeGit.Error.CODE.ERROR) { + throw new Error("Cannot unregister filter"); + } + }); }); - it("can perform basic functionality via worker thread", function(done) { + it("can perform basic functionality via worker thread", function (done) { const workerPath = local("../utils/worker.js"); const worker = new Worker(workerPath, { workerData: { clonePath, - url: "https://github.com/nodegit/test.git" - } + url: "https://github.com/nodegit/test.git", + }, }); worker.on("message", (message) => { switch (message) { @@ -66,18 +65,21 @@ if (Worker) { }); for (let i = 0; i < 5; ++i) { - it(`can kill worker thread while in use #${i}`, function(done) { // jshint ignore:line + it(`can kill worker thread while in use #${i}`, function (done) { + // jshint ignore:line const workerPath = local("../utils/worker.js"); - const worker = new Worker(workerPath, { + const worker = new Worker(workerPath, { workerData: { clonePath, - url: "https://github.com/nodegit/test.git" - } + url: "https://github.com/nodegit/test.git", + }, }); worker.on("message", (message) => { switch (message) { case "init": - setTimeout(() => { worker.terminate(); }, 500); + setTimeout(() => { + worker.terminate(); + }, 500); break; case "success": assert.fail(); @@ -106,14 +108,14 @@ if (Worker) { // during the test match the count of objects being tracked by the // nodegit::Context, which will be destroyed on context shutdown. To check // that they are actually being freed can be done with a debugger/profiler. - it("can track objects to free on context shutdown", function(done) { + it("can track objects to free on context shutdown", function (done) { let testOk; const workerPath = local("../utils/worker_context_aware.js"); const worker = new Worker(workerPath, { workerData: { clonePath, - url: "https://github.com/nodegit/test.git" - } + url: "https://github.com/nodegit/test.git", + }, }); worker.on("message", (message) => { switch (message) { @@ -134,8 +136,7 @@ if (Worker) { worker.on("exit", (code) => { if (code === 1 && testOk === true) { done(); - } - else { + } else { assert.fail(); } }); @@ -144,20 +145,23 @@ if (Worker) { // This tests that while calling filter's apply callbacks and the worker // is terminated, node exits gracefully. To make sure we terminate the // worker during a checkout, continuous checkouts will be running in a loop. - it("can kill worker thread while doing a checkout and exit gracefully", function(done) { // jshint ignore:line + it("can kill worker thread while doing a checkout and exit gracefully", function (done) { + // jshint ignore:line const workerPath = local("../utils/worker_checkout.js"); const worker = new Worker(workerPath, { workerData: { clonePath, - url: "https://github.com/nodegit/test.git" - } + url: "https://github.com/nodegit/test.git", + }, }); worker.on("message", (message) => { switch (message) { case "init": // give enough time for the worker to start applying the filter // during continuous checkouts - setTimeout(() => { worker.terminate(); }, 10000); + setTimeout(() => { + worker.terminate(); + }, 10000); break; case "success": assert.fail(); @@ -179,14 +183,15 @@ if (Worker) { // This tests that after calling filter's apply callbacks and the worker // is terminated, there will be no memory leaks. - it("can track objects to free on context shutdown after multiple checkouts", function(done) { // jshint ignore:line + it("can track objects to free on context shutdown after multiple checkouts", function (done) { + // jshint ignore:line let testOk; const workerPath = local("../utils/worker_context_aware_checkout.js"); const worker = new Worker(workerPath, { workerData: { clonePath, - url: "https://github.com/nodegit/test.git" - } + url: "https://github.com/nodegit/test.git", + }, }); worker.on("message", (message) => { switch (message) { @@ -207,8 +212,7 @@ if (Worker) { worker.on("exit", (code) => { if (code === 1 && testOk === true) { done(); - } - else { + } else { assert.fail(); } }); diff --git a/test/utils/garbage_collect.js b/test/utils/garbage_collect.js index a288b99c8..b0a33dae6 100644 --- a/test/utils/garbage_collect.js +++ b/test/utils/garbage_collect.js @@ -4,7 +4,7 @@ function garbageCollect() { var terminatingIterations = 3; var usedBeforeGC = Number.MAX_VALUE; var nondecreasingIterations = 0; - for ( ; ; ) { + for (;;) { global.gc(); var usedAfterGC = process.memoryUsage().heapUsed; if (usedAfterGC >= usedBeforeGC) { diff --git a/test/utils/index_setup.js b/test/utils/index_setup.js index 7dc3748e8..5b364027e 100644 --- a/test/utils/index_setup.js +++ b/test/utils/index_setup.js @@ -4,12 +4,7 @@ var fse = require("fs-extra"); var RepoUtils = require("../utils/repository_setup"); var IndexSetup = { - createConflict: function createConflict( - repository, - _ourBranchName, - _theirBranchName, - _fileName - ) { + createConflict: function createConflict(repository, _ourBranchName, _theirBranchName, _fileName) { var fileName = _fileName || "everyonesFile.txt"; var ourBranchName = _ourBranchName || "ours"; @@ -19,74 +14,69 @@ var IndexSetup = { var ourFileContent = "I like Toll Roads. I have an EZ-Pass!\n"; var theirFileContent = "I'm skeptical about Toll Roads\n"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); var ourCommit; var ourBranch; var theirBranch; - return fse.writeFile( - path.join(repository.workdir(), fileName), - baseFileContent - ) - .then(function() { + return fse + .writeFile(path.join(repository.workdir(), fileName), baseFileContent) + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + .then(function (oid) { + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); }) - .then(function(commitOid) { - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { + .then(function (commitOid) { + return repository + .getCommit(commitOid) + .then(function (commit) { + ourCommit = commit; + }) + .then(function () { + return repository.createBranch(ourBranchName, commitOid).then(function (branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); + }); }) - .then(function(branch) { + .then(function (branch) { theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + theirFileContent); + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + theirFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + .then(function (oid) { + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + ourCommit, + ]); }) - .then(function(_commitOid) { - return fse.writeFile(path.join(repository.workdir(), fileName), - baseFileContent + ourFileContent); + .then(function (_commitOid) { + return fse.writeFile(path.join(repository.workdir(), fileName), baseFileContent + ourFileContent); }) - .then(function() { + .then(function () { return RepoUtils.addFileToIndex(repository, fileName); }) - .then(function(oid) { - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + .then(function (oid) { + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + ourCommit, + ]); }) - .then(function() { - return repository.checkoutBranch( - ourBranch, - new NodeGit.CheckoutOptions() - ); + .then(function () { + return repository.checkoutBranch(ourBranch, new NodeGit.CheckoutOptions()); }) - .then(function() { + .then(function () { return repository.mergeBranches(ourBranchName, theirBranchName); }) - .catch(function(index) { - return NodeGit.Checkout.index(repository, index) - .then(function() { return index; }); + .catch(function (index) { + return NodeGit.Checkout.index(repository, index).then(function () { + return index; + }); }); - } + }, }; module.exports = IndexSetup; diff --git a/test/utils/leak_test.js b/test/utils/leak_test.js index a784facb1..15fedc77d 100644 --- a/test/utils/leak_test.js +++ b/test/utils/leak_test.js @@ -8,26 +8,26 @@ function leakTest(Type, getInstance) { var startNonSelfFreeingCount = Type.getNonSelfFreeingConstructedCount(); var resolve; - var promise = new Promise(function(_resolve) { resolve = _resolve; }); + var promise = new Promise(function (_resolve) { + resolve = _resolve; + }); - getInstance() - .then(function() { - var selfFreeingCount = Type.getSelfFreeingInstanceCount(); - assert.equal(startSelfFreeingCount + 1, selfFreeingCount); - // get out of this promise chain to help GC get rid of the commit - setTimeout(resolve, 0); - }); + getInstance().then(function () { + var selfFreeingCount = Type.getSelfFreeingInstanceCount(); + assert.equal(startSelfFreeingCount + 1, selfFreeingCount); + // get out of this promise chain to help GC get rid of the commit + setTimeout(resolve, 0); + }); - return promise - .then(function() { - garbageCollect(); - var endSelfFreeingCount = Type.getSelfFreeingInstanceCount(); - var endNonSelfFreeingCount = Type.getNonSelfFreeingConstructedCount(); - // any new self-freeing commits should have been freed - assert.equal(startSelfFreeingCount, endSelfFreeingCount); - // no new non-self-freeing commits should have been constructed - assert.equal(startNonSelfFreeingCount, endNonSelfFreeingCount); - }); + return promise.then(function () { + garbageCollect(); + var endSelfFreeingCount = Type.getSelfFreeingInstanceCount(); + var endNonSelfFreeingCount = Type.getNonSelfFreeingConstructedCount(); + // any new self-freeing commits should have been freed + assert.equal(startSelfFreeingCount, endSelfFreeingCount); + // no new non-self-freeing commits should have been constructed + assert.equal(startNonSelfFreeingCount, endNonSelfFreeingCount); + }); } module.exports = leakTest; diff --git a/test/utils/loop_checkout.js b/test/utils/loop_checkout.js index b05fb1f8d..c848102a5 100644 --- a/test/utils/loop_checkout.js +++ b/test/utils/loop_checkout.js @@ -2,9 +2,9 @@ const fse = require("fs-extra"); const path = require("path"); const NodeGit = require("../../"); -const getDirExtFiles = function(dir, ext, done) { +const getDirExtFiles = function (dir, ext, done) { let results = []; - fse.readdir(dir, function(err, list) { + fse.readdir(dir, function (err, list) { if (err) { return done(err); } @@ -15,9 +15,9 @@ const getDirExtFiles = function(dir, ext, done) { return done(null, results); } file = path.resolve(dir, file); - fse.stat(file, function(err, stat) { + fse.stat(file, function (err, stat) { if (stat && stat.isDirectory()) { - getDirExtFiles(file, ext, function(err, res) { + getDirExtFiles(file, ext, function (err, res) { results = results.concat(res); next(); }); @@ -32,9 +32,9 @@ const getDirExtFiles = function(dir, ext, done) { }); }; -const getDirFilesToChange = function(dir, ext) { - return new Promise(function(resolve, reject) { - getDirExtFiles(dir, ext, function(err, results) { +const getDirFilesToChange = function (dir, ext) { + return new Promise(function (resolve, reject) { + getDirExtFiles(dir, ext, function (err, results) { if (err) { reject(err); } @@ -47,38 +47,34 @@ const getDirFilesToChange = function(dir, ext) { // in directory 'dir' recursively. // Returns relative file paths const changeDirExtFiles = function (dir, ext, newText) { - let filesChanged = []; + const filesChanged = []; return getDirFilesToChange(dir, ext) - .then(function(filesWithExt) { - filesWithExt.forEach(function(file) { - fse.writeFile( - file, - newText, - { encoding: "utf-8" } - ); - filesChanged.push(path.relative(dir, file)); + .then(function (filesWithExt) { + filesWithExt.forEach(function (file) { + fse.writeFile(file, newText, { encoding: "utf-8" }); + filesChanged.push(path.relative(dir, file)); + }); + return filesChanged; + }) + .catch(function () { + throw new Error("Error getting files with extension .".concat(ext)); }); - return filesChanged; - }) - .catch(function() { - throw new Error("Error getting files with extension .".concat(ext)); - }); }; // 'times' to limit the number of iterations in the loop. // 0 means no limit. -const loopingCheckoutHead = async function(repoPath, repo, times) { +const loopingCheckoutHead = async function (repoPath, repo, times) { const text0 = "Text0: changing content to trigger checkout"; const text1 = "Text1: changing content to trigger checkout"; let iteration = 0; // eslint-disable-next-line no-constant-condition - for (let i = 0; true; i = ++i%2) { - const newText = (i == 0) ? text0 : text1; - const jsRelativeFilePahts = await changeDirExtFiles(repoPath, "js", newText); // jshint ignore:line - let checkoutOpts = { + for (let i = 0; true; i = ++i % 2) { + const newText = i == 0 ? text0 : text1; + const jsRelativeFilePahts = await changeDirExtFiles(repoPath, "js", newText); // jshint ignore:line + const checkoutOpts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, - paths: jsRelativeFilePahts + paths: jsRelativeFilePahts, }; await NodeGit.Checkout.head(repo, checkoutOpts); @@ -89,4 +85,4 @@ const loopingCheckoutHead = async function(repoPath, repo, times) { return; }; -module.exports = loopingCheckoutHead; \ No newline at end of file +module.exports = loopingCheckoutHead; diff --git a/test/utils/repository_setup.js b/test/utils/repository_setup.js index 5a36bf746..aee606624 100644 --- a/test/utils/repository_setup.js +++ b/test/utils/repository_setup.js @@ -4,197 +4,180 @@ var path = require("path"); var fse = require("fs-extra"); var RepositorySetup = { - addFileToIndex: - function addFileToIndex(repository, fileName) { - return repository.refreshIndex() - .then(function(index) { - return index.addByPath(fileName) - .then(function() { - return index.write(); - }) - .then(function() { - return index.writeTree(); - }); - }); - }, - - commitFileToRepo: - function commitFileToRepo(repository, fileName, fileContent, parentCommit) { - var repoWorkDir = repository.workdir(); - var signature = NodeGit.Signature.create("Foo bar", - "foo@bar.com", 123456789, 60); - - var filePath = path.join(repoWorkDir, fileName); - var parents = []; - if (parentCommit) { - parents.push(parentCommit); - } - - // fse.ensure allows us to write files inside new folders - return fse.ensureFile(filePath) - .then(function() { - return fse.writeFile(filePath, fileContent); - }) - .then(function() { - return RepositorySetup.addFileToIndex(repository, fileName); - }) - .then(function(oid) { - return repository.createCommit("HEAD", signature, signature, - "initial commit", oid, parents); - }) - .then(function(commitOid) { - return repository.getCommit(commitOid); - }); - }, - - createRepository: - function createRepository(repoPath, isBare){ - // Create a new repository in a clean directory - return fse.remove(repoPath) - .then(function() { - return fse.ensureDir(repoPath); - }) - .then(function() { - var bare = typeof isBare !== "undefined" ? isBare : 0; - return NodeGit.Repository.init(repoPath, bare); - }); - }, - - // Expects empty repo - setupBranches: - function setupBranches(repository, checkoutOurs) { - var repoWorkDir = repository.workdir(); - - var ourBranchName = "ours"; - var theirBranchName = "theirs"; - - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; - - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; - - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - - var initialCommit; - var ourBranch; - var theirBranch; - - var ret = { - ourBranchName: ourBranchName, - theirBranchName: theirBranchName, - - ourSignature: ourSignature, - theirSignature: theirSignature, - - ourFileName: ourFileName, - theirFileName: theirFileName, - - ourFileContent: ourFileContent, - theirFileContent: theirFileContent - }; - - return Promise.all([ - fse.writeFile(path.join(repoWorkDir, baseFileName), - baseFileContent), - fse.writeFile(path.join(repoWorkDir, ourFileName), - ourFileContent), - fse.writeFile(path.join(repoWorkDir, theirFileName), - theirFileContent) - ]) - .then(function() { - return RepositorySetup.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - - return repository.createCommit( - "HEAD", ourSignature, ourSignature, - "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - - return repository.getCommit(commitOid); - }) - .then(function(commit) { - ret.initialCommit = initialCommit = commit; - - return Promise.all([ - repository.createBranch(ourBranchName, initialCommit), - repository.createBranch(theirBranchName, initialCommit) - ]); - }) - .then(function(branches) { - assert(branches[0]); - assert(branches[1]); - - ret.ourBranch = ourBranch = branches[0]; - ret.theirBranch = theirBranch = branches[1]; - - return RepositorySetup.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - return repository.getCommit(commitOid); - }) - .then(function(commit) { - ret.ourCommit = commit; - return NodeGit.Reset.default( - repository, initialCommit, ourFileName); - }) - .then(function() { - return RepositorySetup.addFileToIndex( - repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); - - return repository.createCommit( - theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [initialCommit]); - }) - .then(function(commitOid) { - return repository.getCommit(commitOid); - }) - .then(function(commit) { - ret.theirCommit = commit; - return NodeGit.Reset.default( - repository, initialCommit, theirFileName); - }) - .then(function() { - return Promise.all([ - fse.remove(path.join(repoWorkDir, ourFileName)), - fse.remove(path.join(repoWorkDir, theirFileName)) - ]); - }) - .then(function() { - if (checkoutOurs) { - var opts = { - checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE - }; - - return repository.checkoutBranch(ourBranchName, opts); - } - }) - .then(function() { - return ret; - }); - } + addFileToIndex: function addFileToIndex(repository, fileName) { + return repository.refreshIndex().then(function (index) { + return index + .addByPath(fileName) + .then(function () { + return index.write(); + }) + .then(function () { + return index.writeTree(); + }); + }); + }, + + commitFileToRepo: function commitFileToRepo(repository, fileName, fileContent, parentCommit) { + var repoWorkDir = repository.workdir(); + var signature = NodeGit.Signature.create("Foo bar", "foo@bar.com", 123456789, 60); + + var filePath = path.join(repoWorkDir, fileName); + var parents = []; + if (parentCommit) { + parents.push(parentCommit); + } + + // fse.ensure allows us to write files inside new folders + return fse + .ensureFile(filePath) + .then(function () { + return fse.writeFile(filePath, fileContent); + }) + .then(function () { + return RepositorySetup.addFileToIndex(repository, fileName); + }) + .then(function (oid) { + return repository.createCommit("HEAD", signature, signature, "initial commit", oid, parents); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid); + }); + }, + + createRepository: function createRepository(repoPath, isBare) { + // Create a new repository in a clean directory + return fse + .remove(repoPath) + .then(function () { + return fse.ensureDir(repoPath); + }) + .then(function () { + var bare = typeof isBare !== "undefined" ? isBare : 0; + return NodeGit.Repository.init(repoPath, bare); + }); + }, + + // Expects empty repo + setupBranches: function setupBranches(repository, checkoutOurs) { + var repoWorkDir = repository.workdir(); + + var ourBranchName = "ours"; + var theirBranchName = "theirs"; + + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; + + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; + + var ourSignature = NodeGit.Signature.create("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + + var initialCommit; + var ourBranch; + var theirBranch; + + var ret = { + ourBranchName: ourBranchName, + theirBranchName: theirBranchName, + + ourSignature: ourSignature, + theirSignature: theirSignature, + + ourFileName: ourFileName, + theirFileName: theirFileName, + + ourFileContent: ourFileContent, + theirFileContent: theirFileContent, + }; + + return Promise.all([ + fse.writeFile(path.join(repoWorkDir, baseFileName), baseFileContent), + fse.writeFile(path.join(repoWorkDir, ourFileName), ourFileContent), + fse.writeFile(path.join(repoWorkDir, theirFileName), theirFileContent), + ]) + .then(function () { + return RepositorySetup.addFileToIndex(repository, baseFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); + }) + .then(function (commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository.getCommit(commitOid); + }) + .then(function (commit) { + ret.initialCommit = initialCommit = commit; + + return Promise.all([ + repository.createBranch(ourBranchName, initialCommit), + repository.createBranch(theirBranchName, initialCommit), + ]); + }) + .then(function (branches) { + assert(branches[0]); + assert(branches[1]); + + ret.ourBranch = ourBranch = branches[0]; + ret.theirBranch = theirBranch = branches[1]; + + return RepositorySetup.addFileToIndex(repository, ourFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ + initialCommit, + ]); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid); + }) + .then(function (commit) { + ret.ourCommit = commit; + return NodeGit.Reset.default(repository, initialCommit, ourFileName); + }) + .then(function () { + return RepositorySetup.addFileToIndex(repository, theirFileName); + }) + .then(function (oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ + initialCommit, + ]); + }) + .then(function (commitOid) { + return repository.getCommit(commitOid); + }) + .then(function (commit) { + ret.theirCommit = commit; + return NodeGit.Reset.default(repository, initialCommit, theirFileName); + }) + .then(function () { + return Promise.all([ + fse.remove(path.join(repoWorkDir, ourFileName)), + fse.remove(path.join(repoWorkDir, theirFileName)), + ]); + }) + .then(function () { + if (checkoutOurs) { + var opts = { + checkoutStrategy: NodeGit.Checkout.STRATEGY.FORCE, + }; + + return repository.checkoutBranch(ourBranchName, opts); + } + }) + .then(function () { + return ret; + }); + }, }; module.exports = RepositorySetup; diff --git a/test/utils/worker.js b/test/utils/worker.js index 6f2d21840..b701e5824 100644 --- a/test/utils/worker.js +++ b/test/utils/worker.js @@ -1,8 +1,4 @@ -const { - isMainThread, - parentPort, - workerData -} = require("worker_threads"); +const { isMainThread, parentPort, workerData } = require("worker_threads"); const assert = require("assert"); const NodeGit = require("../../"); @@ -14,25 +10,30 @@ parentPort.postMessage("init"); const { clonePath, url } = workerData; const opts = { - fetchOpts: { - callbacks: { - certificateCheck: () => 0 - } - } + fetchOpts: { + callbacks: { + certificateCheck: () => 0, + }, + }, }; let repository; -return NodeGit.Clone(url, clonePath, opts).then((_repository) => { - repository = _repository; - assert.ok(repository instanceof NodeGit.Repository); - return repository.index(); -}).then((index) => { - assert.ok(index instanceof NodeGit.Index); - return repository.getRemoteNames(); -}).then((remotes) => { - assert.ok(Array.isArray(remotes)); - return repository.getCurrentBranch(); -}).then((branch) => { - assert.ok(branch instanceof NodeGit.Reference); - parentPort.postMessage("success"); -}).catch(() => parentPort.postMessage("failure")); +return NodeGit.Clone(url, clonePath, opts) + .then((_repository) => { + repository = _repository; + assert.ok(repository instanceof NodeGit.Repository); + return repository.index(); + }) + .then((index) => { + assert.ok(index instanceof NodeGit.Index); + return repository.getRemoteNames(); + }) + .then((remotes) => { + assert.ok(Array.isArray(remotes)); + return repository.getCurrentBranch(); + }) + .then((branch) => { + assert.ok(branch instanceof NodeGit.Reference); + parentPort.postMessage("success"); + }) + .catch(() => parentPort.postMessage("failure")); diff --git a/test/utils/worker_checkout.js b/test/utils/worker_checkout.js index 661bd3dca..e1524f09a 100644 --- a/test/utils/worker_checkout.js +++ b/test/utils/worker_checkout.js @@ -1,8 +1,4 @@ -const { - isMainThread, - parentPort, - workerData -} = require("worker_threads"); +const { isMainThread, parentPort, workerData } = require("worker_threads"); const assert = require("assert"); const NodeGit = require("../../"); const loopingCheckoutHead = require("./loop_checkout.js"); @@ -15,37 +11,42 @@ parentPort.postMessage("init"); const { clonePath, url } = workerData; const cloneOpts = { - fetchOpts: { - callbacks: { - certificateCheck: () => 0 - } - } + fetchOpts: { + callbacks: { + certificateCheck: () => 0, + }, + }, }; let repository; -let filterName = "psuedo_filter"; +const filterName = "psuedo_filter"; let applyCallbackResult = 1; return NodeGit.Clone(url, clonePath, cloneOpts) -.then(function(_repository) { - repository = _repository; - assert.ok(repository instanceof NodeGit.Repository); - return NodeGit.FilterRegistry.register(filterName, { - apply: function() { - applyCallbackResult = 0; - }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0); -}) -.then(function(result) { - assert.strictEqual(result, NodeGit.Error.CODE.OK); - return loopingCheckoutHead(clonePath, repository, 0); -}).then(function() { - assert.strictEqual(applyCallbackResult, 0); - parentPort.postMessage("success"); -}) -.catch(() => { - parentPort.postMessage("failure"); -}); \ No newline at end of file + .then(function (_repository) { + repository = _repository; + assert.ok(repository instanceof NodeGit.Repository); + return NodeGit.FilterRegistry.register( + filterName, + { + apply: function () { + applyCallbackResult = 0; + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, + }, + 0 + ); + }) + .then(function (result) { + assert.strictEqual(result, NodeGit.Error.CODE.OK); + return loopingCheckoutHead(clonePath, repository, 0); + }) + .then(function () { + assert.strictEqual(applyCallbackResult, 0); + parentPort.postMessage("success"); + }) + .catch(() => { + parentPort.postMessage("failure"); + }); diff --git a/test/utils/worker_context_aware.js b/test/utils/worker_context_aware.js index a255267f3..071610f1c 100644 --- a/test/utils/worker_context_aware.js +++ b/test/utils/worker_context_aware.js @@ -1,8 +1,4 @@ -const { - isMainThread, - parentPort, - workerData -} = require("worker_threads"); +const { isMainThread, parentPort, workerData } = require("worker_threads"); const garbageCollect = require("./garbage_collect.js"); const assert = require("assert"); const NodeGit = require("../../"); @@ -14,61 +10,62 @@ if (isMainThread) { const { clonePath, url } = workerData; const opts = { - fetchOpts: { - callbacks: { - certificateCheck: () => 0 - } - } + fetchOpts: { + callbacks: { + certificateCheck: () => 0, + }, + }, }; let repository; const oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; return NodeGit.Clone(url, clonePath, opts) -.then((_repository) => { - repository = _repository; - assert.ok(repository instanceof NodeGit.Repository); - return repository.getCommit(oid); -}).then((commit) => { - assert.ok(commit instanceof NodeGit.Commit); - var historyCount = 0; - var history = commit.history(); + .then((_repository) => { + repository = _repository; + assert.ok(repository instanceof NodeGit.Repository); + return repository.getCommit(oid); + }) + .then((commit) => { + assert.ok(commit instanceof NodeGit.Commit); + var historyCount = 0; + var history = commit.history(); - history.on("commit", function(_commit) { - // Number of commits is known to be higher than 200 - if (++historyCount == 200) { - // Tracked objects must work too when the Garbage Collector is triggered - garbageCollect(); + history.on("commit", function (_commit) { + // Number of commits is known to be higher than 200 + if (++historyCount == 200) { + // Tracked objects must work too when the Garbage Collector is triggered + garbageCollect(); - // Count total of objects left after being created/destroyed - const freeingCount = - NodeGit.Cert.getNonSelfFreeingConstructedCount() + - NodeGit.Repository.getSelfFreeingInstanceCount() + - NodeGit.Commit.getSelfFreeingInstanceCount() + - NodeGit.Oid.getSelfFreeingInstanceCount() + - NodeGit.Revwalk.getSelfFreeingInstanceCount(); + // Count total of objects left after being created/destroyed + const freeingCount = + NodeGit.Cert.getNonSelfFreeingConstructedCount() + + NodeGit.Repository.getSelfFreeingInstanceCount() + + NodeGit.Commit.getSelfFreeingInstanceCount() + + NodeGit.Oid.getSelfFreeingInstanceCount() + + NodeGit.Revwalk.getSelfFreeingInstanceCount(); - const numberOfTrackedObjects = NodeGit.getNumberOfTrackedObjects(); + const numberOfTrackedObjects = NodeGit.getNumberOfTrackedObjects(); - if (freeingCount === numberOfTrackedObjects) { - parentPort.postMessage("numbersMatch"); + if (freeingCount === numberOfTrackedObjects) { + parentPort.postMessage("numbersMatch"); + } else { + parentPort.postMessage("numbersDoNotMatch"); + } } - else { - parentPort.postMessage("numbersDoNotMatch"); - } - } - }); - - history.on("end", function(_commits) { - // Test should not get this far - parentPort.postMessage("failure"); - }); + }); + + history.on("end", function (_commits) { + // Test should not get this far + parentPort.postMessage("failure"); + }); + + history.on("error", function (_end) { + assert.ok(false); + }); - history.on("error", function(_end) { - assert.ok(false); - }); + history.start(); - history.start(); - - return promisify(setTimeout)(50000); -}).catch(() => parentPort.postMessage("failure")); \ No newline at end of file + return promisify(setTimeout)(50000); + }) + .catch(() => parentPort.postMessage("failure")); diff --git a/test/utils/worker_context_aware_checkout.js b/test/utils/worker_context_aware_checkout.js index 1b252876b..9966701e1 100644 --- a/test/utils/worker_context_aware_checkout.js +++ b/test/utils/worker_context_aware_checkout.js @@ -1,8 +1,4 @@ -const { - isMainThread, - parentPort, - workerData -} = require("worker_threads"); +const { isMainThread, parentPort, workerData } = require("worker_threads"); const garbageCollect = require("./garbage_collect.js"); const assert = require("assert"); const NodeGit = require("../../"); @@ -15,52 +11,57 @@ if (isMainThread) { const { clonePath, url } = workerData; const cloneOpts = { - fetchOpts: { - callbacks: { - certificateCheck: () => 0 - } - } + fetchOpts: { + callbacks: { + certificateCheck: () => 0, + }, + }, }; let repository; -let filterName = "psuedo_filter"; +const filterName = "psuedo_filter"; let applyCallbackResult = 1; return NodeGit.Clone(url, clonePath, cloneOpts) -.then(function(_repository) { - repository = _repository; - assert.ok(repository instanceof NodeGit.Repository); - return NodeGit.FilterRegistry.register(filterName, { - apply: function() { - applyCallbackResult = 0; - }, - check: function() { - return NodeGit.Error.CODE.OK; - } - }, 0); -}) -.then(function(result) { - assert.strictEqual(result, NodeGit.Error.CODE.OK); - return loopingCheckoutHead(clonePath, repository, 10); -}).then(function() { - assert.strictEqual(applyCallbackResult, 0); - // Tracked objects must work too when the Garbage Collector is triggered - garbageCollect(); + .then(function (_repository) { + repository = _repository; + assert.ok(repository instanceof NodeGit.Repository); + return NodeGit.FilterRegistry.register( + filterName, + { + apply: function () { + applyCallbackResult = 0; + }, + check: function () { + return NodeGit.Error.CODE.OK; + }, + }, + 0 + ); + }) + .then(function (result) { + assert.strictEqual(result, NodeGit.Error.CODE.OK); + return loopingCheckoutHead(clonePath, repository, 10); + }) + .then(function () { + assert.strictEqual(applyCallbackResult, 0); + // Tracked objects must work too when the Garbage Collector is triggered + garbageCollect(); - // Count total of objects left after being created/destroyed - const freeingCount = - NodeGit.Cert.getNonSelfFreeingConstructedCount() + - NodeGit.FilterSource.getNonSelfFreeingConstructedCount() + - NodeGit.Buf.getNonSelfFreeingConstructedCount() + - NodeGit.Repository.getSelfFreeingInstanceCount(); + // Count total of objects left after being created/destroyed + const freeingCount = + NodeGit.Cert.getNonSelfFreeingConstructedCount() + + NodeGit.FilterSource.getNonSelfFreeingConstructedCount() + + NodeGit.Buf.getNonSelfFreeingConstructedCount() + + NodeGit.Repository.getSelfFreeingInstanceCount(); - const numberOfTrackedObjects = NodeGit.getNumberOfTrackedObjects(); + const numberOfTrackedObjects = NodeGit.getNumberOfTrackedObjects(); - if (freeingCount === numberOfTrackedObjects) { - parentPort.postMessage("numbersMatch"); - } - else { - parentPort.postMessage("numbersDoNotMatch"); - } - return promisify(setTimeout)(50000); -}).catch(() => parentPort.postMessage("failure")); \ No newline at end of file + if (freeingCount === numberOfTrackedObjects) { + parentPort.postMessage("numbersMatch"); + } else { + parentPort.postMessage("numbersDoNotMatch"); + } + return promisify(setTimeout)(50000); + }) + .catch(() => parentPort.postMessage("failure")); diff --git a/utils/README.md b/utils/README.md index cf046f05b..40b5c7bb5 100644 --- a/utils/README.md +++ b/utils/README.md @@ -1,9 +1,11 @@ ## /utils - Contains utilities for NodeGit +Contains utilities for NodeGit - #### buildFlags - Determines how NodeGit should build. Use `BUILD_ONLY` environment variable to build from source. +#### buildFlags - ## acquireOpenSSL - Download and compile OpenSSL. +Determines how NodeGit should build. Use `BUILD_ONLY` environment variable to build from source. + +## acquireOpenSSL + +Download and compile OpenSSL. diff --git a/utils/acquireOpenSSL.js b/utils/acquireOpenSSL.js index 7969b29ce..8b3f38b58 100644 --- a/utils/acquireOpenSSL.js +++ b/utils/acquireOpenSSL.js @@ -14,7 +14,7 @@ const zlib = require("zlib"); const pipeline = promisify(stream.pipeline); -const packageJson = require('../package.json') +const packageJson = require("../package.json"); const OPENSSL_VERSION = "1.1.1s"; const win32BatPath = path.join(__dirname, "build-openssl.bat"); @@ -22,9 +22,7 @@ const vendorPath = path.resolve(__dirname, "..", "vendor"); const opensslPatchPath = path.join(vendorPath, "patches", "openssl"); const extractPath = path.join(vendorPath, "openssl"); -const pathsToIncludeForPackage = [ - "include", "lib" -]; +const pathsToIncludeForPackage = ["include", "lib"]; const getOpenSSLSourceUrl = (version) => `https://www.openssl.org/source/openssl-${version}.tar.gz`; const getOpenSSLSourceSha256Url = (version) => `${getOpenSSLSourceUrl(version)}.sha256`; @@ -50,9 +48,7 @@ class HashVerify extends stream.Transform { const makeHashVerifyOnFinal = (expected) => (digest) => { const digestOk = digest === expected; - return digestOk - ? null - : new Error(`Digest not OK: ${digest} !== ${this.expected}`); + return digestOk ? null : new Error(`Digest not OK: ${digest} !== ${this.expected}`); }; // currently this only needs to be done on linux @@ -62,16 +58,20 @@ const applyOpenSSLPatches = async (buildCwd, operatingSystem) => { const patchTarget = patchFilename.split("-")[1]; if (patchFilename.split(".").pop() === "patch" && (patchTarget === operatingSystem || patchTarget === "all")) { console.log(`applying ${patchFilename}`); - await execPromise(`patch -up0 -i ${path.join(opensslPatchPath, patchFilename)}`, { - cwd: buildCwd - }, { pipeOutput: true }); + await execPromise( + `patch -up0 -i ${path.join(opensslPatchPath, patchFilename)}`, + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); } } - } catch(e) { + } catch (e) { console.log("Patch application failed: ", e); throw e; } -} +}; const buildDarwin = async (buildCwd, macOsDeploymentTarget) => { if (!macOsDeploymentTarget) { @@ -92,28 +92,44 @@ const buildDarwin = async (buildCwd, macOsDeploymentTarget) => { `--prefix="${extractPath}"`, `--openssldir="${extractPath}"`, // set macos version requirement - `-mmacosx-version-min=${macOsDeploymentTarget}` + `-mmacosx-version-min=${macOsDeploymentTarget}`, ]; - await execPromise(`./Configure ${buildArgs.join(" ")}`, { - cwd: buildCwd - }, { pipeOutput: true }); + await execPromise( + `./Configure ${buildArgs.join(" ")}`, + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); await applyOpenSSLPatches(buildCwd, "darwin"); // only build the libraries, not the tests/fuzzer or apps - await execPromise("make build_libs", { - cwd: buildCwd - }, { pipeOutput: true }); - - await execPromise("make test", { - cwd: buildCwd - }, { pipeOutput: true }); - - await execPromise("make install_sw", { - cwd: buildCwd, - maxBuffer: 10 * 1024 * 1024 // we should really just use spawn - }, { pipeOutput: true }); + await execPromise( + "make build_libs", + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); + + await execPromise( + "make test", + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); + + await execPromise( + "make install_sw", + { + cwd: buildCwd, + maxBuffer: 10 * 1024 * 1024, // we should really just use spawn + }, + { pipeOutput: true } + ); }; const buildLinux = async (buildCwd) => { @@ -132,28 +148,44 @@ const buildLinux = async (buildCwd) => { "no-comp", // set install directory `--prefix="${extractPath}"`, - `--openssldir="${extractPath}"` + `--openssldir="${extractPath}"`, ]; - await execPromise(`./Configure ${buildArgs.join(" ")}`, { - cwd: buildCwd - }, { pipeOutput: true }); + await execPromise( + `./Configure ${buildArgs.join(" ")}`, + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); await applyOpenSSLPatches(buildCwd, "linux"); // only build the libraries, not the tests/fuzzer or apps - await execPromise("make build_libs", { - cwd: buildCwd - }, { pipeOutput: true }); + await execPromise( + "make build_libs", + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); - await execPromise("make test", { - cwd: buildCwd - }, { pipeOutput: true }); + await execPromise( + "make test", + { + cwd: buildCwd, + }, + { pipeOutput: true } + ); // only install software, not the docs - await execPromise("make install_sw", { - cwd: buildCwd, - maxBuffer: 10 * 1024 * 1024 // we should really just use spawn - }, { pipeOutput: true }); + await execPromise( + "make install_sw", + { + cwd: buildCwd, + maxBuffer: 10 * 1024 * 1024, // we should really just use spawn + }, + { pipeOutput: true } + ); }; const buildWin32 = async (buildCwd, vsBuildArch) => { @@ -161,12 +193,11 @@ const buildWin32 = async (buildCwd, vsBuildArch) => { throw new Error("Expected vsBuildArch to be specified"); } - const programFilesPath = (process.arch === "x64" - ? process.env["ProgramFiles(x86)"] - : process.env.ProgramFiles) || "C:\\Program Files"; - const vcvarsallPath = process.env.npm_config_vcvarsall_path || `${ - programFilesPath - }\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat`; + const programFilesPath = + (process.arch === "x64" ? process.env["ProgramFiles(x86)"] : process.env.ProgramFiles) || "C:\\Program Files"; + const vcvarsallPath = + process.env.npm_config_vcvarsall_path || + `${programFilesPath}\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat`; try { await fs.stat(vcvarsallPath); } catch { @@ -184,16 +215,20 @@ const buildWin32 = async (buildCwd, vsBuildArch) => { vcTarget = "VC-WIN32"; break; } - + default: { throw new Error(`Unknown vsBuildArch: ${vsBuildArch}`); } } - await execPromise(`"${win32BatPath}" "${vcvarsallPath}" ${vsBuildArch} ${vcTarget}`, { - cwd: buildCwd, - maxBuffer: 10 * 1024 * 1024 // we should really just use spawn - }, { pipeOutput: true }); + await execPromise( + `"${win32BatPath}" "${vcvarsallPath}" ${vsBuildArch} ${vcTarget}`, + { + cwd: buildCwd, + maxBuffer: 10 * 1024 * 1024, // we should really just use spawn + }, + { pipeOutput: true } + ); }; const removeOpenSSLIfOudated = async (openSSLVersion) => { @@ -230,16 +265,12 @@ const makeOnStreamDownloadProgress = () => { const currentTime = performance.now(); if (currentTime - lastReport > 1 * 1000) { lastReport = currentTime; - console.log(`progress: ${transferred}/${total} (${(percent * 100).toFixed(2)}%)`) + console.log(`progress: ${transferred}/${total} (${(percent * 100).toFixed(2)}%)`); } }; }; -const buildOpenSSLIfNecessary = async ({ - macOsDeploymentTarget, - openSSLVersion, - vsBuildArch -}) => { +const buildOpenSSLIfNecessary = async ({ macOsDeploymentTarget, openSSLVersion, vsBuildArch }) => { if (process.platform !== "darwin" && process.platform !== "win32" && process.platform !== "linux") { console.log(`Skipping OpenSSL build, not required on ${process.platform}`); return; @@ -290,13 +321,9 @@ const buildOpenSSLIfNecessary = async ({ } console.log("Build finished."); -} +}; -const downloadOpenSSLIfNecessary = async ({ - downloadBinUrl, - maybeDownloadSha256, - maybeDownloadSha256Url -}) => { +const downloadOpenSSLIfNecessary = async ({ downloadBinUrl, maybeDownloadSha256, maybeDownloadSha256Url }) => { if (process.platform !== "darwin" && process.platform !== "win32" && process.platform !== "linux") { console.log(`Skipping OpenSSL download, not required on ${process.platform}`); return; @@ -314,7 +341,7 @@ const downloadOpenSSLIfNecessary = async ({ } catch { // ignore } - + if (maybeDownloadSha256Url) { maybeDownloadSha256 = (await got(maybeDownloadSha256Url)).body.trim(); } @@ -324,30 +351,24 @@ const downloadOpenSSLIfNecessary = async ({ const pipelineSteps = [ downloadStream, - maybeDownloadSha256 - ? new HashVerify("sha256", makeHashVerifyOnFinal(maybeDownloadSha256)) - : null, + maybeDownloadSha256 ? new HashVerify("sha256", makeHashVerifyOnFinal(maybeDownloadSha256)) : null, zlib.createGunzip(), - tar.extract(extractPath) - ].filter(step => step !== null); - await pipeline( - ...pipelineSteps - ); + tar.extract(extractPath), + ].filter((step) => step !== null); + await pipeline(...pipelineSteps); console.log(`OpenSSL download + extract complete${maybeDownloadSha256 ? ": SHA256 OK." : "."}`); console.log("Download finished."); -} +}; const getOpenSSLPackageName = () => { let arch = process.arch; - if (process.platform === "win32" && ( - process.arch === "ia32" || process.env.NODEGIT_VS_BUILD_ARCH === "x86" - )) { + if (process.platform === "win32" && (process.arch === "ia32" || process.env.NODEGIT_VS_BUILD_ARCH === "x86")) { arch = "x86"; } return `openssl-${OPENSSL_VERSION}-${process.platform}-${arch}.tar.gz`; -} +}; const getOpenSSLPackageUrl = () => `${packageJson.binary.host}${getOpenSSLPackageName()}`; @@ -361,13 +382,12 @@ const buildPackage = async () => { entries: pathsToIncludeForPackage, ignore: (name) => { // Ignore pkgconfig files - return path.extname(name) === ".pc" - || path.basename(name) === "pkgconfig"; + return path.extname(name) === ".pc" || path.basename(name) === "pkgconfig"; }, // eslint-disable-next-line no-octal dmode: 0755, // eslint-disable-next-line no-octal - fmode: 0644 + fmode: 0644, }), zlib.createGzip(), new HashVerify("sha256", (digest) => { @@ -381,11 +401,12 @@ const buildPackage = async () => { const acquireOpenSSL = async () => { try { - const downloadBinUrl = process.env.npm_config_openssl_bin_url - || (['win32', 'darwin'].includes(process.platform) ? getOpenSSLPackageUrl() : undefined); - if (downloadBinUrl && downloadBinUrl !== 'skip' && !process.env.NODEGIT_OPENSSL_BUILD_PACKAGE) { + const downloadBinUrl = + process.env.npm_config_openssl_bin_url || + (["win32", "darwin"].includes(process.platform) ? getOpenSSLPackageUrl() : undefined); + if (downloadBinUrl && downloadBinUrl !== "skip" && !process.env.NODEGIT_OPENSSL_BUILD_PACKAGE) { const downloadOptions = { downloadBinUrl }; - if (process.env.npm_config_openssl_bin_sha256 !== 'skip') { + if (process.env.npm_config_openssl_bin_sha256 !== "skip") { if (process.env.npm_config_openssl_bin_sha256) { downloadOptions.maybeDownloadSha256 = process.env.npm_config_openssl_bin_sha256; } else { @@ -416,7 +437,7 @@ const acquireOpenSSL = async () => { await buildOpenSSLIfNecessary({ openSSLVersion: OPENSSL_VERSION, macOsDeploymentTarget, - vsBuildArch + vsBuildArch, }); if (process.env.NODEGIT_OPENSSL_BUILD_PACKAGE) { await buildPackage(); @@ -430,7 +451,7 @@ const acquireOpenSSL = async () => { module.exports = { acquireOpenSSL, getOpenSSLPackageName, - OPENSSL_VERSION + OPENSSL_VERSION, }; if (require.main === module) { diff --git a/utils/buildFlags.js b/utils/buildFlags.js index 3c3d9d9b2..f4dfcf3d6 100644 --- a/utils/buildFlags.js +++ b/utils/buildFlags.js @@ -15,5 +15,5 @@ module.exports = { isElectron: process.env.npm_config_runtime === "electron", isGitRepo: isGitRepo, isNwjs: process.env.npm_config_runtime === "node-webkit", - mustBuild: !!(isGitRepo || process.env.BUILD_DEBUG || process.env.BUILD_ONLY) + mustBuild: !!(isGitRepo || process.env.BUILD_DEBUG || process.env.BUILD_ONLY), }; diff --git a/utils/configureLibssh2.js b/utils/configureLibssh2.js index 95328ebdb..357581ff9 100644 --- a/utils/configureLibssh2.js +++ b/utils/configureLibssh2.js @@ -5,7 +5,7 @@ var path = require("path"); const opensslVendorDirectory = path.resolve(__dirname, "..", "vendor", "openssl"); const libssh2VendorDirectory = path.resolve(__dirname, "..", "vendor", "libssh2"); const libssh2ConfigureScript = path.join(libssh2VendorDirectory, "configure"); -const libssh2StaticConfigDirectory = path.resolve(__dirname, "..", "vendor", "static_config", "libssh2"); +const libssh2StaticConfigDirectory = path.resolve(__dirname, "..", "vendor", "static_config", "libssh2"); module.exports = function retrieveExternalDependencies() { console.info("[nodegit] Configuring libssh2."); @@ -19,28 +19,26 @@ module.exports = function retrieveExternalDependencies() { } // Run the `configure` script on Linux - return new Promise(function(resolve, reject) { + return new Promise(function (resolve, reject) { var newEnv = {}; - Object.keys(process.env).forEach(function(key) { + Object.keys(process.env).forEach(function (key) { newEnv[key] = process.env[key]; }); - let cpArgs = process.env.NODEGIT_OPENSSL_STATIC_LINK === '1' - ? ` --with-libssl-prefix=${opensslVendorDirectory}` - : ''; + const cpArgs = + process.env.NODEGIT_OPENSSL_STATIC_LINK === "1" ? ` --with-libssl-prefix=${opensslVendorDirectory}` : ""; cp.exec( `${libssh2ConfigureScript}${cpArgs}`, { cwd: libssh2VendorDirectory, - env: newEnv + env: newEnv, }, - function(err, stdout, stderr) { + function (err, stdout, stderr) { if (err) { console.error(err); console.error(stderr); reject(err, stderr); - } - else { + } else { resolve(stdout); } } diff --git a/utils/defaultCxxStandard.js b/utils/defaultCxxStandard.js index bc42a39a6..8afc960aa 100644 --- a/utils/defaultCxxStandard.js +++ b/utils/defaultCxxStandard.js @@ -1,18 +1,16 @@ -const targetSpecified = process.argv[2] !== 'none'; +const targetSpecified = process.argv[2] !== "none"; let isNode18OrElectron20AndUp = false; if (targetSpecified) { // Assume electron if target is specified. // If building node 18 / 19 via target, will need to specify C++ standard manually - const majorVersion = process.argv[2].split('.')[0]; + const majorVersion = process.argv[2].split(".")[0]; isNode18OrElectron20AndUp = majorVersion >= 20; } else { // Node 18 === 108 isNode18OrElectron20AndUp = Number.parseInt(process.versions.modules) >= 108; } -const defaultCxxStandard = isNode18OrElectron20AndUp - ? '17' - : '14'; +const defaultCxxStandard = isNode18OrElectron20AndUp ? "17" : "14"; process.stdout.write(defaultCxxStandard); diff --git a/utils/execPromise.js b/utils/execPromise.js index acdc785ec..6592d1196 100644 --- a/utils/execPromise.js +++ b/utils/execPromise.js @@ -1,15 +1,14 @@ -var cp = require('child_process'); +var cp = require("child_process"); // We have to manually promisify this because at this is required in lifecycle // methods and we are not guaranteed that any 3rd party packages are installed // at this point -module.exports = function(command, opts, extraOpts = {}) { - return new Promise(function(resolve, reject) { - const childProcess = cp.exec(command, opts, function(err, result) { +module.exports = function (command, opts, extraOpts = {}) { + return new Promise(function (resolve, reject) { + const childProcess = cp.exec(command, opts, function (err, result) { if (err) { reject(err); - } - else { + } else { resolve(result); } }); diff --git a/utils/getElectronOpenSSLRoot.js b/utils/getElectronOpenSSLRoot.js index a8ccc09b7..ccc75bb5e 100644 --- a/utils/getElectronOpenSSLRoot.js +++ b/utils/getElectronOpenSSLRoot.js @@ -6,5 +6,5 @@ if (process.argv.length < 3) { const [, , moduleRootDir] = process.argv; -const openSSLRoot = process.env.npm_config_openssl_dir || path.join(moduleRootDir, 'vendor', 'openssl'); +const openSSLRoot = process.env.npm_config_openssl_dir || path.join(moduleRootDir, "vendor", "openssl"); process.stdout.write(openSSLRoot); diff --git a/utils/gitExecutableLocation.js b/utils/gitExecutableLocation.js index 48316510f..b3b747471 100644 --- a/utils/gitExecutableLocation.js +++ b/utils/gitExecutableLocation.js @@ -1,21 +1,19 @@ var cp = require("child_process"); module.exports = function gitExecutableLocation() { - return new Promise(function(resolve, reject) { + return new Promise(function (resolve, reject) { var cmd; if (process.platform === "win32") { cmd = "where git"; - } - else { + } else { cmd = "which git"; } - cp.exec(cmd, function(err, stdout, stderr) { + cp.exec(cmd, function (err, stdout, stderr) { if (err) { reject(err, stderr); - } - else { + } else { resolve(stdout); } }); diff --git a/utils/isBuildingForElectron.js b/utils/isBuildingForElectron.js index b395ef55b..979ae7f67 100644 --- a/utils/isBuildingForElectron.js +++ b/utils/isBuildingForElectron.js @@ -1,4 +1,4 @@ -const fs = require("fs") +const fs = require("fs"); const JSON5 = require("json5"); const path = require("path"); @@ -6,7 +6,7 @@ if (process.argv.length < 3) { process.exit(1); } -const last = arr => arr[arr.length - 1]; +const last = (arr) => arr[arr.length - 1]; const [, , nodeRootDir] = process.argv; let isElectron = last(nodeRootDir.split(path.sep)).startsWith("iojs"); @@ -14,12 +14,9 @@ let isElectron = last(nodeRootDir.split(path.sep)).startsWith("iojs"); if (!isElectron) { try { // Not ideal, would love it if there were a full featured gyp package to do this operation instead. - const { variables: { built_with_electron } } = JSON5.parse( - fs.readFileSync( - path.resolve(nodeRootDir, "include", "node", "config.gypi"), - "utf8" - ) - ); + const { + variables: { built_with_electron }, + } = JSON5.parse(fs.readFileSync(path.resolve(nodeRootDir, "include", "node", "config.gypi"), "utf8")); if (built_with_electron) { isElectron = true; diff --git a/utils/retry.js b/utils/retry.js index c7a57fb06..7f7c434f4 100644 --- a/utils/retry.js +++ b/utils/retry.js @@ -1,4 +1,4 @@ -const { spawn } = require('child_process'); +const { spawn } = require("child_process"); const [, , cmd, ...args] = process.argv; if (!cmd) { @@ -14,19 +14,19 @@ const once = (fn) => { runOnce = true; fn(...args); - } + }; }; const retry = (numRetries = 3) => { const child = spawn(cmd, args, { - shell: process.platform === 'win32', - stdio: [0, 'pipe', 'pipe'] + shell: process.platform === "win32", + stdio: [0, "pipe", "pipe"], }); child.setMaxListeners(0); - child.stdout.setEncoding('utf8'); - child.stderr.setEncoding('utf8'); + child.stdout.setEncoding("utf8"); + child.stderr.setEncoding("utf8"); child.stdout.pipe(process.stdout); child.stderr.pipe(process.stderr); @@ -42,10 +42,10 @@ const retry = (numRetries = 3) => { process.exit(status); } }); - const onClose = status => cleanupAndExit(null, status); + const onClose = (status) => cleanupAndExit(null, status); - child.on('close', onClose); - child.on('error', cleanupAndExit); + child.on("close", onClose); + child.on("error", cleanupAndExit); }; retry();