Skip to content

Commit

Permalink
Merge branch 'main' into feature/rlx
Browse files Browse the repository at this point in the history
  • Loading branch information
napalmpapalam committed May 20, 2024
2 parents a60f723 + c572cdb commit 58874be
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 257 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- `root` - CHANGLOG.md according to the Keep a Changelog format

## [1.0.0-rc.16] - 2024-05-03
### Fixed
- `@distributedlab/w3p` - `ProviderDetector` resets pure providers list on init
- `@distributedlab/jac` - example in README

## [1.0.0-rc.15] - 2024-04-08
### Fixed
- `@distributedlab/jac` - `JsonApiResponse.createLink` method to handle client `baseUrl` with root path
Expand Down Expand Up @@ -384,7 +389,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[SWC tsc migration guide]: https://swc.rs/docs/migrating-from-tsc
[old repo]: https://github.com/distributed-lab/web-kit-old

[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.15...HEAD
[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.16...HEAD
[1.0.0-rc.16]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.15...1.0.0-rc.16
[1.0.0-rc.15]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.14...1.0.0-rc.15
[1.0.0-rc.14]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.13...1.0.0-rc.14
[1.0.0-rc.13]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.12...1.0.0-rc.13
Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/fetcher",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Fetch API wrapper with the extended functionality and simple interface",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/jac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const refreshTokenInterceptor: FetcherErrorResponseInterceptor = async (
// Add if you use a refresh token (as 'refresh_token_url' there should be refresh token endpoint)
// && config.url !== 'refresh_token_url'
)
return Promise.reject(response)
return response

// Some authentication store in the client app
const { t } = i18n.global
Expand All @@ -71,7 +71,7 @@ export const refreshTokenInterceptor: FetcherErrorResponseInterceptor = async (
const url = new URL(config.url)

return new Fetcher({ baseUrl: url.origin }).request({
endpoint: url.pathname,
endpoint: config.url.replace(url.origin, ''),
method: config.method as HTTP_METHODS,
...(config.body ? { body: config.body } : {}),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion packages/jac/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/jac",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "A library for constructing JSON-API compliant requests and responses",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/reactivity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/reactivity",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Implementation of the reactivity connections to propagate changes between objects",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/tools",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Collection of common utility functions and classes",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/w3p/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/w3p",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Wrapper for Web3 Providers",
"repository": {
"type": "git",
Expand Down
9 changes: 6 additions & 3 deletions packages/w3p/src/provider-detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ export class ProviderDetector<T extends keyof Record<string, string>> {
} as ProviderInstance
})

this.pureProviders = browserProviders.filter(
(el, idx, arr) => arr.findIndex(sec => sec.name === el.name) === idx,
)
this.pureProviders = [
...this.pureProviders,
...browserProviders.filter(
(el, idx, arr) => arr.findIndex(sec => sec.name === el.name) === idx,
),
]
}

getAppropriateProviderName(provider: RawProvider): PROVIDERS {
Expand Down
Loading

0 comments on commit 58874be

Please sign in to comment.