@prantlf/jsonlint 14.0.2 → 14.1.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
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/printer.js"],
4
- "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)\n : typeof define === 'function' && define.amd ? define('jsonlint-printer', ['exports'], factory)\n : (global = global || self, factory(global.jsonlintPrinter = {}))\n}(this, function (exports) {\n 'use strict'\n\n function noop () {}\n\n function isIdentifierName (value) {\n return /^[a-zA-Z$_][a-zA-Z0-9$_]*$/.test(value)\n }\n\n function concatenateTokens (tokens) {\n let outputString = ''\n const tokenCount = tokens.length\n let tokenIndex\n for (tokenIndex = 0; tokenIndex < tokenCount; ++tokenIndex) {\n outputString += tokens[tokenIndex].raw\n }\n return outputString\n }\n\n function print (tokens, options) {\n if (!(tokens && tokens.length)) {\n throw new Error('JSON tokens missing.')\n }\n // Whitespace and comments are available only as raw token content.\n if (!(tokens[0] && tokens[0].raw)) {\n throw new Error('JSON tokens lack raw values.')\n }\n\n if (!options) {\n // If no options, not even an empty object is passed, just concatenate\n // the raw tokens with neither minification, nor pretty-printing.\n return concatenateTokens(tokens)\n }\n\n let indentString = options.indent\n if (typeof indentString === 'number') {\n indentString = new Array(indentString + 1).join(' ')\n }\n // Setting the indent to an empty string enables pretty-printing too.\n // It will just insert line breaks without any indentation.\n const prettyPrint = indentString !== undefined\n const pruneComments = options.pruneComments\n const stripObjectKeys = options.stripObjectKeys\n const enforceDoubleQuotes = options.enforceDoubleQuotes\n const enforceSingleQuotes = options.enforceSingleQuotes\n const trimTrailingCommas = options.trimTrailingCommas\n\n let outputString = ''\n let foundLineBreak, addedLineBreak, needsLineBreak\n let addedSpace, needsSpace\n let indentLevel = 0\n const scopes = []\n let scopeType\n let isValue\n const tokenCount = tokens.length\n let tokenIndex, token, tokenType, tokenContent\n\n function peekAtNextToken () {\n let nextTokenIndex = tokenIndex\n let nextToken\n do {\n nextToken = tokens[++nextTokenIndex]\n } while (nextToken && (nextToken.type === 'whitespace' ||\n nextToken.type === 'comment'))\n return nextToken\n }\n\n let addIndent\n if (prettyPrint && indentString) {\n addIndent = function () {\n for (let i = 0; i < indentLevel; ++i) {\n outputString += indentString\n }\n }\n } else {\n addIndent = noop\n }\n\n let addLineBreak, addDelayedSpaceOrLineBreak\n if (prettyPrint) {\n addLineBreak = function () {\n outputString += '\\n'\n }\n\n addDelayedSpaceOrLineBreak = function () {\n // A line break is more important than a space.\n if (needsLineBreak) {\n addLineBreak()\n addIndent()\n } else if (needsSpace) {\n outputString += ' '\n }\n needsSpace = needsLineBreak = false\n }\n } else {\n addLineBreak = addDelayedSpaceOrLineBreak = noop\n }\n\n let addStandaloneComment, tryAddingInlineComment\n if (pruneComments) {\n addStandaloneComment = tryAddingInlineComment = noop\n } else {\n if (prettyPrint) {\n addStandaloneComment = function () {\n // If a comment is not appended to the end of a line, it will start\n // on a new line with the current indentation.\n if (!addedLineBreak && tokenIndex > 0) {\n addLineBreak()\n addIndent()\n }\n outputString += tokenContent\n foundLineBreak = false\n addedLineBreak = false\n // If a comment is not appended to the end of a line, it will take\n // the whole line and has to end by a line break.\n needsLineBreak = true\n }\n\n tryAddingInlineComment = function () {\n // This function is called after printing a non-line-break character.\n foundLineBreak = false\n addedLineBreak = false\n addedSpace = false\n\n // Start with the character after the just processed one.\n let tryTokenIndex = tokenIndex + 1\n\n function skipWhitespace () {\n let token = tokens[tryTokenIndex]\n if (token && token.type === 'whitespace') {\n foundLineBreak = token.raw.indexOf('\\n') >= 0\n token = tokens[++tryTokenIndex]\n }\n return token\n }\n\n const token = skipWhitespace()\n // If line break followed the previous token, leave the comment\n // to be handled by the next usual token processing.\n if (!foundLineBreak && token && token.type === 'comment') {\n if (needsLineBreak) {\n // If the previous non-whitespace token was ended by a line\n // break, retain it. Print the comment after the line break too.\n if (!addedLineBreak) {\n addLineBreak()\n addIndent()\n }\n } else {\n // If the previous non-whitespace token was not ended by a line\n // break, ensure that the comment is separated from it.\n if (!addedSpace) {\n outputString += ' '\n }\n }\n outputString += token.raw\n // Set the current token to the just processed comment.\n tokenIndex = tryTokenIndex++\n // Check the whitespace after the comment to give a hint\n // about the next whitespace to the further processing.\n skipWhitespace()\n if (foundLineBreak) {\n needsSpace = false\n needsLineBreak = true\n } else {\n needsSpace = true\n needsLineBreak = false\n }\n }\n }\n } else {\n // If all whitespace is omitted, convert single-line comments\n // to multi-line ones, which include a comment-closing token.\n addStandaloneComment = function () {\n if (tokenContent[1] === '/') {\n outputString += '/*'\n outputString += tokenContent.substr(2, tokenContent.length - 2)\n outputString += ' */'\n } else {\n outputString += tokenContent\n }\n }\n\n tryAddingInlineComment = noop\n }\n }\n\n function addLiteral () {\n addDelayedSpaceOrLineBreak()\n const tokenValue = token.value\n if (stripObjectKeys && scopeType === '{' && !isValue &&\n isIdentifierName(tokenValue)) {\n outputString += tokenValue\n } else if (typeof tokenValue === 'string') {\n if (enforceDoubleQuotes && tokenContent[0] !== '\"') {\n outputString += JSON.stringify(tokenValue)\n } else if (enforceSingleQuotes && tokenContent[0] !== '\\'') {\n outputString += '\\'' + tokenValue.replace(/'/g, '\\\\\\'') + '\\''\n } else {\n outputString += tokenContent\n }\n } else {\n outputString += tokenContent\n }\n tryAddingInlineComment()\n }\n\n function openScope () {\n addDelayedSpaceOrLineBreak()\n scopes.push(scopeType)\n scopeType = tokenContent\n isValue = scopeType === '['\n outputString += tokenContent\n tryAddingInlineComment()\n ++indentLevel\n needsLineBreak = true\n }\n\n function closeScope () {\n scopeType = scopes.pop()\n addLineBreak()\n --indentLevel\n addIndent()\n needsSpace = needsLineBreak = false\n outputString += tokenContent\n tryAddingInlineComment()\n }\n\n function addComma () {\n if (trimTrailingCommas) {\n const nextToken = peekAtNextToken()\n if (nextToken && nextToken.type === 'symbol') {\n return tryAddingInlineComment()\n }\n }\n addDelayedSpaceOrLineBreak()\n outputString += ','\n tryAddingInlineComment()\n addLineBreak()\n addIndent()\n addedLineBreak = true\n needsLineBreak = false\n isValue = scopeType === '['\n }\n\n function addColon () {\n addDelayedSpaceOrLineBreak()\n outputString += ':'\n needsSpace = true\n tryAddingInlineComment()\n isValue = true\n }\n\n for (tokenIndex = 0; tokenIndex < tokenCount; ++tokenIndex) {\n token = tokens[tokenIndex]\n tokenType = token.type\n tokenContent = token.raw\n switch (tokenType) {\n case 'literal':\n addLiteral()\n break\n case 'comment':\n addStandaloneComment()\n break\n case 'symbol':\n switch (tokenContent) {\n case '{':\n case '[':\n openScope()\n break\n case '}':\n case ']':\n closeScope()\n break\n case ',':\n addComma()\n break\n case ':':\n addColon()\n }\n break\n default: // whitespace\n foundLineBreak = tokenContent.indexOf('\\n') >= 0\n }\n }\n\n return outputString\n }\n\n exports.print = print\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
- "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,OAAO,SAAY,UAAY,OAAO,OAAW,IAAcA,EAAQ,OAAO,EAC1E,OAAO,QAAW,YAAc,OAAO,IAAM,OAAO,mBAAoB,CAAC,SAAS,EAAGA,CAAO,GACzFD,EAASA,GAAU,KAAMC,EAAQD,EAAO,gBAAkB,CAAC,CAAC,EACrE,GAAE,KAAM,SAAUE,EAAS,CACzB,aAEA,SAASC,GAAQ,CAAC,CAElB,SAASC,EAAkBC,EAAO,CAChC,MAAO,6BAA6B,KAAKA,CAAK,CAChD,CAEA,SAASC,EAAmBC,EAAQ,CAClC,IAAIC,EAAe,GACnB,MAAMC,EAAaF,EAAO,OAC1B,IAAIG,EACJ,IAAKA,EAAa,EAAGA,EAAaD,EAAY,EAAEC,EAC9CF,GAAgBD,EAAOG,CAAU,EAAE,IAErC,OAAOF,CACT,CAEA,SAASG,EAAOJ,EAAQK,EAAS,CAC/B,GAAI,EAAEL,GAAUA,EAAO,QACrB,MAAM,IAAI,MAAM,sBAAsB,EAGxC,GAAI,EA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,IACxBnB,GAAgBuB,EAChBS,EAAuB,EACvB,EAAEf,EACFH,EAAiB,EACnB,CAEA,SAASwB,GAAc,CACrBnB,EAAYD,EAAO,IAAI,EACvBW,EAAa,EACb,EAAEZ,EACFU,EAAU,EACVX,EAAaF,EAAiB,GAC9Bd,GAAgBuB,EAChBS,EAAuB,CACzB,CAEA,SAASO,GAAY,CACnB,GAAI5B,EAAoB,CACtB,MAAMe,EAAYF,EAAgB,EAClC,GAAIE,GAAaA,EAAU,OAAS,SAClC,OAAOM,EAAuB,EAGlCF,EAA2B,EAC3B9B,GAAgB,IAChBgC,EAAuB,EACvBH,EAAa,EACbF,EAAU,EACVd,EAAiB,GACjBC,EAAiB,GACjBM,EAAUD,IAAc,GAC1B,CAEA,SAASqB,GAAY,CACnBV,EAA2B,EAC3B9B,GAAgB,IAChBgB,EAAa,GACbgB,EAAuB,EACvBZ,EAAU,EACZ,CAEA,IAAKlB,EAAa,EAAGA,EAAaD,EAAY,EAAEC,EAI9C,OAHAmB,EAAQtB,EAAOG,CAAU,EACzBoB,EAAYD,EAAM,KAClBE,EAAeF,EAAM,IACbC,EAAW,CACjB,IAAK,UACHa,EAAW,EACX,MACF,IAAK,UACHJ,EAAqB,EACrB,MACF,IAAK,SACH,OAAQR,EAAc,CACpB,IAAK,IACL,IAAK,IACHc,EAAU,EACV,MACF,IAAK,IACL,IAAK,IACHC,EAAW,EACX,MACF,IAAK,IACHC,EAAS,EACT,MACF,IAAK,IACHC,EAAS,CACb,CACA,MACF,QACE5B,EAAiBW,EAAa,QAAQ;AAAA,CAAI,GAAK,CACnD,CAGF,OAAOvB,CACT,CAEAN,EAAQ,MAAQS,EAEhB,OAAO,eAAeT,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
4
+ "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)\n : typeof define === 'function' && define.amd ? define('jsonlint-printer', ['exports'], factory)\n : (global = global || self, factory(global.jsonlintPrinter = {}))\n}(this, function (exports) {\n 'use strict'\n\n function noop () {}\n\n function isIdentifierName (value) {\n return /^[a-zA-Z$_][a-zA-Z0-9$_]*$/.test(value)\n }\n\n function concatenateTokens (tokens) {\n let outputString = ''\n const tokenCount = tokens.length\n let tokenIndex\n for (tokenIndex = 0; tokenIndex < tokenCount; ++tokenIndex) {\n outputString += tokens[tokenIndex].raw\n }\n return outputString\n }\n\n function print (tokens, options) {\n if (!(tokens?.length)) {\n throw new Error('JSON tokens missing.')\n }\n // Whitespace and comments are available only as raw token content.\n if (!(tokens[0]?.raw)) {\n throw new Error('JSON tokens lack raw values.')\n }\n\n if (!options) {\n // If no options, not even an empty object is passed, just concatenate\n // the raw tokens with neither minification, nor pretty-printing.\n return concatenateTokens(tokens)\n }\n\n let indentString = options.indent\n if (typeof indentString === 'number') {\n indentString = new Array(indentString + 1).join(' ')\n }\n // Setting the indent to an empty string enables pretty-printing too.\n // It will just insert line breaks without any indentation.\n const prettyPrint = indentString !== undefined\n const pruneComments = options.pruneComments\n const stripObjectKeys = options.stripObjectKeys\n const enforceDoubleQuotes = options.enforceDoubleQuotes\n const enforceSingleQuotes = options.enforceSingleQuotes\n const trimTrailingCommas = options.trimTrailingCommas\n\n let outputString = ''\n let foundLineBreak\n let addedLineBreak\n let needsLineBreak\n let addedSpace\n let needsSpace\n let indentLevel = 0\n const scopes = []\n let scopeType\n let isValue\n const tokenCount = tokens.length\n let tokenIndex\n let token\n let tokenType\n let tokenContent\n\n function peekAtNextToken () {\n let nextTokenIndex = tokenIndex\n let nextToken\n do {\n nextToken = tokens[++nextTokenIndex]\n } while (nextToken && (nextToken.type === 'whitespace' ||\n nextToken.type === 'comment'))\n return nextToken\n }\n\n let addIndent\n if (prettyPrint && indentString) {\n addIndent = function () {\n for (let i = 0; i < indentLevel; ++i) {\n outputString += indentString\n }\n }\n } else {\n addIndent = noop\n }\n\n let addLineBreak\n let addDelayedSpaceOrLineBreak\n if (prettyPrint) {\n addLineBreak = function () {\n outputString += '\\n'\n }\n\n addDelayedSpaceOrLineBreak = function () {\n // A line break is more important than a space.\n if (needsLineBreak) {\n addLineBreak()\n addIndent()\n } else if (needsSpace) {\n outputString += ' '\n }\n needsSpace = needsLineBreak = false\n }\n } else {\n addLineBreak = addDelayedSpaceOrLineBreak = noop\n }\n\n let addStandaloneComment\n let tryAddingInlineComment\n if (pruneComments) {\n addStandaloneComment = tryAddingInlineComment = noop\n } else {\n if (prettyPrint) {\n addStandaloneComment = function () {\n // If a comment is not appended to the end of a line, it will start\n // on a new line with the current indentation.\n if (!addedLineBreak && tokenIndex > 0) {\n addLineBreak()\n addIndent()\n }\n outputString += tokenContent\n foundLineBreak = false\n addedLineBreak = false\n // If a comment is not appended to the end of a line, it will take\n // the whole line and has to end by a line break.\n needsLineBreak = true\n }\n\n tryAddingInlineComment = function () {\n // This function is called after printing a non-line-break character.\n foundLineBreak = false\n addedLineBreak = false\n addedSpace = false\n\n // Start with the character after the just processed one.\n let tryTokenIndex = tokenIndex + 1\n\n function skipWhitespace () {\n let token = tokens[tryTokenIndex]\n if (token && token.type === 'whitespace') {\n foundLineBreak = token.raw.indexOf('\\n') >= 0\n token = tokens[++tryTokenIndex]\n }\n return token\n }\n\n const token = skipWhitespace()\n // If line break followed the previous token, leave the comment\n // to be handled by the next usual token processing.\n if (!foundLineBreak && token && token.type === 'comment') {\n if (needsLineBreak) {\n // If the previous non-whitespace token was ended by a line\n // break, retain it. Print the comment after the line break too.\n if (!addedLineBreak) {\n addLineBreak()\n addIndent()\n }\n } else {\n // If the previous non-whitespace token was not ended by a line\n // break, ensure that the comment is separated from it.\n if (!addedSpace) {\n outputString += ' '\n }\n }\n outputString += token.raw\n // Set the current token to the just processed comment.\n tokenIndex = tryTokenIndex++\n // Check the whitespace after the comment to give a hint\n // about the next whitespace to the further processing.\n skipWhitespace()\n if (foundLineBreak) {\n needsSpace = false\n needsLineBreak = true\n } else {\n needsSpace = true\n needsLineBreak = false\n }\n }\n }\n } else {\n // If all whitespace is omitted, convert single-line comments\n // to multi-line ones, which include a comment-closing token.\n addStandaloneComment = function () {\n if (tokenContent[1] === '/') {\n outputString += '/*'\n outputString += tokenContent.substr(2, tokenContent.length - 2)\n outputString += ' */'\n } else {\n outputString += tokenContent\n }\n }\n\n tryAddingInlineComment = noop\n }\n }\n\n function addLiteral () {\n addDelayedSpaceOrLineBreak()\n const tokenValue = token.value\n if (stripObjectKeys && scopeType === '{' && !isValue &&\n isIdentifierName(tokenValue)) {\n outputString += tokenValue\n } else if (typeof tokenValue === 'string') {\n if (enforceDoubleQuotes && tokenContent[0] !== '\"') {\n outputString += JSON.stringify(tokenValue)\n } else if (enforceSingleQuotes && tokenContent[0] !== '\\'') {\n outputString += `\\'${tokenValue.replace(/'/g, '\\\\\\'')}\\'`\n } else {\n outputString += tokenContent\n }\n } else {\n outputString += tokenContent\n }\n tryAddingInlineComment()\n }\n\n function openScope () {\n addDelayedSpaceOrLineBreak()\n scopes.push(scopeType)\n scopeType = tokenContent\n isValue = scopeType === '['\n outputString += tokenContent\n tryAddingInlineComment()\n ++indentLevel\n needsLineBreak = true\n }\n\n function closeScope () {\n scopeType = scopes.pop()\n addLineBreak()\n --indentLevel\n addIndent()\n needsSpace = needsLineBreak = false\n outputString += tokenContent\n tryAddingInlineComment()\n }\n\n function addComma () {\n if (trimTrailingCommas) {\n const nextToken = peekAtNextToken()\n if (nextToken && nextToken.type === 'symbol') {\n return tryAddingInlineComment()\n }\n }\n addDelayedSpaceOrLineBreak()\n outputString += ','\n tryAddingInlineComment()\n addLineBreak()\n addIndent()\n addedLineBreak = true\n needsLineBreak = false\n isValue = scopeType === '['\n }\n\n function addColon () {\n addDelayedSpaceOrLineBreak()\n outputString += ':'\n needsSpace = true\n tryAddingInlineComment()\n isValue = true\n }\n\n for (tokenIndex = 0; tokenIndex < tokenCount; ++tokenIndex) {\n token = tokens[tokenIndex]\n tokenType = token.type\n tokenContent = token.raw\n switch (tokenType) {\n case 'literal':\n addLiteral()\n break\n case 'comment':\n addStandaloneComment()\n break\n case 'symbol':\n switch (tokenContent) {\n case '{':\n case '[':\n openScope()\n break\n case '}':\n case ']':\n closeScope()\n break\n case ',':\n addComma()\n break\n case ':':\n addColon()\n }\n break\n default: // whitespace\n foundLineBreak = tokenContent.indexOf('\\n') >= 0\n }\n }\n\n return outputString\n }\n\n exports.print = print\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
+ "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,OAAO,SAAY,UAAY,OAAO,OAAW,IAAcA,EAAQ,OAAO,EAC1E,OAAO,QAAW,YAAc,OAAO,IAAM,OAAO,mBAAoB,CAAC,SAAS,EAAGA,CAAO,GACzFD,EAASA,GAAU,KAAMC,EAAQD,EAAO,gBAAkB,CAAC,CAAC,EACrE,GAAE,KAAM,SAAUE,EAAS,CACzB,aAEA,SAASC,GAAQ,CAAC,CAElB,SAASC,EAAkBC,EAAO,CAChC,MAAO,6BAA6B,KAAKA,CAAK,CAChD,CAEA,SAASC,EAAmBC,EAAQ,CAClC,IAAIC,EAAe,GACnB,MAAMC,EAAaF,EAAO,OAC1B,IAAIG,EACJ,IAAKA,EAAa,EAAGA,EAAaD,EAAY,EAAEC,EAC9CF,GAAgBD,EAAOG,CAAU,EAAE,IAErC,OAAOF,CACT,CAEA,SAASG,EAAOJ,EAAQK,EAAS,CAC/B,GAAI,CAAEL,GAAQ,OACZ,MAAM,IAAI,MAAM,sBAAsB,EAGxC,GAAI,CAAEA,EAAO,CAAC,GAAG,IACf,MAAM,IAAI,MAAM,8BAA8B,EAGhD,GAAI,CAACK,EAGH,OAAON,EAAkBC,CAAM,EAGjC,IAAIM,EAAeD,EAAQ,OACvB,OAAOC,GAAiB,WAC1BA,EAAe,IAAI,MAAMA,EAAe,CAAC,EAAE,KAAK,GAAG,GAIrD,MAAMC,EAAcD,IAAiB,OAC/BE,EAAgBH,EAAQ,cACxBI,EAAkBJ,EAAQ,gBAC1BK,EAAsBL,EAAQ,oBA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,EAC3B9B,GAAgB,IAChBgC,EAAuB,EACvBH,EAAa,EACbF,EAAU,EACVd,EAAiB,GACjBC,EAAiB,GACjBM,EAAUD,IAAc,GAC1B,CAEA,SAASqB,GAAY,CACnBV,EAA2B,EAC3B9B,GAAgB,IAChBgB,EAAa,GACbgB,EAAuB,EACvBZ,EAAU,EACZ,CAEA,IAAKlB,EAAa,EAAGA,EAAaD,EAAY,EAAEC,EAI9C,OAHAmB,EAAQtB,EAAOG,CAAU,EACzBoB,EAAYD,EAAM,KAClBE,EAAeF,EAAM,IACbC,EAAW,CACjB,IAAK,UACHa,EAAW,EACX,MACF,IAAK,UACHJ,EAAqB,EACrB,MACF,IAAK,SACH,OAAQR,EAAc,CACpB,IAAK,IACL,IAAK,IACHc,EAAU,EACV,MACF,IAAK,IACL,IAAK,IACHC,EAAW,EACX,MACF,IAAK,IACHC,EAAS,EACT,MACF,IAAK,IACHC,EAAS,CACb,CACA,MACF,QACE5B,EAAiBW,EAAa,QAAQ;AAAA,CAAI,GAAK,CACnD,CAGF,OAAOvB,CACT,CAEAN,EAAQ,MAAQS,EAEhB,OAAO,eAAeT,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
6
  "names": ["global", "factory", "exports", "noop", "isIdentifierName", "value", "concatenateTokens", "tokens", "outputString", "tokenCount", "tokenIndex", "print", "options", "indentString", "prettyPrint", "pruneComments", "stripObjectKeys", "enforceDoubleQuotes", "enforceSingleQuotes", "trimTrailingCommas", "foundLineBreak", "addedLineBreak", "needsLineBreak", "addedSpace", "needsSpace", "indentLevel", "scopes", "scopeType", "isValue", "token", "tokenType", "tokenContent", "peekAtNextToken", "nextTokenIndex", "nextToken", "addIndent", "i", "addLineBreak", "addDelayedSpaceOrLineBreak", "addStandaloneComment", "tryAddingInlineComment", "tryTokenIndex", "skipWhitespace", "addLiteral", "tokenValue", "openScope", "closeScope", "addComma", "addColon"]
7
7
  }
package/web/sorter.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define("jsonlint-sorter",["exports"],n):(r=r||self,n(r.jsonlintSorter={}))})(this,function(r){"use strict";const n=Object.prototype.hasOwnProperty;function s(t){if(Array.isArray(t))return t.map(s);if(Object.prototype.toString.call(t)!=="[object Object]")return t;const i={};let e;const o=[];for(e in t)n.call(t,e)&&o.push(e);for(o.sort(),e=0;e<o.length;e++)i[o[e]]=s(t[o[e]]);return i}r.sortObject=s,Object.defineProperty(r,"__esModule",{value:!0})});
1
+ (function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define("jsonlint-sorter",["exports"],i):(o=o||self,i(o.jsonlintSorter={}))})(this,function(o){"use strict";const i=Object.prototype.hasOwnProperty;function p(e,{ignoreCase:u,locale:f,caseFirst:c,numeric:d}={}){if(Array.isArray(e))return e.map(p);if(Object.prototype.toString.call(e)!=="[object Object]")return e;const j={};let t;const n=[];for(t in e)i.call(e,t)&&n.push(t);if(f||c||d){f==="default"&&(f=void 0);const r={caseFirst:c,numeric:d};u&&(r.sensitivity="accent"),n.sort((s,y)=>s.localeCompare(y,f,r))}else u?n.sort((r,s)=>(r=r.toLowerCase(),s=s.toLowerCase(),r<s?-1:r>s?1:0)):n.sort();for(t=0;t<n.length;t++)j[n[t]]=p(e[n[t]]);return j}o.sortObject=p,Object.defineProperty(o,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=sorter.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/sorter.js"],
4
- "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)\n : typeof define === 'function' && define.amd ? define('jsonlint-sorter', ['exports'], factory)\n : (global = global || self, factory(global.jsonlintSorter = {}))\n}(this, function (exports) {\n 'use strict'\n\n // from http://stackoverflow.com/questions/1359761/sorting-a-json-object-in-javascript\n const hasOwnProperty = Object.prototype.hasOwnProperty\n function sortObject (o) {\n if (Array.isArray(o)) {\n return o.map(sortObject)\n } else if (Object.prototype.toString.call(o) !== '[object Object]') {\n return o\n }\n const sorted = {}\n let key\n const a = []\n for (key in o) {\n if (hasOwnProperty.call(o, key)) {\n a.push(key)\n }\n }\n a.sort()\n for (key = 0; key < a.length; key++) {\n sorted[a[key]] = sortObject(o[a[key]])\n }\n return sorted\n }\n\n exports.sortObject = sortObject\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
- "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,OAAO,SAAY,UAAY,OAAO,OAAW,IAAcA,EAAQ,OAAO,EAC1E,OAAO,QAAW,YAAc,OAAO,IAAM,OAAO,kBAAmB,CAAC,SAAS,EAAGA,CAAO,GACxFD,EAASA,GAAU,KAAMC,EAAQD,EAAO,eAAiB,CAAC,CAAC,EACpE,GAAE,KAAM,SAAUE,EAAS,CACzB,aAGA,MAAMC,EAAiB,OAAO,UAAU,eACxC,SAASC,EAAYC,EAAG,CACtB,GAAI,MAAM,QAAQA,CAAC,EACjB,OAAOA,EAAE,IAAID,CAAU,EAClB,GAAI,OAAO,UAAU,SAAS,KAAKC,CAAC,IAAM,kBAC/C,OAAOA,EAET,MAAMC,EAAS,CAAC,EAChB,IAAIC,EACJ,MAAMC,EAAI,CAAC,EACX,IAAKD,KAAOF,EACNF,EAAe,KAAKE,EAAGE,CAAG,GAC5BC,EAAE,KAAKD,CAAG,EAId,IADAC,EAAE,KAAK,EACFD,EAAM,EAAGA,EAAMC,EAAE,OAAQD,IAC5BD,EAAOE,EAAED,CAAG,CAAC,EAAIH,EAAWC,EAAEG,EAAED,CAAG,CAAC,CAAC,EAEvC,OAAOD,CACT,CAEAJ,EAAQ,WAAaE,EAErB,OAAO,eAAeF,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
- "names": ["global", "factory", "exports", "hasOwnProperty", "sortObject", "o", "sorted", "key", "a"]
4
+ "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)\n : typeof define === 'function' && define.amd ? define('jsonlint-sorter', ['exports'], factory)\n : (global = global || self, factory(global.jsonlintSorter = {}))\n}(this, function (exports) {\n 'use strict'\n\n // from http://stackoverflow.com/questions/1359761/sorting-a-json-object-in-javascript\n const ownsProperty = Object.prototype.hasOwnProperty\n function sortObject (o, { ignoreCase, locale, caseFirst, numeric } = {}) {\n if (Array.isArray(o)) {\n return o.map(sortObject)\n }if (Object.prototype.toString.call(o) !== '[object Object]') {\n return o\n }\n const sorted = {}\n let key\n const a = []\n for (key in o) {\n if (ownsProperty.call(o, key)) {\n a.push(key)\n }\n }\n if (locale || caseFirst || numeric) {\n if (locale === 'default') {\n locale = undefined\n }\n const sortOptions = { caseFirst, numeric }\n if (ignoreCase) {\n sortOptions.sensitivity = 'accent'\n }\n a.sort((l, r) => l.localeCompare(r, locale, sortOptions))\n } else if (ignoreCase) {\n a.sort((l, r) => {\n l = l.toLowerCase()\n r = r.toLowerCase()\n return l < r ? -1 : l > r ? 1 : 0\n })\n } else {\n a.sort()\n }\n for (key = 0; key < a.length; key++) {\n sorted[a[key]] = sortObject(o[a[key]])\n }\n return sorted\n }\n\n exports.sortObject = sortObject\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
+ "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,OAAO,SAAY,UAAY,OAAO,OAAW,IAAcA,EAAQ,OAAO,EAC1E,OAAO,QAAW,YAAc,OAAO,IAAM,OAAO,kBAAmB,CAAC,SAAS,EAAGA,CAAO,GACxFD,EAASA,GAAU,KAAMC,EAAQD,EAAO,eAAiB,CAAC,CAAC,EACpE,GAAE,KAAM,SAAUE,EAAS,CACzB,aAGA,MAAMC,EAAe,OAAO,UAAU,eACtC,SAASC,EAAYC,EAAG,CAAE,WAAAC,EAAY,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,CAAQ,EAAI,CAAC,EAAG,CACvE,GAAI,MAAM,QAAQJ,CAAC,EACjB,OAAOA,EAAE,IAAID,CAAU,EACxB,GAAI,OAAO,UAAU,SAAS,KAAKC,CAAC,IAAM,kBACzC,OAAOA,EAET,MAAMK,EAAS,CAAC,EAChB,IAAIC,EACJ,MAAMC,EAAI,CAAC,EACX,IAAKD,KAAON,EACNF,EAAa,KAAKE,EAAGM,CAAG,GAC1BC,EAAE,KAAKD,CAAG,EAGd,GAAIJ,GAAUC,GAAaC,EAAS,CAC9BF,IAAW,YACbA,EAAS,QAEX,MAAMM,EAAc,CAAE,UAAAL,EAAW,QAAAC,CAAQ,EACrCH,IACFO,EAAY,YAAc,UAE5BD,EAAE,KAAK,CAACE,EAAGC,IAAMD,EAAE,cAAcC,EAAGR,EAAQM,CAAW,CAAC,CAC1D,MAAWP,EACTM,EAAE,KAAK,CAACE,EAAGC,KACTD,EAAIA,EAAE,YAAY,EAClBC,EAAIA,EAAE,YAAY,EACXD,EAAIC,EAAI,GAAKD,EAAIC,EAAI,EAAI,EACjC,EAEDH,EAAE,KAAK,EAET,IAAKD,EAAM,EAAGA,EAAMC,EAAE,OAAQD,IAC5BD,EAAOE,EAAED,CAAG,CAAC,EAAIP,EAAWC,EAAEO,EAAED,CAAG,CAAC,CAAC,EAEvC,OAAOD,CACT,CAEAR,EAAQ,WAAaE,EAErB,OAAO,eAAeF,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
+ "names": ["global", "factory", "exports", "ownsProperty", "sortObject", "o", "ignoreCase", "locale", "caseFirst", "numeric", "sorted", "key", "a", "sortOptions", "l", "r"]
7
7
  }
@@ -1,4 +1,4 @@
1
- (function(j,f){if(typeof exports=="object"&&typeof module<"u"){const c=require("./jsonlint"),l={Ajv04:"ajv-draft-04",Ajv07:"ajv",AjvJTD:"ajv/dist/jtd",Ajv2019:"ajv/dist/2019",Ajv2020:"ajv/dist/2020",Schema06:"ajv/dist/refs/json-schema-draft-06.json"},d=g=>{const u=require(l[g]);return!u.$schema&&u.default||u};f(exports,c,d)}else if(typeof define=="function"&&define.amd)define("jsonlint-validator",["exports","jsonlint","ajv"],function(c,l,d){f(c,l,u=>{const m=d[u];return!m.$schema&&m.default||m})});else{j=j||self;const c=l=>{const d=j.ajv[l];return!d.$schema&&d.default||d};f(j.jsonlintValidator={},j.jsonlint,c)}})(this,function(j,f,c){"use strict";function l(e,s,t,a){const i=t.find(function(o){return a===f.pathToPointer(o.path)});if(i){const o=i.location.start,r=o.offset,n=o.line,h=o.column,S=f.getErrorTexts(e.reason,s,r,n,h);return e.message=S.message,e.excerpt=S.excerpt,S.pointer&&(e.pointer=S.pointer,e.location={start:{column:h,line:n,offset:r}}),!0}}function d(e,s,t){const a=e.dataPath,i=e.schemaPath,o=(a||"/")+" "+e.message+"; see "+i,r={reason:o,dataPath:a,schemaPath:i};return l(r,s,t,a)||(r.message=o),r}function g(e,s,t,a){t||(t=JSON.stringify(s,void 0,2)),a||(a={}),Object.assign(a,{tokenLocations:!0,tokenPaths:!0});const i=f.tokenize(t,a),o=d(e[0],t,i),r=new SyntaxError(o.message);return Object.assign(r,o),r}function u(e){let s;if(!e||e==="json-schema-draft-06"||e==="draft-06"){const t=c("Ajv07");s=new t,s.addMetaSchema(c("Schema06"))}else if(e==="json-schema-draft-07"||e==="draft-07"){const t=c("Ajv07");s=new t}else if(e==="json-schema-draft-04"||e==="draft-04"){const t=c("Ajv04");s=new t}else if(e==="json-schema-draft-2019-09"||e==="draft-2019-09"){const t=c("Ajv2019");s=new t}else if(e==="json-schema-draft-2020-12"||e==="draft-2020-12"){const t=c("Ajv2020");s=new t}else if(e==="json-type-definition"||e==="jtd"||e==="rfc8927"){const t=c("AjvJTD");s=new t}else throw new RangeError(`Unsupported environment for the JSON Schema validation: "${e}".`);return s}function m(e,s,t){Array.isArray(s)||(s=[s]);const[a,...i]=s.map((o,r)=>{if(typeof o!="string")return o;try{return f.parse(o,t)}catch(n){throw n.message=`Parsing the JSON Schema #${r+1} failed.
1
+ (function(j,f){if(typeof exports=="object"&&typeof module<"u"){const c=require("./jsonlint"),l={Ajv04:"ajv-draft-04",Ajv07:"ajv",AjvJTD:"ajv/dist/jtd",Ajv2019:"ajv/dist/2019",Ajv2020:"ajv/dist/2020",Schema06:"ajv/dist/refs/json-schema-draft-06.json"},d=g=>{const u=require(l[g]);return!u.$schema&&u.default||u};f(exports,c,d)}else if(typeof define=="function"&&define.amd)define("jsonlint-validator",["exports","jsonlint","ajv"],function(c,l,d){f(c,l,u=>{const m=d[u];return!m.$schema&&m.default||m})});else{j=j||self;const c=l=>{const d=j.ajv[l];return!d.$schema&&d.default||d};f(j.jsonlintValidator={},j.jsonlint,c)}})(this,function(j,f,c){"use strict";function l(e,s,t,a){const i=t.find(function(o){return a===f.pathToPointer(o.path)});if(i){const o=i.location.start,r=o.offset,n=o.line,h=o.column,S=f.getErrorTexts(e.reason,s,r,n,h);return e.message=S.message,e.excerpt=S.excerpt,S.pointer&&(e.pointer=S.pointer,e.location={start:{column:h,line:n,offset:r}}),!0}}function d(e,s,t){const a=e.dataPath,i=e.schemaPath,o=`${a||"/"} ${e.message}; see ${i}`,r={reason:o,dataPath:a,schemaPath:i};return l(r,s,t,a)||(r.message=o),r}function g(e,s,t,a){t||(t=JSON.stringify(s,void 0,2)),a||(a={}),Object.assign(a,{tokenLocations:!0,tokenPaths:!0});const i=f.tokenize(t,a),o=d(e[0],t,i),r=new SyntaxError(o.message);return Object.assign(r,o),r}function u(e){let s;if(!e||e==="json-schema-draft-06"||e==="draft-06"){const t=c("Ajv07");s=new t,s.addMetaSchema(c("Schema06"))}else if(e==="json-schema-draft-07"||e==="draft-07"){const t=c("Ajv07");s=new t}else if(e==="json-schema-draft-04"||e==="draft-04"){const t=c("Ajv04");s=new t}else if(e==="json-schema-draft-2019-09"||e==="draft-2019-09"){const t=c("Ajv2019");s=new t}else if(e==="json-schema-draft-2020-12"||e==="draft-2020-12"){const t=c("Ajv2020");s=new t}else if(e==="json-type-definition"||e==="jtd"||e==="rfc8927"){const t=c("AjvJTD");s=new t}else throw new RangeError(`Unsupported environment for the JSON Schema validation: "${e}".`);return s}function m(e,s,t){Array.isArray(s)||(s=[s]);const[a,...i]=s.map((o,r)=>{if(typeof o!="string")return o;try{return f.parse(o,t)}catch(n){throw n.message=`Parsing the JSON Schema #${r+1} failed.
2
2
  ${n.message}`,n}});try{for(const o of i)e.addSchema(o);return e.compile(a)}catch(o){const r=e.errors,n=r?g(r,parsed,s,t):o;throw n.message=`Compiling the JSON Schema failed.
3
3
  ${n.message}`,n}}function A(e,s){let t={};typeof s=="object"&&!(s instanceof String)&&(t=s,s=t.environment);const a=u(s),i={mode:t.mode,ignoreBOM:t.ignoreBOM,ignoreComments:t.ignoreComments,ignoreTrailingCommas:t.ignoreTrailingCommas,allowSingleQuotedStrings:t.allowSingleQuotedStrings,allowDuplicateObjectKeys:t.allowDuplicateObjectKeys},o=m(a,e,i);return function(r,n,h){if(typeof r=="string"||r instanceof String?(h=n,n=r,r=f.parse(n,h)):typeof n=="string"||n instanceof String||(h=n,n=void 0),o(r))return r;throw g(o.errors,r,n,h)}}j.compile=A,Object.defineProperty(j,"__esModule",{value:!0})});
4
4
  //# sourceMappingURL=validator.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/validator.js"],
4
- "sourcesContent": ["(function (global, factory) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n const jsonlint = require('./jsonlint')\n const ajv = {\n Ajv04: 'ajv-draft-04',\n Ajv07: 'ajv',\n AjvJTD: 'ajv/dist/jtd',\n Ajv2019: 'ajv/dist/2019',\n Ajv2020: 'ajv/dist/2020',\n Schema06: 'ajv/dist/refs/json-schema-draft-06.json'\n }\n const requireAjv = name => {\n const exported = require(ajv[name])\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n } else if (typeof define === 'function' && define.amd) {\n define('jsonlint-validator', ['exports', 'jsonlint', 'ajv'],\n function (exports, jsonlint, ajv) {\n const requireAjv = name => {\n const exported = ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n })\n } else {\n global = global || self\n const requireAjv = name => {\n const exported = global.ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(global.jsonlintValidator = {}, global.jsonlint, requireAjv)\n }\n}(this, function (exports, jsonlint, requireAjv) {\n 'use strict'\n\n function addErrorLocation (problem, input, tokens, dataPath) {\n const token = tokens.find(function (token) {\n return dataPath === jsonlint.pathToPointer(token.path)\n })\n if (token) {\n const location = token.location.start\n const offset = location.offset\n const line = location.line\n const column = location.column\n const texts = jsonlint.getErrorTexts(problem.reason, input, offset, line, column)\n problem.message = texts.message\n problem.excerpt = texts.excerpt\n if (texts.pointer) {\n problem.pointer = texts.pointer\n problem.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return true\n }\n }\n\n function errorToProblem (error, input, tokens) {\n const dataPath = error.dataPath\n const schemaPath = error.schemaPath\n const reason = (dataPath || '/') + ' ' + error.message + '; see ' + schemaPath\n const problem = {\n reason,\n dataPath,\n schemaPath\n }\n if (!addErrorLocation(problem, input, tokens, dataPath)) {\n problem.message = reason\n }\n return problem\n }\n\n function createError (errors, data, input, options) {\n if (!input) {\n input = JSON.stringify(data, undefined, 2)\n }\n if (!options) {\n options = {}\n }\n Object.assign(options, {\n tokenLocations: true,\n tokenPaths: true\n })\n const tokens = jsonlint.tokenize(input, options)\n // var problems = errors.map(function (error) {\n // return errorToProblem(error, input, tokens)\n // })\n // var message = problems\n // .map(function (problem) {\n // return problem.message\n // })\n // .join('\\n')\n const problem = errorToProblem(errors[0], input, tokens)\n const error = new SyntaxError(problem.message)\n Object.assign(error, problem)\n return error\n }\n\n function createAjv (environment) {\n let ajv\n if (!environment || environment === 'json-schema-draft-06' || environment === 'draft-06') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n ajv.addMetaSchema(requireAjv('Schema06'))\n } else if (environment === 'json-schema-draft-07' || environment === 'draft-07') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-04' || environment === 'draft-04') {\n const Ajv = requireAjv('Ajv04')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2019-09' || environment === 'draft-2019-09') {\n const Ajv = requireAjv('Ajv2019')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2020-12' || environment === 'draft-2020-12') {\n const Ajv = requireAjv('Ajv2020')\n ajv = new Ajv()\n } else if (environment === 'json-type-definition' || environment === 'jtd' || environment === 'rfc8927') {\n const Ajv = requireAjv('AjvJTD')\n ajv = new Ajv()\n } else {\n throw new RangeError(`Unsupported environment for the JSON Schema validation: \"${environment}\".`)\n }\n return ajv\n }\n\n function compileSchema (ajv, schema, parseOptions) {\n if (!Array.isArray(schema)) schema = [schema]\n const [main, ...others] = schema.map((schema, index) => {\n if (typeof schema !== 'string') return schema\n try {\n return jsonlint.parse(schema, parseOptions)\n } catch (error) {\n error.message = `Parsing the JSON Schema #${index + 1} failed.\\n${error.message}`\n throw error\n }\n })\n try {\n for (const schema of others) {\n ajv.addSchema(schema)\n }\n return ajv.compile(main)\n } catch (originalError) {\n const errors = ajv.errors\n const betterError = errors\n ? createError(errors, parsed, schema, parseOptions)\n : originalError\n betterError.message = `Compiling the JSON Schema failed.\\n${betterError.message}`\n throw betterError\n }\n }\n\n function compile (schema, environment) {\n let options = {}\n if (typeof environment === 'object' && !(environment instanceof String)) {\n options = environment\n environment = options.environment\n }\n const ajv = createAjv(environment)\n const parseOptions = {\n mode: options.mode,\n ignoreBOM: options.ignoreBOM,\n ignoreComments: options.ignoreComments,\n ignoreTrailingCommas: options.ignoreTrailingCommas,\n allowSingleQuotedStrings: options.allowSingleQuotedStrings,\n allowDuplicateObjectKeys: options.allowDuplicateObjectKeys\n }\n const validate = compileSchema(ajv, schema, parseOptions)\n return function (data, input, options) {\n if (typeof data === 'string' || data instanceof String) {\n options = input\n input = data\n data = jsonlint.parse(input, options)\n } else if (!(typeof input === 'string' || input instanceof String)) {\n options = input\n input = undefined\n }\n if (validate(data)) {\n return data\n }\n throw createError(validate.errors, data, input, options)\n }\n }\n\n exports.compile = compile\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
- "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,GAAI,OAAO,SAAY,UAAY,OAAO,OAAW,IAAa,CAChE,MAAMC,EAAW,QAAQ,YAAY,EAC/BC,EAAM,CACV,MAAO,eACP,MAAO,MACP,OAAQ,eACR,QAAS,gBACT,QAAS,gBACT,SAAU,yCACZ,EACMC,EAAaC,GAAQ,CACzB,MAAMC,EAAW,QAAQH,EAAIE,CAAI,CAAC,EAClC,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,EACAL,EAAQ,QAASC,EAAUE,CAAU,UAC5B,OAAO,QAAW,YAAc,OAAO,IAChD,OAAO,qBAAsB,CAAC,UAAW,WAAY,KAAK,EACxD,SAAUG,EAASL,EAAUC,EAAK,CAKhCF,EAAQM,EAASL,EAJEG,GAAQ,CACzB,MAAMC,EAAWH,EAAIE,CAAI,EACzB,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,CACqC,CACvC,CAAC,MACE,CACLN,EAASA,GAAU,KACnB,MAAMI,EAAaC,GAAQ,CACzB,MAAMC,EAAWN,EAAO,IAAIK,CAAI,EAChC,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,EACAL,EAAQD,EAAO,kBAAoB,CAAC,EAAGA,EAAO,SAAUI,CAAU,EAEtE,GAAE,KAAM,SAAUG,EAASL,EAAUE,EAAY,CAC/C,aAEA,SAASI,EAAkBC,EAASC,EAAOC,EAAQC,EAAU,CAC3D,MAAMC,EAAQF,EAAO,KAAK,SAAUE,EAAO,CACzC,OAAOD,IAAaV,EAAS,cAAcW,EAAM,IAAI,CACvD,CAAC,EACD,GAAIA,EAAO,CACT,MAAMC,EAAWD,EAAM,SAAS,MAC1BE,EAASD,EAAS,OAClBE,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aAExB,MAAMvB,EAAMwB,EAAUC,CAAW,EAC3BI,EAAe,CACnB,KAAMN,EAAQ,KACd,UAAWA,EAAQ,UACnB,eAAgBA,EAAQ,eACxB,qBAAsBA,EAAQ,qBAC9B,yBAA0BA,EAAQ,yBAClC,yBAA0BA,EAAQ,wBACpC,EACMa,EAAWT,EAAc3B,EAAK4B,EAAQC,CAAY,EACxD,OAAO,SAAUP,EAAMf,EAAOgB,EAAS,CASrC,GARI,OAAOD,GAAS,UAAYA,aAAgB,QAC9CC,EAAUhB,EACVA,EAAQe,EACRA,EAAOvB,EAAS,MAAMQ,EAAOgB,CAAO,GACzB,OAAOhB,GAAU,UAAYA,aAAiB,SACzDgB,EAAUhB,EACVA,EAAQ,QAEN6B,EAASd,CAAI,EACf,OAAOA,EAET,MAAMF,EAAYgB,EAAS,OAAQd,EAAMf,EAAOgB,CAAO,CACzD,CACF,CAEAnB,EAAQ,QAAU+B,EAElB,OAAO,eAAe/B,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
4
+ "sourcesContent": ["(function (global, factory) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n const jsonlint = require('./jsonlint')\n const ajv = {\n Ajv04: 'ajv-draft-04',\n Ajv07: 'ajv',\n AjvJTD: 'ajv/dist/jtd',\n Ajv2019: 'ajv/dist/2019',\n Ajv2020: 'ajv/dist/2020',\n Schema06: 'ajv/dist/refs/json-schema-draft-06.json'\n }\n const requireAjv = name => {\n const exported = require(ajv[name])\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n } else if (typeof define === 'function' && define.amd) {\n define('jsonlint-validator', ['exports', 'jsonlint', 'ajv'],\n function (exports, jsonlint, ajv) {\n const requireAjv = name => {\n const exported = ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n })\n } else {\n global = global || self\n const requireAjv = name => {\n const exported = global.ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(global.jsonlintValidator = {}, global.jsonlint, requireAjv)\n }\n}(this, function (exports, jsonlint, requireAjv) {\n 'use strict'\n\n function addErrorLocation (problem, input, tokens, dataPath) {\n const token = tokens.find(function (token) {\n return dataPath === jsonlint.pathToPointer(token.path)\n })\n if (token) {\n const location = token.location.start\n const offset = location.offset\n const line = location.line\n const column = location.column\n const texts = jsonlint.getErrorTexts(problem.reason, input, offset, line, column)\n problem.message = texts.message\n problem.excerpt = texts.excerpt\n if (texts.pointer) {\n problem.pointer = texts.pointer\n problem.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return true\n }\n }\n\n function errorToProblem (error, input, tokens) {\n const dataPath = error.dataPath\n const schemaPath = error.schemaPath\n const reason = `${dataPath || '/'} ${error.message}; see ${schemaPath}`\n const problem = {\n reason,\n dataPath,\n schemaPath\n }\n if (!addErrorLocation(problem, input, tokens, dataPath)) {\n problem.message = reason\n }\n return problem\n }\n\n function createError (errors, data, input, options) {\n if (!input) {\n input = JSON.stringify(data, undefined, 2)\n }\n if (!options) {\n options = {}\n }\n Object.assign(options, {\n tokenLocations: true,\n tokenPaths: true\n })\n const tokens = jsonlint.tokenize(input, options)\n // var problems = errors.map(function (error) {\n // return errorToProblem(error, input, tokens)\n // })\n // var message = problems\n // .map(function (problem) {\n // return problem.message\n // })\n // .join('\\n')\n const problem = errorToProblem(errors[0], input, tokens)\n const error = new SyntaxError(problem.message)\n Object.assign(error, problem)\n return error\n }\n\n function createAjv (environment) {\n let ajv\n if (!environment || environment === 'json-schema-draft-06' || environment === 'draft-06') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n ajv.addMetaSchema(requireAjv('Schema06'))\n } else if (environment === 'json-schema-draft-07' || environment === 'draft-07') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-04' || environment === 'draft-04') {\n const Ajv = requireAjv('Ajv04')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2019-09' || environment === 'draft-2019-09') {\n const Ajv = requireAjv('Ajv2019')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2020-12' || environment === 'draft-2020-12') {\n const Ajv = requireAjv('Ajv2020')\n ajv = new Ajv()\n } else if (environment === 'json-type-definition' || environment === 'jtd' || environment === 'rfc8927') {\n const Ajv = requireAjv('AjvJTD')\n ajv = new Ajv()\n } else {\n throw new RangeError(`Unsupported environment for the JSON Schema validation: \"${environment}\".`)\n }\n return ajv\n }\n\n function compileSchema (ajv, schema, parseOptions) {\n if (!Array.isArray(schema)) schema = [schema]\n const [main, ...others] = schema.map((schema, index) => {\n if (typeof schema !== 'string') return schema\n try {\n return jsonlint.parse(schema, parseOptions)\n } catch (error) {\n error.message = `Parsing the JSON Schema #${index + 1} failed.\\n${error.message}`\n throw error\n }\n })\n try {\n for (const schema of others) {\n ajv.addSchema(schema)\n }\n return ajv.compile(main)\n } catch (originalError) {\n const errors = ajv.errors\n const betterError = errors\n ? createError(errors, parsed, schema, parseOptions)\n : originalError\n betterError.message = `Compiling the JSON Schema failed.\\n${betterError.message}`\n throw betterError\n }\n }\n\n function compile (schema, environment) {\n let options = {}\n if (typeof environment === 'object' && !(environment instanceof String)) {\n options = environment\n environment = options.environment\n }\n const ajv = createAjv(environment)\n const parseOptions = {\n mode: options.mode,\n ignoreBOM: options.ignoreBOM,\n ignoreComments: options.ignoreComments,\n ignoreTrailingCommas: options.ignoreTrailingCommas,\n allowSingleQuotedStrings: options.allowSingleQuotedStrings,\n allowDuplicateObjectKeys: options.allowDuplicateObjectKeys\n }\n const validate = compileSchema(ajv, schema, parseOptions)\n return function (data, input, options) {\n if (typeof data === 'string' || data instanceof String) {\n options = input\n input = data\n data = jsonlint.parse(input, options)\n } else if (!(typeof input === 'string' || input instanceof String)) {\n options = input\n input = undefined\n }\n if (validate(data)) {\n return data\n }\n throw createError(validate.errors, data, input, options)\n }\n }\n\n exports.compile = compile\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
+ "mappings": "CAAC,SAAUA,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A,EAAQ,UACnB,eAAgBA,EAAQ,eACxB,qBAAsBA,EAAQ,qBAC9B,yBAA0BA,EAAQ,yBAClC,yBAA0BA,EAAQ,wBACpC,EACMa,EAAWT,EAAc3B,EAAK4B,EAAQC,CAAY,EACxD,OAAO,SAAUP,EAAMf,EAAOgB,EAAS,CASrC,GARI,OAAOD,GAAS,UAAYA,aAAgB,QAC9CC,EAAUhB,EACVA,EAAQe,EACRA,EAAOvB,EAAS,MAAMQ,EAAOgB,CAAO,GACzB,OAAOhB,GAAU,UAAYA,aAAiB,SACzDgB,EAAUhB,EACVA,EAAQ,QAEN6B,EAASd,CAAI,EACf,OAAOA,EAET,MAAMF,EAAYgB,EAAS,OAAQd,EAAMf,EAAOgB,CAAO,CACzD,CACF,CAEAnB,EAAQ,QAAU+B,EAElB,OAAO,eAAe/B,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
6
  "names": ["global", "factory", "jsonlint", "ajv", "requireAjv", "name", "exported", "exports", "addErrorLocation", "problem", "input", "tokens", "dataPath", "token", "location", "offset", "line", "column", "texts", "errorToProblem", "error", "schemaPath", "reason", "createError", "errors", "data", "options", "createAjv", "environment", "Ajv", "compileSchema", "schema", "parseOptions", "main", "others", "index", "originalError", "betterError", "compile", "validate"]
7
7
  }
package/CHANGELOG.md DELETED
@@ -1,440 +0,0 @@
1
- ## [14.0.2](https://github.com/prantlf/jsonlint/compare/v14.0.1...v14.0.2) (2023-03-08)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * Recognise property "patterns" in the config file again ([2619904](https://github.com/prantlf/jsonlint/commit/2619904760c4f03fa0b93893ecaf8ccecff1d6ad)), closes [#18](https://github.com/prantlf/jsonlint/issues/18)
7
-
8
- ## [14.0.1](https://github.com/prantlf/jsonlint/compare/v14.0.0...v14.0.1) (2023-03-07)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * Prevent setting a constant variable ([c7e940c](https://github.com/prantlf/jsonlint/commit/c7e940c4d59b594bca3c32ff974c91b69d44feb6))
14
-
15
- # [14.0.0](https://github.com/prantlf/jsonlint/compare/v13.1.0...v14.0.0) (2023-03-05)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * Replace commander with hand-written command-line parser ([af0ea29](https://github.com/prantlf/jsonlint/commit/af0ea29c3f39ea713fc0bd72829678067a6c1fc0))
21
-
22
-
23
- ### BREAKING CHANGES
24
-
25
- * Although you shouldn't notice any change on the behaviour of the command line, something unexpected might've changed. Something did change: if you're annoyed by inserting "--" between the multi-value option and other arguments, you don't have to do it any more. Multi-value options can be entered either using the option prefix multiple times for each value, or using the option prefix just once and separating the values by commas.
26
-
27
- # [13.1.0](https://github.com/prantlf/jsonlint/compare/v13.0.1...v13.1.0) (2023-03-05)
28
-
29
-
30
- ### Features
31
-
32
- * Accept multiple schemas if external definitions are used ([32d1cab](https://github.com/prantlf/jsonlint/commit/32d1cabfc5cf00f23ec8d7b6b4a5b62e66924fa3))
33
-
34
- ## [13.0.1](https://github.com/prantlf/jsonlint/compare/v13.0.0...v13.0.1) (2023-03-05)
35
-
36
-
37
- ### Bug Fixes
38
-
39
- * Replace ajv@6 with ajv-draft-04 ([b1535a3](https://github.com/prantlf/jsonlint/commit/b1535a3ec24be7913f0005cdd617680c02086cdf))
40
-
41
- # [13.0.0](https://github.com/prantlf/jsonlint/compare/v12.0.0...v13.0.0) (2023-03-05)
42
-
43
-
44
- ### Features
45
-
46
- * Support JSON Schema drafts 2019-09 and 2020-12 and JSON Type Definition ([0b9130c](https://github.com/prantlf/jsonlint/commit/0b9130ceae5f6f27cbe3e6d65207127862ffe584))
47
-
48
-
49
- ### BREAKING CHANGES
50
-
51
- * The default environment recognises only JSON Schema drafts 06 and 07 automatically. Not 04 any more. The environment for JSON Schema drafts 04 has to be selected explicitly. Also, JSON Schema drafts 06 and 07 are handled by AJV@8 instead of AJV@6. It shouldn't make any difference, but the implementation is new and could perform a stricter validation.
52
-
53
- # [12.0.0](https://github.com/prantlf/jsonlint/compare/v11.7.2...v12.0.0) (2023-03-05)
54
-
55
-
56
- ### Bug Fixes
57
-
58
- * Upgrade dependencies and require Node.js 14 ([87205c2](https://github.com/prantlf/jsonlint/commit/87205c2427a0ebe0d791a4189b2b2346506601b3))
59
-
60
-
61
- ### BREAKING CHANGES
62
-
63
- * Dropped support for Node.js 12 . The minimum supported version is Node.js 14.
64
-
65
- ## [11.7.2](https://github.com/prantlf/jsonlint/compare/v11.7.1...v11.7.2) (2023-03-05)
66
-
67
-
68
- ### Bug Fixes
69
-
70
- * Use both typings and types in package.json ([5d00c00](https://github.com/prantlf/jsonlint/commit/5d00c00c7fd098674ee9d1f3dba14369debaa73b))
71
-
72
- ## [11.7.1](https://github.com/prantlf/jsonlint/compare/v11.7.0...v11.7.1) (2023-03-05)
73
-
74
-
75
- ### Bug Fixes
76
-
77
- * Complete TypeScript types ([7064c50](https://github.com/prantlf/jsonlint/commit/7064c5041a292a5a87bccc2de7fc945a2ee7c160))
78
-
79
- # [11.7.0](https://github.com/prantlf/jsonlint/compare/v11.6.0...v11.7.0) (2022-09-26)
80
-
81
-
82
- ### Bug Fixes
83
-
84
- * Upgrade npm dependencies ([81526ce](https://github.com/prantlf/jsonlint/commit/81526ce034cf52623dbca986cf9d450287fb104a))
85
-
86
-
87
- ### Features
88
-
89
- * Ignore the leading UTF-8 byte-order mark (BOM) ([311c6df](https://github.com/prantlf/jsonlint/commit/311c6df75963a5b6da3984ba85541b800d751939))
90
-
91
- # [11.6.0](https://github.com/prantlf/jsonlint/compare/v11.5.0...v11.6.0) (2022-05-04)
92
-
93
-
94
- ### Bug Fixes
95
-
96
- * Do not generate text diff if not needed ([0423a4b](https://github.com/prantlf/jsonlint/commit/0423a4b1fbc10cb6a201fe79e29a2b0e0101f3d0))
97
-
98
-
99
- ### Features
100
-
101
- * Allow setting the line count as diff context ([9b22843](https://github.com/prantlf/jsonlint/commit/9b22843a93ec47c0e18b1833618072083989b431))
102
-
103
- # [11.5.0](https://github.com/prantlf/jsonlint/compare/v11.4.0...v11.5.0) (2022-05-03)
104
-
105
-
106
- ### Bug Fixes
107
-
108
- * Do not print file names twice in the compact mode ([86691cc](https://github.com/prantlf/jsonlint/commit/86691cc5fea760a437cae5aff71f0acc987c4e05))
109
-
110
-
111
- ### Features
112
-
113
- * Add option "diff" to print the difference instead of the output ([cb3826c](https://github.com/prantlf/jsonlint/commit/cb3826c7610aae8d23623da3693e45cbf942223e))
114
-
115
- # [11.4.0](https://github.com/prantlf/jsonlint/compare/v11.3.0...v11.4.0) (2022-05-03)
116
-
117
-
118
- ### Features
119
-
120
- * Introduce a check that the formatted output is the same as the input ([75167f7](https://github.com/prantlf/jsonlint/commit/75167f76c4bbd13551ca7e20824cc05095fc6be0))
121
-
122
- # [11.3.0](https://github.com/prantlf/jsonlint/compare/v11.2.0...v11.3.0) (2022-05-03)
123
-
124
-
125
- ### Bug Fixes
126
-
127
- * Fix the regex splitting input by line breaks ([7423806](https://github.com/prantlf/jsonlint/commit/74238065643d31044990801713410041cdbb55f0))
128
-
129
-
130
- ### Features
131
-
132
- * Read options from configuration files ([7eebd76](https://github.com/prantlf/jsonlint/commit/7eebd765f66bcd3bcd6cde7d9c128cbacaca1285))
133
-
134
- # [11.2.0](https://github.com/prantlf/jsonlint/compare/v11.1.1...v11.2.0) (2022-05-01)
135
-
136
-
137
- ### Features
138
-
139
- * Allow logging only the name of processed files ([91346d9](https://github.com/prantlf/jsonlint/commit/91346d95459f5b516ae71233050262534f197fbf))
140
- * Allow to continue processing in case of error ([e5318eb](https://github.com/prantlf/jsonlint/commit/e5318ebb75f90459ff4164ec6e84efcc34a9bf4c))
141
- * Support BASH patterns to specify input files ([31d162f](https://github.com/prantlf/jsonlint/commit/31d162fa9578bd6888d01c3cd0175960b5740d86))
142
-
143
- ## [11.1.1](https://github.com/prantlf/jsonlint/compare/v11.1.0...v11.1.1) (2022-05-01)
144
-
145
-
146
- ### Bug Fixes
147
-
148
- * Retain the original last line break in the processed file ([54fd5ab](https://github.com/prantlf/jsonlint/commit/54fd5ab0349300c7bd11dfa6baf4e787e40bead9))
149
-
150
- # [11.1.0](https://github.com/prantlf/jsonlint/compare/v11.0.0...v11.1.0) (2022-05-01)
151
-
152
- ### Bug Fixes
153
-
154
- * Merge remote-tracking branch 'xmedeko/patch-1' ([da3e1dc](https://github.com/prantlf/jsonlint/commit/da3e1dca6ce6efcd8d5bd775d75bad06d8c46223))
155
-
156
- ### Features
157
-
158
- * Optionally ensure a line break at the end of the output ([226019e](https://github.com/prantlf/jsonlint/commit/226019eb75c675eab1dca817ff0dc42e0223d197))
159
-
160
- # [11.0.0](https://github.com/prantlf/jsonlint/compare/v10.2.0...v11.0.0) (2022-05-01)
161
-
162
- ### Bug Fixes
163
-
164
- * Upgrade dependencies ([0d35969](https://github.com/prantlf/jsonlint/commit/0d359690aa19884a6d17990c476cf780b39663c0))
165
-
166
- ### BREAKING CHANGES
167
-
168
- * The minimum supported version has become Node.js 12 instead of the previous Node.js 6. At least `commander` needs the new version.
169
-
170
- # [10.2.0](https://github.com/prantlf/jsonlint/compare/v10.1.1...v10.2.0) (2019-12-28)
171
-
172
- ### Features
173
-
174
- * Allow trimming trailing commas in arrays and objects (JSON5) ([136ea99](https://github.com/prantlf/jsonlint/commit/136ea995bef7b0f77c2ac54b6ce7dd8572190bf8))
175
- * Allow unifying quotes around object keys to double or single ones (JSON5) ([6b6da17](https://github.com/prantlf/jsonlint/commit/6b6da175cfea8f71841e145a525ef124c19c2607))
176
-
177
- # [10.1.1](https://github.com/prantlf/jsonlint/compare/v10.1.0...v10.1.1) (2019-12-27)
178
-
179
- ### Bug Fixes
180
-
181
- * Restore compatibility with IE11 ([55b8a48](https://github.com/prantlf/jsonlint/commit/55b8a4816b08c5504cf7f0841d1997634a6376ea))
182
-
183
- # [10.1.0](https://github.com/prantlf/jsonlint/compare/v10.0.2...v10.1.0) (2019-12-27)
184
-
185
- ### Features
186
-
187
- * Alternatively accept number of spaces for the indent parameter ([4c25739](https://github.com/prantlf/jsonlint/commit/4c257399b77e446c198b25049fae2ca08ad174ec))
188
-
189
- # [10.0.2](https://github.com/prantlf/jsonlint/compare/v10.0.1...v10.0.2) (2019-12-27)
190
-
191
- ### Bug Fixes
192
-
193
- * Do not modify input options in the tokenize method ([7e3ac0b](https://github.com/prantlf/jsonlint/commit/7e3ac0babf873c42da1daadaee2bbe55d2644690))
194
-
195
- # [10.0.1](https://github.com/prantlf/jsonlint/compare/v10.0.0...v10.0.1) (2019-12-27)
196
-
197
- ### Bug Fixes
198
-
199
- * Pretty-printer: keep the comment after opening an object scope indented ([4fbc09d](https://github.com/prantlf/jsonlint/commit/4fbc09d402ed5442e2de77382342267e330cb908))
200
-
201
- # [10.0.0](https://github.com/prantlf/jsonlint/compare/v9.0.0...v10.0.0) (2019-12-27)
202
-
203
- ### Bug Fixes
204
-
205
- * Rename the property "exzerpt" in error information to "excerpt" ([4c74e3d](https://github.com/prantlf/jsonlint/commit/4c74e3d866fc54a7b2f833ff522efbaef3331bbe))
206
-
207
- ### Features
208
-
209
- * Add support for pretty-printing of the JSON input ([d5eaa93](https://github.com/prantlf/jsonlint/commit/d5eaa9350d654050316b186dc8965ce9cb45d905))
210
-
211
- ### BREAKING CHANGES
212
-
213
- * If you used the property "exzerpt" from the parsing error object, you have to change it to "excerpt". It should be easy using a full-text search in your sources.
214
- * The option for pretty-printing *invalid input* has been renamed:
215
-
216
- -p (--pretty-print) ==> -P (--pretty-print-invalid)
217
-
218
- The option `-p (--pretty-print)` will newly prettify the raw (text) input instead of formatting the parsed JSON object.
219
-
220
- # [9.0.0](https://github.com/prantlf/jsonlint/compare/v8.0.3...v9.0.0) (2019-12-22)
221
-
222
- ### chore
223
-
224
- * Upgrade package dependencies ([4a8f2d9](https://github.com/prantlf/jsonlint/commit/4a8f2d9c27428da32b95f607bf7952190636af9f))
225
-
226
- ### Features
227
-
228
- * Add TypeScript typings ([ba6c979](https://github.com/prantlf/jsonlint/commit/ba6c9790792837fdc3abd0032899ffd04953cf3d))
229
-
230
- ### BREAKING CHANGES
231
-
232
- * Dependencies (commander, at least) dropped support for Node.js 4. Node.js 6 should still work, but officially it is not supported either. You should upgrade to the current or still supported Node.js LTS version.
233
-
234
- ## [8.0.3](https://github.com/prantlf/jsonlint/compare/v8.0.2...v8.0.3) (2019-09-24)
235
-
236
- ### Bug Fixes
237
-
238
- * Upgrade package dependencies and adapt sources ([9f1f332](https://github.com/prantlf/jsonlint/commit/9f1f332960c91d9779bff995457154157df8823b))
239
-
240
- ## [8.0.2](https://github.com/prantlf/jsonlint/compare/v8.0.1...v8.0.2) (2019-07-04)
241
-
242
- ### Bug Fixes
243
-
244
- * Put only the reason of the error to the error.reason property when the custom parser is used; not the full message including the error context ([8d7f0b1](https://github.com/prantlf/jsonlint/commit/8d7f0b13b2bfe7e854c965b7266e5de1dec79229))
245
- * Update newline replacement regex to show correct error position on Windows ([7af364c](https://github.com/prantlf/jsonlint/commit/7af364cbafd84326f20f29adbacde1cd0f70e57a))
246
-
247
- # [8.0.0](https://github.com/prantlf/jsonlint/compare/v7.0.3...v8.0.0) (2019-06-16)
248
-
249
- ### Bug Fixes
250
-
251
- * Give the schema-drafts.js proper name and path in source maps ([c2f0148](https://github.com/prantlf/jsonlint/commit/c2f0148cb027e335fa2bb644f3c09a9c51303193))
252
-
253
- ### Features
254
-
255
- * Add the tokenize method returning tokens instead of the parsed object ([cc7b554](https://github.com/prantlf/jsonlint/commit/cc7b55495b3287279aa0c27e242d3e90d8636d66))
256
- * Improve schema error reporting to the level of data parsing ([ea5a8a2](https://github.com/prantlf/jsonlint/commit/ea5a8a2f917f6a07212f8a4e05af22c14e5f1883))
257
- * Remove deprecated exports `Parser` and `parser` ([8bda5b1](https://github.com/prantlf/jsonlint/commit/8bda5b1455d8d176997dcce0bbcd622985888fc7))
258
-
259
- ### BREAKING CHANGES
260
-
261
- * The `Parser` class and `parser` instance did not bring any benefit. They were generated by Jison. After abandoning the Jison parser they were kept for compatibility only. The only method on the `Parser` prototype was the `parse`. It remains unchanged as a direct export. Drop the class interface and just call the `parse` method directly.
262
-
263
- ## [7.0.3](https://github.com/prantlf/jsonlint/compare/v7.0.2...v7.0.3) (2019-06-03)
264
-
265
- ### Bug Fixes
266
-
267
- * Ensure, that tokens and keys in error messages are enclosed in quotation marks ([2149198](https://github.com/prantlf/jsonlint/commit/2149198721fc8dd05632b2225c621ebf7b5e14b7))
268
-
269
- ## [7.0.2](https://github.com/prantlf/jsonlint/compare/v7.0.1...v7.0.2) (2019-06-02)
270
-
271
- ### Bug Fixes
272
-
273
- * Upgrade minificating module ([04d80d7](https://github.com/prantlf/jsonlint/commit/04d80d752c4900f26585d9a809b8ac6d0eef696d))
274
-
275
- ## [7.0.1](https://github.com/prantlf/jsonlint/compare/v7.0.0...v7.0.1) (2019-06-02)
276
-
277
- ### Bug Fixes
278
-
279
- * Recognize boxed string as schema environment too ([e37b004](https://github.com/prantlf/jsonlint/commit/e37b0042376cf5beafc93bf906ee70b583f08969))
280
-
281
- # [7.0.0](https://github.com/prantlf/jsonlint/compare/v6.3.1...v7.0.0) (2019-06-02)
282
-
283
- ### Bug Fixes
284
-
285
- * Do not use the native parser in Safari and Node.js 4 ([a4a606c](https://github.com/prantlf/jsonlint/commit/a4a606c333e443642ced99d466223607bce11461))
286
- * Include the minified scripts used on the on-line page in the NPM module ([03561ec](https://github.com/prantlf/jsonlint/commit/03561ecba00c5d23dfba41831bea818837a7b804))
287
-
288
- ### Features
289
-
290
- * Add "mode" parameter to set flags for a typical format type easier ([9aa09fb](https://github.com/prantlf/jsonlint/commit/9aa09fbc9980e78fa0fed134ce48d99412b619a9))
291
- * Add an option for ignoring trailing commas in object and arrays ([7d521fb](https://github.com/prantlf/jsonlint/commit/7d521fb68ea7919625cc6bc5f5179ce69f6b5985))
292
- * Add an option for reporting duplicate object keys as an error ([09e3977](https://github.com/prantlf/jsonlint/commit/09e39772de088b73e43dac551533a160bc09903c))
293
- * Replace the parser generated by Jison with a hand-built parser from JJU ([2781670](https://github.com/prantlf/jsonlint/commit/27816706435fb48fb8816d743bc56d6d34c4c6c8))
294
- * Support `reviver` from the native `JSON.parse` method ([83cd33c](https://github.com/prantlf/jsonlint/commit/83cd33c937851482799e01bf7262a9ba93bed6cf))
295
-
296
- ### BREAKING CHANGES
297
-
298
- * There is no `yy.parseError` to intercept error handling. Use the thrown error - it contains all available information. The error does not include the `hash` object with structured information. Look for the [documentd properties](/prantlf/jsonlint#error-handling). The location of the error occurrence is available as `location.start`, for example.
299
-
300
- DEPRECATION: The only exposed object to use from now on is the `parse` method as a named export. Other exports (`parser` and `Parser`) are deprecated and will be removed in future.
301
-
302
- The parser from ["Utilities to work with JSON/JSON5 documents"](/rlidwka/jju) is four times faster, than the previous one, has approximatly the same size and can be easier enhanced, regarding both features and error handling.
303
-
304
- ## [6.3.1](https://github.com/prantlf/jsonlint/compare/v6.3.0...v6.3.1) (2019-05-31)
305
-
306
- ### Bug Fixes
307
-
308
- * Recognise the location of error occurrences in Firefox ([7c8c040](https://github.com/prantlf/jsonlint/commit/7c8c040e8f9d259bf573c04f8f6a7df15587a54a))
309
-
310
- # [6.3.0](https://github.com/prantlf/jsonlint/compare/v6.2.1...v6.3.0) (2019-05-30)
311
-
312
- ### Bug Fixes
313
-
314
- * Auto-detect the version of the JSON Schema draft by default ([1fe98ef](https://github.com/prantlf/jsonlint/commit/1fe98ef4e3ee5cd26055e6f73f11387635a078a3))
315
- * Prefer the native JSON parser, if possible, to improve performance ([1639356](https://github.com/prantlf/jsonlint/commit/16393562769a9f77741347fd9cda15c5207f1fee))
316
-
317
- ### Features
318
-
319
- * Support parser options for customisation and performance in JSON schema parsing too ([d562826](https://github.com/prantlf/jsonlint/commit/d562826f604f8c3df5656a79ee4c2085c203f91c))
320
-
321
- ## [6.2.1](https://github.com/prantlf/jsonlint/compare/v6.2.0...v6.2.1) (2019-05-30)
322
-
323
- ### Bug Fixes
324
-
325
- * Include source code in source maps on the on-line validator page ([31e0097](https://github.com/prantlf/jsonlint/commit/31e0097de3c2c5a30e3695d1d5b3f411dc7b6723))
326
-
327
- # [6.2.0](https://github.com/prantlf/jsonlint/compare/v6.1.0...v6.2.0) (2019-05-30)
328
-
329
- ### Features
330
-
331
- * Extract the functionality for sorting object keys to a module ([a53bd93](https://github.com/prantlf/jsonlint/commit/a53bd9392b2116b5272c77deee9423ba16b5f520))
332
-
333
- # [6.1.0](https://github.com/prantlf/jsonlint/compare/v6.0.0...v6.1.0) (2019-05-27)
334
-
335
- ### Bug Fixes
336
-
337
- * Fix the missing function object (Parser) in the main module exports ([eb892aa](https://github.com/prantlf/jsonlint/commit/eb892aab516754ec3bf2eb01ff575fe0c173a510))
338
- * Restore context options (yy) set in the Parser constructor after the call to parse, if the options were overridden by the method arguments ([787c350](https://github.com/prantlf/jsonlint/commit/787c350c201ac0971e42d5b9f224689600e5c11f))
339
-
340
- ### Features
341
-
342
- * Use the native JSON parser if a limited error information is enough ([8aa9fb1](https://github.com/prantlf/jsonlint/commit/8aa9fb10d6c6f7f148d8c7816cc73d6b8385aace))
343
-
344
- # [6.0.0](https://github.com/prantlf/jsonlint/compare/v5.0.0...v6.0.0) (2019-05-26)
345
-
346
- ### Features
347
-
348
- * Declare modules in this package using UMD ([d442583](https://github.com/prantlf/jsonlint/commit/d4425837cea5c11352f988e3723455b8d8f5115b))
349
- * Remove ParserWithComments and parseWithComment from the interface ([3fab374](https://github.com/prantlf/jsonlint/commit/3fab374a0675a699dab3e8aed3bcf928b77fffe4))
350
-
351
- ### BREAKING CHANGES
352
-
353
- * The object and the method do not exist any more. Pass the parameter "ignoreComments" as an object `{ ignoreComments: true }` either to the constructor of the `Parser` object, or as the second parameter to the method `parse`.
354
-
355
- # [5.0.0](https://github.com/prantlf/jsonlint/compare/v4.0.2...v5.0.0) (2019-05-26)
356
-
357
- ### Bug Fixes
358
-
359
- * Do not export "main" method, which requires other NPM modules ([d8af36a](https://github.com/prantlf/jsonlint/commit/d8af36ac292c68b0ee35460a5e7394a26fad4524))
360
-
361
- ### Features
362
-
363
- * Accept single quotes (apostrophes) as string delimiters ([240b8cd](https://github.com/prantlf/jsonlint/commit/240b8cd916b7424e27f7ff585ca30512e87a6566))
364
-
365
- ### BREAKING CHANGES
366
-
367
- * The "main" method providing a command-line interface importable from other module has been removed. If you used it, have a look at the command-line interface in `lib/cli`. You can import this module in instead and it offers a richer interface, than the previously exported "main" method. The `lib/cli` module is mapped to `bin/jsonlint` too. However, consider the default library export (`lib/jsonlint`) for programmatic usage. You will pack less JavaScript code and use smalker, mode programmer-oriented interface.
368
-
369
- ## [4.0.2](https://github.com/prantlf/jsonlint/compare/v4.0.1...v4.0.2) (2019-05-19)
370
-
371
- ### Bug Fixes
372
-
373
- * Print parsing errors if the JSON input is read from stdin ([acfdf11](https://github.com/prantlf/jsonlint/commit/acfdf11e11a8f355cdd8fd1abf09edde664d8c02))
374
-
375
- ## [4.0.1](https://github.com/prantlf/jsonlint/compare/v4.0.0...v4.0.1) (2019-05-19)
376
-
377
- ### Bug Fixes
378
-
379
- * Do not fail sorting objects with a property called "hasOwnProperty" ([b544ceb](https://github.com/prantlf/jsonlint/commit/b544ceb54d44e8273dd7a1d28fc7f69a527fd806))
380
-
381
- # [4.0.0](https://github.com/prantlf/jsonlint/compare/v3.0.0...v4.0.0) (2019-05-19)
382
-
383
- ### Bug Fixes
384
-
385
- * Standardize the interface of the "jsonlint/lib/formatter" module ([b8b041b](https://github.com/prantlf/jsonlint/commit/b8b041bcc0e6ea672ec4575c5b108f347cfef69a))
386
-
387
- ### Features
388
-
389
- * Add web and programmatic interfaces to JSON Schema validation ([d45b243](https://github.com/prantlf/jsonlint/commit/d45b243bf1d083df58d9959d42eb3a787f5e7d89))
390
-
391
- ### BREAKING CHANGES
392
-
393
- * The formatting method is exposed not as exports.formatter.formatJson, but as exports.format.
394
- This module is not documented and it is unlikely, that it broke other project.
395
-
396
- # [3.0.0](https://github.com/prantlf/jsonlint/compare/v2.0.1...v3.0.0) (2019-05-18)
397
-
398
- ### Bug Fixes
399
-
400
- * Replace JSON schema validator JSV with ajv, because JSV is not maintained any more and does not support current JSON schema drafts ([1a4864f](https://github.com/prantlf/jsonlint/commit/1a4864f63ba14cb86a4e677fc23e5c1e963d2e07))
401
-
402
- ### BREAKING CHANGES
403
-
404
- * The environment for the JSON schema validation "json-schema-draft-03" is not available any more.
405
- Migrate your schemas from the JSON schema draft 03 to 04 or newer. Drafts 04, 06 and 07 are supported with this release.
406
-
407
- ## [2.0.1](https://github.com/prantlf/jsonlint/compare/v2.0.0...v2.0.1) (2019-05-18)
408
-
409
- ### Bug Fixes
410
-
411
- * Do not depend on the standard checker in the release package ([1e9c7b5](https://github.com/prantlf/jsonlint/commit/1e9c7b5b5c091332270dbe6b2203fd66644bf355))
412
-
413
- # [2.0.0](https://github.com/prantlf/jsonlint/compare/v1.7.0...v2.0.0) (2019-05-18)
414
-
415
- ### Bug Fixes
416
-
417
- * Accept any file extension on the command line directly ([14ba31c](https://github.com/prantlf/jsonlint/commit/14ba31cf5adc0ddb24d6c318866b6bf9a3c6ae48))
418
- * Do not distribute the web directory in the npm module ([7379be8](https://github.com/prantlf/jsonlint/commit/7379be83e3dc511785c4506e8ab55b77e014724e))
419
- * Make the compact-errors mode working with the latest Jison output ([d417a9c](https://github.com/prantlf/jsonlint/commit/d417a9c39047be929b9f7589da9c2d3c188db7f9))
420
- * Rename the long name of the option "extension" to "extensions" ([383e50a](https://github.com/prantlf/jsonlint/commit/383e50a6a00ee4641f8ae863b46e1af7bade7ee9))
421
- * Replace nomnom as command-line parser with commander, which is maintaitained ([6694bba](https://github.com/prantlf/jsonlint/commit/6694bba56fc821cbe2622340c9753506fa026580))
422
- * Report the right file name in the compact-errors mode, if multiple files or directories are engtered ([7c80326](https://github.com/prantlf/jsonlint/commit/7c80326a69a8df8f1f7ea66dced4a888ea321d9b))
423
-
424
- ### Features
425
-
426
- * Add a checkbox to recognize JavaScript-style comments to the web page ([2a9082a](https://github.com/prantlf/jsonlint/commit/2a9082a26d1316a80ebf132d159e5bf49c3d0978))
427
- * Support parsing and skipping JavaScript-style comments in the JSON input ([4955c58](https://github.com/prantlf/jsonlint/commit/4955c58788dd3b8c3a7a4358cbf65af72a353d0d))
428
-
429
- ### BREAKING CHANGES
430
-
431
- * The options "extension" is not recognized any more.
432
- Use the option "extensions" with the same semantics instead.
433
-
434
- # [1.7.0](https://github.com/prantlf/jsonlint/compare/v1.6.4...v1.7.0) (2019-05-18)
435
-
436
- ### Features
437
-
438
- * Allow specifying JSON file extensions for directory walk ([d8e8076](https://github.com/prantlf/jsonlint/commit/d8e8076edb831a577f5e272a5ea9e4edd077671b))
439
-
440
- This is the first version released after forking the [original project](https://github.com/zaach/jsonlint).