Compare commits

..

2 Commits

Author SHA1 Message Date
github-actions[bot]
41c6b4d5b7 chore: update versions (#226)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-22 14:52:59 +01:00
Pilou
2e1c0555c7 fix: import axios in using require() to avoid XMLHttpRequest is not defined (#225)
See: https://github.com/vitejs/vite/discussions/6397
2022-02-22 14:29:34 +01:00
15 changed files with 51 additions and 10 deletions

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-auth-js # @nhost/hasura-auth-js
## 0.1.13
### Patch Changes
- 2e1c055: Axios causes some trouble when used NodeJS / CommonJS. Any code importing `axios` now does so in using the `require()` syntax
## 0.1.12 ## 0.1.12
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/hasura-auth-js", "name": "@nhost/hasura-auth-js",
"version": "0.1.12", "version": "0.1.13",
"description": "Hasura-auth client", "description": "Hasura-auth client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,4 +1,4 @@
import axios, { AxiosError, AxiosInstance } from 'axios' import type { AxiosError, AxiosInstance } from 'axios'
import { import {
ApiChangeEmailResponse, ApiChangeEmailResponse,
@@ -24,6 +24,8 @@ import {
SignUpEmailPasswordParams SignUpEmailPasswordParams
} from './utils/types' } from './utils/types'
const axios = require('axios')
const SERVER_ERROR_CODE = 500 const SERVER_ERROR_CODE = 500
export class HasuraAuthApi { export class HasuraAuthApi {
private url: string private url: string

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-storage-js # @nhost/hasura-storage-js
## 0.0.9
### Patch Changes
- 2e1c055: Axios causes some trouble when used NodeJS / CommonJS. Any code importing `axios` now does so in using the `require()` syntax
## 0.0.8 ## 0.0.8
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/hasura-storage-js", "name": "@nhost/hasura-storage-js",
"version": "0.0.8", "version": "0.0.9",
"description": "Hasura-storage client", "description": "Hasura-storage client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
import axios, { AxiosInstance } from 'axios' import type { AxiosInstance } from 'axios'
import { import {
ApiDeleteParams, ApiDeleteParams,
@@ -11,6 +11,7 @@ import {
UploadHeaders UploadHeaders
} from './utils/types' } from './utils/types'
const axios = require('axios')
export class HasuraStorageApi { export class HasuraStorageApi {
private url: string private url: string
private httpClient: AxiosInstance private httpClient: AxiosInstance

View File

@@ -1,5 +1,14 @@
# @nhost/nhost-js # @nhost/nhost-js
## 0.3.9
### Patch Changes
- 2e1c055: Axios causes some trouble when used NodeJS / CommonJS. Any code importing `axios` now does so in using the `require()` syntax
- Updated dependencies [2e1c055]
- @nhost/hasura-auth-js@0.1.13
- @nhost/hasura-storage-js@0.0.9
## 0.3.8 ## 0.3.8
### Patch Changes ### Patch Changes

View File

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

View File

@@ -1,7 +1,8 @@
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios' import type { AxiosInstance, AxiosRequestConfig } from 'axios'
import { FunctionCallResponse } from '../types' import { FunctionCallResponse } from '../types'
const axios = require('axios')
export interface NhostFunctionsConstructorParams { export interface NhostFunctionsConstructorParams {
url: string url: string
} }

View File

@@ -1,7 +1,9 @@
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios' import type { AxiosInstance, AxiosRequestConfig } from 'axios'
import { GraphqlRequestResponse, GraphqlResponse } from '../types' import { GraphqlRequestResponse, GraphqlResponse } from '../types'
const axios = require('axios')
export interface NhostGraphqlConstructorParams { export interface NhostGraphqlConstructorParams {
url: string url: string
} }

View File

@@ -1,4 +1,4 @@
import { AxiosResponse } from 'axios' import type { AxiosResponse } from 'axios'
export type GraphqlRequestResponse = export type GraphqlRequestResponse =
| { | {

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo # @nhost/react-apollo
## 2.1.3
### Patch Changes
- Updated dependencies [2e1c055]
- @nhost/nhost-js@0.3.9
## 2.1.2 ## 2.1.2
### Patch Changes ### Patch Changes

View File

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

View File

@@ -1,5 +1,12 @@
# @nhost/react-auth # @nhost/react-auth
## 2.0.6
### Patch Changes
- Updated dependencies [2e1c055]
- @nhost/nhost-js@0.3.9
## 2.0.5 ## 2.0.5
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react-auth", "name": "@nhost/react-auth",
"version": "2.0.5", "version": "2.0.6",
"description": "Nhost React client", "description": "Nhost React client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [