You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
7.5 KiB

3 years ago
  1. * Commit history: https://github.com/pegjs/pegjs/commits/master
  2. * Previous changelogs: https://github.com/pegjs/pegjs/tree/master/docs/changelogs
  3. * Contributors this release: https://github.com/pegjs/pegjs/graphs/contributors?from=2016-08-20
  4. > This is a work in progress changelog for the next release _(currently v0.11)_.
  5. ### Major Changes
  6. * [Implemented value plucking](https://github.com/pegjs/pegjs/commit/460f0cc5bc9e7b12e7830a13a9afa5026a5f20f4): e.g. When `grammar = "-" @$[a-z]i* "-"` is given `-PEGjs-`, it returns `PEGjs`
  7. * Upgraded JavaScript support:
  8. - Parser's are generated in ES5
  9. - Source code for PEG.js and scripts in the repository are written in ES2015, for Node 8+
  10. - The browser release is in ES5, generated using [Rollup](https://rollupjs.org/) and [Babel](https://babeljs.io/)
  11. - Dropped support for Node versions _0.x_, _4_, _6_ and _non-LTS_ versions (e.g. `7`, `9`, etc)
  12. - Dropped support for IE versions _8_, _9_ and _10_
  13. * Updated documentation:
  14. - extracted to separate markdown files in the [docs folder](https://github.com/pegjs/pegjs/tree/master/docs)
  15. - better explanation about error messages
  16. - added documentation for case-insensitivity in grammar
  17. - added documentation for backtracking in grammar
  18. - clarify details for the execution environment for actions ([#531](https://github.com/pegjs/pegjs/pull/531))
  19. - added a clear explanation of balanced braces ([#533](https://github.com/pegjs/pegjs/pull/533))
  20. - updated documentation for the JavaScript API
  21. - added a guide for plugins
  22. - added documentation for tracer usage
  23. - added a guide for the CLI
  24. * Rewrote command line tool:
  25. - added 2 aliases for `--extra-options-file`: `-c` and `--config`
  26. - options can accept their values via the assignment operator (e.g. `pegjs -c=config.js`)
  27. - all arguments after `--` are passed to `options["--"]`
  28. - added aliases for some CLI options; Check them out using `pegjs -h`
  29. - added "bare" to accepted module formats
  30. * Updated the helpers providable to the generated parsers:
  31. - reintroduced `offset()` which was removed in a previous release ([#528](https://github.com/pegjs/pegjs/pull/528))
  32. - added `range()`; returns `[starting offset, current offset]`
  33. - `location()` also returns a `filename` property if one was passed to the generated parser as an option ([#421](https://github.com/pegjs/pegjs/issues/421))
  34. - helpers can be disabled via the new `features` option (e.g. `{ text: false }` will remove the `text()` helper)
  35. * Parser returns an instance of the new Grammar class instead of a plain JavaScript object
  36. * Added the ASTVisitor class ([#451](https://github.com/pegjs/pegjs/issues/451))
  37. * Moved all code generation from the `generateBytecode` pass to the `generateJs` pass ([#459](https://github.com/pegjs/pegjs/pull/459))
  38. * Use `.js` files with the `--extra-options-file` (aliased by `-c` and `--config`) option on CLI
  39. * Added the Session API (`peg.compiler.Session`); this should simplify extending PEG.js using plugins
  40. * Implemented warning and error emitters: `session.warn`, `session.error` and `session.fatal` ([#327](https://github.com/pegjs/pegjs/issues/327), [#430](https://github.com/pegjs/pegjs/issues/430), [#431](https://github.com/pegjs/pegjs/issues/431))
  41. ### Minor Changes
  42. * Omit PEG.js version from the browser release's filename
  43. * Added support for generating the parser as a ES module using `"format": "es"`
  44. * Added [bundled](https://www.npmjs.com/package/pegjs) TypeScript declaration files for
  45. - the PEG.js API: `pegjs/typings/api.d.ts`
  46. - the PEG.js modules: `pegjs/typings/modules.d.ts`
  47. - generated parsers: `pegjs/typings/generated-parser.d.ts`
  48. * Updated bytecode generator; Generated parsers look slightly better
  49. - optimize silent fails ([#399](https://github.com/pegjs/pegjs/issues/399))
  50. - optimize redundant fail checks ([#400](https://github.com/pegjs/pegjs/issues/400))
  51. - remove unnecessary opcode ([#509](https://github.com/pegjs/pegjs/pull/509))
  52. * Added `ASTVisitor.on.{property,children}`; these are helper's to create visitor's for use with the new ASTVisitor class
  53. * Merged ast utility functions into the new Grammar class; faster and simpler to use now.
  54. * Pass `options.parser` from `peg.generate` to the PEG.js parser (`peg.parser`, or a custom parser)
  55. * Added a pass for the compiler to warn when unused rules are found ([#200](https://github.com/pegjs/pegjs/issues/200))
  56. * Added a `header` option to the compiler; Adds custom comments to the header of the generated parser
  57. * CLI restores original output file (if it already exists) when parser generation fails
  58. * Added the option `extractComments` to the PEG.js parser which if _true_ will extract comments from the grammar ([#511](https://github.com/pegjs/pegjs/pull/511))
  59. * Made the default tracer optional (disabled like so `peg.generate(grammar, { features: { DefaultTracer: false } })`)
  60. * Pass variables to generated parsers through the `context` option when `output: "parser"` ([#517](https://github.com/pegjs/pegjs/issues/517))
  61. * On the CLI added the use of `input` and `output` from the _config file_ instead of passing them as arguments
  62. * Updated examples
  63. * Upgraded support for Unicode (from _v8_ to _v11_)
  64. ### Bugfixes
  65. * Report consistent errors on look ahead + cached results (fix's [#452](https://github.com/pegjs/pegjs/issues/452) via [#555](https://github.com/pegjs/pegjs/issues/555))
  66. * Improve error messages ([#194](https://github.com/pegjs/pegjs/issues/194), [#475](https://github.com/pegjs/pegjs/pull/475), [#534](https://github.com/pegjs/pegjs/pull/534), [#547](https://github.com/pegjs/pegjs/pull/547), [#552](https://github.com/pegjs/pegjs/pull/552))
  67. * Do not indent backtick quoted strings in code blocks ([#492](https://github.com/pegjs/pegjs/pull/492))
  68. * Fix shadowing issue for UMD generated parsers ([#499](https://github.com/pegjs/pegjs/issues/499))
  69. * Check rules from `options.allowedStartRules` exist within the grammar ([#524](https://github.com/pegjs/pegjs/issues/524))
  70. ### Internal
  71. * Use ESLint to enforce code style
  72. * Switch from Jasmine to Mocha & Chai ([#409](https://github.com/pegjs/pegjs/issues/409))
  73. * Removed Makefile (Had switched to Gulp, but removed that as well); Using the _scripts_ field of `package.json` instead
  74. * Rewrote `tools/impact`; previously a bash script that required external programs, it's now a cross-platform Node script
  75. * Added coverage via [Istanbul](https://www.npmjs.com/package/nyc), [coveralls.io](https://coveralls.io/github/pegjs/pegjs) and [codeclimate.com](https://codeclimate.com/github/pegjs/pegjs) ([#546](https://github.com/pegjs/pegjs/pull/546), [#596](https://github.com/pegjs/pegjs/pull/596))
  76. * Updated spec tests
  77. * Switched to Yarn for workspace based development (_NOTE:_ Yarn should not be required for production use)
  78. * Updated keywords for the [NPM package](https://www.npmjs.com/package/pegjs)
  79. * Moved source code for the [website](https://pegjs.org/) into the main repository; the website is updated as repo is updated now
  80. * Added the [spec](https://pegjs.org/development/test) and [benchmark](https://pegjs.org/development/benchmark) tests to the website
  81. * Switch from [Browserify](https://github.com/browserify/browserify) to [Rollup](https://rollupjs.org/)
  82. * Auto-import PEG.js version using `require("pegjs/package.json")`, and on dist generation use [rollup-plugin-json](https://www.npmjs.com/package/rollup-plugin-json)
  83. * Added https://pegjs.org/development/try; an editor that uses the latest source files for PEG.js
  84. * Replaced [Travis CI support](https://travis-ci.org/pegjs/pegjs/builds) with [Azure Pipelines](https://dev.azure.com/pegjs/pegjs/_build) ([#596](https://github.com/pegjs/pegjs/pull/596))