Skip to content

Commit 46a5a98

Browse files
authored
Merge pull request peggyjs#612 from hildjj/audit-changelog
Minor changes to changelog and docs to match release.
2 parents f51967d + 3a41fde commit 46a5a98

File tree

5 files changed

+204
-97
lines changed

5 files changed

+204
-97
lines changed

CHANGELOG.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Change Log
33

44
This file documents all notable changes to Peggy.
55

6-
Unreleased
7-
----------
6+
5.0.0
7+
-----
88

9-
Released: TBD (Not before 2025-05-01)
9+
Released: 2025-05-03
1010

1111
### Major Changes
1212

@@ -35,19 +35,21 @@ Released: TBD (Not before 2025-05-01)
3535
[#602](https://github.com/peggyjs/peggy/pull/602)
3636

3737
### New features
38-
- Extend library mode to include a success flag and a function for throwing syntax errors when needed.
38+
- Extend library mode to include a success flag and a function for throwing
39+
syntax errors when needed. Library mode is still intended as internal-only,
40+
and subject to backward-incompatible changes in future versions.
3941
[#501](https://github.com/peggyjs/peggy/issues/501)
4042
- Slightly better verbose output from the CLI, showing where files are written.
4143
[#601](https://github.com/peggyjs/peggy/pull/601)
42-
- Merged class rules (rules which consist of a character class like `foo =
43-
[0-9]` that are only called from a rule like `bar = foo / [a-z]`, which
44+
- Merged class rules (rules which consist of a character class like
45+
`foo = [0-9]` that are only called from a rule like `bar = foo / [a-z]`, which
4446
merges the two classes together into a single rule like `bar = [0-9a-z]`),
4547
and which are not allowedStartRules, are no longer output into the generated
4648
parser, since there is no way for that code to be called. This has a chance
4749
of generating issues for people who are calling the internals of the
4850
generated parser using
4951
[@peggyjs/coverage](https://github.com/peggyjs/coverage), but that's a
50-
lightly-documented feature of the library.
52+
lightly-documented feature of that library.
5153
[#594](https://github.com/peggyjs/peggy/pull/594)
5254
- Superfluous rules (rules which cannot be reached from an allowedStartRule)
5355
no longer generate code into the parser. An INFO-level debug statement is
@@ -96,9 +98,13 @@ Released: TBD (Not before 2025-05-01)
9698
error in a future release, once experience in the field has shown that the
9799
approach does not catch code that is valid.
98100
[#606](https://github.com/peggyjs/peggy/pull/606)
101+
- Globals, UMD, and CommonJS are now downloadable from the online version. The
102+
weird version of globals that was only available from the web download was
103+
removed. [#608](https://github.com/peggyjs/peggy/pull/608)
99104

100105
### Bug fixes
101106

107+
- Switch to pnpm-action instead of corepack for GitHub Actions. Ensure that help text always wraps the same in tests, no matter the actual terminal width. [#588](https://github.com/peggyjs/peggy/pull/588)
102108
- All libraries used in the web site brought up-to-date, versioned with all
103109
other dependencies, and served locally. (TODO: Old version of CodeMirror to
104110
be replaced with Monaco). [#593](https://github.com/peggyjs/peggy/pull/593)
@@ -115,11 +121,15 @@ Released: TBD (Not before 2025-05-01)
115121
- Small measures to try to get `deno run -A npm:peggy` to work. We will not
116122
know if these were successful until the package is published next. Testing
117123
with `--format es -t foo` will still not work in Deno.
124+
[#603](https://github.com/peggyjs/peggy/pull/603)
118125
- Fix a bug with named NEVER_MATCH expressions.
119126
[#454](https://github.com/peggyjs/peggy/pull/454)
120127
- Warnings from grammar parsing are now presented more fully to the user in
121128
the CLI. Info messages from grammar parsing are presented the same if in
122129
verbose mode. [#605](https://github.com/peggyjs/peggy/pull/605)
130+
- One of the intermediate files that is generated in tests was not getting
131+
a warning when it was unexpectedly found on test start.
132+
[#604](https://github.com/peggyjs/peggy/pull/604)
123133

124134
### Documentation
125135

@@ -130,6 +140,9 @@ Released: TBD (Not before 2025-05-01)
130140
[#595](https://github.com/peggyjs/peggy/pull/595)
131141
- Set a minimum height for the editors in the online version.
132142
[#596](https://github.com/peggyjs/peggy/pull/596)
143+
- Update the docs for newly-created compiler passes. Make pluck and literal
144+
syntax use the new "dim" approach for optional bits.
145+
[$612](https://github.com/peggyjs/peggy/pull/612)
133146

134147
4.2.0
135148
-----

docs/documentation.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -819,12 +819,13 @@ <h3 id="grammar-syntax-and-semantics-parsing-expression-types">Parsing Expressio
819819
<code>rest</code> is any remaining input after the match.</p>
820820

821821
<dl>
822-
<dt><code>"<em>literal</em>"<br>'<em>literal</em>'</code></dt>
822+
<dt><code>"<em>literal</em>"<span class="dim">i</span><br>'<em>literal</em>'<span class="dim">i</span></code></dt>
823823

824824
<dd>
825825
<p>Match exact literal string and return it. The string syntax is the same
826-
as in JavaScript. Appending <code>i</code> right after the literal makes the
827-
match case-insensitive.</p>
826+
as in JavaScript, including escape sequences such as <code>"\xff"</code>,
827+
<code>"\uffff"</code> and <code>"\u{f}"</code>. Appending <code>i</code>
828+
after the literal makes the match case-insensitive.</p>
828829

829830
<div class="example">
830831
<div>
@@ -1351,7 +1352,7 @@ <h3 id="grammar-syntax-and-semantics-parsing-expression-types">Parsing Expressio
13511352
</div>
13521353
</dd>
13531354

1354-
<dt id="pluck"><code><em>@</em> ( <em>label</em> : )? <em>expression</em></code></dt>
1355+
<dt id="pluck"><code><em>@</em> <span class="dim"><em>label</em>:</span> <em>expression</em></code></dt>
13551356

13561357
<dd>
13571358
<p>Match the expression and if the label exists, remember its match result
@@ -1828,10 +1829,15 @@ <h3><code>config</code></h3>
18281829
mapping will contain at least the following keys:</p>
18291830

18301831
<ul>
1831-
<li><code>check</code> — passes that check AST for correctness. They shouldn't change the AST</li>
1832+
<li><code>prepare</code> - passes that prepare the AST for further
1833+
processing. They may add to the AST, but not otherwise modify it.</li>
1834+
<li><code>check</code> — passes that check AST for correctness. They
1835+
shouldn't change the AST</li>
18321836
<li><code>transform</code> — passes that performs various optimizations. They can change
18331837
the AST, add or remove nodes or their properties</li>
1834-
<li><code>generate</code> — passes used for actual code generating</li>
1838+
<li><code>semantic</code> — passes that process the AST semantically,
1839+
relying on all of the transformations from previous passes.</li>
1840+
<li><code>generate</code> — passes used for actual code generation.</li>
18351841
</ul>
18361842

18371843
<p>A plugin that implements a pass should usually push it to the end of the correct

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"file-saver": "2.0.5",
1616
"jquery": "3.7.1",
1717
"jquery.scrollto": "2.1.3",
18-
"mocha": "11.1.0",
18+
"mocha": "11.2.2",
1919
"node-inspect-extracted": "3.0.2"
2020
},
2121
"devDependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"chai": "4.5.0",
6969
"chai-like": "^1.1.3",
7070
"copyfiles": "^2.4.1",
71-
"eslint": "^9.25.1",
71+
"eslint": "^9.26.0",
7272
"eslint-plugin-compat": "6.0.2",
7373
"eslint-plugin-mocha": "11.0.0",
7474
"express": "5.1.0",

0 commit comments

Comments
 (0)