jsonc-parser
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -13,3 +13,11 @@ | ||
"rules": { | ||
"@typescript-eslint/class-name-casing": "warn", | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": "typeLike", | ||
"format": [ | ||
"PascalCase" | ||
] | ||
} | ||
], | ||
"@typescript-eslint/semi": "warn", | ||
@@ -16,0 +24,0 @@ "curly": "warn", |
2.3.0 2020-07-03 | ||
================== | ||
* new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. | ||
* `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will be not be formatted. | ||
* `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. | ||
@@ -6,0 +6,0 @@ |
@@ -445,12 +445,7 @@ /*--------------------------------------------------------------------------------------------- | ||
case 11 /* NumericLiteral */: | ||
var value = 0; | ||
try { | ||
value = JSON.parse(_scanner.getTokenValue()); | ||
if (typeof value !== 'number') { | ||
handleError(2 /* InvalidNumberFormat */); | ||
value = 0; | ||
} | ||
} | ||
catch (e) { | ||
var tokenValue = _scanner.getTokenValue(); | ||
var value = Number(tokenValue); | ||
if (isNaN(value)) { | ||
handleError(2 /* InvalidNumberFormat */); | ||
value = 0; | ||
} | ||
@@ -457,0 +452,0 @@ onLiteralValue(value); |
@@ -464,12 +464,7 @@ (function (factory) { | ||
case 11 /* NumericLiteral */: | ||
var value = 0; | ||
try { | ||
value = JSON.parse(_scanner.getTokenValue()); | ||
if (typeof value !== 'number') { | ||
handleError(2 /* InvalidNumberFormat */); | ||
value = 0; | ||
} | ||
} | ||
catch (e) { | ||
var tokenValue = _scanner.getTokenValue(); | ||
var value = Number(tokenValue); | ||
if (isNaN(value)) { | ||
handleError(2 /* InvalidNumberFormat */); | ||
value = 0; | ||
} | ||
@@ -476,0 +471,0 @@ onLiteralValue(value); |
{ | ||
"name": "jsonc-parser", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Scanner and parser for JSON with comments.", | ||
@@ -18,9 +18,9 @@ "main": "./lib/umd/main.js", | ||
"devDependencies": { | ||
"mocha": "^7.1.2", | ||
"typescript": "^3.6.4", | ||
"mocha": "^8.1.3", | ||
"typescript": "^4.0.2", | ||
"@types/node": "^10.12.12", | ||
"@types/mocha": "^5.2.7", | ||
"@typescript-eslint/eslint-plugin": "^2.30.0", | ||
"@typescript-eslint/parser": "^2.30.0", | ||
"eslint": "^7.3.1", | ||
"@typescript-eslint/eslint-plugin": "^4.1.1", | ||
"@typescript-eslint/parser": "^4.1.1", | ||
"eslint": "^7.9.0", | ||
"rimraf": "^3.0.2" | ||
@@ -36,3 +36,3 @@ }, | ||
"watch": "tsc -w -p ./src", | ||
"test": "npm run compile && mocha", | ||
"test": "npm run compile && mocha ./lib/umd/test", | ||
"lint": "eslint src/**/*.ts", | ||
@@ -39,0 +39,0 @@ "preversion": "npm test", |
18
3703
170429