Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

166 changes: 0 additions & 166 deletions .eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run linting
run: npm run lint

- name: Run format check
run: npm run format:check

- name: Run tests
run: npm run test
8 changes: 4 additions & 4 deletions .jdoc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"templates": {
"default": {
"includeDate": false
}
"default": {
"includeDate": false
}
}
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.16.0
v24.11.1
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
docs
dist
.git
package-lock.json
src/types.d.ts
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 120,
"tabWidth": 2
}
90 changes: 54 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,118 @@
# Release Notes

## 3.0.0

This Version includes several changes for a more modern JavaScript/TypeScript development experience.

- migrated from CommonJS to ES Modules (ESM) - converted all `require()` to `import` statements and `module.exports` to `export` statements
- removed Babel compilation and dependencies (Node 18+ supports ESM natively)
- removed `./lib` folder - source files are now the distribution
- simplified build process - only generates `./docs` and TS type definitions but now in `./src` folder
- replaced jest with faster more modern vitest
- added Prettier for consistent code formatting (integrated with ESLint)
- removed `node-fetch` - using native global `fetch` (Node 18+)
- changed npm script `prepublishOnly` to `build` because this is doing all the necessary steps to prepare the change for publishing via git
- removed `sync-request` dependency and all synchronous blocking calls - now all operations are async using `async/await` and native `fetch` API

### Migration Guide from v2.x to v3.0.0

See [migration guide](https://github.com/campudus/grud-structorizer/blob/HEAD/migration_v2_to_v3.md) for details.

## 2.0.1

* fixed `ColumnBuilder.showMemberColumns` method to return the `ColumnBuilder` instance
- fixed `ColumnBuilder.showMemberColumns` method to return the `ColumnBuilder` instance

## 2.0.0

* **BREAKING CHANGE:** Upgraded Node to v20 and Babel to v7. This might break your build process if you are using an older version of Node or Babel.
* Upgraded Eslint to v8 and Jest to v29.
- **BREAKING CHANGE:** Upgraded Node to v20 and Babel to v7. This might break your build process if you are using an older version of Node or Babel.
- Upgraded Eslint to v8 and Jest to v29.

## 1.9.8

* added method `.archiveCascade` to `ConstraintBuilder`
* added method `.finalCascade` to `ConstraintBuilder`
* added method `.decimalDigits` to `ColumnBuilder`
* added method `.showMemberColumns` to `ColumnBuilder`
- added method `.archiveCascade` to `ConstraintBuilder`
- added method `.finalCascade` to `ConstraintBuilder`
- added method `.decimalDigits` to `ColumnBuilder`
- added method `.showMemberColumns` to `ColumnBuilder`

## 1.9.7

* added `AsyncApi` to implement the async version of the `.doCall` method
- added `AsyncApi` to implement the async version of the `.doCall` method

## 1.9.6

* added type `"taxonomy"` to `TableBuilder`
- added type `"taxonomy"` to `TableBuilder`

## 1.9.5

* added method `.hidden` to `ColumnBuilder`
* added method `.minLength` to `ColumnBuilder`
* added method `.maxLength` to `ColumnBuilder`
- added method `.hidden` to `ColumnBuilder`
- added method `.minLength` to `ColumnBuilder`
- added method `.maxLength` to `ColumnBuilder`

## 1.9.4

* replaced old lib/syncApi.js by the new case-sensitive version lib/SyncApi.js
- replaced old lib/syncApi.js by the new case-sensitive version lib/SyncApi.js

## 1.9.2

* added `headers` parameter to options in backward compatible manner (cookies and headers object will be merged). This adds the ability to pass for example authorization bearer to SyncApi (e.g.`{ "headers": { "Authorization": "Bearer eyJhbGciOiJSU...C6XZsFhVsxFw"}`)
- added `headers` parameter to options in backward compatible manner (cookies and headers object will be merged). This adds the ability to pass for example authorization bearer to SyncApi (e.g.`{ "headers": { "Authorization": "Bearer eyJhbGciOiJSU...C6XZsFhVsxFw"}`)

## 1.9.1

* added property `rowId` to methods `getRow` and `getRows` so it can be used for further manipulation like updates/deletions/etc.
- added property `rowId` to methods `getRow` and `getRows` so it can be used for further manipulation like updates/deletions/etc.

## 1.9.0

* added method `convertColumnToMultilanguage` and `convertColumnToSinglelanguage` to `Table`
- added method `convertColumnToMultilanguage` and `convertColumnToSinglelanguage` to `Table`

## 1.8.0

* added tests for `Table`
* added method `getRows` for `Table` which returns an array of row objects zipped with column names
* added method `getRow` for `Table` returns a single row object depending on the parameter `id`
- added tests for `Table`
- added method `getRows` for `Table` which returns an array of row objects zipped with column names
- added method `getRow` for `Table` returns a single row object depending on the parameter `id`

## 1.7.1

* fix bug in `Table.createRowByObj` if columnName is a special word like 'length'
* fix typos in `package.json`
- fix bug in `Table.createRowByObj` if columnName is a special word like 'length'
- fix typos in `package.json`

## 1.7.0

* add ability to configure `formatPattern` on group columns
- add ability to configure `formatPattern` on group columns

## 1.6.0

* add new parameter for options
* currently only cookies are implemented (e.g. `{ "cookies": { "cookie-name": { "value": "cookie-value" } }}`)
* rewrite syncApi to class implementation with better type support
- add new parameter for options
- currently only cookies are implemented (e.g. `{ "cookies": { "cookie-name": { "value": "cookie-value" } }}`)
- rewrite syncApi to class implementation with better type support

## 1.5.0

* remove `minimist` dependency
- remove `minimist` dependency

## 1.4.0

* add a typedef for `Column`
* add some tests for `ColumnBuilder` and remove `resetSchema` test
* add type definitions for multi-language methods `displayName()`, `description()`, etc.
* add argument checks for `languageType()` and `toOrdering()`
- add a typedef for `Column`
- add some tests for `ColumnBuilder` and remove `resetSchema` test
- add type definitions for multi-language methods `displayName()`, `description()`, etc.
- add argument checks for `languageType()` and `toOrdering()`

## 1.3.0

* add TypeScript definitions
- add TypeScript definitions

## 1.2.0

* add simple JSDoc comments and generate docs
- add simple JSDoc comments and generate docs

## 1.1.1

* fix bug in `Table.createRowByObj` in error case
- fix bug in `Table.createRowByObj` in error case

## 1.1.0

* add new method `toOrdering` to `ColumnBuilder`
* change npm script `prepare` to `prepublishOnly` b/c this shouldn't run on `npm install`
- add new method `toOrdering` to `ColumnBuilder`
- change npm script `prepare` to `prepublishOnly` b/c this shouldn't run on `npm install`

## 1.0.0

* initial release
- initial release
Loading