ngx-translate-multi-http-loader
Advanced tools
Comparing version 18.2.0 to 19.0.0
import { HttpBackend } from '@angular/common/http'; | ||
import { TranslateLoader } from '@ngx-translate/core'; | ||
import { Observable } from 'rxjs'; | ||
export interface ITranslationResource { | ||
export interface TranslationResource { | ||
prefix: string; | ||
@@ -12,6 +12,5 @@ suffix?: string; | ||
private _resourcesPrefix; | ||
constructor(_handler: HttpBackend, _resourcesPrefix: string[] | ITranslationResource[]); | ||
constructor(_handler: HttpBackend, _resourcesPrefix: string[] | TranslationResource[]); | ||
getTranslation(lang: string): Observable<any>; | ||
isObject(item: any): boolean; | ||
mergeDeep(target: any, source: any): any; | ||
} |
{ | ||
"name": "ngx-translate-multi-http-loader", | ||
"version": "18.2.0", | ||
"version": "19.0.0", | ||
"license": "MIT", | ||
@@ -26,3 +26,3 @@ "author": { | ||
"dependencies": { | ||
"tslib": "^2.6.3" | ||
"tslib": "^2.8.1" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
"@angular/core": ">=13.0.0", | ||
"@ngx-translate/core": ">=15.0.0", | ||
"@ngx-translate/core": ">=16.0.3", | ||
"rxjs": "^7.8.1" | ||
@@ -50,2 +50,2 @@ }, | ||
"sideEffects": false | ||
} | ||
} |
@@ -18,2 +18,5 @@ # @ngx-translate/multi-http-loader | ||
## breaking change: v19.0.0 | ||
* Uses `mergeDeep` from `@ngx-translate/core@16` making it's `v16` mandatory | ||
## breaking change: v9.0.0 | ||
@@ -27,8 +30,6 @@ * This library is now using `httpBackend` instead of the `httpClient`, to avoid being delayed by interceptor, which was creating errors while loading. | ||
Now you need to install the npm module for `MultiTranslateHttpLoader`: | ||
[deepmerge-ts](https://www.npmjs.com/package/deepmerge-ts) may also need to be installed _should be done automatically though_ | ||
Now you need to install the npm module for `MultiTranslateHttpLoader`: | ||
```sh | ||
npm install ngx-translate-multi-http-loader | ||
npm install deepmerge-ts | ||
``` | ||
@@ -40,2 +41,3 @@ | ||
| ------- | ------------------- | ------------------------------- | | ||
| >= 16 | 16.x+ | >= 19.x+ | | ||
| >= 16 | 15.x+ | >= 15.x+ | | ||
@@ -83,3 +85,3 @@ | 15 | 14.x+ | 9.x+ | | ||
The `MultiTranslateHttpLoader` takes a list of `string[]` or `ITranslationResource[]`. | ||
The `MultiTranslateHttpLoader` takes a list of `string[]` or `TranslationResource[]`. | ||
@@ -109,13 +111,6 @@ ### String[] | ||
The loader will merge all translation files from the server using [deepmerge-ts](https://www.npmjs.com/package/deepmerge-ts). | ||
The loader will merge all translation files from the server | ||
## Possible error & Bugfix | ||
### Can't resolve 'deepmerge-ts' | ||
1. run `npm i deepmerge-ts` | ||
This is due to some version of npm not being able to download peerDependencies properly. | ||
I decided to **not** move it under dependencies since it's considered to be a bad practice. | ||
### values.at is not a function | ||
@@ -125,5 +120,3 @@ 1. Install `core-js` | ||
`deepmerge-ts@5` uses `Array.at`, which is [not supported](https://caniuse.com/?search=array.at) in _not so_ old versions of Safari `< 15.4`. | ||
## Authors and acknowledgment | ||
@@ -130,0 +123,0 @@ * maintainer [Raphaël Balet](https://github.com/rbalet) |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18618
101
121
Updatedtslib@^2.8.1