Skip to content

Commit 2fd4c01

Browse files
committed
v1.4.5
1 parent b9014fe commit 2fd4c01

File tree

5 files changed

+37
-15
lines changed

5 files changed

+37
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to the "PostgreSQL Hacker Helper" extension will be document
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.4.5]
9+
10+
No changes
11+
812
## [1.4.4]
913

1014
Add `typedefs.list` file preprocessing for feeding to `pg_bsd_indent`. Processed file saved in `/tmp/pg-hacker-helper.typedefs.list` file and may be reused between different sessions. Without processing raw file (downloaded from buildfarm) `pg_bsd_indent` produces invalid formatted code.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ Known issues:
222222

223223
## Release Notes
224224

225+
### 1.4.5
226+
227+
No changes
228+
225229
### 1.4.4
226230

227231
Add `typedefs.list` file preprocessing for feeding to `pg_bsd_indent`. Processed file saved in `/tmp/pg-hacker-helper.typedefs.list` file and may be reused between different sessions.

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "postgresql-hacker-helper",
33
"displayName": "PostgreSQL Hacker Helper",
44
"description": "Extension to assist Postgres hackers - source code developers",
5-
"version": "1.4.4",
5+
"version": "1.4.5",
66
"engines": {
77
"vscode": "^1.30.0"
88
},
@@ -100,6 +100,16 @@
100100
}
101101
]
102102
},
103+
"colors": [
104+
{
105+
"id": "pghelper.sample.color",
106+
"description": "Color for ",
107+
"defaults": {
108+
"dark": "errorForeground",
109+
"light": "errorForeground"
110+
}
111+
}
112+
],
103113
"views": {
104114
"debug": [
105115
{
@@ -162,14 +172,14 @@
162172
"deploy": "vsce publish"
163173
},
164174
"devDependencies": {
165-
"@types/vscode": "^1.30.0",
166175
"@types/mocha": "^10.0.7",
167176
"@types/node": "20.x",
177+
"@types/vscode": "^1.30.0",
168178
"@typescript-eslint/eslint-plugin": "^7.14.1",
169179
"@typescript-eslint/parser": "^7.11.0",
170-
"eslint": "^8.57.0",
171-
"typescript": "^5.4.5",
172180
"@vscode/test-cli": "^0.0.9",
173-
"@vscode/test-electron": "^2.4.0"
181+
"@vscode/test-electron": "^2.4.0",
182+
"eslint": "^8.57.0",
183+
"typescript": "^5.4.5"
174184
}
175185
}

src/formatter.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,20 @@ class PgindentDocumentFormatterProvider implements vscode.DocumentFormattingEdit
389389

390390
this.savedProcessedTypedef = undefined;
391391
} else if (await utils.fileExists(processedTypedef)) {
392-
/* After restart be */
392+
/*
393+
* This file is cache in /tmp, so may be created
394+
* in another VS Code session
395+
*/
393396
this.savedProcessedTypedef = processedTypedef;
394397
return processedTypedef;
395398
}
396399

397400
/*
398401
* Add and remove some entries from `typedefs.list` file
399-
* downloaded from buildfarm
402+
* downloaded from buildfarm.
403+
*
404+
* This data did not change since PG 10 and i don't think
405+
* it will change in near future.
400406
*/
401407
const rawTypedef = await this.getTypedefs(pg_bsd_indent);
402408
const contents = await utils.readFile(rawTypedef);
@@ -507,7 +513,6 @@ class PgindentDocumentFormatterProvider implements vscode.DocumentFormattingEdit
507513
throwOnError: false,
508514
});
509515
const postProcessed = this.runPostIndent(processed);
510-
// const result = stdout;
511516

512517
/* On success cache pg_bsd_indent path */
513518
this.savedPgbsdPath = pg_bsd_indent;
@@ -525,8 +530,7 @@ class PgindentDocumentFormatterProvider implements vscode.DocumentFormattingEdit
525530
throw err;
526531
}
527532
}
528-
529-
/* Second attempt */
533+
530534
this.logger.info('pg_bsd_indent seems not installed. trying to install');
531535
this.savedPgbsdPath = undefined;
532536
pg_bsd_indent = await this.findExistingPgbsdindent(workspace);

0 commit comments

Comments
 (0)