Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aurelia/fetch-client

Package Overview
Dependencies
Maintainers
1
Versions
1006
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia/fetch-client - npm Package Compare versions

Comparing version 2.0.1-dev.202402130428 to 2.0.1-dev.202403021005

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Change Log

<a name="2.0.0-beta.12"></a>
# 2.0.0-beta.12 (2024-03-02)
### Bug Fixes:
* **di:** new instance resolver (#1909) ([efe208c](https://github.com/aurelia/aurelia/commit/efe208c))
<a name="2.0.0-beta.11"></a>

@@ -8,0 +15,0 @@ # 2.0.0-beta.11 (2024-02-13)

6

package.json
{
"name": "@aurelia/fetch-client",
"version": "2.0.1-dev.202402130428",
"version": "2.0.1-dev.202403021005",
"main": "dist/cjs/index.cjs",

@@ -56,4 +56,4 @@ "module": "dist/esm/index.mjs",

"dependencies": {
"@aurelia/kernel": "2.0.1-dev.202402130428",
"@aurelia/metadata": "2.0.1-dev.202402130428"
"@aurelia/kernel": "2.0.1-dev.202403021005",
"@aurelia/metadata": "2.0.1-dev.202403021005"
},

@@ -60,0 +60,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

import { DI, IContainer, IIndexable, Registration, resolve } from '@aurelia/kernel';
import { DI, IIndexable, factory, resolve } from '@aurelia/kernel';
import { HttpClientConfiguration } from './http-client-configuration';

@@ -19,15 +19,3 @@ import { IFetchInterceptor } from './interfaces';

export const IHttpClient = /*@__PURE__*/DI.createInterface<IHttpClient>('IHttpClient', x => x.cachedCallback((handler) => {
// reason for this gymnastic is because the way fetch-client is used in applications
// there's no registration, there's only direct usage
// which means application won't have the opportunity to register IHttpClient and HttpClient properly
// app may inject HttpClient in some places and IHttpClient in some other
// so we need to make sure HttpClient and IHttpClient are the same instance
if (handler.has(HttpClient, false)) {
return handler.get(HttpClient);
}
const client = handler.invoke(HttpClient);
handler.register(Registration.instance(HttpClient, client));
return client;
}));
export const IHttpClient = /*@__PURE__*/DI.createInterface<IHttpClient>('IHttpClient', x => x.aliasTo(HttpClient));

@@ -81,3 +69,3 @@ export interface IHttpClient extends HttpClient {}

/** @internal */
private readonly _container = resolve(IContainer);
private readonly _createConfiguration = resolve(factory(HttpClientConfiguration));
/** @internal */

@@ -101,3 +89,3 @@ private readonly _fetchFn = resolve(IFetchFn);

} else if (typeof config === 'function') {
normalizedConfig = this._container.invoke(HttpClientConfiguration);
normalizedConfig = this._createConfiguration();
normalizedConfig.baseUrl = this.baseUrl;

@@ -104,0 +92,0 @@ normalizedConfig.defaults = { ...this.defaults };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc