Compare commits

..

5 Commits

Author SHA1 Message Date
Szilárd Dóró
ce3ece1ad7 Merge pull request #1714 from nhost/changeset-release/main
chore: update versions
2023-03-08 09:21:29 +01:00
github-actions[bot]
c81002622c chore: update versions 2023-03-07 16:27:40 +00:00
Szilárd Dóró
35fa6bb043 Merge pull request #1712 from nhost/fix/functions
fix(nhost-js): correct return type in functions
2023-03-07 17:24:07 +01:00
Szilárd Dóró
b8f11a13d7 fix: add missing type 2023-03-07 15:09:35 +01:00
Szilárd Dóró
1d1555593f fix: correct return type in functions 2023-03-07 15:03:28 +01:00
17 changed files with 65 additions and 12 deletions

View File

@@ -1,5 +1,12 @@
# @nhost/dashboard # @nhost/dashboard
## 0.12.4
### Patch Changes
- @nhost/react-apollo@5.0.9
- @nhost/nextjs@1.13.14
## 0.12.3 ## 0.12.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/dashboard", "name": "@nhost/dashboard",
"version": "0.12.3", "version": "0.12.4",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",

View File

@@ -1,5 +1,12 @@
# @nhost/apollo # @nhost/apollo
## 5.0.8
### Patch Changes
- Updated dependencies [1d155559]
- @nhost/nhost-js@2.0.8
## 5.0.7 ## 5.0.7
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/apollo", "name": "@nhost/apollo",
"version": "5.0.7", "version": "5.0.8",
"description": "Nhost Apollo Client library", "description": "Nhost Apollo Client library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo # @nhost/react-apollo
## 5.0.9
### Patch Changes
- @nhost/apollo@5.0.8
- @nhost/react@2.0.8
## 5.0.8 ## 5.0.8
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react-apollo", "name": "@nhost/react-apollo",
"version": "5.0.8", "version": "5.0.9",
"description": "Nhost React Apollo client", "description": "Nhost React Apollo client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react-urql # @nhost/react-urql
## 2.0.8
### Patch Changes
- @nhost/react@2.0.8
## 2.0.7 ## 2.0.7
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react-urql", "name": "@nhost/react-urql",
"version": "2.0.7", "version": "2.0.8",
"description": "Nhost React URQL client", "description": "Nhost React URQL client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/nextjs # @nhost/nextjs
## 1.13.14
### Patch Changes
- @nhost/react@2.0.8
## 1.13.13 ## 1.13.13
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/nextjs", "name": "@nhost/nextjs",
"version": "1.13.13", "version": "1.13.14",
"description": "Nhost NextJS library", "description": "Nhost NextJS library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/nhost-js # @nhost/nhost-js
## 2.0.8
### Patch Changes
- 1d155559: fix(nhost-js): allow `null` as body and return JSON when `content-type` is `application/json`
## 2.0.7 ## 2.0.7
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/nhost-js", "name": "@nhost/nhost-js",
"version": "2.0.7", "version": "2.0.8",
"description": "Nhost JavaScript SDK", "description": "Nhost JavaScript SDK",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -40,7 +40,7 @@ export class NhostFunctionsClient {
async call<T = unknown, D = any>( async call<T = unknown, D = any>(
url: string, url: string,
data: D, data: D | null,
config?: NhostFunctionCallConfig config?: NhostFunctionCallConfig
): Promise<NhostFunctionCallResponse<T>> ): Promise<NhostFunctionCallResponse<T>>
@@ -56,7 +56,7 @@ export class NhostFunctionsClient {
*/ */
async call<T = unknown, D = any>( async call<T = unknown, D = any>(
url: string, url: string,
body: D, body: D | null,
config?: NhostFunctionCallConfig config?: NhostFunctionCallConfig
): Promise<NhostFunctionCallResponse<T>> { ): Promise<NhostFunctionCallResponse<T>> {
const headers: HeadersInit = { const headers: HeadersInit = {
@@ -69,7 +69,7 @@ export class NhostFunctionsClient {
try { try {
const result = await fetch(fullUrl, { const result = await fetch(fullUrl, {
body: JSON.stringify(body), body: body ? JSON.stringify(body) : null,
headers, headers,
method: 'POST' method: 'POST'
}) })
@@ -80,7 +80,7 @@ export class NhostFunctionsClient {
let data: T let data: T
if (result.headers.get('content-type') === 'application/json') { if (result.headers.get('content-type')?.includes('application/json')) {
data = await result.json() data = await result.json()
} else { } else {
data = (await result.text()) as unknown as T data = (await result.text()) as unknown as T

View File

@@ -1,5 +1,12 @@
# @nhost/react # @nhost/react
## 2.0.8
### Patch Changes
- Updated dependencies [1d155559]
- @nhost/nhost-js@2.0.8
## 2.0.7 ## 2.0.7
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react", "name": "@nhost/react",
"version": "2.0.7", "version": "2.0.8",
"description": "Nhost React library", "description": "Nhost React library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/vue # @nhost/vue
## 1.13.14
### Patch Changes
- Updated dependencies [1d155559]
- @nhost/nhost-js@2.0.8
## 1.13.13 ## 1.13.13
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/vue", "name": "@nhost/vue",
"version": "1.13.13", "version": "1.13.14",
"description": "Nhost Vue library", "description": "Nhost Vue library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [