@@ -61,8 +61,7 @@ function getVersionRange(version: IVersion): string {
61
61
function updateVersionInFile (
62
62
filePath : string ,
63
63
pattern : RegExp ,
64
- version : IVersion ,
65
- isGlobal = false
64
+ version : IVersion
66
65
) : void {
67
66
const content = fs . readFileSync ( filePath , 'utf-8' ) ;
68
67
const versionRange = getVersionRange ( version ) ;
@@ -150,21 +149,6 @@ async function updatePreCommitConfig(version: IVersion): Promise<void> {
150
149
updateVersionInFile ( filePath , pattern , version ) ;
151
150
}
152
151
153
- // async function updateWorkflowFiles(version: IVersion): Promise<void> {
154
- // const workflowDir = path.resolve('.github', 'workflows');
155
- // const files = fs.readdirSync(workflowDir);
156
- // const pattern = /(jupyterlab)(?:>=|==)[\d.]+(?:,<[\d.]+)?(?="|,|\s|$)/g;
157
-
158
- // for (const file of files) {
159
- // const filePath = path.join(workflowDir, file);
160
- // const content = fs.readFileSync(filePath, 'utf-8');
161
-
162
- // if (content.includes('jupyterlab>=')) {
163
- // updateVersionInFile(filePath, pattern, version, true);
164
- // }
165
- // }
166
- // }
167
-
168
152
async function upgradeLabDependencies ( ) : Promise < void > {
169
153
const args : string [ ] = process . argv . slice ( 2 ) ;
170
154
@@ -177,7 +161,6 @@ async function upgradeLabDependencies(): Promise<void> {
177
161
await updatePackageJson ( args [ 1 ] ) ; // Keep original string version for package.json
178
162
await updatePyprojectToml ( version ) ;
179
163
await updatePreCommitConfig ( version ) ;
180
- // await updateWorkflowFiles(version);
181
164
}
182
165
183
166
upgradeLabDependencies ( ) ;
0 commit comments