Comparing version 0.0.0-pr-27652-3af8043 to 0.0.0-pr-27652-5a954f2
{ | ||
"name": "nx", | ||
"version": "0.0.0-pr-27652-3af8043", | ||
"version": "0.0.0-pr-27652-5a954f2", | ||
"private": false, | ||
@@ -74,3 +74,3 @@ "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", | ||
"ora": "5.3.0", | ||
"@nrwl/tao": "0.0.0-pr-27652-3af8043" | ||
"@nrwl/tao": "0.0.0-pr-27652-5a954f2" | ||
}, | ||
@@ -90,12 +90,12 @@ "peerDependencies": { | ||
"optionalDependencies": { | ||
"@nx/nx-darwin-x64": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-darwin-arm64": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-linux-x64-gnu": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-linux-x64-musl": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-win32-x64-msvc": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-linux-arm64-gnu": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-linux-arm64-musl": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-linux-arm-gnueabihf": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-win32-arm64-msvc": "0.0.0-pr-27652-3af8043", | ||
"@nx/nx-freebsd-x64": "0.0.0-pr-27652-3af8043" | ||
"@nx/nx-darwin-x64": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-darwin-arm64": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-linux-x64-gnu": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-linux-x64-musl": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-win32-x64-msvc": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-linux-arm64-gnu": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-linux-arm64-musl": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-linux-arm-gnueabihf": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-win32-arm64-msvc": "0.0.0-pr-27652-5a954f2", | ||
"@nx/nx-freebsd-x64": "0.0.0-pr-27652-5a954f2" | ||
}, | ||
@@ -102,0 +102,0 @@ "nx-migrations": { |
@@ -11,3 +11,2 @@ export declare function cloneFromUpstream(url: string, destination: string, { originName, depth }?: { | ||
addFetchRemote(remoteName: string, branch: string): Promise<string>; | ||
private execAsync; | ||
showStat(): Promise<string>; | ||
@@ -32,8 +31,6 @@ listBranches(): Promise<string[]>; | ||
filterBranch(subdirectory: string, branchName: string): Promise<string>; | ||
private execAsync; | ||
private quotePath; | ||
} | ||
/** | ||
* This is used by the squash editor script to update the rebase file. | ||
*/ | ||
export declare function updateRebaseFile(contents: string): string; | ||
/** | ||
* This is currently duplicated in Nx Console. Please let @MaxKless know if you make changes here. | ||
@@ -40,0 +37,0 @@ */ |
@@ -5,3 +5,2 @@ "use strict"; | ||
exports.cloneFromUpstream = cloneFromUpstream; | ||
exports.updateRebaseFile = updateRebaseFile; | ||
exports.getGithubSlugOrNull = getGithubSlugOrNull; | ||
@@ -11,8 +10,8 @@ exports.extractUserAndRepoFromGitHubUrl = extractUserAndRepoFromGitHubUrl; | ||
exports.getLatestCommitSha = getLatestCommitSha; | ||
const child_process_1 = require("child_process"); | ||
const node_child_process_1 = require("node:child_process"); | ||
const node_path_1 = require("node:path"); | ||
const devkit_exports_1 = require("../devkit-exports"); | ||
const path_1 = require("path"); | ||
function execAsync(command, execOptions) { | ||
return new Promise((res, rej) => { | ||
(0, child_process_1.exec)(command, execOptions, (err, stdout, stderr) => { | ||
(0, node_child_process_1.exec)(command, execOptions, (err, stdout, stderr) => { | ||
if (err) { | ||
@@ -29,3 +28,3 @@ return rej(err); | ||
await execAsync(`git clone ${url} ${destination} ${depth ? `--depth ${depth}` : ''} --origin ${originName}`, { | ||
cwd: (0, path_1.dirname)(destination), | ||
cwd: (0, node_path_1.dirname)(destination), | ||
}); | ||
@@ -40,3 +39,3 @@ return new GitRepository(destination); | ||
getGitRootPath(cwd) { | ||
return (0, child_process_1.execSync)('git rev-parse --show-toplevel', { | ||
return (0, node_child_process_1.execSync)('git rev-parse --show-toplevel', { | ||
cwd, | ||
@@ -50,7 +49,2 @@ }) | ||
} | ||
execAsync(command) { | ||
return execAsync(command, { | ||
cwd: this.root, | ||
}); | ||
} | ||
async showStat() { | ||
@@ -90,3 +84,3 @@ return await this.execAsync(`git show --stat`); | ||
async move(path, destination) { | ||
return await this.execAsync(`git mv '${path}' '${destination}'`); | ||
return await this.execAsync(`git mv ${this.quotePath(path)} ${this.quotePath(destination)}`); | ||
} | ||
@@ -120,21 +114,30 @@ async push(ref, remoteName) { | ||
async filterRepo(subdirectory) { | ||
return await this.execAsync(`git filter-repo -f --subdirectory-filter ${subdirectory}`); | ||
// filter-repo requires POSIX path to work | ||
const posixPath = subdirectory.split(node_path_1.sep).join(node_path_1.posix.sep); | ||
return await this.execAsync(`git filter-repo -f --subdirectory-filter ${this.quotePath(posixPath)}`); | ||
} | ||
async filterBranch(subdirectory, branchName) { | ||
// filter-repo requires POSIX path to work | ||
const posixPath = subdirectory.split(node_path_1.sep).join(node_path_1.posix.sep); | ||
// We need non-ASCII file names to not be quoted, or else filter-branch will exclude them. | ||
await this.execAsync(`git config core.quotepath false`); | ||
return await this.execAsync(`git filter-branch --subdirectory-filter ${subdirectory} -- ${branchName}`); | ||
return await this.execAsync(`git filter-branch --subdirectory-filter ${this.quotePath(posixPath)} -- ${branchName}`); | ||
} | ||
execAsync(command) { | ||
return execAsync(command, { | ||
cwd: this.root, | ||
}); | ||
} | ||
quotePath(path) { | ||
return process.platform === 'win32' | ||
? // Windows/CMD only understands double-quotes, single-quotes are treated as part of the file name | ||
// Bash and other shells will substitute `$` in file names with a variable value. | ||
`"${path}"` | ||
: // e.g. `git mv "$$file.txt" "libs/a/$$file.txt"` will not work since `$$` is swapped with the PID of the last process. | ||
// Using single-quotes prevents this substitution. | ||
`'${path}'`; | ||
} | ||
} | ||
exports.GitRepository = GitRepository; | ||
/** | ||
* This is used by the squash editor script to update the rebase file. | ||
*/ | ||
function updateRebaseFile(contents) { | ||
const lines = contents.split('\n'); | ||
const lastCommitIndex = lines.findIndex((line) => line === '') - 1; | ||
lines[lastCommitIndex] = lines[lastCommitIndex].replace('pick', 'fixup'); | ||
return lines.join('\n'); | ||
} | ||
/** | ||
* This is currently duplicated in Nx Console. Please let @MaxKless know if you make changes here. | ||
@@ -144,3 +147,3 @@ */ | ||
try { | ||
const gitRemote = (0, child_process_1.execSync)('git remote -v', { | ||
const gitRemote = (0, node_child_process_1.execSync)('git remote -v', { | ||
stdio: 'pipe', | ||
@@ -191,4 +194,4 @@ }).toString(); | ||
try { | ||
(0, child_process_1.execSync)('git add -A', { encoding: 'utf8', stdio: 'pipe' }); | ||
(0, child_process_1.execSync)('git commit --no-verify -F -', { | ||
(0, node_child_process_1.execSync)('git add -A', { encoding: 'utf8', stdio: 'pipe' }); | ||
(0, node_child_process_1.execSync)('git commit --no-verify -F -', { | ||
encoding: 'utf8', | ||
@@ -216,3 +219,3 @@ stdio: 'pipe', | ||
try { | ||
return (0, child_process_1.execSync)('git rev-parse HEAD', { | ||
return (0, node_child_process_1.execSync)('git rev-parse HEAD', { | ||
encoding: 'utf8', | ||
@@ -219,0 +222,0 @@ stdio: 'pipe', |
Sorry, the diff of this file is not supported yet
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
9174543
42
+ Added@nrwl/tao@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-darwin-arm64@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-darwin-x64@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-freebsd-x64@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-linux-arm-gnueabihf@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-linux-arm64-gnu@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-linux-arm64-musl@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-linux-x64-gnu@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-linux-x64-musl@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-win32-arm64-msvc@0.0.0-pr-27652-5a954f2(transitive)
+ Added@nx/nx-win32-x64-msvc@0.0.0-pr-27652-5a954f2(transitive)
- Removed@nrwl/tao@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-darwin-arm64@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-darwin-x64@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-freebsd-x64@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-linux-arm-gnueabihf@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-linux-arm64-gnu@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-linux-arm64-musl@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-linux-x64-gnu@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-linux-x64-musl@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-win32-arm64-msvc@0.0.0-pr-27652-3af8043(transitive)
- Removed@nx/nx-win32-x64-msvc@0.0.0-pr-27652-3af8043(transitive)