New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

i18next-http-backend

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-http-backend - npm Package Compare versions

Comparing version

to
3.0.1

12

CHANGELOG.md

@@ -0,6 +1,16 @@

### 3.0.1
- try to get rid of top-level await
### 3.0.0
- fix for Deno 2 and removal of unnecessary .cjs file
- for esm build environments not supporting top-level await, you should import the `i18next-http-backend/cjs` export or stay at v2.6.2
- for esm build environments not supporting top-level await, you should import the `i18next-http-backend/cjs` export or stay at v2.6.2 or v2.7.1
### 2.7.1
- same as 2.6.2
### 2.7.0
- deprecated, same as v3.0.0
### 2.6.2

@@ -7,0 +17,0 @@

4

esm/request.js

@@ -37,3 +37,5 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }

try {
fetchApi = (await import('cross-fetch')).default;
import('cross-fetch').then(function (mod) {
fetchApi = mod.default;
}).catch(function () {});
} catch (e) {}

@@ -40,0 +42,0 @@ }

@@ -34,3 +34,7 @@ import { hasXMLHttpRequest } from './utils.js'

try {
fetchApi = (await import('cross-fetch')).default
// top-level await is not available on everywhere
// fetchApi = (await import('cross-fetch')).default
import('cross-fetch').then((mod) => {
fetchApi = mod.default
}).catch(() => {})
} catch (e) {}

@@ -37,0 +41,0 @@ }

{
"name": "i18next-http-backend",
"version": "3.0.0",
"version": "3.0.1",
"private": false,

@@ -75,3 +75,3 @@ "type": "module",

"config": {
"fixcjs": "fs.writeFileSync('cjs/request.js', fs.readFileSync('cjs/request.js').toString().replace(`(await Promise.resolve().then(function () {\n return _interopRequireWildcard(require('cross-fetch'));\n })).default`, `require('cross-fetch')`))"
"fixcjs": "fs.writeFileSync('cjs/request.js', fs.readFileSync('cjs/request.js').toString().replace(`Promise.resolve().then(function () {\n return _interopRequireWildcard(require('cross-fetch'));\n }).then(function (mod) {\n fetchApi = mod.default;\n }).catch(function () {});`, `fetchApi = require('cross-fetch');`))"
},

@@ -78,0 +78,0 @@ "scripts": {