This repository was archived by the owner on May 22, 2024. It is now read-only.
[Snyk] Upgrade pegjs from 0.6.2 to 0.10.0 #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade pegjs from 0.6.2 to 0.10.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: pegjs
-
0.10.0 - 2016-08-19
-
-
-
-
-
-
-
- Exposed the AST node visitor builder as
- Exposed the function which builds messages of exceptions produced by
- The
- Refactored expectations reported in the
- The
- Removed access to the parser object in parser code via the
- Made handling of optional parameters consistent with ES 2015. Specifically,
- Renamed several compiler passes.
- Generated parsers no longer consider
- Simplified the arithmetics example grammar.
- Switched from
- Started using ESLint instead of JSHint and fixed various problems it found.
- Added contribution
- Removed support for io.js.
- Fixed
- Fixed label scoping so that labels in expressions like
- Fixed escaping of generated JavaScript strings & regexps to also escape DEL
- Fixed the JSON example grammar to correctly handle characters with code
- Fixed multiple compatibility issues of
- Fixed slow deduplication of expectation descriptions.
-
0.9.0 - 2015-08-30
- Tracing support. Parsers can be compiled with support for tracing their
- Infinite loop detection. Grammar constructs that could cause infinite
- Improved location information API. The
- Improved error reporting. All exceptions thrown when generating a parser
- Strict mode code. All PEG.js and generated parser code is written using
- Labels behave like block-scoped variables. This means parser code can see
- Empty sequences are no longer allowed.
- Label names can’t be JavaScript reserved words.
- Rule and label names can contain Unicode characters like in JavaScript.
- Rules have to be separated either by
- The PEG.js grammar and all the example grammars were completely rewritten.
- The parser object can now be accessed as
- Location information computation is faster.
- Added support for Node.js >= 0.10.x, io.js, and Edge. Removed support for
- Fixed left recursion detector which missed many cases.
- Fixed escaping of U+0100—U+107F and U+1000—U+107F in generated code and
- Renamed
-
0.8.0 - 2013-12-24
- Completely rewrote the code generator. Among other things, it allows optimizing generated parsers for parsing speed or code size using the
- Completely redesigned error handling. Instead of returning
- Implemented a plugin API. The list of plugins to use can be specified using the
- Made
- Added a new
- Added a new
- The
- Predicates now always return
- Replaced the
- The list of allowed start rules of a generated parser now has to be specified explicitly using the
- Removed the
- The source code is now a valid npm package. This makes using development
- Generated parsers are now ~25% faster and ~62%/~3% smaller (when optimized for size/speed) than those generated by 0.7.0.
- Requires Node.js 0.8.0+.
- Changed the value of the
- Setup prototype chain for
- Setup prototype chain for
- Fixed error messages in certain cases with trailing input [#119]
- Fixed code generated for classes starting with
- Fixed too eager proxy rules removal. [#137]
- Added a license to all vendored libraries. [#207]
- Converted the test suite from QUnit to Jasmine, cleaning it up on the way.
- Travis CI integration.
- Various internal code improvements and fixes.
- Various generated code improvements and fixes.
- Various example grammar improvements and fixes.
- Improved
- Converted
-
0.7.0 - 2012-04-18
-
0.6.2 - 2011-08-20
from pegjs GitHub release notesMajor Changes
Parsers can be generated in multiple module formats. The available
formats are: CommonJS (the default), AMD, UMD, globals, and bare (not
available from the command-line).
The format can be specified using the
formatoption of thepeg.generatefunction or the
--formatoption on the command-line.It is also possible to specify parser dependencies using the
dependenciesoption of the
peg.generatefunction or the--dependency/-doption onthe command-line. This is mainly useful for the UMD format, where the
dependencies are translated into both AMD dependencies and CommonJS
requirecalls.Browser version of PEG.js is now in the UMD format. This means it will try
to detect AMD or Node.js/CommonJS module loader and define itself as a
module. If no loader is found, it will export itself using a global
variable.
API polishing. The
peg.buildParserfunction was renamed topeg.generate. The global variable the browser version of PEG.js isavailable in when no loader is detected was renamed from
PEGtopeg.CLI improvements. There is new
--output/-ocommand-line option whichallows to specify the output file. The old way of specifying the output file
using a second argument was removed. To make room for the new
-ooptionthe old one (a shortcut for
--optimize) was renamed to-O. All thesechanges make PEG.js conform to traditional compiler command-line interface.
It is now also possible to use
-as a file name on the command-line (withthe usual meaning of standard input/output).
Improved error messages. Both messages produced by PEG.js and generated
parsers were improved.
Duplicate rule definitions are reported as errors.
Duplicate labels are reported as errors.
Minor Changes
peg.compiler.visitor. This isuseful mainly for plugins which manipulate the AST.
generated parsers as
SyntaxError.buildMessage. This is useful mainly forcustomizing these error messages.
errorandexpectedfunctions now accept an optionallocationparameter. This allows to customize the location in which the resulting
syntax error is reported.
expectedproperty of exceptionsproduced by generated parsers. They are no longer de-duplicated and sorted,
their format changed to be more machine-readable, and they no longer contain
human-readable descriptions.
foundproperty of exceptions produced by theerrorfunction is nowset to
null.parservariable.
passing
undefinedas a parameter value is now equivalent to not passingthe parameter at all.
\r,\u2028, and\u2029asnewlines (only
\nand\r\n).first/resttohead/tailin PEG.js grammar and examplegrammars.
guidelines.
Bug Fixes
bin/pegjsso that invoking it with one non-option argument which isan extension-less file doesn’t cause that file to be overwritten.
(a:"a")or(a:"a" b:"b" c:"c")aren’t visible from the outside.(U+007F).
points above U+10FF in strings.
tools/impacton OS X.Complete set of changes
Major Changes
progress, which can help debugging complex grammars. This feature is
experimental and is expected to evolve over time as experience is gained.
More details
loops in generated parsers are detected during compilation and cause errors.
line,column, andoffsetfunctions available in parser code were replaced by a single
locationfunction which returns an object describing the current location. Similarly,
the
line,column, andoffsetproperties of exceptions were replaced bya single
locationproperty. The location is no longer a single point but acharacter range, which is meaningful mainly in actions where the range
covers action’s expression.
More details
have associated location information. And all exceptions thrown by generated
parser and PEG.js itself have a stack trace (the
stackproperty) inenvironments that support
Error.captureStackTrace.JavaScript strict mode.
Minor Changes
labels defined outside expressions containing code.
;or a newline (until now, anywhitespace was enough).
This rewrite included a number of cleanups, formatting changes, naming
changes, and bug fixes.
parserin parser code.Node.js < 0.10.x.
Bug Fixes
error messages.
parseandSyntaxErrortopeg$parseandpeg$SyntaxErrortomark them as internal identifiers.
Complete set of changes
Big Changes
optimizeoption of thePEG.buildParsermethod or the--optimize/-ooption on the command-line. All internal identifiers in generated code now also have apeg$prefix to discourage their use and avoid conflicts. [#35, #92]nullinside actions to indicate match failure, newexpectedanderrorfunctions can be called to trigger an error. Also, expectation inside theSyntaxErrorexceptions are now structured to allow easier machine processing. [#198]pluginsoption of thePEG.buildParsermethod or the--pluginoption on the command-line. Also implemented the--extra-optionsand--extra-options-filecommand-line options, which are mainly useful to pass additional options to plugins. [#106]offset,lineandcolumnfunctions, not variables. They are now available in all parsers and return lazily-computed position data. Removed now uselesstrackLineAndColumnoption of thePEG.buildParsermethod and the--track-line-and-columnoption on the command-line.textfunction. When called inside an action, it returns the text matched by action's expression. [#131]$operator. It extracts matched strings from expressions.?operator now returnsnullon unsuccessful match.undefined.startRuleparameter of theparsemethod in generated parsers with more genericoptionsparameter. The start rule can now be specified as thestartRuleoption. Theoptionsparameter can be also used to pass custom options to the parser because it is visible as theoptionsvariable inside parser code. [#37]allowedStartRulesoption of thePEG.buildParsermethod or the--allowed-start-ruleoption on the command-line. This will make certain optimizations like rule inlining easier in the future.toSourcemethod of generated parsers and introduced a newoutputoption of thePEG.buildParsermethod. It allows callers to specify whether they want to get back the parser object or its source code.versions easier. [#32]
Small Changes
bin/pegjsnow outputs just the parser source if the value of the--export-varoption is empty. This makes embedding generated parsers into other files easier. [#143]nameproperty ofPEG.GrammarErrorinstances from “PEG.GrammarError” to just “GrammarError”. This better reflects the fact that PEG.js can get required with different variable name thanPEG.PEG.GrammarErrorcorrectly.SyntaxErrorin generated parsers correctly.\^. [#125]README.md.CHANGELOGto Markdown.README.md: Fix |PEG.buildParser| option name
Update version to 0.6.2
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs