Created
January 25, 2026 01:46
-
-
Save technovangelist/6cda665f516b97a01db3146910066538 to your computer and use it in GitHub Desktop.
git diff for n8n files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| const fs = require('fs'); | |
| const path = process.argv[2]; | |
| let content = fs.readFileSync(path, 'utf8'); | |
| // Remove createdAt/updatedAt timestamps | |
| content = content.replace(/\"createdAt\":\\s*\"[^\"]*\"/g, '\"createdAt\": \"REMOVED\"'); | |
| content = content.replace(/\"updatedAt\":\\s*\"[^\"]*\"/g, '\"updatedAt\": \"REMOVED\"'); | |
| // Remove position values | |
| content = content.replace(/\"position\":\\s*\\[\\s*-?\\d+\\s*,\\s*-?\\d+\\s*\\]/g, '\"position\": [0,0]'); | |
| // Standardize version IDs | |
| content = content.replace(/\"versionId\":\\s*\"[^\"]*\"/g, '\"versionId\": \"REMOVED\"'); | |
| // Remove staticData block | |
| content = content.replace(/,\\s*\"staticData\"\\s*:\\s*{[^}]*}/g, ''); | |
| process.stdout.write(content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment