Skip to content

Commit 6707441

Browse files
committed
Package bump
1 parent 8e11849 commit 6707441

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

scripts/tool-annotations/apply-annotations.js

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class AnnotationApplier {
3030
processed: 0,
3131
modified: 0,
3232
errors: 0,
33-
skipped: 0,
34-
modifiedFiles: []
33+
skipped: 0
3534
};
3635
}
3736

@@ -187,10 +186,9 @@ class AnnotationApplier {
187186
}
188187

189188
isActionFile(fileName, fullPath) {
190-
const normalizedPath = fullPath.replace(/\\/g, '/');
191189
return (fileName.endsWith('.mjs') || fileName.endsWith('.ts')) &&
192-
normalizedPath.includes('/actions/') &&
193-
!normalizedPath.includes('/common/');
190+
fullPath.includes('/actions/') &&
191+
!fullPath.includes('/common/');
194192
}
195193

196194
extractActionKey(fileContent) {
@@ -223,15 +221,8 @@ class AnnotationApplier {
223221
}
224222

225223
applyAnnotations(fileContent, annotations) {
226-
// Find and replace version - handle both orders: type before version OR version before type
227-
// Try lookahead first (version comes before type: "action")
228-
let versionMatch = fileContent.match(/(.*version:\s*["'])([^"']+)(["'],?\s*\n)(?=[\s\S]*?type:\s*["']action["'])/s);
229-
230-
// If not found, try lookbehind (type: "action" comes before version)
231-
if (!versionMatch) {
232-
versionMatch = fileContent.match(/(?<=type:\s*["']action["'][\s\S]{0,1000}?)(.*version:\s*["'])([^"']+)(["'],?\s*\n)/s);
233-
}
234-
224+
// Find and replace version
225+
const versionMatch = fileContent.match(/(.*version:\s*["'])([^"']+)(["'],?\s*\n)/s);
235226
if (!versionMatch) {
236227
throw new Error('Could not find version field in file');
237228
}
@@ -279,7 +270,7 @@ class AnnotationApplier {
279270
const modifiedContent = this.applyAnnotations(fileContent, annotations);
280271
fs.writeFileSync(filePath, modifiedContent, 'utf8');
281272

282-
this.recordModification(fileContent, actionKey, filePath);
273+
this.recordModification(fileContent, actionKey);
283274
return true;
284275

285276
} catch (error) {
@@ -299,9 +290,8 @@ class AnnotationApplier {
299290
this.log(`Error processing ${filePath}: ${error.message}`, 'error');
300291
}
301292

302-
recordModification(fileContent, actionKey, filePath) {
293+
recordModification(fileContent, actionKey) {
303294
this.stats.modified++;
304-
this.stats.modifiedFiles.push(filePath);
305295

306296
const currentVersionMatch = fileContent.match(/version:\s*["']([^"']+)["']/);
307297
const currentVersion = currentVersionMatch ? currentVersionMatch[1] : 'unknown';
@@ -351,12 +341,6 @@ class AnnotationApplier {
351341
this.log('\n=== ERRORS ===');
352342
this.errors.forEach(error => this.log(error, 'error'));
353343
}
354-
355-
// Output modified files as JSON
356-
if (this.stats.modifiedFiles.length > 0) {
357-
this.log('\n=== MODIFIED FILES (JSON) ===');
358-
console.log(JSON.stringify(this.stats.modifiedFiles, null, 2));
359-
}
360344
}
361345

362346
async run() {

types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/types",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Pipedream TypeScript types",
55
"keywords": [
66
"pipedream",

0 commit comments

Comments
 (0)