@unchainedshop/core-countries 2.2.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LRUCache } from 'lru-cache';
|
|
2
2
|
const { NODE_ENV } = process.env;
|
|
3
3
|
const ttl = NODE_ENV === 'production' ? 1000 * 1 : 0; // minute or second
|
|
4
|
-
const currencyCodeCache = new
|
|
4
|
+
const currencyCodeCache = new LRUCache({
|
|
5
5
|
max: 500,
|
|
6
6
|
ttl,
|
|
7
7
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDefaultCurrencyCodeService.js","sourceRoot":"","sources":["../../src/service/resolveDefaultCurrencyCodeService.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"resolveDefaultCurrencyCodeService.js","sourceRoot":"","sources":["../../src/service/resolveDefaultCurrencyCodeService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAEjC,MAAM,GAAG,GAAG,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB;AAEzE,MAAM,iBAAiB,GAAG,IAAI,QAAQ,CAAC;IACrC,GAAG,EAAE,GAAG;IACR,GAAG;CACJ,CAAC,CAAC;AAEH,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE3C,MAAM,kBAAkB,GAAG,KAAK,EAAE,OAAgB,EAAE,OAAiB,EAAE,EAAE;IACvE,IAAI,OAAO,EAAE,iBAAiB,EAAE;QAC9B,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;YACrC,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAsC,KAAK,EACvF,EAAE,OAAO,EAAE,EACX,EAAE,OAAO,EAAE,EACX,EAAE;IACF,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAW,CAAC;IAC9D,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GAAG,QAAQ,EAAE,OAAO,IAAI,kBAAkB,IAAI,KAAK,CAAC;IAC1E,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEjD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-countries",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"main": "lib/countries-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/countries-index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unchainedshop/events": "^2.
|
|
35
|
-
"@unchainedshop/utils": "^2.
|
|
34
|
+
"@unchainedshop/events": "^2.3.0",
|
|
35
|
+
"@unchainedshop/utils": "^2.3.0",
|
|
36
36
|
"emoji-flags": "^1.3.0",
|
|
37
37
|
"i18n-iso-countries": "^7.6.0",
|
|
38
|
-
"lru-cache": "^
|
|
38
|
+
"lru-cache": "^10.0.0",
|
|
39
39
|
"simpl-schema": "=3.2.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^18.16.
|
|
43
|
-
"@unchainedshop/types": "^2.
|
|
42
|
+
"@types/node": "^18.16.19",
|
|
43
|
+
"@unchainedshop/types": "^2.3.0",
|
|
44
44
|
"cross-env": "^7.0.3",
|
|
45
|
-
"jest": "^29.
|
|
46
|
-
"ts-jest": "^29.1.
|
|
47
|
-
"typescript": "^
|
|
45
|
+
"jest": "^29.6.0",
|
|
46
|
+
"ts-jest": "^29.1.1",
|
|
47
|
+
"typescript": "^5.1.6"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Country, ResolveDefaultCurrencyCodeService } from '@unchainedshop/types/countries.js';
|
|
2
2
|
import { Modules } from '@unchainedshop/types/modules.js';
|
|
3
|
-
import
|
|
3
|
+
import { LRUCache } from 'lru-cache';
|
|
4
4
|
|
|
5
5
|
const { NODE_ENV } = process.env;
|
|
6
6
|
|
|
7
7
|
const ttl = NODE_ENV === 'production' ? 1000 * 1 : 0; // minute or second
|
|
8
8
|
|
|
9
|
-
const currencyCodeCache = new
|
|
9
|
+
const currencyCodeCache = new LRUCache({
|
|
10
10
|
max: 500,
|
|
11
11
|
ttl,
|
|
12
12
|
});
|