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

i18next-parser

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-parser - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

CHANGELOG.md
# Changelog
# 4.0.0 - latest
# 4.0.1 - latest

@@ -5,0 +5,0 @@ - Drop support for Node 10

@@ -131,6 +131,4 @@ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _helpers = require("./helpers");

this.entries = this.entries.sort(function (a, b) {return a.key.localeCompare(b.key);});
}
}var _iterator2 = _createForOfIteratorHelper(
debugger;var _iterator2 = _createForOfIteratorHelper(
this.options.locales),_step2;try {var _loop = function _loop() {var locale = _step2.value;

@@ -137,0 +135,0 @@ var catalog = {};

@@ -5,3 +5,3 @@ {

"name": "i18next-parser",
"version": "4.0.0",
"version": "4.0.1",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "dist/index.js",

@@ -133,4 +133,2 @@ import { dotPathToHash, mergeHashes, transferValues } from './helpers'

debugger
for (const locale of this.options.locales) {

@@ -137,0 +135,0 @@ const catalog = {}

@@ -14,7 +14,7 @@ import { assert } from 'chai'

const { target } = dotPathToHash(
{ keyWithNamespace: 'one.' },
{ keyWithNamespace: 'one.two.' },
{},
{ separator: '.' }
)
assert.deepEqual(target, { one: '' })
assert.deepEqual(target, { one: { two: '' } })
done()

@@ -21,0 +21,0 @@ })

@@ -1640,26 +1640,2 @@ import { assert } from 'chai'

it('extracts all keys when sort is false', (done) => {
let result
const i18nextParser = new i18nTransform()
const fakeFile = new Vinyl({
contents: Buffer.from(
"t('aaa.bbb.ccc'); t('aaa.aaa'); t('bbb.aaa')"
),
path: 'file.js',
})
i18nextParser.on('data', (file) => {
if (file.relative.endsWith(enLibraryPath)) {
result = JSON.parse(file.contents)
}
})
i18nextParser.once('end', () => {
assert.sameOrderedMembers(Object.keys(result), ['ccc', 'aaa', 'bbb'])
assert.sameOrderedMembers(Object.keys(result.bbb), ['bbb', 'aaa'])
done()
})
i18nextParser.end(fakeFile)
})
it('supports sort as an option', (done) => {

@@ -1666,0 +1642,0 @@ let result

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