Skip to content

Commit

Permalink
refactor: rewrite to TypeScript
Browse files Browse the repository at this point in the history
- Adds types for requests and responses generated from the Swagger schema
- Uses Vite for build
- Removes need for babel in favor of ts-jest in tests
- Added `countries` as there is (to my knowledge) no endpoint to get all available countries
  • Loading branch information
lilianalillyy committed Nov 16, 2023
1 parent b11e41b commit 5315562
Show file tree
Hide file tree
Showing 58 changed files with 7,359 additions and 34,973 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
indent_size = 2
indent_style = space
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tests/
.nvmrc
babel.config.json
main.js
!src
!tsconfig.json
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [2.0.0] - 2023-11-14
- Rewrite in TypeScript
- Generates types from the OA specification
- Added `countries` array with `{ id: CountryCode, name: "Country Name" }` objects (eg. `{ id: "CZ", name: "Czechia" }`)
- generateToken() now updates the `NordigenClient.token` property
- [BC break] Removed `AccountApi#getPremiumDetails()`
- [BC break] Restructuring of files, therefore direct imports may not work the same way
- [BC break] `import NordigenClient from "nordigen-node"` -> `import { NordigenClient } from "nordigen-node"`

## [1.2.5] - 2023-06-22
- Change Nordigen URLs to GC

Expand Down
3 changes: 0 additions & 3 deletions babel.config.json

This file was deleted.

5 changes: 5 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
111 changes: 0 additions & 111 deletions lib/api/account.js

This file was deleted.

106 changes: 0 additions & 106 deletions lib/api/agreements.js

This file was deleted.

4 changes: 0 additions & 4 deletions lib/api/index.js

This file was deleted.

38 changes: 0 additions & 38 deletions lib/api/institutions.js

This file was deleted.

Loading

0 comments on commit 5315562

Please sign in to comment.