Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f8a492a
Initial modernization setup
Enngage Apr 3, 2025
de37263
Adds basic tests for success GET response & tests failed requests
Enngage Apr 7, 2025
91f7623
updates deps, removes axios
Enngage Apr 8, 2025
4605b54
Adds retry policy spec, use 0 delay between retries in tests
Enngage Apr 9, 2025
3451816
Adds comments
Enngage Apr 9, 2025
2289656
Better organization of retry / header functions, implements defaultCa…
Enngage Apr 9, 2025
e297fd1
Adds more tests, uses fetch mocking
Enngage Apr 9, 2025
a17bc12
Export script utils, adds tracking header if it doesn't exist
Enngage Apr 9, 2025
7ece039
Adds headers tests
Enngage Apr 10, 2025
fa176c6
Deletes legacy test
Enngage Apr 14, 2025
6072919
Adds json type models, prepares POST request, organizes error / retry…
Enngage Apr 14, 2025
64698a8
Adds body to HttpResponse
Enngage Apr 14, 2025
03b91fe
Adds function for executing Fetch requests, implements POST
Enngage Apr 14, 2025
b301998
Extends http types, adds downloadFile function
Enngage Apr 14, 2025
5eeb415
Improves type safety
Enngage Apr 14, 2025
431c1ac
Delete http.functions.ts
Enngage Apr 14, 2025
066dd94
Update public_api.ts
Enngage Apr 14, 2025
b4fa862
Removes response type
Enngage Apr 14, 2025
8efa092
Adds upload file support
Enngage Apr 30, 2025
d7e6ea6
updates deps
Enngage May 7, 2025
a21c646
Extracts request option into types
Enngage May 7, 2025
f813fd1
Replaces eslint & prettier with biome
Enngage May 9, 2025
1fb7006
Implements code required for uploading files, correctly parse request…
Enngage May 9, 2025
51d2f16
Update http.models.ts
Enngage May 9, 2025
b5433bc
Update .gitignore
Enngage May 9, 2025
91f6eb4
Removes legacy code in package.json
Enngage May 9, 2025
f95594f
Do not export script utils
Enngage May 9, 2025
d8f3a60
Adds comments
Enngage May 9, 2025
7474257
Removes duplicate script
Enngage May 9, 2025
f726d4c
exports 'devkit' submodule, update version release
Enngage May 12, 2025
07408e6
updates deps
Enngage May 19, 2025
6ad15f7
Delete .env
Enngage May 19, 2025
39be9c1
Prepares integration env
Enngage May 19, 2025
a31ad51
Adds file management integration tests, simplifies retry functionalit…
Enngage May 20, 2025
df2949a
Flattens CoreSdkError and adds comments
Enngage May 20, 2025
084357a
Simplifies HttpService, prepares sendAsync, adds config to default ht…
Enngage May 23, 2025
5d967a1
Fixes import type, removes log
Enngage May 26, 2025
8dd7884
Separates http adapter
Enngage May 26, 2025
2f52eb1
Removes BaseHttpQueryOptions
Enngage May 26, 2025
edde4f1
renames executeAsync function
Enngage May 26, 2025
924a3c0
updates deps
Enngage May 28, 2025
bbd3a20
Tests custom adapter, renames HttpAdapter fns
Enngage May 29, 2025
ac53b30
Update tests.yml
Enngage May 29, 2025
60bfcce
Update CODEOWNERS
Enngage May 29, 2025
75c1bcc
updates deps
Enngage May 29, 2025
4907688
Update .env.template
Enngage May 29, 2025
b5402da
Update README.md
Enngage May 29, 2025
6b68c98
chore(release): 11.0.0-0
Enngage May 29, 2025
7f9ea50
extends devkit api
Enngage May 29, 2025
828a6f9
chore(release): 11.0.0-1
Enngage May 29, 2025
76b160f
Update devkit_api.ts
Enngage Jun 2, 2025
3c5beed
Expose error type guards, makes CoreSDKError generic
Enngage Jun 3, 2025
88233ca
chore(release): 11.0.0-2
Enngage Jun 3, 2025
1016994
Update package.json
Enngage Jun 3, 2025
443c272
update deps
Enngage Jun 3, 2025
f6cda19
Uses tryCatch helper function for error handling
Enngage Jun 4, 2025
6350cac
updates deps
Enngage Jun 4, 2025
e118326
chore(release): 11.0.0-3
Enngage Jun 4, 2025
fbc4201
Refactors to use Result instead of relying on catching exceptions, us…
Enngage Jun 6, 2025
6a16325
chore(release): 11.0.0-4
Enngage Jun 6, 2025
29e760c
renames data to responseData
Enngage Jun 9, 2025
e856b1b
chore(release): 11.0.0-5
Enngage Jun 9, 2025
c6c6f4c
Exports utility types that are expected to be used by SDKs
Enngage Jun 9, 2025
4c48160
chore(release): 11.0.0-6
Enngage Jun 9, 2025
ec8431e
Uses kontent-ai biome & eslint
Enngage Jun 9, 2025
f2cbd13
Update package.json
Enngage Jun 9, 2025
d8e9664
Separates unit & integration tests
Enngage Jun 9, 2025
6467020
chore(release): 11.0.0-7
Enngage Jun 9, 2025
26b50d8
Update package.json
Enngage Jun 9, 2025
1724885
simplifies test
Enngage Jun 9, 2025
cece07c
flattens CoreSdkError and simplifies error handling
Enngage Jun 10, 2025
34db0ab
Uses dedicated HttpResponse monad for responses
Enngage Jun 10, 2025
afa080a
chore(release): 11.0.0-8
Enngage Jun 10, 2025
7e854be
Formats package.json
Enngage Jun 10, 2025
02132df
Removes standard version, updates test workflow, adds release workflow
Enngage Jun 13, 2025
4a48d24
Fix: incorrect function export
Enngage Jun 17, 2025
b9d4656
renames maxAttempts to maxRetries & use retries naming convention
Enngage Jun 17, 2025
4df06fd
typo
Enngage Jun 17, 2025
01b2bc6
Simplifies error messages utils
Enngage Jun 17, 2025
f1c0000
Checks parsed number from retry-after header & adds test for various …
Enngage Jun 17, 2025
3f86f10
Merge branch 'master' into modernization
Enngage Jun 17, 2025
31f7041
Fixes imports & vi missing context
Enngage Jun 17, 2025
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
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Name of Kontent.ai project: @kontent-ai/core-sdk-js

INTEGRATION_ENVIRONMENT_ID=x
INTEGRATION_MANAGEMENT_API_KEY=x

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

* @IvanKiral @kontent-ai/javascript-maintainers
* @Enngage @kontent-ai/javascript-maintainers
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint & Build

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run build
28 changes: 0 additions & 28 deletions .github/workflows/integrate.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Integration Tests

on:
push:
branches: [main]
pull_request:

env:
INTEGRATION_ENVIRONMENT_ID: ${{ secrets.INTEGRATION_ENVIRONMENT_ID }}
INTEGRATION_MANAGEMENT_API_KEY: ${{ secrets.INTEGRATION_MANAGEMENT_API_KEY }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run test:integration
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
release:
types: [published]

name: publish-to-npm
jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- run: npm ci

- run: npm publish --access=public
if: ${{!github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
- run: npm publish --tag prerelease
if: ${{github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
22 changes: 22 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Unit Tests

on:
push:
branches: [main]
pull_request:

env:
INTEGRATION_ENVIRONMENT_ID: ${{ secrets.INTEGRATION_ENVIRONMENT_ID }}
INTEGRATION_MANAGEMENT_API_KEY: ${{ secrets.INTEGRATION_MANAGEMENT_API_KEY }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc file
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run test:unit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Custom
.editorconfig
.env

# See http://help.github.com/ignore-files/ for more about ignoring files.

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

24 changes: 22 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
}
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
},
"[markdown]": {
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
Loading