Skip to content

Commit

Permalink
Update dependencies (#5405)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth authored Apr 3, 2022
1 parent 3ad26de commit d535a78
Show file tree
Hide file tree
Showing 13 changed files with 1,650 additions and 1,356 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [12.x, 14.x, 16.x, 17.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci

Expand Down
7 changes: 5 additions & 2 deletions docs/v2/annotated-source/grammar.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ <h2 id="grammatical-rules">Grammatical Rules</h2>
dollar-sign variables are provided by Jison as references to the value of
their numeric position, so in this rule:</p>
<pre><code><span class="hljs-string">&#x27;Expression UNLESS Expression&#x27;</span>
</code></pre><p><code>$1</code> would be the value of the first <code>Expression</code>, <code>$2</code> would be the token
</code></pre>
<p><code>$1</code> would be the value of the first <code>Expression</code>, <code>$2</code> would be the token
for the <code>UNLESS</code> terminal, and <code>$3</code> would be the value of the second
<code>Expression</code>.</p>

Expand Down Expand Up @@ -1975,9 +1976,11 @@ <h2 id="precedence">Precedence</h2>
<p>Operators at the top of this list have higher precedence than the ones lower
down. Following these rules is what makes <code>2 + 3 * 4</code> parse as:</p>
<pre><code><span class="hljs-number">2</span> + (<span class="hljs-number">3</span> * <span class="hljs-number">4</span>)
</code></pre><p>And not:</p>
</code></pre>
<p>And not:</p>
<pre><code>(<span class="hljs-number">2</span> + <span class="hljs-number">3</span>) * <span class="hljs-number">4</span>
</code></pre>

</div>

<div class="content"><div class='highlight'><pre>operators = [
Expand Down
10 changes: 7 additions & 3 deletions docs/v2/annotated-source/lexer.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ <h1>lexer.coffee</h1>
a token is produced, we consume the match, and start again. Tokens are in the
form:</p>
<pre><code>[tag, value, locationData]
</code></pre><p>where locationData is {first_line, first_column, last_line, last_column, last_line_exclusive, last_column_exclusive}, which is a
</code></pre>
<p>where locationData is {first_line, first_column, last_line, last_column, last_line_exclusive, last_column_exclusive}, which is a
format that can be fed directly into <a href="https://github.com/zaach/jison">Jison</a>. These
are read by jison in the <code>parser.lexer</code> function defined in coffeescript.coffee.</p>

Expand Down Expand Up @@ -974,7 +975,8 @@ <h2 id="tokenizers">Tokenizers</h2>
<pre><code>elements
.each( ... )
.map( ... )
</code></pre><p>Keeps track of the level of indentation, because a single outdent token
</code></pre>
<p>Keeps track of the level of indentation, because a single outdent token
can close multiple indents, so we need to know how far in we happen to be.</p>

</div>
Expand Down Expand Up @@ -1590,7 +1592,8 @@ <h2 id="token-manipulators">Token Manipulators</h2>
inside it using Ruby-like notation for substitution of arbitrary
expressions.</p>
<pre><code><span class="hljs-string">&quot;Hello <span class="hljs-subst">#{name.capitalize()}</span>.&quot;</span>
</code></pre><p>If it encounters an interpolation, this method will recursively create a new
</code></pre>
<p>If it encounters an interpolation, this method will recursively create a new
Lexer and tokenize until the <code>{</code> of <code>#{</code> is balanced with a <code>}</code>.</p>
<ul>
<li><code>regex</code> matches the contents of a token (but not <code>delimiter</code>, and not
Expand Down Expand Up @@ -1941,6 +1944,7 @@ <h2 id="token-manipulators">Token Manipulators</h2>
<pre><code>el.click(<span class="hljs-function"><span class="hljs-params">(event)</span> -&gt;</span>
el.hide())
</code></pre>

</div>

<div class="content"><div class='highlight'><pre> [..., lastIndent] = @indents
Expand Down
5 changes: 4 additions & 1 deletion docs/v2/annotated-source/nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -3518,7 +3518,7 @@ <h3 id="jsx">JSX</h3>
<div class="sswrap ">
<a class="ss" href="#section-134">&#x00a7;</a>
</div>
<p>Catch invalid attributes: <div {a:"b", props} {props} "value" /></p>
<p>Catch invalid attributes: &lt;div {a:”b”, props} {props} value” /&gt;</p>

</div>

Expand Down Expand Up @@ -8727,6 +8727,7 @@ <h3 id="op">Op</h3>
<pre><code>bin/coffee -e <span class="hljs-string">&#x27;console.log 50 &lt; 65 &gt; 10&#x27;</span>
<span class="hljs-literal">true</span>
</code></pre>

</div>

<div class="content"><div class='highlight'><pre> compileChain: <span class="hljs-function"><span class="hljs-params">(o)</span> -&gt;</span>
Expand Down Expand Up @@ -10563,6 +10564,7 @@ <h2 id="helper-functions">Helper Functions</h2>
mergeLocationData(first, second, justLeading: <span class="hljs-literal">yes</span>).range <span class="hljs-comment"># [1, 5]</span>
mergeLocationData(first, second, justEnding: <span class="hljs-literal">yes</span>).range <span class="hljs-comment"># [4, 10]</span>
</code></pre>

</div>

<div class="content"><div class='highlight'><pre><span class="hljs-built_in">exports</span>.mergeLocationData = mergeLocationData = <span class="hljs-function"><span class="hljs-params">(locationDataA, locationDataB, {justLeading, justEnding} = {})</span> -&gt;</span>
Expand Down Expand Up @@ -10629,6 +10631,7 @@ <h2 id="helper-functions">Helper Functions</h2>
mergeAstLocationData(first, second, justLeading: <span class="hljs-literal">yes</span>).range <span class="hljs-comment"># [1, 5]</span>
mergeAstLocationData(first, second, justEnding: <span class="hljs-literal">yes</span>).range <span class="hljs-comment"># [4, 10]</span>
</code></pre>

</div>

<div class="content"><div class='highlight'><pre><span class="hljs-built_in">exports</span>.mergeAstLocationData = mergeAstLocationData = <span class="hljs-function"><span class="hljs-params">(nodeA, nodeB, {justLeading, justEnding} = {})</span> -&gt;</span>
Expand Down
6 changes: 4 additions & 2 deletions docs/v2/annotated-source/optparse.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ <h1>optparse.coffee</h1>
Use it like so:</p>
<pre><code>parser = <span class="hljs-keyword">new</span> OptionParser switches, helpBanner
options = parser.parse process.argv
</code></pre><p>The first non-option is considered to be the start of the file (and file
</code></pre>
<p>The first non-option is considered to be the start of the file (and file
option) list, and all subsequent arguments are left unparsed.</p>
<p>The <code>coffee</code> command uses an instance of <strong>OptionParser</strong> to parse its
command-line arguments in <code>src/command.coffee</code>.</p>
Expand All @@ -153,7 +154,8 @@ <h1>optparse.coffee</h1>
</div>
<p>Initialize with a list of valid options, in the form:</p>
<pre><code>[short-flag, long-flag, description]
</code></pre><p>Along with an optional banner for the usage help.</p>
</code></pre>
<p>Along with an optional banner for the usage help.</p>

</div>

Expand Down
35 changes: 25 additions & 10 deletions docs/v2/annotated-source/rewriter.html
Original file line number Diff line number Diff line change
Expand Up @@ -738,22 +738,28 @@ <h1>rewriter.coffee</h1>
<pre><code>f
a: b
c: d
</code></pre><p>Don’t accept implicit calls of this type, when on the same line
</code></pre>
<p>Don’t accept implicit calls of this type, when on the same line
as the control structures below as that may misinterpret constructs like:</p>
<pre><code><span class="hljs-keyword">if</span> f
a: <span class="hljs-number">1</span>
</code></pre><p>as</p>
</code></pre>
<p>as</p>
<pre><code><span class="hljs-keyword">if</span> f(a: <span class="hljs-number">1</span>)
</code></pre><p>which is probably always unintended.
Furthermore don’t allow this in literal arrays, as
that creates grammatical ambiguities.</p>
</code></pre>
<p>which is probably always unintended.
Furthermore don’t allow this in the first line of a literal array
or explicit object, as that creates grammatical ambiguities (#5368).</p>

</div>

<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> IMPLICIT_FUNC <span class="hljs-keyword">and</span>
@indexOfTag(i + <span class="hljs-number">1</span>, <span class="hljs-string">&#x27;INDENT&#x27;</span>) &gt; <span class="hljs-number">-1</span> <span class="hljs-keyword">and</span> @looksObjectish(i + <span class="hljs-number">2</span>) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> @findTagsBackwards(i, [<span class="hljs-string">&#x27;CLASS&#x27;</span>, <span class="hljs-string">&#x27;EXTENDS&#x27;</span>, <span class="hljs-string">&#x27;IF&#x27;</span>, <span class="hljs-string">&#x27;CATCH&#x27;</span>,
<span class="hljs-string">&#x27;SWITCH&#x27;</span>, <span class="hljs-string">&#x27;LEADING_WHEN&#x27;</span>, <span class="hljs-string">&#x27;FOR&#x27;</span>, <span class="hljs-string">&#x27;WHILE&#x27;</span>, <span class="hljs-string">&#x27;UNTIL&#x27;</span>])
<span class="hljs-string">&#x27;SWITCH&#x27;</span>, <span class="hljs-string">&#x27;LEADING_WHEN&#x27;</span>, <span class="hljs-string">&#x27;FOR&#x27;</span>, <span class="hljs-string">&#x27;WHILE&#x27;</span>, <span class="hljs-string">&#x27;UNTIL&#x27;</span>]) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> ((s = stackTop()?[<span class="hljs-number">0</span>]) <span class="hljs-keyword">in</span> [<span class="hljs-string">&#x27;{&#x27;</span>, <span class="hljs-string">&#x27;[&#x27;</span>] <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> isImplicit(stackTop()) <span class="hljs-keyword">and</span>
@findTagsBackwards(i, s))
startImplicitCall i + <span class="hljs-number">1</span>
stack.push [<span class="hljs-string">&#x27;INDENT&#x27;</span>, i + <span class="hljs-number">2</span>]
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">3</span>)</pre></div></div>
Expand Down Expand Up @@ -807,13 +813,18 @@ <h1>rewriter.coffee</h1>
<div class="sswrap ">
<a class="ss" href="#section-30">&#x00a7;</a>
</div>
<p>Are we just continuing an already declared object?</p>
<p>Are we just continuing an already declared object?
Including the case where we indent on the line after an explicit ‘{‘.</p>

</div>

<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> stackTop()
[stackTag, stackIdx] = stackTop()
<span class="hljs-keyword">if</span> (stackTag <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;{&#x27;</span> <span class="hljs-keyword">or</span> stackTag <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;INDENT&#x27;</span> <span class="hljs-keyword">and</span> @tag(stackIdx - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;{&#x27;</span>) <span class="hljs-keyword">and</span>
stackNext = stack[stack.length - <span class="hljs-number">2</span>]
<span class="hljs-keyword">if</span> (stackTag <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;{&#x27;</span> <span class="hljs-keyword">or</span>
stackTag <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;INDENT&#x27;</span> <span class="hljs-keyword">and</span> stackNext?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;{&#x27;</span> <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> isImplicit(stackNext) <span class="hljs-keyword">and</span>
@findTagsBackwards(stackIdx<span class="hljs-number">-1</span>, [<span class="hljs-string">&#x27;{&#x27;</span>])) <span class="hljs-keyword">and</span>
(startsLine <span class="hljs-keyword">or</span> @tag(s - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;,&#x27;</span> <span class="hljs-keyword">or</span> @tag(s - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;{&#x27;</span>) <span class="hljs-keyword">and</span>
@tag(s - <span class="hljs-number">1</span>) <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> UNFINISHED
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">1</span>)
Expand All @@ -838,11 +849,13 @@ <h1>rewriter.coffee</h1>
.g b, <span class="hljs-function">-&gt;</span>
c
.h a
</code></pre><p>and also</p>
</code></pre>
<p>and also</p>
<pre><code>f a
.g b
.h a
</code></pre>

</div>

</li>
Expand Down Expand Up @@ -963,9 +976,11 @@ <h1>rewriter.coffee</h1>
a: b,
c: d,
e = <span class="hljs-number">2</span>
</code></pre><p>and</p>
</code></pre>
<p>and</p>
<pre><code>f a, b: c, d: e, f, g: h: i, j
</code></pre>

</div>

<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">&#x27;,&#x27;</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> @looksObjectish(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">and</span> inImplicitObject() <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> (@tag(i + <span class="hljs-number">2</span>) <span class="hljs-keyword">in</span> [<span class="hljs-string">&#x27;FOROF&#x27;</span>, <span class="hljs-string">&#x27;FORIN&#x27;</span>]) <span class="hljs-keyword">and</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/browser-compiler-legacy/coffeescript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/v2/browser-compiler-modern/coffeescript.js

Large diffs are not rendered by default.

Loading

0 comments on commit d535a78

Please sign in to comment.