patch-package
Advanced tools
Comparing version 1.1.1 to 1.2.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var chalk_1 = require("chalk"); | ||
var process_1 = require("process"); | ||
@@ -13,6 +14,14 @@ var applyPatches_1 = require("./applyPatches"); | ||
var packageNames = [].slice.call(process_1.argv, 2); | ||
packageNames.forEach(function (packageName) { | ||
makePatch_1.default(packageName, appPath); | ||
}); | ||
if (packageNames.indexOf("--help") > -1 || packageNames.indexOf("-h") > -1) { | ||
printHelp(); | ||
} | ||
else { | ||
packageNames.forEach(function (packageName) { | ||
makePatch_1.default(packageName, appPath); | ||
}); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxtQ0FBOEI7QUFDOUIsK0NBQXlDO0FBQ3pDLG1EQUE2QztBQUM3Qyx5Q0FBbUM7QUFFbkMsSUFBTSxPQUFPLEdBQUcsd0JBQWMsRUFBRSxDQUFBO0FBQ2hDLEVBQUUsQ0FBQyxDQUFDLGNBQUksQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN0QixzQkFBWSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBQ3ZCLENBQUM7QUFBQyxJQUFJLENBQUMsQ0FBQztJQUNOLElBQU0sWUFBWSxHQUFHLEVBQUUsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLGNBQUksRUFBRSxDQUFDLENBQUMsQ0FBQTtJQUMzQyxZQUFZLENBQUMsT0FBTyxDQUFDLFVBQUMsV0FBbUI7UUFDdkMsbUJBQVMsQ0FBQyxXQUFXLEVBQUUsT0FBTyxDQUFDLENBQUE7SUFDakMsQ0FBQyxDQUFDLENBQUE7QUFDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYXJndiB9IGZyb20gXCJwcm9jZXNzXCJcbmltcG9ydCBhcHBseVBhdGNoZXMgZnJvbSBcIi4vYXBwbHlQYXRjaGVzXCJcbmltcG9ydCBnZXRBcHBSb290UGF0aCBmcm9tIFwiLi9nZXRBcHBSb290UGF0aFwiXG5pbXBvcnQgbWFrZVBhdGNoIGZyb20gXCIuL21ha2VQYXRjaFwiXG5cbmNvbnN0IGFwcFBhdGggPSBnZXRBcHBSb290UGF0aCgpXG5pZiAoYXJndi5sZW5ndGggPT09IDIpIHtcbiAgYXBwbHlQYXRjaGVzKGFwcFBhdGgpXG59IGVsc2Uge1xuICBjb25zdCBwYWNrYWdlTmFtZXMgPSBbXS5zbGljZS5jYWxsKGFyZ3YsIDIpXG4gIHBhY2thZ2VOYW1lcy5mb3JFYWNoKChwYWNrYWdlTmFtZTogc3RyaW5nKSA9PiB7XG4gICAgbWFrZVBhdGNoKHBhY2thZ2VOYW1lLCBhcHBQYXRoKVxuICB9KVxufVxuIl19 | ||
function printHelp() { | ||
console.log("\nUsage:\n\n " + chalk_1.bold("patch-package") + chalk_1.italic("[ <package-name>]") + "\n\n\n Without arguments, the " + chalk_1.bold("patch-package") + " command will attempt to find and apply\n patch files to your project. It looks for files named like\n\n ./patches/<package-name>:<version>.patch\n\n When given package names as arguments, patch-package will create patch files\n based on any changes you've made to the version installed by yarn/npm.\n\n Add the following to your package.json to ensure that these patches are\n gracefully applied whenever yarn or npm make changes to node_modules:\n\n \"scripts\": {\n \"prepare\": \"patch-package\"\n }\n"); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwrQkFBMEM7QUFDMUMsbUNBQThCO0FBQzlCLCtDQUF5QztBQUN6Qyx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rYWdlLW5hbWU+Ojx2ZXJzaW9uPi5wYXRjaFxuXG4gIFdoZW4gZ2l2ZW4gcGFja2FnZSBuYW1lcyBhcyBhcmd1bWVudHMsIHBhdGNoLXBhY2thZ2Ugd2lsbCBjcmVhdGUgcGF0Y2ggZmlsZXNcbiAgYmFzZWQgb24gYW55IGNoYW5nZXMgeW91J3ZlIG1hZGUgdG8gdGhlIHZlcnNpb24gaW5zdGFsbGVkIGJ5IHlhcm4vbnBtLlxuXG4gIEFkZCB0aGUgZm9sbG93aW5nIHRvIHlvdXIgcGFja2FnZS5qc29uIHRvIGVuc3VyZSB0aGF0IHRoZXNlIHBhdGNoZXMgYXJlXG4gIGdyYWNlZnVsbHkgYXBwbGllZCB3aGVuZXZlciB5YXJuIG9yIG5wbSBtYWtlIGNoYW5nZXMgdG8gbm9kZV9tb2R1bGVzOlxuXG4gICAgXCJzY3JpcHRzXCI6IHtcbiAgICAgIFwicHJlcGFyZVwiOiBcInBhdGNoLXBhY2thZ2VcIlxuICAgIH1cbmApXG59XG4iXX0= |
@@ -23,5 +23,9 @@ "use strict"; | ||
child_process_1.execSync("git init", { cwd: tmpDir.name }); | ||
// unignore node_modules to get nested changes | ||
fs.writeFileSync(path.join(tmpDir.name, ".gitignore"), "!/node_modules\n"); | ||
child_process_1.execSync(shellEscape(["git", "add", "-f", path.join("node_modules", packageName)]), { cwd: tmpDir.name }); | ||
child_process_1.execSync("git commit -m init", { cwd: tmpDir.name }); | ||
child_process_1.execSync(shellEscape(["cp", "-RL", packagePath, path.join(tmpDir.name, "node_modules")])); | ||
var patch = child_process_1.execSync("git diff", { cwd: tmpDir.name }).toString(); | ||
child_process_1.execSync(shellEscape(["git", "add", "-f", path.join("node_modules", packageName)]), { cwd: tmpDir.name }); | ||
var patch = child_process_1.execSync("git diff HEAD", { cwd: tmpDir.name }).toString(); | ||
var patchesDir_1 = path.join(appPath, "patches"); | ||
@@ -55,2 +59,2 @@ if (!fs.existsSync(patchesDir_1)) { | ||
} | ||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EaXIpLmZvckVhY2goKGZpbGVOYW1lKSA9PiB7XG4gICAgICBpZiAoZmlsZU5hbWUuc3RhcnRzV2l0aChwYWNrYWdlTmFtZSArIFwiOlwiKSkge1xuICAgICAgICBmcy51bmxpbmtTeW5jKHBhdGguam9pbihwYXRjaGVzRGlyLCBmaWxlTmFtZSkpXG4gICAgICB9XG4gICAgfSlcblxuICAgIGNvbnN0IHBhdGNoRmlsZU5hbWUgPSBgJHtwYWNrYWdlTmFtZX06JHtwYWNrYWdlVmVyc2lvbn0ucGF0Y2hgXG4gICAgZnMud3JpdGVGaWxlU3luYyhwYXRoLmpvaW4ocGF0Y2hlc0RpciwgcGF0Y2hGaWxlTmFtZSksIHBhdGNoKVxuICAgIGNvbnNvbGUubG9nKGBDcmVhdGVkIHBhdGNoIGZpbGUgJHtwYXRjaEZpbGVOYW1lfSAke2dyZWVuKFwi4pyUXCIpfWApXG4gIH0gZmluYWxseSB7XG4gICAgdG1wRGlyLnJlbW92ZUNhbGxiYWNrKClcbiAgfVxufVxuXG5mdW5jdGlvbiBnZXRQYWNrYWdlTWFuYWdlcihjd2Q6IHN0cmluZyk6IFBhY2thZ2VNYW5hZ2VyIHtcbiAgdHJ5IHtcbiAgICBleGVjKFwid2hpY2ggeWFyblwiKVxuICAgIHJldHVybiBuZXcgWWFybihjd2QpXG4gIH0gY2F0Y2ggKGUpIHtcbiAgICByZXR1cm4gbmV3IE5wbShjd2QpXG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "patch-package", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "When forking just won't work, patch it.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117375
18
258