diff --git a/dist/index.js b/dist/index.js index fece34a..24a3b32 100644 --- a/dist/index.js +++ b/dist/index.js @@ -25710,8 +25710,6 @@ async function run() { const token_for_target_repo = core.getInput('token_for_target_repo'); // Obviously, don't log this! await (0, main_1.main)({ domain: source_domain, owner: source_owner, name: source_name }, { domain: target_domain, owner: target_owner, name: target_name }, dry_run, token_for_target_repo); - // Set output - core.setOutput('example-output', 'some value'); } catch (error) { if (error instanceof Error) { @@ -25795,8 +25793,8 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) { // than abandoning the target tree after the insertion point and trusting in later operation to rebuild it - because // the target repo's tree will have representations of commits from _other_ (source)repos too, which we cannot // recreate without their context) - var targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, reversedSourceCommitHistory[0].date); - for (var sourceCommit of reversedSourceCommitHistory) { + let targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, reversedSourceCommitHistory[0].date); + for (const sourceCommit of reversedSourceCommitHistory) { // "(Index of) First Target Commit that is earlier than (or equal to) the source commit" const targetCommitIndex = targetCommitHistory.findIndex(c => c.date <= sourceCommit.date); console.log(`DEBUG - targetCommitIndex: ${targetCommitIndex}. targetCommitHistory: ${JSON.stringify(targetCommitHistory)}`); @@ -25813,7 +25811,7 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) { } else { console.log(`DEBUG - No match for ${sourceCommit.hash} in ${targetCommit.hash} - inserting.`); - var followOnTargetCommit; + let followOnTargetCommit; if (targetCommitIndex == 0) { // The targetCommit is the latest (in time; first in the array) in the history - i.e. there is nothing to cherry-pick back on top of it followOnTargetCommit = undefined; @@ -25862,6 +25860,10 @@ function buildSourceCommitHistory(path, numCommits) { // If you want to copy this formatting for debugging, it's: // // --pretty=format:'{"hash":"%h","author_name":"%an","author_email":"%ae","date":"%ai","message":"%s"}' + // + // TODO - return to this and figure out if these are _actually_ "useless escapes" or not - got a couple layers + // of string-parsing to consider here, I wouldn't want to bet without testing! + //eslint-disable-next-line no-useless-escape `git log --max-count=${numCommits} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path }); const logLines = logOutput.toString().split('\n'); for (const line of logLines) { @@ -25877,7 +25879,11 @@ function buildTargetCommitHistory(path, oldestDateInSourceCommitHistory) { const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path }); const countedNumber = countingLogOutput.toString().split('\n').length; console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`); - const logOutput = (0, child_process_1.execSync)(`git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path }); + // TODO - return to this and figure out if these are _actually_ "useless escapes" or not - got a couple layers + // of string-parsing to consider here, I wouldn't want to bet without testing! + const logOutput = (0, child_process_1.execSync)( + //eslint-disable-next-line no-useless-escape + `git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path }); const logLines = logOutput.toString().split('\n'); for (const line of logLines) { const commit = parseCommit(path, line); diff --git a/node_modules/@vercel/ncc/dist/ncc/cli.js.cache b/node_modules/@vercel/ncc/dist/ncc/cli.js.cache index be9ef08..33ed4c9 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/cli.js.cache and b/node_modules/@vercel/ncc/dist/ncc/cli.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/index.js.cache b/node_modules/@vercel/ncc/dist/ncc/index.js.cache index 4e7c108..135873f 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/index.js.cache and b/node_modules/@vercel/ncc/dist/ncc/index.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache index 4b6f674..dc06a57 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache index 2a6d0d4..56168e6 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache differ diff --git a/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache b/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache index 9355e74..ed86b06 100644 Binary files a/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache and b/node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache differ