Skip to content

Commit 9217166

Browse files
authored
Merge pull request #342 from hoijnet/infra/fix-build-process-and-typescript
Infra/fix build process and typescript, to release 11.1.2
2 parents ee83de2 + 1cf852a commit 9217166

File tree

17 files changed

+126
-22
lines changed

17 files changed

+126
-22
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
run: |
4242
npm ci
4343
npm run build
44+
npm run validate-types:strict
4445
npm run test
4546
npm run test:integration
4647
- name: Lint

.husky/pre-commit

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
# Lint
55
npm run lint:check;
66

7-
# Test
8-
npm test;
7+
# Check typescript
8+
npm run validate-types:strict
99

1010
# Build
1111
npm run build
1212

13+
# Test
14+
npm test;
15+

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# TerminusDB Client v11.1.2
2+
## Fixes
3+
* Adjust the release process to include version update task
4+
* Fix typescript generation and add ci tests to prevent similar errors in the future.
5+
16
# TerminusDB Client v11.1.1
27
## Fixes
38
* Update dependencies follow-redirects, webpack-dev-middleware, axios, braces, semver, micromatch, cross-spawn, word-wrap, on-headers, compression, form-data

docs/release_process.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Releasing a new version of the client
22

3-
1. Review the changelog between last tagged release v10.0.34..HEAD
4-
1. Create a branch and update RELEASE_NOTES.md based on changes
5-
1. Add target version number to release notes
6-
1. Check in and merge
7-
1. Pick the latest version from the RELEASE_NOTES.md file
8-
1. Update package.json version and run npm install
9-
1. Tag the repo locally and push the tag, align the release (git tag -s v11.x.x)
10-
1. The new release will be built and published 🎉
3+
1. Review the changelog between last tagged release v11.1.x..HEAD
4+
2. Pick the next version number, update package.json, and run `npm install`
5+
3. Create a branch and update RELEASE_NOTES.md based on changes
6+
4. Add target version number to release notes
7+
5. Check in and merge
8+
6. Pick the latest version from the RELEASE_NOTES.md file
9+
7. Copy the release notes in Markdown, create a tag on Github with the notes
10+
8. The new release will be built and published 🎉

lib/typedef.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,27 @@ const { ACTIONS } = Utils.ACTIONS;
187187
/**
188188
* @typedef {Object} NamedResourceData - { filename: "data.csv", data: "col1;col2\nval1;val2" }
189189
* @property {string} filename - Filename referenced in the WOQL query
190-
* @property {string|Blob} data - Attached data, such as CSV contents
190+
* @property {string|Blob|Buffer} data - Attached data, such as CSV contents
191+
*/
192+
193+
/**
194+
* @typedef {Object} Frame - Represents a document frame, object frame, or property frame
195+
* in the viewer system. Frames are used to describe the structure and properties of data
196+
* being displayed or validated.
197+
* @property {string} [subject] - Subject identifier
198+
* @property {string} [property] - Property name
199+
* @property {string} [type] - Type information (e.g., xsd:string, schema:Person)
200+
* @property {*} [value] - Frame value
201+
* @property {number} [depth] - Depth in frame hierarchy
202+
* @property {string} [range] - Property range/type
203+
* @property {string} [label] - Display label
204+
* @property {Object} [parent] - Parent frame reference
205+
* @property {Array} [children] - Child frames
206+
* @property {string} [status] - Frame status: 'updated' | 'error' | 'new' | 'ok'
207+
* @property {boolean} [literal] - Whether this represents a literal value
208+
* @property {number} [index] - Index in parent collection
209+
* @property {Object} [frame] - Nested frame data
210+
* @property {string} [subjectClass] - Class of the subject
191211
*/
192212

193213
module.exports = {};

lib/viewer/frameRule.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
/* eslint-disable no-use-before-define */
99
const TerminusRule = require('./terminusRule');
1010

11+
/**
12+
* @typedef {import('../typedef').Frame} Frame
13+
*/
14+
1115
/**
1216
* @file Frame Rule
1317
* @license Apache Version 2
@@ -23,7 +27,7 @@ Object.setPrototypeOf(FrameRule.prototype, TerminusRule.TerminusRule.prototype);
2327
/**
2428
* Returns an array of rules that match the paased frame
2529
* @param {[FrameRule]} rules - array of rules to be tested
26-
* @param {Frame} frame - object frame, property frame or data from to be tested
30+
* @param {Frame | object} frame - document frame, object frame, or property frame to be tested
2731
* @param {function} [onmatch] - optional function to be called with args (frame, rule)
2832
* on each match
2933
*/

lib/viewer/tableConfig.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ WOQLTableConfig.prototype.prettyPrint = function () {
124124
};
125125

126126
/**
127-
* @param {boolean} canfilter
128-
* @returns WOQLTableConfig
127+
* Gets or sets whether the table is filterable
128+
* @param {boolean} [canfilter] - If provided, sets the filterable state
129+
* @returns {boolean|WOQLTableConfig} - Returns the filterable state (boolean) when called
130+
* without arguments, or returns this instance (WOQLTableConfig) for chaining when setting
129131
*/
130132

131133
WOQLTableConfig.prototype.filterable = function (canfilter) {

lib/viewer/terminusRule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TerminusRule.prototype.literal = function (tf) {
2020
};
2121

2222
/**
23-
* @param {[TYPE_URLS]} list - parameters are types identified by prefixed URLS (xsd:string...)
23+
* @param {...string} list - parameters are types identified by prefixed URLS (xsd:string...)
2424
*/
2525
TerminusRule.prototype.type = function (...list) {
2626
if (typeof list === 'undefined' || list.length === 0) {

lib/viewer/woqlChooser.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ const WOQLChooserConfig = require('./chooserConfig');
66
const UTILS = require('../utils');
77
const { WOQLRule } = require('./woqlRule');
88

9+
/**
10+
* @typedef {import('../woqlClient')} WOQLClient
11+
*/
12+
913
/**
1014
* Very simple implementation of a WOQL backed chooser
1115
* Makes a drop down from a WOQL query - configuration tells it which columns to use...

lib/viewer/woqlResult.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
const UTILS = require('../utils');
99
const WOQL = require('../woql');
1010
const WOQLQ = require('./woqlPaging');
11+
12+
/**
13+
* @typedef {import('../query/woqlCore')} WOQLQuery
14+
*/
15+
1116
/**
1217
* @module WOQLResult
1318
* @license Apache Version 2

0 commit comments

Comments
 (0)