Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Dec 20, 2024
1 parent 591ee4a commit 5bd57b9
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions buildutils/src/upgrade-lab-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ function getVersionRange(version: IVersion): string {
function updateVersionInFile(
filePath: string,
pattern: RegExp,
version: IVersion,
isGlobal = false
version: IVersion
): void {
const content = fs.readFileSync(filePath, 'utf-8');
const versionRange = getVersionRange(version);
Expand Down Expand Up @@ -150,21 +149,6 @@ async function updatePreCommitConfig(version: IVersion): Promise<void> {
updateVersionInFile(filePath, pattern, version);
}

// async function updateWorkflowFiles(version: IVersion): Promise<void> {
// const workflowDir = path.resolve('.github', 'workflows');
// const files = fs.readdirSync(workflowDir);
// const pattern = /(jupyterlab)(?:>=|==)[\d.]+(?:,<[\d.]+)?(?="|,|\s|$)/g;

// for (const file of files) {
// const filePath = path.join(workflowDir, file);
// const content = fs.readFileSync(filePath, 'utf-8');

// if (content.includes('jupyterlab>=')) {
// updateVersionInFile(filePath, pattern, version, true);
// }
// }
// }

async function upgradeLabDependencies(): Promise<void> {
const args: string[] = process.argv.slice(2);

Expand All @@ -177,7 +161,6 @@ async function upgradeLabDependencies(): Promise<void> {
await updatePackageJson(args[1]); // Keep original string version for package.json
await updatePyprojectToml(version);
await updatePreCommitConfig(version);
// await updateWorkflowFiles(version);
}

upgradeLabDependencies();

0 comments on commit 5bd57b9

Please sign in to comment.