patch-package
Advanced tools
Comparing version 7.0.0 to 8.0.0-canary.0
@@ -8,12 +8,11 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const patchFs_1 = require("./patchFs"); | ||
const apply_1 = require("./patch/apply"); | ||
const fs_extra_1 = require("fs-extra"); | ||
const path_1 = require("./path"); | ||
const path_2 = require("path"); | ||
const PackageDetails_1 = require("./PackageDetails"); | ||
const reverse_1 = require("./patch/reverse"); | ||
const path_1 = require("path"); | ||
const semver_1 = __importDefault(require("semver")); | ||
const packageIsDevDependency_1 = require("./packageIsDevDependency"); | ||
const apply_1 = require("./patch/apply"); | ||
const read_1 = require("./patch/read"); | ||
const packageIsDevDependency_1 = require("./packageIsDevDependency"); | ||
const reverse_1 = require("./patch/reverse"); | ||
const patchFs_1 = require("./patchFs"); | ||
const path_2 = require("./path"); | ||
class PatchApplicationError extends Error { | ||
@@ -24,10 +23,4 @@ constructor(msg) { | ||
} | ||
function findPatchFiles(patchesDirectory) { | ||
if (!fs_extra_1.existsSync(patchesDirectory)) { | ||
return []; | ||
} | ||
return patchFs_1.getPatchFiles(patchesDirectory); | ||
} | ||
function getInstalledPackageVersion({ appPath, path, pathSpecifier, isDevOnly, patchFilename, }) { | ||
const packageDir = path_1.join(appPath, path); | ||
const packageDir = path_2.join(appPath, path); | ||
if (!fs_extra_1.existsSync(packageDir)) { | ||
@@ -37,3 +30,3 @@ if (process.env.NODE_ENV === "production" && isDevOnly) { | ||
} | ||
let err = `${chalk_1.default.red("Error:")} Patch file found for package ${path_2.posix.basename(pathSpecifier)}` + ` which is not present at ${path_1.relative(".", packageDir)}`; | ||
let err = `${chalk_1.default.red("Error:")} Patch file found for package ${path_1.posix.basename(pathSpecifier)}` + ` which is not present at ${path_2.relative(".", packageDir)}`; | ||
if (!isDevOnly && process.env.NODE_ENV === "production") { | ||
@@ -49,7 +42,7 @@ err += ` | ||
} | ||
const { version } = require(path_1.join(packageDir, "package.json")); | ||
const { version } = require(path_2.join(packageDir, "package.json")); | ||
// normalize version for `npm ci` | ||
const result = semver_1.default.valid(version); | ||
if (result === null) { | ||
throw new PatchApplicationError(`${chalk_1.default.red("Error:")} Version string '${version}' cannot be parsed from ${path_1.join(packageDir, "package.json")}`); | ||
throw new PatchApplicationError(`${chalk_1.default.red("Error:")} Version string '${version}' cannot be parsed from ${path_2.join(packageDir, "package.json")}`); | ||
} | ||
@@ -59,5 +52,5 @@ return result; | ||
function applyPatchesForApp({ appPath, reverse, patchDir, shouldExitWithError, shouldExitWithWarning, }) { | ||
const patchesDirectory = path_1.join(appPath, patchDir); | ||
const files = findPatchFiles(patchesDirectory); | ||
if (files.length === 0) { | ||
const patchesDirectory = path_2.join(appPath, patchDir); | ||
const groupedPatches = patchFs_1.getGroupedPatches(patchesDirectory); | ||
if (groupedPatches.numPatchFiles === 0) { | ||
console.error(chalk_1.default.blueBright("No patch files found")); | ||
@@ -67,74 +60,92 @@ return; | ||
const errors = []; | ||
const warnings = []; | ||
for (const filename of files) { | ||
try { | ||
const packageDetails = PackageDetails_1.getPackageDetailsFromPatchFilename(filename); | ||
if (!packageDetails) { | ||
warnings.push(`Unrecognized patch file in patches directory ${filename}`); | ||
continue; | ||
} | ||
const { name, version, path, pathSpecifier, isDevOnly, patchFilename, } = packageDetails; | ||
const installedPackageVersion = getInstalledPackageVersion({ | ||
appPath, | ||
path, | ||
pathSpecifier, | ||
isDevOnly: isDevOnly || | ||
// check for direct-dependents in prod | ||
(process.env.NODE_ENV === "production" && | ||
packageIsDevDependency_1.packageIsDevDependency({ appPath, packageDetails })), | ||
patchFilename, | ||
}); | ||
if (!installedPackageVersion) { | ||
// it's ok we're in production mode and this is a dev only package | ||
console.log(`Skipping dev-only ${chalk_1.default.bold(pathSpecifier)}@${version} ${chalk_1.default.blue("✔")}`); | ||
continue; | ||
} | ||
if (applyPatch({ | ||
patchFilePath: path_1.resolve(patchesDirectory, filename), | ||
reverse, | ||
packageDetails, | ||
patchDir, | ||
})) { | ||
// yay patch was applied successfully | ||
// print warning if version mismatch | ||
if (installedPackageVersion !== version) { | ||
warnings.push(createVersionMismatchWarning({ | ||
const warnings = [...groupedPatches.warnings]; | ||
for (const [pathSpecifier, details] of Object.entries(groupedPatches.pathSpecifierToPatchFiles)) { | ||
packageLoop: for (const patchDetails of details) { | ||
try { | ||
const { name, version, path, isDevOnly, patchFilename } = patchDetails; | ||
const installedPackageVersion = getInstalledPackageVersion({ | ||
appPath, | ||
path, | ||
pathSpecifier, | ||
isDevOnly: isDevOnly || | ||
// check for direct-dependents in prod | ||
(process.env.NODE_ENV === "production" && | ||
packageIsDevDependency_1.packageIsDevDependency({ | ||
appPath, | ||
patchDetails, | ||
})), | ||
patchFilename, | ||
}); | ||
if (!installedPackageVersion) { | ||
// it's ok we're in production mode and this is a dev only package | ||
console.log(`Skipping dev-only ${chalk_1.default.bold(pathSpecifier)}@${version} ${chalk_1.default.blue("✔")}`); | ||
continue; | ||
} | ||
if (applyPatch({ | ||
patchFilePath: path_2.resolve(patchesDirectory, patchFilename), | ||
reverse, | ||
patchDetails, | ||
patchDir, | ||
cwd: process.cwd(), | ||
})) { | ||
// yay patch was applied successfully | ||
// print warning if version mismatch | ||
if (installedPackageVersion !== version) { | ||
warnings.push(createVersionMismatchWarning({ | ||
packageName: name, | ||
actualVersion: installedPackageVersion, | ||
originalVersion: version, | ||
pathSpecifier, | ||
path, | ||
})); | ||
} | ||
const sequenceString = patchDetails.sequenceNumber != null | ||
? ` (${patchDetails.sequenceNumber}${patchDetails.sequenceName | ||
? " " + patchDetails.sequenceName | ||
: ""})` | ||
: ""; | ||
console.log(`${chalk_1.default.bold(pathSpecifier)}@${version}${sequenceString} ${chalk_1.default.green("✔")}`); | ||
} | ||
else if (installedPackageVersion === version) { | ||
// completely failed to apply patch | ||
// TODO: propagate useful error messages from patch application | ||
errors.push(createBrokenPatchFileError({ | ||
packageName: name, | ||
patchFilename, | ||
pathSpecifier, | ||
path, | ||
})); | ||
// in case the package has multiple patches, we need to break out of this inner loop | ||
// because we don't want to apply more patches on top of the broken state | ||
break packageLoop; | ||
} | ||
else { | ||
errors.push(createPatchApplicationFailureError({ | ||
packageName: name, | ||
actualVersion: installedPackageVersion, | ||
originalVersion: version, | ||
patchFilename, | ||
path, | ||
pathSpecifier, | ||
path, | ||
})); | ||
// in case the package has multiple patches, we need to break out of this inner loop | ||
// because we don't want to apply more patches on top of the broken state | ||
break packageLoop; | ||
} | ||
console.log(`${chalk_1.default.bold(pathSpecifier)}@${version} ${chalk_1.default.green("✔")}`); | ||
} | ||
else if (installedPackageVersion === version) { | ||
// completely failed to apply patch | ||
// TODO: propagate useful error messages from patch application | ||
errors.push(createBrokenPatchFileError({ | ||
packageName: name, | ||
patchFileName: filename, | ||
pathSpecifier, | ||
path, | ||
})); | ||
catch (error) { | ||
if (error instanceof PatchApplicationError) { | ||
errors.push(error.message); | ||
} | ||
else { | ||
errors.push(createUnexpectedError({ | ||
filename: patchDetails.patchFilename, | ||
error: error, | ||
})); | ||
} | ||
// in case the package has multiple patches, we need to break out of this inner loop | ||
// because we don't want to apply more patches on top of the broken state | ||
break packageLoop; | ||
} | ||
else { | ||
errors.push(createPatchApplictionFailureError({ | ||
packageName: name, | ||
actualVersion: installedPackageVersion, | ||
originalVersion: version, | ||
patchFileName: filename, | ||
path, | ||
pathSpecifier, | ||
})); | ||
} | ||
} | ||
catch (error) { | ||
if (error instanceof PatchApplicationError) { | ||
errors.push(error.message); | ||
} | ||
else { | ||
errors.push(createUnexpectedError({ filename, error })); | ||
} | ||
} | ||
} | ||
@@ -167,10 +178,20 @@ for (const warning of warnings) { | ||
exports.applyPatchesForApp = applyPatchesForApp; | ||
function applyPatch({ patchFilePath, reverse, packageDetails, patchDir, }) { | ||
const patch = read_1.readPatch({ patchFilePath, packageDetails, patchDir }); | ||
function applyPatch({ patchFilePath, reverse, patchDetails, patchDir, cwd, }) { | ||
const patch = read_1.readPatch({ | ||
patchFilePath, | ||
patchDetails, | ||
patchDir, | ||
}); | ||
try { | ||
apply_1.executeEffects(reverse ? reverse_1.reversePatch(patch) : patch, { dryRun: false }); | ||
apply_1.executeEffects(reverse ? reverse_1.reversePatch(patch) : patch, { | ||
dryRun: false, | ||
cwd, | ||
}); | ||
} | ||
catch (e) { | ||
try { | ||
apply_1.executeEffects(reverse ? patch : reverse_1.reversePatch(patch), { dryRun: true }); | ||
apply_1.executeEffects(reverse ? patch : reverse_1.reversePatch(patch), { | ||
dryRun: true, | ||
cwd, | ||
}); | ||
} | ||
@@ -212,3 +233,3 @@ catch (e) { | ||
} | ||
function createBrokenPatchFileError({ packageName, patchFileName, path, pathSpecifier, }) { | ||
function createBrokenPatchFileError({ packageName, patchFilename, path, pathSpecifier, }) { | ||
return ` | ||
@@ -221,3 +242,3 @@ ${chalk_1.default.red.bold("**ERROR**")} ${chalk_1.default.red(`Failed to apply patch for package ${chalk_1.default.bold(packageName)} at path`)} | ||
patches/${patchFileName} | ||
patches/${patchFilename} | ||
@@ -237,3 +258,3 @@ Try removing node_modules and trying again. If that doesn't work, maybe there was | ||
} | ||
function createPatchApplictionFailureError({ packageName, actualVersion, originalVersion, patchFileName, path, pathSpecifier, }) { | ||
function createPatchApplicationFailureError({ packageName, actualVersion, originalVersion, patchFilename, path, pathSpecifier, }) { | ||
return ` | ||
@@ -262,3 +283,3 @@ ${chalk_1.default.red.bold("**ERROR**")} ${chalk_1.default.red(`Failed to apply patch for package ${chalk_1.default.bold(packageName)} at path`)} | ||
Info: | ||
Patch file: patches/${patchFileName} | ||
Patch file: patches/${patchFilename} | ||
Patch was made for version: ${chalk_1.default.green.bold(originalVersion)} | ||
@@ -276,2 +297,2 @@ Installed version: ${chalk_1.default.red.bold(actualVersion)} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbHlQYXRjaGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwcGx5UGF0Y2hlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpb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HtcbiAgICAgICAgICAgICAgcGFja2FnZU5hbWU6IG5hbWUsXG4gICAgICAgICAgICAgIGFjdHVhbFZlcnNpb246IGluc3RhbGxlZFBhY2thZ2VWZXJzaW9uLFxuICAgICAgICAgICAgICBvcmlnaW5hbFZlcnNpb246IHZlcnNpb24sXG4gICAgICAgICAgICAgIHBhdGhTcGVjaWZpZXIsXG4gICAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgY29uc29sZS5sb2coXG4gICAgICAgICAgYCR7Y2hhbGsuYm9sZChwYXRoU3BlY2lmaWVyKX1AJHt2ZXJzaW9ufSAke2NoYWxrLmdyZWVuKFwi4pyUXCIpfWAsXG4gICAgICAgIClcbiAgICAgIH0gZWxzZSBpZiAoaW5zdGFsbGVkUGFja2FnZVZlcnNpb24gPT09IHZlcnNpb24pIHtcbiAgICAgICAgLy8gY29tcGxldGVseSBmYWlsZWQgdG8gYXBwbHkgcGF0Y2hcbiAgICAgICAgLy8gVE9ETzogcHJvcGFnYXRlIHVzZWZ1bCBlcnJvciBtZXNzYWdlcyBmcm9tIHBhdGNoIGFwcGxpY2F0aW9uXG4gICAgICAgIGVycm9ycy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUJyb2tlblBhdGNoRmlsZUVycm9yKHtcbiAgICAgICAgICAgIHBhY2thZ2VOYW1lOiBuYW1lLFxuICAgICAgICAgICAgcGF0Y2hGaWxlTmFtZTogZmlsZW5hbWUsXG4gICAgICAgICAgICBwYXRoU3BlY2lmaWVyLFxuICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICB9KSxcbiAgICAgICAgKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZXJyb3JzLnB1c2goXG4gICAgICAgICAgY3JlYXRlUGF0Y2hBcHBsaWN0aW9uRmFpbHVyZUVycm9yKHtcbiAgICAgICAgICAgIHBhY2thZ2VOYW1lOiBuYW1lLFxuICAgICAgICAgICAg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AgICAgICAgICAgICl9QCR7dmVyc2lvbn0gJHtjaGFsay5ibHVlKFwi4pyUXCIpfWAsXG4gICAgICAgICAgKVxuICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoXG4gICAgICAgICAgYXBwbHlQYXRjaCh7XG4gICAgICAgICAgICBwYXRjaEZpbGVQYXRoOiByZXNvbHZlKHBhdGNoZXNEaXJlY3RvcnksIHBhdGNoRmlsZW5hbWUpIGFzIHN0cmluZyxcbiAgICAgICAgICAgIHJldmVyc2UsXG4gICAgICAgICAgICBwYXRjaERldGFpbHMsXG4gICAgICAgICAgICBwYXRjaERpcixcbiAgICAgICAgICAgIGN3ZDogcHJvY2Vzcy5jd2QoKSxcbiAgICAgICAgICB9KVxuICAgICAgICApIHtcbiAgICAgICAgICAvLyB5YXkgcGF0Y2ggd2FzIGFwcGxpZWQgc3VjY2Vzc2Z1bGx5XG4gICAgICAgICAgLy8gcHJpbnQgd2FybmluZyBpZiB2ZXJzaW9uIG1pc21hdGNoXG4gICAgICAgICAgaWYgKGluc3RhbGxlZFBhY2thZ2VWZXJzaW9uICE9PSB2ZXJzaW9uKSB7XG4gICAgICAgICAgICB3YXJuaW5ncy5wdXNoKFxuICAgICAgICAgICAgICBjcmVhdGVWZXJzaW9uTWlzbWF0Y2hXYXJuaW5nKHtcbiAgICAgICAgICAgICAgICBwYWNrYWdlTmFtZTogbmFtZSxcbiAgICAgICAgICAgICAgICBhY3R1YWxWZXJzaW9uOiBpbnN0YWxsZWRQYWNrYWdlVmVyc2lvbixcbiAgICAgICAgICAgICAgICBvcmlnaW5hbFZlcnNpb246IHZlcnNpb24sXG4gICAgICAgICAgICAgICAgcGF0aFNwZWNpZmllcixcbiAgICAgICAgICAgICAgICBwYXRoLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3Qgc2VxdWVuY2VTdHJpbmcgPVxuICAgICAgICAgICAgcGF0Y2hEZXRhaWxzLnNlcXVlbmNlTnVtYmVyICE9IG51bGxcbiAgICAgICAgICAgICAgPyBgICgke3BhdGNoRGV0YWlscy5zZXF1ZW5jZU51bWJlcn0ke1xuICAgICAgICAgICAgICAgICAgcGF0Y2hEZXRhaWxzLnNlcXVlbmNlTmFtZVxuICAgICAgICAgICAgICAgICAgICA/IFwiIFwiICsgcGF0Y2hEZXRhaWxzLnNlcXVlbmNlTmFtZVxuICAgICAgICAgICAgICAgICAgICA6IFwiXCJcbiAgICAgICAgICAgICAgICB9KWBcbiAgICAgICAgICAgICAgOiBcIlwiXG4gICAgICAgICAgY29uc29sZS5sb2coXG4gICAgICAgICAgICBgJHtjaGFsay5ib2xkKFxuICAgICAgICAgICAgICBwYXRoU3BlY2lmaWVyLFxuICAgICAgICAgICAgKX1AJHt2ZXJzaW9ufSR7c2VxdWVuY2VTdHJpbmd9ICR7Y2hhbGsuZ3JlZW4oXCLinJRcIil9YCxcbiAgICAgICAgICApXG4gICAgICAgIH0gZWxzZSBpZiAoaW5zdGFsbGVkUGFja2FnZVZlcnNpb24gPT09IHZlcnNpb24pIHtcbiAgICAgICAgICAvLyBjb21wbGV0ZWx5IGZhaWxlZCB0byBhcHBseSBwYXRjaFxuICAgICAgICAgIC8vIFRPRE86IHByb3BhZ2F0ZSB1c2VmdWwgZXJyb3IgbWVzc2FnZXMgZnJvbSBwYXRjaCBhcHBsaWNhdGlvblxuICAgICAgICAgIGVycm9ycy5wdXNoKFxuICAgICAgICAgICAgY3JlYXRlQnJva2VuUGF0Y2hGaWxlRXJyb3Ioe1xuICAgICAgICAgICAgICBwYWNrYWdlTmFtZTogbmFtZSxcbiAgICAgICAgICAgICAgcGF0Y2hGaWxlbmFtZSxcbiAgICAgICAgICAgICAgcGF0aFNwZWNpZmllcixcbiAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIClcbiAgICAgICAgICAvLyBpbiBjYXNlIHRoZSBwYWNrYWdl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gICBQYXRjaCBmaWxlOiBwYXRjaGVzLyR7cGF0Y2hGaWxlbmFtZX1cbiAgICBQYXRjaCB3YXMgbWFkZSBmb3IgdmVyc2lvbjogJHtjaGFsay5ncmVlbi5ib2xkKG9yaWdpbmFsVmVyc2lvbil9XG4gICAgSW5zdGFsbGVkIHZlcnNpb246ICR7Y2hhbGsucmVkLmJvbGQoYWN0dWFsVmVyc2lvbil9XG5gXG59XG5cbmZ1bmN0aW9uIGNyZWF0ZVVuZXhwZWN0ZWRFcnJvcih7XG4gIGZpbGVuYW1lLFxuICBlcnJvcixcbn06IHtcbiAgZmlsZW5hbWU6IHN0cmluZ1xuICBlcnJvcjogRXJyb3Jcbn0pIHtcbiAgcmV0dXJuIGBcbiR7Y2hhbGsucmVkLmJvbGQoXCIqKkVSUk9SKipcIil9ICR7Y2hhbGsucmVkKFxuICAgIGBGYWlsZWQgdG8gYXBwbHkgcGF0Y2ggZmlsZSAke2NoYWxrLmJvbGQoZmlsZW5hbWUpfWAsXG4gICl9XG4gIFxuJHtlcnJvci5zdGFja31cblxuICBgXG59XG4iXX0= |
@@ -30,3 +30,3 @@ "use strict"; | ||
], | ||
string: ["patch-dir"], | ||
string: ["patch-dir", "append"], | ||
}); | ||
@@ -62,2 +62,5 @@ const packageNames = argv._; | ||
createIssue, | ||
mode: "append" in argv | ||
? { type: "append", name: argv.append || undefined } | ||
: { type: "overwrite_last" }, | ||
}); | ||
@@ -180,2 +183,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrREFBeUI7QUFDekIsc0RBQTZCO0FBQzdCLHdEQUErQjtBQUUvQixpREFBbUQ7QUFDbkQscURBQWlEO0FBQ2pELDJDQUF1QztBQUN2Qyw2Q0F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SByZWdleHBzIHVzZWQgaW4gLS1pbmNsdWRlIG9yIC0tZXhjbHVkZSBmaWx0ZXJzIGNhc2Utc2Vuc2l0aXZlLlxuICAgIFxuICAgICR7Y2hhbGsuYm9sZChcIi0tcGF0Y2gtZGlyXCIpfVxuXG4gICAgICAgIFNwZWNpZnkgdGhlIG5hbWUgZm9yIHRoZSBkaXJlY3RvcnkgaW4gd2hpY2ggdG8gcHV0IHRoZSBwYXRjaCBmaWxlcy5cbmApXG59XG4iXX0= |
@@ -8,17 +8,18 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const path_1 = require("./path"); | ||
const spawnSafe_1 = require("./spawnSafe"); | ||
const filterFiles_1 = require("./filterFiles"); | ||
const fs_1 = require("fs"); | ||
const fs_extra_1 = require("fs-extra"); | ||
const rimraf_1 = require("rimraf"); | ||
const fs_extra_2 = require("fs-extra"); | ||
const tmp_1 = require("tmp"); | ||
const zlib_1 = require("zlib"); | ||
const applyPatches_1 = require("./applyPatches"); | ||
const createIssue_1 = require("./createIssue"); | ||
const filterFiles_1 = require("./filterFiles"); | ||
const getPackageResolution_1 = require("./getPackageResolution"); | ||
const getPackageVersion_1 = require("./getPackageVersion"); | ||
const PackageDetails_1 = require("./PackageDetails"); | ||
const parse_1 = require("./patch/parse"); | ||
const patchFs_1 = require("./patchFs"); | ||
const PackageDetails_1 = require("./PackageDetails"); | ||
const path_1 = require("./path"); | ||
const resolveRelativeFileDependencies_1 = require("./resolveRelativeFileDependencies"); | ||
const getPackageResolution_1 = require("./getPackageResolution"); | ||
const parse_1 = require("./patch/parse"); | ||
const zlib_1 = require("zlib"); | ||
const getPackageVersion_1 = require("./getPackageVersion"); | ||
const createIssue_1 = require("./createIssue"); | ||
const spawnSafe_1 = require("./spawnSafe"); | ||
function printNoPackageFoundError(packageName, packageJsonPath) { | ||
@@ -29,3 +30,4 @@ console.error(`No such package ${packageName} | ||
} | ||
function makePatch({ packagePathSpecifier, appPath, packageManager, includePaths, excludePaths, patchDir, createIssue, }) { | ||
function makePatch({ packagePathSpecifier, appPath, packageManager, includePaths, excludePaths, patchDir, createIssue, mode, }) { | ||
var _a, _b, _c; | ||
const packageDetails = PackageDetails_1.getPatchDetailsFromCliString(packagePathSpecifier); | ||
@@ -36,2 +38,3 @@ if (!packageDetails) { | ||
} | ||
const existingPatches = patchFs_1.getGroupedPatches(patchDir).pathSpecifierToPatchFiles[packageDetails.pathSpecifier] || []; | ||
const appPackageJson = require(path_1.join(appPath, "package.json")); | ||
@@ -67,3 +70,3 @@ const packagePath = path_1.join(appPath, packageDetails.path); | ||
if (fs_extra_1.existsSync(rcPath)) { | ||
fs_extra_2.copySync(rcPath, path_1.join(tmpRepo.name, rcFile), { dereference: true }); | ||
fs_extra_1.copySync(rcPath, path_1.join(tmpRepo.name, rcFile), { dereference: true }); | ||
} | ||
@@ -126,2 +129,17 @@ }); | ||
filterFiles_1.removeIgnoredFiles(tmpRepoPackagePath, includePaths, excludePaths); | ||
// apply all existing patches if appending | ||
// otherwise apply all but the last | ||
const patchesToApplyBeforeCommit = mode.type === "append" ? existingPatches : existingPatches.slice(0, -1); | ||
for (const patchDetails of patchesToApplyBeforeCommit) { | ||
if (!applyPatches_1.applyPatch({ | ||
patchDetails, | ||
patchDir, | ||
patchFilePath: path_1.join(appPath, patchDir, patchDetails.patchFilename), | ||
reverse: false, | ||
cwd: tmpRepo.name, | ||
})) { | ||
console.error(`Failed to apply patch ${patchDetails.patchFilename} to ${packageDetails.pathSpecifier}`); | ||
process.exit(1); | ||
} | ||
} | ||
git("add", "-f", packageDetails.path); | ||
@@ -132,3 +150,3 @@ git("commit", "--allow-empty", "-m", "init"); | ||
// pnpm installs packages as symlinks, copySync would copy only the symlink | ||
fs_extra_2.copySync(fs_extra_1.realpathSync(packagePath), tmpRepoPackagePath); | ||
fs_extra_1.copySync(fs_extra_1.realpathSync(packagePath), tmpRepoPackagePath); | ||
// remove nested node_modules just to be safe | ||
@@ -194,11 +212,42 @@ rimraf_1.sync(path_1.join(tmpRepoPackagePath, "node_modules")); | ||
// maybe delete existing | ||
patchFs_1.getPatchFiles(patchDir).forEach((filename) => { | ||
const deets = PackageDetails_1.getPackageDetailsFromPatchFilename(filename); | ||
if (deets && deets.path === packageDetails.path) { | ||
fs_extra_1.unlinkSync(path_1.join(patchDir, filename)); | ||
if (mode.type === "overwrite_last") { | ||
const prevPatch = existingPatches[existingPatches.length - 1]; | ||
if (prevPatch) { | ||
const patchFilePath = path_1.join(appPath, patchDir, prevPatch.patchFilename); | ||
try { | ||
fs_extra_1.unlinkSync(patchFilePath); | ||
} | ||
catch (e) { | ||
// noop | ||
} | ||
} | ||
}); | ||
} | ||
else if (existingPatches.length === 1) { | ||
// if we are appending to an existing patch that doesn't have a sequence number let's rename it | ||
const prevPatch = existingPatches[0]; | ||
if (prevPatch.sequenceNumber === undefined) { | ||
const newFileName = createPatchFileName({ | ||
packageDetails, | ||
packageVersion, | ||
sequenceNumber: 1, | ||
sequenceName: (_a = prevPatch.sequenceName) !== null && _a !== void 0 ? _a : "initial", | ||
}); | ||
const oldPath = path_1.join(appPath, patchDir, prevPatch.patchFilename); | ||
const newPath = path_1.join(appPath, patchDir, newFileName); | ||
fs_1.renameSync(oldPath, newPath); | ||
prevPatch.sequenceNumber = 1; | ||
prevPatch.patchFilename = newFileName; | ||
prevPatch.sequenceName = (_b = prevPatch.sequenceName) !== null && _b !== void 0 ? _b : "initial"; | ||
} | ||
} | ||
const lastPatch = existingPatches[existingPatches.length - 1]; | ||
const sequenceName = mode.type === "append" ? mode.name : lastPatch === null || lastPatch === void 0 ? void 0 : lastPatch.sequenceName; | ||
const sequenceNumber = mode.type === "append" | ||
? ((_c = lastPatch === null || lastPatch === void 0 ? void 0 : lastPatch.sequenceNumber) !== null && _c !== void 0 ? _c : 0) + 1 | ||
: lastPatch === null || lastPatch === void 0 ? void 0 : lastPatch.sequenceNumber; | ||
const patchFileName = createPatchFileName({ | ||
packageDetails, | ||
packageVersion, | ||
sequenceName, | ||
sequenceNumber, | ||
}); | ||
@@ -232,8 +281,13 @@ const patchPath = path_1.join(patchesDir, patchFileName); | ||
exports.makePatch = makePatch; | ||
function createPatchFileName({ packageDetails, packageVersion, }) { | ||
function createPatchFileName({ packageDetails, packageVersion, sequenceNumber, sequenceName, }) { | ||
const packageNames = packageDetails.packageNames | ||
.map((name) => name.replace(/\//g, "+")) | ||
.join("++"); | ||
return `${packageNames}+${packageVersion}.patch`; | ||
const nameAndVersion = `${packageNames}+${packageVersion}`; | ||
const num = sequenceNumber === undefined | ||
? "" | ||
: `+${sequenceNumber.toString().padStart(3, "0")}`; | ||
const name = !sequenceName ? "" : `+${sequenceName}`; | ||
return `${nameAndVersion}${num}${name}.patch`; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFrZVBhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21ha2VQYXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxrREFBeUI7QUFDekIsaUNBQStDO0FBQy9DLDJDQUEyQztBQUUzQywrQ0FBa0Q7QUFDbEQsdUNBT2lCO0FBQ2pCLG1DQUF1QztBQUN2Qyx1Q0FBbUM7QUFDbkMsNkJBQTZCO0FBQzdCLHVDQUF5QztBQUN6QyxxREFJeUI7QUFDekIsdUZBQW1GO0FBQ25GLGlFQUE2RDtBQUM3RCx5Q0FBOEM7QUFDOUMsK0JBQStCO0FBQy9CLDJEQUF1RDtBQUN2RCwrQ0FHc0I7QUFFdEIsU0FBUyx3QkFBd0IsQ0FDL0IsV0FBbUIsRUFDbkIsZUFBdUI7SUFFdkIsT0FBTyxDQUFDLEtBQUssQ0FDWCxtQkFBbUIsV0FBVzs7b0JBRWQsZUFBZSxFQUFFLENBQ2xDLENBQUE7QUFDSCxDQUFDO0FBRUQsU0FBZ0IsU0FBUyxDQUFDLEVBQ3hCLG9CQUFvQixFQUNwQix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0gYCR7cGFja2FnZU5hbWVzfSske3BhY2thZ2VWZXJzaW9ufWBcbiAgY29uc3QgbnVtID1cbiAgICBzZXF1ZW5jZU51bWJlciA9PT0gdW5kZWZpbmVkXG4gICAgICA/IFwiXCJcbiAgICAgIDogYCske3NlcXVlbmNlTnVtYmVyLnRvU3RyaW5nKCkucGFkU3RhcnQoMywgXCIwXCIpfWBcbiAgY29uc3QgbmFtZSA9ICFzZXF1ZW5jZU5hbWUgPyBcIlwiIDogYCske3NlcXVlbmNlTmFtZX1gXG5cbiAgcmV0dXJuIGAke25hbWVBbmRWZXJzaW9ufSR7bnVtfSR7bmFtZX0ucGF0Y2hgXG59XG4iXX0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPatchDetailsFromCliString = exports.getPackageDetailsFromPatchFilename = void 0; | ||
exports.getPatchDetailsFromCliString = exports.getPackageDetailsFromPatchFilename = exports.parseNameAndVersion = void 0; | ||
const path_1 = require("./path"); | ||
function parseNameAndVersion(s) { | ||
const parts = s.split("+"); | ||
switch (parts.length) { | ||
function parseNameAndVersion(str) { | ||
const parts = str | ||
.split("+") | ||
.map((s) => s.trim()) | ||
.filter(Boolean); | ||
if (parts.length === 0) { | ||
return null; | ||
} | ||
if (parts.length === 1) { | ||
return { packageName: str }; | ||
} | ||
const versionIndex = parts.findIndex((part) => part.match(/^\d+\.\d+\.\d+.*$/)); | ||
if (versionIndex === -1) { | ||
const [scope, name] = parts; | ||
return { packageName: `${scope}/${name}` }; | ||
} | ||
const nameParts = parts.slice(0, versionIndex); | ||
let packageName; | ||
switch (nameParts.length) { | ||
case 0: | ||
return null; | ||
case 1: | ||
packageName = nameParts[0]; | ||
break; | ||
case 2: | ||
const [scope, name] = nameParts; | ||
packageName = `${scope}/${name}`; | ||
break; | ||
default: | ||
return null; | ||
} | ||
const version = parts[versionIndex]; | ||
const sequenceParts = parts.slice(versionIndex + 1); | ||
if (sequenceParts.length === 0) { | ||
return { packageName, version }; | ||
} | ||
// expect sequenceParts[0] to be a number, strip leading 0s | ||
const sequenceNumber = parseInt(sequenceParts[0].replace(/^0+/, ""), 10); | ||
if (isNaN(sequenceNumber)) { | ||
return null; | ||
} | ||
switch (sequenceParts.length) { | ||
case 1: { | ||
return { name: parts[0] }; | ||
return { packageName, version, sequenceNumber }; | ||
} | ||
case 2: { | ||
const [nameOrScope, versionOrName] = parts; | ||
if (versionOrName.match(/^\d+/)) { | ||
return { | ||
name: nameOrScope, | ||
version: versionOrName, | ||
}; | ||
} | ||
return { name: `${nameOrScope}/${versionOrName}` }; | ||
return { | ||
packageName, | ||
version, | ||
sequenceName: sequenceParts[1], | ||
sequenceNumber, | ||
}; | ||
} | ||
case 3: { | ||
const [scope, name, version] = parts; | ||
return { name: `${scope}/${name}`, version }; | ||
default: { | ||
return null; | ||
} | ||
@@ -28,19 +64,4 @@ } | ||
} | ||
exports.parseNameAndVersion = parseNameAndVersion; | ||
function getPackageDetailsFromPatchFilename(patchFilename) { | ||
const legacyMatch = patchFilename.match(/^([^+=]+?)(:|\+)(\d+\.\d+\.\d+.*?)(\.dev)?\.patch$/); | ||
if (legacyMatch) { | ||
const name = legacyMatch[1]; | ||
const version = legacyMatch[3]; | ||
return { | ||
packageNames: [name], | ||
pathSpecifier: name, | ||
humanReadablePathSpecifier: name, | ||
path: path_1.join("node_modules", name), | ||
name, | ||
version, | ||
isNested: false, | ||
patchFilename, | ||
isDevOnly: patchFilename.endsWith(".dev.patch"), | ||
}; | ||
} | ||
const parts = patchFilename | ||
@@ -59,11 +80,15 @@ .replace(/(\.dev)?\.patch$/, "") | ||
return { | ||
name: lastPart.name, | ||
name: lastPart.packageName, | ||
version: lastPart.version, | ||
path: path_1.join("node_modules", parts.map(({ name }) => name).join("/node_modules/")), | ||
path: path_1.join("node_modules", parts.map(({ packageName: name }) => name).join("/node_modules/")), | ||
patchFilename, | ||
pathSpecifier: parts.map(({ name }) => name).join("/"), | ||
humanReadablePathSpecifier: parts.map(({ name }) => name).join(" => "), | ||
pathSpecifier: parts.map(({ packageName: name }) => name).join("/"), | ||
humanReadablePathSpecifier: parts | ||
.map(({ packageName: name }) => name) | ||
.join(" => "), | ||
isNested: parts.length > 1, | ||
packageNames: parts.map(({ name }) => name), | ||
packageNames: parts.map(({ packageName: name }) => name), | ||
isDevOnly: patchFilename.endsWith(".dev.patch"), | ||
sequenceName: lastPart.sequenceName, | ||
sequenceNumber: lastPart.sequenceNumber, | ||
}; | ||
@@ -104,2 +129,2 @@ } | ||
exports.getPatchDetailsFromCliString = getPatchDetailsFromCliString; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFja2FnZURldGFpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUGFja2FnZURldGFpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQTZCO0FBaUI3QixTQUFTLG1CQUFtQixDQUMxQixDQUFTO0lBS1QsTUFBTSxLQUFLLEdBQUcsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUMxQixRQUFRLEtBQUssQ0FBQyxNQUFNLEVBQUU7UUFDcEIsS0FBSyxDQUFDLENBQUMsQ0FBQztZQUNOLE9BQU8sRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7U0FDMUI7UUFDRCxLQUFLLENBQUMsQ0FBQyxDQUFDO1lBQ04sTUFBTSxDQUFDLFdBQVcsRUFBRSxhQUFhLENBQUMsR0FBRyxLQUFLLENBQUE7WUFDMUMsSUFBSSxhQUFhLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFFO2dCQUMvQixPQUFPO29CQUNMLElBQUksRUFBRSxXQUFXO29CQUNqQixPQUFPLEVBQUUsYUFBYTtpQkFDdkIsQ0FBQTthQUNGO1lBQ0QsT0FBTyxFQUFFLElBQUksRUFBRSxHQ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iAgICBwYWNrYWdlTmFtZXMsXG4gICAgcGF0aCxcbiAgICBuYW1lOiBwYWNrYWdlTmFtZXNbcGFja2FnZU5hbWVzLmxlbmd0aCAtIDFdLFxuICAgIGh1bWFuUmVhZGFibGVQYXRoU3BlY2lmaWVyOiBwYWNrYWdlTmFtZXMuam9pbihcIiA9PiBcIiksXG4gICAgaXNOZXN0ZWQ6IHBhY2thZ2VOYW1lcy5sZW5ndGggPiAxLFxuICAgIHBhdGhTcGVjaWZpZXI6IHNwZWNpZmllcixcbiAgfVxufVxuIl19 |
@@ -5,69 +5,2 @@ "use strict"; | ||
describe("getPackageDetailsFromPatchFilename", () => { | ||
it("parses old-style patch filenames", () => { | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("@types/banana:3.4.2-beta.2.patch")).toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "@types/banana", | ||
"isDevOnly": false, | ||
"isNested": false, | ||
"name": "@types/banana", | ||
"packageNames": Array [ | ||
"@types/banana", | ||
], | ||
"patchFilename": "@types/banana:3.4.2-beta.2.patch", | ||
"path": "node_modules/@types/banana", | ||
"pathSpecifier": "@types/banana", | ||
"version": "3.4.2-beta.2", | ||
} | ||
`); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("banana:0.4.2.patch")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "banana", | ||
"isDevOnly": false, | ||
"isNested": false, | ||
"name": "banana", | ||
"packageNames": Array [ | ||
"banana", | ||
], | ||
"patchFilename": "banana:0.4.2.patch", | ||
"path": "node_modules/banana", | ||
"pathSpecifier": "banana", | ||
"version": "0.4.2", | ||
} | ||
`); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("banana+0.4.2.patch")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "banana", | ||
"isDevOnly": false, | ||
"isNested": false, | ||
"name": "banana", | ||
"packageNames": Array [ | ||
"banana", | ||
], | ||
"patchFilename": "banana+0.4.2.patch", | ||
"path": "node_modules/banana", | ||
"pathSpecifier": "banana", | ||
"version": "0.4.2", | ||
} | ||
`); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("banana-0.4.2.patch")).toBe(null); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("@types+banana-0.4.2.patch")).toBe(null); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("banana+0.4.2.dev.patch")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "banana", | ||
"isDevOnly": true, | ||
"isNested": false, | ||
"name": "banana", | ||
"packageNames": Array [ | ||
"banana", | ||
], | ||
"patchFilename": "banana+0.4.2.dev.patch", | ||
"path": "node_modules/banana", | ||
"pathSpecifier": "banana", | ||
"version": "0.4.2", | ||
} | ||
`); | ||
}); | ||
it("parses new-style patch filenames", () => { | ||
@@ -88,2 +21,4 @@ expect(PackageDetails_1.getPackageDetailsFromPatchFilename("banana++apple+0.4.2.patch")) | ||
"pathSpecifier": "banana/apple", | ||
"sequenceName": undefined, | ||
"sequenceNumber": undefined, | ||
"version": "0.4.2", | ||
@@ -106,2 +41,4 @@ } | ||
"pathSpecifier": "@types/banana/@types/apple/@mollusc/man", | ||
"sequenceName": undefined, | ||
"sequenceNumber": undefined, | ||
"version": "0.4.2-banana-tree", | ||
@@ -123,2 +60,4 @@ } | ||
"pathSpecifier": "@types/banana.patch/hello", | ||
"sequenceName": undefined, | ||
"sequenceNumber": undefined, | ||
"version": "0.4.2-banana-tree", | ||
@@ -140,2 +79,4 @@ } | ||
"pathSpecifier": "@types/banana.patch/hello", | ||
"sequenceName": undefined, | ||
"sequenceNumber": undefined, | ||
"version": "0.4.2-banana-tree", | ||
@@ -145,2 +86,39 @@ } | ||
}); | ||
it("works for ordered patches", () => { | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("left-pad+1.3.0+02+world")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "left-pad", | ||
"isDevOnly": false, | ||
"isNested": false, | ||
"name": "left-pad", | ||
"packageNames": Array [ | ||
"left-pad", | ||
], | ||
"patchFilename": "left-pad+1.3.0+02+world", | ||
"path": "node_modules/left-pad", | ||
"pathSpecifier": "left-pad", | ||
"sequenceName": "world", | ||
"sequenceNumber": 2, | ||
"version": "1.3.0", | ||
} | ||
`); | ||
expect(PackageDetails_1.getPackageDetailsFromPatchFilename("@microsoft/api-extractor+2.0.0+01+FixThing")).toMatchInlineSnapshot(` | ||
Object { | ||
"humanReadablePathSpecifier": "@microsoft/api-extractor", | ||
"isDevOnly": false, | ||
"isNested": false, | ||
"name": "@microsoft/api-extractor", | ||
"packageNames": Array [ | ||
"@microsoft/api-extractor", | ||
], | ||
"patchFilename": "@microsoft/api-extractor+2.0.0+01+FixThing", | ||
"path": "node_modules/@microsoft/api-extractor", | ||
"pathSpecifier": "@microsoft/api-extractor", | ||
"sequenceName": "FixThing", | ||
"sequenceNumber": 1, | ||
"version": "2.0.0", | ||
} | ||
`); | ||
}); | ||
}); | ||
@@ -234,2 +212,90 @@ describe("getPatchDetailsFromCliString", () => { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFja2FnZURldGFpbHMudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9QYWNrYWdlRGV0YWlscy50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEscURBR3lCO0FBRXpCLFFBQVEsQ0FBQyxvQ0FBb0MsRUFBRSxHQUFHLEVBQUU7SUFDbEQsRUFBRSxDQUFDLGtDQUFrQyxFQUFFLEdBQUcsRUFBRTtRQUMxQyxNQUFNLENBQ0osbURBQWtDLENBQUMsa0NBQWtDLENBQUMsQ0FDdkUsQ0FBQyxxQkFBcUIsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Q0FjM0IsQ0FBQ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cImRhdmlkL3BhdGNoLXBhY2thZ2UvQGRhdmlkL2JhbmFuYVwiLFxufVxuYCxcbiAgICApXG4gIH0pXG59KVxuIl19 | ||
describe("parseNameAndVersion", () => { | ||
it("works for good-looking names", () => { | ||
expect(PackageDetails_1.parseNameAndVersion("lodash+2.3.4")).toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "lodash", | ||
"version": "2.3.4", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("patch-package+2.0.0-alpha.3")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "patch-package", | ||
"version": "2.0.0-alpha.3", | ||
} | ||
`); | ||
}); | ||
it("works for scoped package names", () => { | ||
expect(PackageDetails_1.parseNameAndVersion("@react-spring+rafz+2.0.0-alpha.3")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@react-spring/rafz", | ||
"version": "2.0.0-alpha.3", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("@microsoft+api-extractor+2.2.3")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@microsoft/api-extractor", | ||
"version": "2.2.3", | ||
} | ||
`); | ||
}); | ||
it("works for ordered patches", () => { | ||
expect(PackageDetails_1.parseNameAndVersion("patch-package+2.0.0+01")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "patch-package", | ||
"sequenceNumber": 1, | ||
"version": "2.0.0", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("@react-spring+rafz+2.0.0-alpha.3+23")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@react-spring/rafz", | ||
"sequenceNumber": 23, | ||
"version": "2.0.0-alpha.3", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("@microsoft+api-extractor+2.0.0+001")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@microsoft/api-extractor", | ||
"sequenceNumber": 1, | ||
"version": "2.0.0", | ||
} | ||
`); | ||
}); | ||
it("works for ordered patches with names", () => { | ||
expect(PackageDetails_1.parseNameAndVersion("patch-package+2.0.0+021+FixImportantThing")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "patch-package", | ||
"sequenceName": "FixImportantThing", | ||
"sequenceNumber": 21, | ||
"version": "2.0.0", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("@react-spring+rafz+2.0.0-alpha.3+000023+Foo")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@react-spring/rafz", | ||
"sequenceName": "Foo", | ||
"sequenceNumber": 23, | ||
"version": "2.0.0-alpha.3", | ||
} | ||
`); | ||
expect(PackageDetails_1.parseNameAndVersion("@microsoft+api-extractor+2.0.0+001+Bar")) | ||
.toMatchInlineSnapshot(` | ||
Object { | ||
"packageName": "@microsoft/api-extractor", | ||
"sequenceName": "Bar", | ||
"sequenceNumber": 1, | ||
"version": "2.0.0", | ||
} | ||
`); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFja2FnZURldGFpbHMudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9QYWNrYWdlRGV0YWlscy50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEscURBSXlCO0FBRXpCLFFBQVEsQ0FBQyxvQ0FBb0MsRUFBRSxHQUFHLEVBQUU7SUFDbEQsRUFBRSxDQUFDLGtDQUFrQyxFQUFFLEdBQUcsRUFBRTtRQUMxQyxNQUFNLENBQUMsbURBQWtDLENBQUMsMkJBQTJCLENBQUMsQ0FBQzthQUNwRSxxQkFBcUIsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FpQjVCLENBQUMsQ0FBQTtRQUVFLE1BQU0sQ0FDSixtREFBa0MsQ0FDaEMsbUVBQW1FLENBQ3BFLENBQ0YsQ0FBQyxxQkFB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FxuICBcInZlcnNpb25cIjogXCIyLjAuMC1hbHBoYS4zXCIsXG59XG5gKVxuICAgIGV4cGVjdChwYXJzZU5hbWVBbmRWZXJzaW9uKFwiQG1pY3Jvc29mdCthcGktZXh0cmFjdG9yKzIuMC4wKzAwMStCYXJcIikpXG4gICAgICAudG9NYXRjaElubGluZVNuYXBzaG90KGBcbk9iamVjdCB7XG4gIFwicGFja2FnZU5hbWVcIjogXCJAbWljcm9zb2Z0L2FwaS1leHRyYWN0b3JcIixcbiAgXCJzZXF1ZW5jZU5hbWVcIjogXCJCYXJcIixcbiAgXCJzZXF1ZW5jZU51bWJlclwiOiAxLFxuICBcInZlcnNpb25cIjogXCIyLjAuMFwiLFxufVxuYClcbiAgfSlcbn0pXG4iXX0= |
@@ -6,3 +6,3 @@ "use strict"; | ||
const fs_1 = require("fs"); | ||
function packageIsDevDependency({ appPath, packageDetails, }) { | ||
function packageIsDevDependency({ appPath, patchDetails, }) { | ||
const packageJsonPath = path_1.join(appPath, "package.json"); | ||
@@ -13,5 +13,5 @@ if (!fs_1.existsSync(packageJsonPath)) { | ||
const { devDependencies } = require(packageJsonPath); | ||
return Boolean(devDependencies && devDependencies[packageDetails.packageNames[0]]); | ||
return Boolean(devDependencies && devDependencies[patchDetails.packageNames[0]]); | ||
} | ||
exports.packageIsDevDependency = packageIsDevDependency; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZUlzRGV2RGVwZW5kZW5jeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wYWNrYWdlSXNEZXZEZXBlbmRlbmN5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLGlDQUE2QjtBQUM3QiwyQkFBK0I7QUFFL0IsU0FBZ0Isc0JBQXNCLENBQUMsRUFDckMsT0FBTyxFQUNQLGNBQWMsR0FJZjtJQUNDLE1BQU0sZUFBZSxHQUFHLFdBQU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4gIHBhdGNoRGV0YWlsczogUGF0Y2hlZFBhY2thZ2VEZXRhaWxzXG59KSB7XG4gIGNvbnN0IHBhY2thZ2VKc29uUGF0aCA9IGpvaW4oYXBwUGF0aCwgXCJwYWNrYWdlLmpzb25cIilcbiAgaWYgKCFleGlzdHNTeW5jKHBhY2thZ2VKc29uUGF0aCkpIHtcbiAgICByZXR1cm4gZmFsc2VcbiAgfVxuICBjb25zdCB7IGRldkRlcGVuZGVuY2llcyB9ID0gcmVxdWlyZShwYWNrYWdlSnNvblBhdGgpXG4gIHJldHVybiBCb29sZWFuKFxuICAgIGRldkRlcGVuZGVuY2llcyAmJiBkZXZEZXBlbmRlbmNpZXNbcGF0Y2hEZXRhaWxzLnBhY2thZ2VOYW1lc1swXV0sXG4gIClcbn1cbiJdfQ== |
@@ -13,3 +13,3 @@ "use strict"; | ||
appPath, | ||
packageDetails: PackageDetails_1.getPackageDetailsFromPatchFilename("typescript+3.0.1.patch"), | ||
patchDetails: PackageDetails_1.getPackageDetailsFromPatchFilename("typescript+3.0.1.patch"), | ||
})).toBe(true); | ||
@@ -20,3 +20,3 @@ }); | ||
appPath, | ||
packageDetails: PackageDetails_1.getPackageDetailsFromPatchFilename("chalk+3.0.1.patch"), | ||
patchDetails: PackageDetails_1.getPackageDetailsFromPatchFilename("chalk+3.0.1.patch"), | ||
})).toBe(false); | ||
@@ -28,3 +28,3 @@ }); | ||
appPath, | ||
packageDetails: PackageDetails_1.getPackageDetailsFromPatchFilename( | ||
patchDetails: PackageDetails_1.getPackageDetailsFromPatchFilename( | ||
// cosmiconfig is a transitive dep of lint-staged | ||
@@ -35,2 +35,2 @@ "cosmiconfig+3.0.1.patch"), | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZUlzRGV2RGVwZW5kZW5jeS50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BhY2thZ2VJc0RldkRl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lbmRlbmN5XCIsICgpID0+IHtcbiAgICBleHBlY3QoXG4gICAgICBwYWNrYWdlSXNEZXZEZXBlbmRlbmN5KHtcbiAgICAgICAgYXBwUGF0aCxcbiAgICAgICAgcGFja2FnZURldGFpbHM6IGdldFBhY2thZ2VEZXRhaWxzRnJvbVBhdGNoRmlsZW5hbWUoXG4gICAgICAgICAgXCJjaGFsayszLjAuMS5wYXRjaFwiLFxuICAgICAgICApISxcbiAgICAgIH0pLFxuICAgICkudG9CZShmYWxzZSlcbiAgfSlcbiAgaXQoXCJyZXR1cm5zIGZhbHNlIGlmIHBhY2thZ2UgaXMgYSB0cmFuc2l0aXZlIGRlcGVuZGVuY3kgb2YgYSBkZXYgZGVwZW5kZW5jeVwiLCAoKSA9PiB7XG4gICAgZXhwZWN0KGV4aXN0c1N5bmMoam9pbihhcHBQYXRoLCBcIm5vZGVfbW9kdWxlcy9jb3NtaWNvbmZpZ1wiKSkpLnRvQmUodHJ1ZSlcbiAgICBleHBlY3QoXG4gICAgICBwYWNrYWdlSXNEZXZEZXBlbmRlbmN5KHtcbiAgICAgICAgYXBwUGF0aCxcbiAgICAgICAgcGFja2FnZURldGFpbHM6IGdldFBhY2thZ2VEZXRhaWxzRnJvbVBhdGNoRmlsZW5hbWUoXG4gICAgICAgICAgLy8gY29zbWljb25maWcgaXMgYSB0cmFuc2l0aXZlIGRlcCBvZiBsaW50LXN0YWdlZFxuICAgICAgICAgIFwiY29zbWljb25maWcrMy4wLjEucGF0Y2hcIixcbiAgICAgICAgKSEsXG4gICAgICB9KSxcbiAgICApLnRvQmUoZmFsc2UpXG4gIH0pXG59KVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZUlzRGV2RGVwZW5kZW5jeS50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BhY2thZ2VJc0RldkRlcGVuZGVuY3kudGVzdC50cyJdLCJuYW1l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QoXG4gICAgICBwYWNrYWdlSXNEZXZEZXBlbmRlbmN5KHtcbiAgICAgICAgYXBwUGF0aCxcbiAgICAgICAgcGF0Y2hEZXRhaWxzOiBnZXRQYWNrYWdlRGV0YWlsc0Zyb21QYXRjaEZpbGVuYW1lKFwiY2hhbGsrMy4wLjEucGF0Y2hcIikhLFxuICAgICAgfSksXG4gICAgKS50b0JlKGZhbHNlKVxuICB9KVxuICBpdChcInJldHVybnMgZmFsc2UgaWYgcGFja2FnZSBpcyBhIHRyYW5zaXRpdmUgZGVwZW5kZW5jeSBvZiBhIGRldiBkZXBlbmRlbmN5XCIsICgpID0+IHtcbiAgICBleHBlY3QoZXhpc3RzU3luYyhqb2luKGFwcFBhdGgsIFwibm9kZV9tb2R1bGVzL2Nvc21pY29uZmlnXCIpKSkudG9CZSh0cnVlKVxuICAgIGV4cGVjdChcbiAgICAgIHBhY2thZ2VJc0RldkRlcGVuZGVuY3koe1xuICAgICAgICBhcHBQYXRoLFxuICAgICAgICBwYXRjaERldGFpbHM6IGdldFBhY2thZ2VEZXRhaWxzRnJvbVBhdGNoRmlsZW5hbWUoXG4gICAgICAgICAgLy8gY29zbWljb25maWcgaXMgYSB0cmFuc2l0aXZlIGRlcCBvZiBsaW50LXN0YWdlZFxuICAgICAgICAgIFwiY29zbWljb25maWcrMy4wLjEucGF0Y2hcIixcbiAgICAgICAgKSEsXG4gICAgICB9KSxcbiAgICApLnRvQmUoZmFsc2UpXG4gIH0pXG59KVxuIl19 |
@@ -10,9 +10,12 @@ "use strict"; | ||
const assertNever_1 = require("../assertNever"); | ||
const executeEffects = (effects, { dryRun }) => { | ||
effects.forEach(eff => { | ||
const executeEffects = (effects, { dryRun, cwd }) => { | ||
const inCwd = (path) => (cwd ? path_1.join(cwd, path) : path); | ||
const humanReadable = (path) => path_1.relative(process.cwd(), inCwd(path)); | ||
effects.forEach((eff) => { | ||
switch (eff.type) { | ||
case "file deletion": | ||
if (dryRun) { | ||
if (!fs_extra_1.default.existsSync(eff.path)) { | ||
throw new Error("Trying to delete file that doesn't exist: " + eff.path); | ||
if (!fs_extra_1.default.existsSync(inCwd(eff.path))) { | ||
throw new Error("Trying to delete file that doesn't exist: " + | ||
humanReadable(eff.path)); | ||
} | ||
@@ -22,3 +25,3 @@ } | ||
// TODO: integrity checks | ||
fs_extra_1.default.unlinkSync(eff.path); | ||
fs_extra_1.default.unlinkSync(inCwd(eff.path)); | ||
} | ||
@@ -29,8 +32,9 @@ break; | ||
// TODO: see what patch files look like if moving to exising path | ||
if (!fs_extra_1.default.existsSync(eff.fromPath)) { | ||
throw new Error("Trying to move file that doesn't exist: " + eff.fromPath); | ||
if (!fs_extra_1.default.existsSync(inCwd(eff.fromPath))) { | ||
throw new Error("Trying to move file that doesn't exist: " + | ||
humanReadable(eff.fromPath)); | ||
} | ||
} | ||
else { | ||
fs_extra_1.default.moveSync(eff.fromPath, eff.toPath); | ||
fs_extra_1.default.moveSync(inCwd(eff.fromPath), inCwd(eff.toPath)); | ||
} | ||
@@ -40,4 +44,5 @@ break; | ||
if (dryRun) { | ||
if (fs_extra_1.default.existsSync(eff.path)) { | ||
throw new Error("Trying to create file that already exists: " + eff.path); | ||
if (fs_extra_1.default.existsSync(inCwd(eff.path))) { | ||
throw new Error("Trying to create file that already exists: " + | ||
humanReadable(eff.path)); | ||
} | ||
@@ -51,17 +56,18 @@ // todo: check file contents matches | ||
: ""; | ||
fs_extra_1.default.ensureDirSync(path_1.dirname(eff.path)); | ||
fs_extra_1.default.writeFileSync(eff.path, fileContents, { mode: eff.mode }); | ||
const path = inCwd(eff.path); | ||
fs_extra_1.default.ensureDirSync(path_1.dirname(path)); | ||
fs_extra_1.default.writeFileSync(path, fileContents, { mode: eff.mode }); | ||
} | ||
break; | ||
case "patch": | ||
applyPatch(eff, { dryRun }); | ||
applyPatch(eff, { dryRun, cwd }); | ||
break; | ||
case "mode change": | ||
const currentMode = fs_extra_1.default.statSync(eff.path).mode; | ||
const currentMode = fs_extra_1.default.statSync(inCwd(eff.path)).mode; | ||
if (((isExecutable(eff.newMode) && isExecutable(currentMode)) || | ||
(!isExecutable(eff.newMode) && !isExecutable(currentMode))) && | ||
dryRun) { | ||
console.warn(`Mode change is not required for file ${eff.path}`); | ||
console.warn(`Mode change is not required for file ${humanReadable(eff.path)}`); | ||
} | ||
fs_extra_1.default.chmodSync(eff.path, eff.newMode); | ||
fs_extra_1.default.chmodSync(inCwd(eff.path), eff.newMode); | ||
break; | ||
@@ -103,3 +109,4 @@ default: | ||
*/ | ||
function applyPatch({ hunks, path }, { dryRun }) { | ||
function applyPatch({ hunks, path }, { dryRun, cwd }) { | ||
path = cwd ? path_1.resolve(cwd, path) : path; | ||
// modifying the file in place | ||
@@ -121,3 +128,3 @@ const fileContents = fs_extra_1.default.readFileSync(path).toString(); | ||
if (Math.abs(fuzzingOffset) > 20) { | ||
throw new Error(`Cant apply hunk ${hunks.indexOf(hunk)} for file ${path}`); | ||
throw new Error(`Cant apply hunk ${hunks.indexOf(hunk)} for file ${path_1.relative(process.cwd(), path)}`); | ||
} | ||
@@ -204,2 +211,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcGF0Y2gvYXBwbHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsd0RBQXlCO0FBQ3pCLCtCQUE4QjtBQUU5QixnREFBNEM7QUFFckMsTUFBTSxjQUFjLEdBQUcsQ0FDNUIsT0FBd0IsRUFDeEIsRUFBRSxNQUFNLEVBQXVCLEVBQy9CLEVBQUU7SUFDRixPQUFPLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1FBQ3BCLFFBQVEsR0FBRyxDQUFDLElBQUksRUFBRTtZQUNoQixLQUFLLGVBQWU7Z0JBQ2xCLElBQUksTUFBTSxFQUFFO29CQUNWLEl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V0ZSBmaWxlIHRoYXQgZG9lc24ndCBleGlzdDogXCIgKyBlZmYucGF0aCxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gVE9ETzogaW50ZWdyaXR5IGNoZWNrc1xuICAgICAgICAgIGZzLnVubGlua1N5bmMoZWZmLnBhdGgpXG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgXCJyZW5hbWVcIjpcbiAgICAgICAgaWYgKGRyeVJ1bikge1xuICAgICAgICAgIC8vIFRPRE86IHNlZSB3aGF0IHBhdGNoIGZpbGVzIGxvb2sgbGlrZSBpZiBtb3ZpbmcgdG8gZXhpc2luZyBwYXRoXG4gICAgICAgICAgaWYgKCFmcy5leGlzdHNTeW5jKGVmZi5mcm9tUGF0aCkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgXCJUcnlpbmcgdG8gbW92ZSBmaWxlIHRoYXQgZG9lc24ndCBleGlzdDogXCIgKyBlZmYuZnJvbVBhdGgsXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGZzLm1vdmVTeW5jKGVmZi5mcm9tUGF0aCwgZWZmLnRvUGF0aClcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgY2FzZSBcImZpbGUgY3JlYXRpb25cIjpcbiAgICAgICAgaWYgKGRyeVJ1bikge1xuICAgICAgICAgIGlmIChmcy5leGlzdHNTeW5jKGVmZi5wYXRoKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICBcIlRyeWluZyB0byBjcmVhdGUgZmlsZSB0aGF0IGFscmVhZHkgZXhpc3RzOiBcIiArIGVmZi5wYXRoLFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgICAvLyB0b2RvOiBjaGVjayBmaWxlIGNvbnRl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uICAgIHJldHVybiBudWxsXG4gIH1cblxuICBmb3IgKGNvbnN0IHBhcnQgb2YgaHVuay5wYXJ0cykge1xuICAgIHN3aXRjaCAocGFydC50eXBlKSB7XG4gICAgICBjYXNlIFwiZGVsZXRpb25cIjpcbiAgICAgIGNhc2UgXCJjb250ZXh0XCI6XG4gICAgICAgIGZvciAoY29uc3QgbGluZSBvZiBwYXJ0LmxpbmVzKSB7XG4gICAgICAgICAgY29uc3Qgb3JpZ2luYWxMaW5lID0gZmlsZUxpbmVzW2NvbnRleHRJbmRleF1cbiAgICAgICAgICBpZiAoIWxpbmVzQXJlRXF1YWwob3JpZ2luYWxMaW5lLCBsaW5lKSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGxcbiAgICAgICAgICB9XG4gICAgICAgICAgY29udGV4dEluZGV4KytcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChwYXJ0LnR5cGUgPT09IFwiZGVsZXRpb25cIikge1xuICAgICAgICAgIHJlc3VsdC5wdXNoKHtcbiAgICAgICAgICAgIHR5cGU6IFwic3BsaWNlXCIsXG4gICAgICAgICAgICBpbmRleDogY29udGV4dEluZGV4IC0gcGFydC5saW5lcy5sZW5ndGgsXG4gICAgICAgICAgICBudW1Ub0RlbGV0ZTogcGFydC5saW5lcy5sZW5ndGgsXG4gICAgICAgICAgICBsaW5lc1RvSW5zZXJ0OiBbXSxcbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgaWYgKHBhcnQubm9OZXdsaW5lQXRFbmRPZkZpbGUpIHtcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKHtcbiAgICAgICAgICAgICAgdHlwZTogXCJwdXNoXCIsXG4gICAgICAgICAgICAgIGxpbmU6IFwiXCIsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgY2FzZSBcImluc2VydGlvblwiOlxuICAgICAgICByZXN1bHQucHVzaCh7XG4gICAgICAgICAgdHlwZTogXCJzc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uICAgICAgICAgIC8vIFRPRE86IGludGVncml0eSBjaGVja3NcbiAgICAgICAgICBmcy51bmxpbmtTeW5jKGluQ3dkKGVmZi5wYXRoKSlcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgY2FzZSBcInJlbmFtZVwiOlxuICAgICAgICBpZiAoZHJ5UnVuKSB7XG4gICAgICAgICAgLy8gVE9ETzogc2VlIHdoYXQgcGF0Y2ggZmlsZXMgbG9vayBsaWtlIGlmIG1vdmluZyB0byBleGlzaW5nIHBhdGhcbiAgICAgICAgICBpZiAoIWZzLmV4aXN0c1N5bmMoaW5Dd2QoZWZmLmZyb21QYXRoKSkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgXCJUcnlpbmcgdG8gbW92ZSBmaWxlIHRoYXQgZG9lc24ndCBleGlzdDogXCIgK1xuICAgICAgICAgICAgICAgIGh1bWFuUmVhZGFibGUoZWZmLmZyb21QYXRoKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZnMubW92ZVN5bmMoaW5Dd2QoZWZmLmZyb21QYXRoKSwgaW5Dd2QoZWZmLnRvUGF0aCkpXG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgXCJmaWxlIGNyZWF0aW9uXCI6XG4gICAgICAgIGlmIChkcnlSdW4pIHtcbiAgICAgICAgICBpZiAoZnMuZXhpc3RzU3luYyhpbkN3ZChlZmYucGF0aCkpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgIFwiVHJ5aW5nIHRvIGNyZWF0ZSBmaWxlIHRoYXQgYWxyZWFkeSBleGlzdHM6IFwiICtcbiAgICAgICAgICAgICAgICBodW1hblJlYWRhYmxlKGVmZi5wYXRoKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gdG9kbzogY2hlY2sgZmlsZSBjb250ZW50cyBtYXRjaGVzXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29uc3QgZmlsZUNvbnRlbnRzID0gZWZmLmh1bmtcbiAgICAgICAgICAgID8gZWZmLmh1bmsucGFydHNbMF0ubGluZXMuam9pbihcIlxcblwiKSArXG4gICAgICAgICAgICAgIChlZmYuaHVuay5wYXJ0c1swXS5ub05ld2xpbmVBdEVuZE9mRmlsZSA/IFwiXCIgOiBcIlxcblwiKVxuICAgICAgICAgICAgOiBcIlwiXG4gICAgICAgICAgY29uc3QgcGF0aCA9IGluQ3dkKGVmZi5wYXRoKVxuICAgICAgICAgIGZzLmVuc3VyZURpclN5bmMoZGlybmFtZShwYXRoKSlcbiAgICAgICAgICBmcy53cml0ZUZpbGVTeW5jKHBhdGgsIGZpbGVDb250ZW50cywgeyBtb2RlOiBlZmYubW9kZSB9KVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG4gICAgICBjYXNlIFwicGF0Y2hcIjpcbiAgICAgICAgYXBwbHlQYXRjaChlZmYsIHsgZHJ5UnVuLCBjd2QgfSlcbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgXCJtb2RlIGNoYW5nZVwiOlxuICAgICAgICBjb25zdCBjdXJyZW50TW9kZSA9IGZzLnN0YXRTeW5jKGluQ3dkKGVmZi5wYXRoKSkubW9kZVxuICAgICAgICBpZiAoXG4gICAgICAgICAgKChpc0V4ZWN1dGFibGUoZWZmLm5ld01vZGUpICYmIGlzRXhlY3V0YWJsZShjdXJyZW50TW9kZSkpIHx8XG4gICAgICAgICAgICAoIWlzRXhlY3V0YWJsZShlZmYubmV3TW9kZSkgJiYgIWlzRXhlY3V0YWJsZShjdXJyZW50TW9kZSkpKSAmJlxuICAgICAgICAgIGRyeVJ1blxuICAgICAgICApIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oXG4gICAgICAgICAgICBgTW9kZSBjaGFuZ2UgaXMgbm90IHJlcXVpcmVkIGZvciBmaW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NhdGlvbnMgPSBldmFsdWF0ZUh1bmsoaHVuaywgZmlsZUxpbmVzLCBmdXp6aW5nT2Zmc2V0KVxuICAgICAgaWYgKG1vZGlmaWNhdGlvbnMpIHtcbiAgICAgICAgcmVzdWx0LnB1c2gobW9kaWZpY2F0aW9ucylcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgZnV6emluZ09mZnNldCA9XG4gICAgICAgIGZ1enppbmdPZmZzZXQgPCAwID8gZnV6emluZ09mZnNldCAqIC0xIDogZnV6emluZ09mZnNldCAqIC0xIC0gMVxuXG4gICAgICBpZiAoTWF0aC5hYnMoZnV6emluZ09mZnNldCkgPiAyMCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgYENhbnQgYXBwbHkgaHVuayAke2h1bmtzLmluZGV4T2YoaHVuayl9IGZvciBmaWxlICR7cmVsYXRpdmUoXG4gICAgICAgICAgICBwcm9jZXNzLmN3ZCgpLFxuICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICApfWAsXG4gICAgICAgIClcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBpZiAoZHJ5UnVuKSB7XG4gICAgcmV0dXJuXG4gIH1cblxuICBsZXQgZGlmZk9mZnNldCA9IDBcblxuICBmb3IgKGNvbnN0IG1vZGlmaWNhdGlvbnMgb2YgcmVzdWx0KSB7XG4gICAgZm9yIChjb25zdCBtb2RpZmljYXRpb24gb2YgbW9kaWZpY2F0aW9ucykge1xuICAgICAgc3dpdGNoIChtb2RpZmljYXRpb24udHlwZSkge1xuICAgICAgICBjYXNlIFwic3BsaWNlXCI6XG4gICAgICAgICAgZmlsZUxpbmVzLnNwbGljZShcbiAgICAgICAgICAgIG1vZGlmaWNhdGlvbi5pbmRleCArIGRpZmZPZmZzZXQsXG4gICAgICAgICAgICBtb2RpZmljYXRpb24ubnVtVG9EZWxldGUsXG4gICAgICAgICAgICAuLi5tb2RpZmljYXRpb24ubGluZXNUb0luc2VydCxcbi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ZXQgY29udGV4dEluZGV4ID0gaHVuay5oZWFkZXIub3JpZ2luYWwuc3RhcnQgLSAxICsgZnV6emluZ09mZnNldFxuICAvLyBkbyBib3VuZHMgY2hlY2tzIGZvciBpbmRleFxuICBpZiAoY29udGV4dEluZGV4IDwgMCkge1xuICAgIHJldHVybiBudWxsXG4gIH1cbiAgaWYgKGZpbGVMaW5lcy5sZW5ndGggLSBjb250ZXh0SW5kZXggPCBodW5rLmhlYWRlci5vcmlnaW5hbC5sZW5ndGgpIHtcbiAgICByZXR1cm4gbnVsbFxuICB9XG5cbiAgZm9yIChjb25zdCBwYXJ0IG9mIGh1bmsucGFydHMpIHtcbiAgICBzd2l0Y2ggKHBhcnQudHlwZSkge1xuICAgICAgY2FzZSBcImRlbGV0aW9uXCI6XG4gICAgICBjYXNlIFwiY29udGV4dFwiOlxuICAgICAgICBmb3IgKGNvbnN0IGxpbmUgb2YgcGFydC5saW5lcykge1xuICAgICAgICAgIGNvbnN0IG9yaWdpbmFsTGluZSA9IGZpbGVMaW5lc1tjb250ZXh0SW5kZXhdXG4gICAgICAgICAgaWYgKCFsaW5lc0FyZUVxdWFsKG9yaWdpbmFsTGluZSwgbGluZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsXG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnRleHRJbmRleCsrXG4gICAgICAgIH1cblxuICAgICAgICBpZiAocGFydC50eXBlID09PSBcImRlbGV0aW9uXCIpIHtcbiAgICAgICAgICByZXN1bHQucHVzaCh7XG4gICAgICAgICAgICB0eXBlOiBcInNwbGljZVwiLFxuICAgICAgICAgICAgaW5kZXg6IGNvbnRleHRJbmRleCAtIHBhcnQubGluZXMubGVuZ3RoLFxuICAgICAgICAgICAgbnVtVG9EZWxldGU6IHBhcnQubGluZXMubGVuZ3RoLFxuICAgICAgICAgICAgbGluZXNUb0luc2VydDogW10sXG4gICAgICAgICAgfSlcblxuICAgICAgICAgIGlmIChwYXJ0Lm5vTmV3bGluZUF0RW5kT2ZGaWxlKSB7XG4gICAgICAgICAgICByZXN1bHQucHVzaCh7XG4gICAgICAgICAgICAgIHR5cGU6IFwicHVzaFwiLFxuICAgICAgICAgICAgICBsaW5lOiBcIlwiLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgXCJpbnNlcnRpb25cIjpcbiAgICAgICAgcmVzdWx0LnB1c2goe1xuICAgICAgICAgIHR5cGU6IFwic3BsaWNlXCIsXG4gICAgICAgICAgaW5kZXg6IGNvbnRleHRJbmRleCxcbiAgICAgICAgICBudW1Ub0RlbGV0ZTogMCxcbiAgICAgICAgICBsaW5lc1RvSW5zZXJ0OiBwYXJ0LmxpbmVzLFxuICAgICAgICB9KVxuICAgICAgICBpZiAocGFydC5ub05ld2xpbmVBdEVuZE9mRmlsZSkge1xuICAgICAgICAgIHJlc3VsdC5wdXNoKHsgdHlwZTogXCJwb3BcIiB9KVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG4gICAgICBkZWZhdWx0OlxuICAgICAgICBhc3NlcnROZXZlcihwYXJ0LnR5cGUpXG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJlc3VsdFxufVxuIl19 |
@@ -12,3 +12,3 @@ "use strict"; | ||
const parse_1 = require("./parse"); | ||
function readPatch({ patchFilePath, packageDetails, patchDir, }) { | ||
function readPatch({ patchFilePath, patchDetails, patchDir, }) { | ||
try { | ||
@@ -25,3 +25,3 @@ return parse_1.parsePatchFile(fs_extra_1.readFileSync(patchFilePath).toString()); | ||
fixupSteps.push(`patch -p1 -i ${relativePatchFilePath.slice(relativePatchFilePath.indexOf(patchDir))}`); | ||
fixupSteps.push(`npx patch-package ${packageDetails.pathSpecifier}`); | ||
fixupSteps.push(`npx patch-package ${patchDetails.pathSpecifier}`); | ||
if (patchBaseDir) { | ||
@@ -31,3 +31,3 @@ fixupSteps.push(`cd ${path_1.relative(path_1.resolve(process.cwd(), patchBaseDir), process.cwd())}`); | ||
console.error(` | ||
${chalk_1.default.red.bold("**ERROR**")} ${chalk_1.default.red(`Failed to apply patch for package ${chalk_1.default.bold(packageDetails.humanReadablePathSpecifier)}`)} | ||
${chalk_1.default.red.bold("**ERROR**")} ${chalk_1.default.red(`Failed to apply patch for package ${chalk_1.default.bold(patchDetails.humanReadablePathSpecifier)}`)} | ||
@@ -52,2 +52,2 @@ This happened because the patch file ${relativePatchFilePath} could not be parsed. | ||
exports.readPatch = readPatch; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9yZWFkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLGtEQUF5QjtBQUN6Qix1Q0FBdUM7QUFDdkMsa0NBQTJDO0FBQzNDLCtCQUFnQztBQUVoQyxtQ0FBdUQ7QUFFdkQsU0FBZ0IsU0FBUyxDQUFDLEVBQ3hCLGFBQWEsRUFDYixjQUFjLEVBQ2QsUUFBUSxHQUtUO0lBQ0MsSUFBSTtRQUNGLE9BQU8sc0JBQWMsQ0FBQyx1QkFBWSxDQUFDLGFBQWEsQ0FBQyxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUE7S0FDOUQ7SUFBQyxPQUFPLENBQUMsRUFBRTtRQUNWLE1BQU0sVUFBVSxHQUFhLEVBQUUsQ0FBQTtRQUMvQixNQUFNLHFCQUFxQixHQUFHLGdCQUFTLENBQ3JDLGVBQVEsQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEVBQUUsYUFBYSxDQUFDLENBQ3ZDLENBQUE7UUFDRCxNQUFNLFlBQVksR0FBRyxxQkFBcUIsQ0FBQyxLQUFLLENBQzlDLENBQUMsRUFDRCxxQkFBcUIsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQ3hDLENBQUE7UUFDR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VwZ3JhZGVkIHBhdGNoLXBhY2thZ2UsIHlvdSBjYW4gdHJ5IHJ1bm5pbmc6XG4gIFxuICAgICR7Zml4dXBTdGVwcy5qb2luKFwiXFxuICAgIFwiKX1cbiAgICBcbiAgT3RoZXJ3aXNlLCB0cnkgbWFudWFsbHkgY3JlYXRpbmcgdGhlIHBhdGNoIGZpbGUgYWdhaW4uXG4gIFxuICBJZiB0aGUgcHJvYmxlbSBwZXJzaXN0cywgcGxlYXNlIHN1Ym1pdCBhIGJ1ZyByZXBvcnQ6XG4gIFxuICAgIGh0dHBzOi8vZ2l0aHViLmNvbS9kczMwMC9wYXRjaC1wYWNrYWdlL2lzc3Vlcy9uZXc/dGl0bGU9UGF0Y2grZmlsZStwYXJzZStlcnJvciZib2R5PSUzQ1BsZWFzZSthdHRhY2grdGhlK3BhdGNoK2ZpbGUraW4rcXVlc3Rpb24lM0VcblxuYClcbiAgICBwcm9jZXNzLmV4aXQoMSlcbiAgfVxuICByZXR1cm4gW11cbn1cbiJdfQ== |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPatchFiles = void 0; | ||
exports.getGroupedPatches = exports.getPatchFiles = void 0; | ||
const PackageDetails_1 = require("./PackageDetails"); | ||
const path_1 = require("./path"); | ||
@@ -14,3 +15,3 @@ const klaw_sync_1 = __importDefault(require("klaw-sync")); | ||
.map(({ path }) => path_1.relative(patchesDir, path)) | ||
.filter(path => path.endsWith(".patch")); | ||
.filter((path) => path.endsWith(".patch")); | ||
} | ||
@@ -22,2 +23,37 @@ catch (e) { | ||
exports.getPatchFiles = getPatchFiles; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0Y2hGcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXRjaEZzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLGlDQUFpQztBQUNqQywwREFBZ0M7QUFFekIsTUFBTSxhQUFhLEdBQUcsQ0FBQyxVQUFrQixFQUFFLEVBQUU7SUFDbEQsSUFBSTtRQUNGLE9BQU8sbUJBQVEsQ0FBQyxVQUFVLEVBQUUsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLENBQUM7YUFDekMsR0FBRyxDQUFDLENBQUMsRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLENBQUMsZUFBUSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQzthQUM3QyxNQUFNLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUE7S0FDM0M7SUFBQyxPQUFPLENBQUMsRUFBRTtRQUNWLE9BQU8sRUFBRSxDQUFBO0tBQ1Y7QUFDSCxDQUFDLENBQUE7QUFSWSxRQUFBLGFBQWEsaUJBUXpCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVsYXRpdmUgfSBmcm9tIFwiLi9wYXRoXCJcbmltcG9ydCBrbGF3U3luYyBmcm9tIFwia2xhdy1zeW5jXCJcblxuZXhwb3J0IGNvbnN0IGdldFBhdGNoRmlsZXMgPSAocGF0Y2hlc0Rpcjogc3RyaW5nKSA9PiB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIGtsYXdTeW5jKHBhdGNoZXNEaXIsIHsgbm9kaXI6IHRydWUgfSlcbiAgICAgIC5tYXAoKHsgcGF0aCB9KSA9PiByZWxhdGl2ZShwYXRjaGVzRGlyLCBwYXRoKSlcbiAgICAgIC5maWx0ZXIocGF0aCA9PiBwYXRoLmVuZHNXaXRoKFwiLnBhdGNoXCIpKVxuICB9IGNhdGNoIChlKSB7XG4gICAgcmV0dXJuIFtdXG4gIH1cbn1cbiJdfQ== | ||
const getGroupedPatches = (patchesDirectory) => { | ||
const files = exports.getPatchFiles(patchesDirectory); | ||
if (files.length === 0) { | ||
return { | ||
numPatchFiles: 0, | ||
pathSpecifierToPatchFiles: {}, | ||
warnings: [], | ||
}; | ||
} | ||
const warnings = []; | ||
const pathSpecifierToPatchFiles = {}; | ||
for (const file of files) { | ||
const details = PackageDetails_1.getPackageDetailsFromPatchFilename(file); | ||
if (!details) { | ||
warnings.push(`Unrecognized patch file in patches directory ${file}`); | ||
continue; | ||
} | ||
if (!pathSpecifierToPatchFiles[details.pathSpecifier]) { | ||
pathSpecifierToPatchFiles[details.pathSpecifier] = []; | ||
} | ||
pathSpecifierToPatchFiles[details.pathSpecifier].push(details); | ||
} | ||
for (const arr of Object.values(pathSpecifierToPatchFiles)) { | ||
arr.sort((a, b) => { | ||
var _a, _b; | ||
return ((_a = a.sequenceNumber) !== null && _a !== void 0 ? _a : 0) - ((_b = b.sequenceNumber) !== null && _b !== void 0 ? _b : 0); | ||
}); | ||
} | ||
return { | ||
numPatchFiles: files.length, | ||
pathSpecifierToPatchFiles, | ||
warnings, | ||
}; | ||
}; | ||
exports.getGroupedPatches = getGroupedPatches; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0Y2hGcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXRjaEZzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHFEQUd5QjtBQUN6QixpQ0FBaUM7QUFDakMsMERBQWdDO0FBRXpCLE1BQU0sYUFBYSxHQUFHLENBQUMsVUFBa0IsRUFBRSxFQUFFO0lBQ2xELElBQUk7UUFDRixPQUFPLG1CQUFRLENBQUMsVUFBVSxFQUFFLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxDQUFDO2FBQ3pDLEdBQUcsQ0FBQyxDQUFDLEVBQUUsSUFBSSxFQUFFLEVBQUUsRUFBRSxDQUFDLGVBQVEsQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDLENBQUM7Y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SAke2ZpbGV9YClcbiAgICAgIGNvbnRpbnVlXG4gICAgfVxuICAgIGlmICghcGF0aFNwZWNpZmllclRvUGF0Y2hGaWxlc1tkZXRhaWxzLnBhdGhTcGVjaWZpZXJdKSB7XG4gICAgICBwYXRoU3BlY2lmaWVyVG9QYXRjaEZpbGVzW2RldGFpbHMucGF0aFNwZWNpZmllcl0gPSBbXVxuICAgIH1cbiAgICBwYXRoU3BlY2lmaWVyVG9QYXRjaEZpbGVzW2RldGFpbHMucGF0aFNwZWNpZmllcl0ucHVzaChkZXRhaWxzKVxuICB9XG4gIGZvciAoY29uc3QgYXJyIG9mIE9iamVjdC52YWx1ZXMocGF0aFNwZWNpZmllclRvUGF0Y2hGaWxlcykpIHtcbiAgICBhcnIuc29ydCgoYSwgYikgPT4ge1xuICAgICAgcmV0dXJuIChhLnNlcXVlbmNlTnVtYmVyID8/IDApIC0gKGIuc2VxdWVuY2VOdW1iZXIgPz8gMClcbiAgICB9KVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICBudW1QYXRjaEZpbGVzOiBmaWxlcy5sZW5ndGgsXG4gICAgcGF0aFNwZWNpZmllclRvUGF0Y2hGaWxlcyxcbiAgICB3YXJuaW5ncyxcbiAgfVxufVxuIl19 |
{ | ||
"name": "patch-package", | ||
"version": "7.0.0", | ||
"version": "8.0.0-canary.0", | ||
"description": "Fix broken node modules with no fuss", | ||
@@ -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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
323350
2395
2