Browse Source

Merge branch 'main' into feature/improve-language-localization-for-de-20241207

pull/4106/head
Thomas Kaul 9 months ago
committed by GitHub
parent
commit
c00a9f05aa
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      CHANGELOG.md
  2. 1
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts
  3. 2
      apps/api/src/services/data-provider/manual/manual.service.ts
  4. 14
      libs/common/src/lib/helper.spec.ts
  5. 2
      libs/common/src/lib/models/portfolio-snapshot.ts
  6. 12
      package-lock.json
  7. 4
      package.json

15
CHANGELOG.md

@ -7,13 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Changed
- Improved the language localization for German (`de`)
- Upgraded `@internationalized/number` from version `3.5.2` to `3.6.0`
### Fixed
- Fixed the import of `jsonpath` to support REST APIs (`JSON`) via the scraper configuration
## 2.127.0 - 2024-12-08
### Added ### Added
- Extended the _X-ray_ page by a summary - Extended the _X-ray_ page by a summary
### Changed ### Fixed
- Improved the language localization for German (`de`) - Fixed an exception in the caching of the portfolio snapshot in the portfolio calculator
## 2.126.1 - 2024-12-07 ## 2.126.1 - 2024-12-07

1
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts

@ -101,6 +101,7 @@ export class TWRPortfolioCalculator extends PortfolioCalculator {
totalInterestWithCurrencyEffect, totalInterestWithCurrencyEffect,
totalInvestment, totalInvestment,
totalInvestmentWithCurrencyEffect, totalInvestmentWithCurrencyEffect,
errors: [],
historicalData: [], historicalData: [],
totalLiabilitiesWithCurrencyEffect: new Big(0), totalLiabilitiesWithCurrencyEffect: new Big(0),
totalValuablesWithCurrencyEffect: new Big(0) totalValuablesWithCurrencyEffect: new Big(0)

2
apps/api/src/services/data-provider/manual/manual.service.ts

@ -29,7 +29,7 @@ import * as cheerio from 'cheerio';
import { isUUID } from 'class-validator'; import { isUUID } from 'class-validator';
import { addDays, format, isBefore } from 'date-fns'; import { addDays, format, isBefore } from 'date-fns';
import got, { Headers } from 'got'; import got, { Headers } from 'got';
import jsonpath from 'jsonpath'; import * as jsonpath from 'jsonpath';
@Injectable() @Injectable()
export class ManualService implements DataProviderInterface { export class ManualService implements DataProviderInterface {

14
libs/common/src/lib/helper.spec.ts

@ -2,37 +2,37 @@ import { extractNumberFromString } from '@ghostfolio/common/helper';
describe('Helper', () => { describe('Helper', () => {
describe('Extract number from string', () => { describe('Extract number from string', () => {
it('Get decimal number', async () => { it('Get decimal number', () => {
expect(extractNumberFromString({ value: '999.99' })).toEqual(999.99); expect(extractNumberFromString({ value: '999.99' })).toEqual(999.99);
}); });
it('Get decimal number (with spaces)', async () => { it('Get decimal number (with spaces)', () => {
expect(extractNumberFromString({ value: ' 999.99 ' })).toEqual(999.99); expect(extractNumberFromString({ value: ' 999.99 ' })).toEqual(999.99);
}); });
it('Get decimal number (with currency)', async () => { it('Get decimal number (with currency)', () => {
expect(extractNumberFromString({ value: '999.99 CHF' })).toEqual(999.99); expect(extractNumberFromString({ value: '999.99 CHF' })).toEqual(999.99);
}); });
it('Get decimal number (comma notation)', async () => { it('Get decimal number (comma notation)', () => {
expect( expect(
extractNumberFromString({ locale: 'de-DE', value: '999,99' }) extractNumberFromString({ locale: 'de-DE', value: '999,99' })
).toEqual(999.99); ).toEqual(999.99);
}); });
it('Get decimal number with group (dot notation)', async () => { it('Get decimal number with group (dot notation)', () => {
expect( expect(
extractNumberFromString({ locale: 'de-CH', value: '99’999.99' }) extractNumberFromString({ locale: 'de-CH', value: '99’999.99' })
).toEqual(99999.99); ).toEqual(99999.99);
}); });
it('Get decimal number with group (comma notation)', async () => { it('Get decimal number with group (comma notation)', () => {
expect( expect(
extractNumberFromString({ locale: 'de-DE', value: '99.999,99' }) extractNumberFromString({ locale: 'de-DE', value: '99.999,99' })
).toEqual(99999.99); ).toEqual(99999.99);
}); });
it('Not a number', async () => { it('Not a number', () => {
expect(extractNumberFromString({ value: 'X' })).toEqual(NaN); expect(extractNumberFromString({ value: 'X' })).toEqual(NaN);
}); });
}); });

2
libs/common/src/lib/models/portfolio-snapshot.ts

@ -13,7 +13,7 @@ export class PortfolioSnapshot {
@Type(() => Big) @Type(() => Big)
currentValueInBaseCurrency: Big; currentValueInBaseCurrency: Big;
errors?: AssetProfileIdentifier[]; errors: AssetProfileIdentifier[];
hasErrors: boolean; hasErrors: boolean;

12
package-lock.json

@ -1,12 +1,12 @@
{ {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.126.1", "version": "2.127.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.126.1", "version": "2.127.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {
@ -28,7 +28,7 @@
"@dfinity/identity": "0.15.7", "@dfinity/identity": "0.15.7",
"@dfinity/principal": "0.15.7", "@dfinity/principal": "0.15.7",
"@dinero.js/currencies": "2.0.0-alpha.8", "@dinero.js/currencies": "2.0.0-alpha.8",
"@internationalized/number": "3.5.2", "@internationalized/number": "3.6.0",
"@nestjs/bull": "10.0.1", "@nestjs/bull": "10.0.1",
"@nestjs/cache-manager": "2.2.2", "@nestjs/cache-manager": "2.2.2",
"@nestjs/common": "10.1.3", "@nestjs/common": "10.1.3",
@ -4126,9 +4126,9 @@
} }
}, },
"node_modules/@internationalized/number": { "node_modules/@internationalized/number": {
"version": "3.5.2", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.5.2.tgz", "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.0.tgz",
"integrity": "sha512-4FGHTi0rOEX1giSkt5MH4/te0eHBq3cvAYsfLlpguV6pzJAReXymiYpE5wPCqKqjkUO3PIsyvk+tBiIV1pZtbA==", "integrity": "sha512-PtrRcJVy7nw++wn4W2OuePQQfTqDzfusSuY1QTtui4wa7r+rGVtR75pO8CyKvHvzyQYi3Q1uO5sY0AsB4e65Bw==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@swc/helpers": "^0.5.0" "@swc/helpers": "^0.5.0"

4
package.json

@ -1,6 +1,6 @@
{ {
"name": "ghostfolio", "name": "ghostfolio",
"version": "2.126.1", "version": "2.127.0",
"homepage": "https://ghostfol.io", "homepage": "https://ghostfol.io",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"repository": "https://github.com/ghostfolio/ghostfolio", "repository": "https://github.com/ghostfolio/ghostfolio",
@ -74,7 +74,7 @@
"@dfinity/identity": "0.15.7", "@dfinity/identity": "0.15.7",
"@dfinity/principal": "0.15.7", "@dfinity/principal": "0.15.7",
"@dinero.js/currencies": "2.0.0-alpha.8", "@dinero.js/currencies": "2.0.0-alpha.8",
"@internationalized/number": "3.5.2", "@internationalized/number": "3.6.0",
"@nestjs/bull": "10.0.1", "@nestjs/bull": "10.0.1",
"@nestjs/cache-manager": "2.2.2", "@nestjs/cache-manager": "2.2.2",
"@nestjs/common": "10.1.3", "@nestjs/common": "10.1.3",

Loading…
Cancel
Save