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 1.0.0-beta11 to 1.0.0-beta12

28

CHANGELOG.md
# Changelog
## 1.0.0-beta11 - latest
## 1.0.0-beta12 - latest
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta11)
- The changelog for the beta can be found in the [releases](https://github.com/i18next/i18next-parser/releases)
## 1.0.0-beta10
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta10)
## 1.0.0-beta9
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta9)
## 1.0.0-beta8
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta8)
## 1.0.0-beta7
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta7)
## 1.0.0-beta2
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta2)
## 1.0.0-beta1
- See [release](https://github.com/i18next/i18next-parser/releases/tag/1.0.0-beta1)
## 0.13.0

@@ -32,0 +8,0 @@

2

dist/lexers/javascript-lexer.js

@@ -155,2 +155,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var _baseLexer = require('./base-lexer');var _baseLexer2 = _interopRequireDefault(_baseLexer);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self, call) {if (!self) {throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call && (typeof call === "object" || typeof call === "function") ? call : self;}function _inherits(subClass, superClass) {if (typeof superClass !== "function" && superClass !== null) {throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;}var

} }], [{ key: 'concatenatedSegmentPattern', get: function get() {return [_baseLexer2.default.singleQuotePattern, _baseLexer2.default.doubleQuotePattern, _baseLexer2.default.backQuotePattern, _baseLexer2.default.variablePattern, '(?:\\s*\\+\\s*)' // support for concatenation via +
].join('|');} }, { key: 'concatenatedArgumentPattern', get: function get() {return '(' + '(?:' + JavascriptLexer.concatenatedSegmentPattern + ')+' + ')';} }, { key: 'hashPattern', get: function get() {return '(\\{[^}]*\\})';} }, { key: 'stringOrVariableOrHashPattern', get: function get() {return '(' + '(' + '(?:' + [JavascriptLexer.concatenatedArgumentPattern, JavascriptLexer.hashPattern].join('|') + ')' + '(?:\\s*,\\s*)?' + ')+' + ')';} }]);return JavascriptLexer;}(_baseLexer2.default);exports.default = JavascriptLexer;module.exports = exports['default'];
].join('|');} }, { key: 'concatenatedArgumentPattern', get: function get() {return '(' + '(?:' + JavascriptLexer.concatenatedSegmentPattern + ')+' + ')';} }, { key: 'hashPattern', get: function get() {return '(\\{.*\\})';} }, { key: 'stringOrVariableOrHashPattern', get: function get() {return '(' + '(' + '(?:' + [JavascriptLexer.concatenatedArgumentPattern, JavascriptLexer.hashPattern].join('|') + ')' + '(?:\\s*,\\s*)?' + ')+' + ')';} }]);return JavascriptLexer;}(_baseLexer2.default);exports.default = JavascriptLexer;module.exports = exports['default'];

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

"name": "i18next-parser",
"version": "1.0.0-beta11",
"version": "1.0.0-beta12",
"license": "MIT",

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

@@ -100,3 +100,3 @@ import BaseLexer from './base-lexer'

static get hashPattern() {
return '(\\{[^}]*\\})'
return '(\\{.*\\})'
}

@@ -103,0 +103,0 @@

@@ -39,2 +39,11 @@ import { assert } from 'chai'

it('extracts the defaultValue/context options with interpolated value', (done) => {
const Lexer = new JavascriptLexer()
const content = 'i18n.t("first", {context: "foo", "defaultValue": \'{{var}} bla\'})'
assert.deepEqual(Lexer.extract(content), [
{ key: 'first', defaultValue: '{{var}} bla', context: 'foo' }
])
done()
})
it('supports multiline and concatenation', (done) => {

@@ -41,0 +50,0 @@ const Lexer = new JavascriptLexer()

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