Skip to content

Commit f2569c9

Browse files
authored
Merge pull request #755 from KxSystems/release-1.18
Release 1.18
2 parents 840a583 + 7f5b815 commit f2569c9

23 files changed

Lines changed: 1376 additions & 881 deletions

.github/workflows/dev.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ jobs:
6666
run: ./qcumber.sh -src test/q/main.q -test test/q/tests
6767
env:
6868
KDB_K4LICENSE_B64: ${{ secrets.KDB_K4LICENSE_B64 }}
69+
q-api:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-node@v4
74+
- run: node build-api.js
75+
- uses: actions/upload-artifact@v4
76+
with:
77+
name: q-api
78+
path: out/vscode.q
6979

7080

7181
app-sec:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ coverage-reports/
1616
out-test/
1717
.test-extensions/
1818
.test-folder/
19+
20+
/bin
21+
/lib
22+
/venv

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to the **kdb VS Code extension** are documented in this file.
44

5+
# v1.18.0
6+
7+
### Enhancements
8+
9+
- Added an option for VS Code to generate named functions instead of using anonymous lambdas.
10+
11+
### Internal Improvements
12+
13+
- Updated dependencies to address known security vulnerabilities.
14+
515
# v1.17.2
616

717
### Enhancements

build-api.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const templatePath = path.join(__dirname, 'resources/q/vscode.q');
5+
const outputPath = path.join(__dirname, 'out/vscode.q');
6+
7+
// Ensure directory exists
8+
if (!fs.existsSync(path.dirname(outputPath))) {
9+
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
10+
}
11+
12+
let template = fs.readFileSync(templatePath, 'utf8');
13+
14+
// Regex to find all //{{path/to/file.q}}
15+
const placeholderRegex = /\/\/\{\{(.*?)\}\}/g;
16+
17+
const result = template.replace(placeholderRegex, (match, filePath) => {
18+
const fullPath = path.resolve(__dirname, filePath.trim());
19+
20+
if (fs.existsSync(fullPath)) {
21+
console.log(`Inlining: ${filePath}`);
22+
// Read the file and return it to replace the match
23+
return fs.readFileSync(fullPath, 'utf8').trim();
24+
} else {
25+
console.error(`Error: File not found - ${fullPath}`);
26+
process.exit(1);
27+
}
28+
});
29+
30+
fs.writeFileSync(outputPath, result);
31+
console.log(`Successfully built: ${outputPath}`);

0 commit comments

Comments
 (0)