Skip to content

Commit

Permalink
chore: bump dev dependencies to latest version
Browse files Browse the repository at this point in the history
Only `eslint-plugin-prettier` is kept on version 4 because we haven't
fixed compatibility with prettier 3.

Update test snapshots.
  • Loading branch information
zackad committed Feb 17, 2024
1 parent 426b27a commit 5343508
Show file tree
Hide file tree
Showing 17 changed files with 2,962 additions and 3,284 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"resolve": "^1.12.0"
},
"devDependencies": {
"eslint": "^4.14.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.5.0",
"eslint-plugin-prettier": "^2.4.0",
"jest": "^21.1.0",
"jest-runner-eslint": "^0.3.0"
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.7.0",
"jest-runner-eslint": "^2.1.2"
},
"jest": {
"projects": [
Expand Down
4 changes: 2 additions & 2 deletions tests/Comments/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`htmlComments.melody.twig 1`] = `
exports[`htmlComments.melody.twig - melody-verify: htmlComments.melody.twig 1`] = `
<!-- I am a comment -->
This is a paragraph
Expand Down Expand Up @@ -34,7 +34,7 @@ A third paragraph
`;

exports[`twigComments.melody.twig 1`] = `
exports[`twigComments.melody.twig - melody-verify: twigComments.melody.twig 1`] = `
{# One #}
{# Two #}
Expand Down
6 changes: 3 additions & 3 deletions tests/ConstantValue/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`constant-value-int.melody.twig 1`] = `
exports[`constant-value-int.melody.twig - melody-verify: constant-value-int.melody.twig 1`] = `
123
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123
`;

exports[`constant-value-string.melody.twig 1`] = `
exports[`constant-value-string.melody.twig - melody-verify: constant-value-string.melody.twig 1`] = `
Test string
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test string
`;

exports[`special-cases.melody.twig 1`] = `
exports[`special-cases.melody.twig - melody-verify: special-cases.melody.twig 1`] = `
{% if isRTL %}&#8206;{% endif %}
{% if searchResultFailing %}
Expand Down
10 changes: 5 additions & 5 deletions tests/ControlStructures/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`for.melody.twig 1`] = `
exports[`for.melody.twig - melody-verify: for.melody.twig 1`] = `
<ul>
{% for item in items %}
<li class="{{ loop.last ? 'last' : '' }}">
Expand Down Expand Up @@ -35,7 +35,7 @@ exports[`for.melody.twig 1`] = `
`;
exports[`forIfElse.melody.twig 1`] = `
exports[`forIfElse.melody.twig - melody-verify: forIfElse.melody.twig 1`] = `
<ul>
{% for a,b in c | slice(3, c.length) if b is even -%}
<li>{{ a }} - {{ b }}</li>
Expand Down Expand Up @@ -75,7 +75,7 @@ exports[`forIfElse.melody.twig 1`] = `
`;
exports[`forInclude.melody.twig 1`] = `
exports[`forInclude.melody.twig - melody-verify: forInclude.melody.twig 1`] = `
{% for foo in range(1, category) %}
<span key="{{ foo }}" class="qtp-item__star icon-ic icon-icn_star--white {{ foo }}">
{% include './Star.twig' only %}
Expand All @@ -91,7 +91,7 @@ exports[`forInclude.melody.twig 1`] = `
`;
exports[`forWithBlock.melody.twig 1`] = `
exports[`forWithBlock.melody.twig - melody-verify: forWithBlock.melody.twig 1`] = `
<h1>{{ title | title }}</h1>
<ul>
{% for item in items %}
Expand All @@ -118,7 +118,7 @@ exports[`forWithBlock.melody.twig 1`] = `
`;
exports[`if.melody.twig 1`] = `
exports[`if.melody.twig - melody-verify: if.melody.twig 1`] = `
<div>
{%- if foo %}
<div class="foo"></div>
Expand Down
2 changes: 1 addition & 1 deletion tests/Declaration/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`doctype.melody.twig 1`] = `
exports[`doctype.melody.twig - melody-verify: doctype.melody.twig 1`] = `
<!DOCTYPE html>
<! DOCTYPE html>
Expand Down
20 changes: 10 additions & 10 deletions tests/Element/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`attributes.melody.twig 1`] = `
exports[`attributes.melody.twig - melody-verify: attributes.melody.twig 1`] = `
<a href="#abcd" target="_blank" lang="en" >Link</a>
<fantasy {{ {
Expand Down Expand Up @@ -35,7 +35,7 @@ exports[`attributes.melody.twig 1`] = `
`;
exports[`breakingSiblings.melody.twig 1`] = `
exports[`breakingSiblings.melody.twig - melody-verify: breakingSiblings.melody.twig 1`] = `
<span>One</span><b>Two</b><i>Three</i><span>Four</span><b>Five</b><i>Six</i><span>Seven</span>
<span>One</span>
Expand All @@ -60,7 +60,7 @@ exports[`breakingSiblings.melody.twig 1`] = `
`;
exports[`children.melody.twig 1`] = `
exports[`children.melody.twig - melody-verify: children.melody.twig 1`] = `
<div class="{{ css.loader }}">
<div class="{{ css.barWrapper }}">
<span class="{{ css.bar }}"></span>
Expand All @@ -77,7 +77,7 @@ exports[`children.melody.twig 1`] = `
`;
exports[`emptyLines.melody.twig 1`] = `
exports[`emptyLines.melody.twig - melody-verify: emptyLines.melody.twig 1`] = `
<div>
<img src="/img/posts/08/07/dns-resolution-expl.png" alt="DNS explained">
Expand Down Expand Up @@ -105,14 +105,14 @@ exports[`emptyLines.melody.twig 1`] = `
`;
exports[`extraSpaces.melody.twig 1`] = `
exports[`extraSpaces.melody.twig - melody-verify: extraSpaces.melody.twig 1`] = `
<span >Text</span >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<span>Text</span>
`;
exports[`manyAttributes.melody.twig 1`] = `
exports[`manyAttributes.melody.twig - melody-verify: manyAttributes.melody.twig 1`] = `
<span attr1="one" attr2="two" attr3="three" attr4="four" attr5="five" attr6="six" attr7="seven" attr8="eight">Text</span>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<span attr1="one"
Expand All @@ -128,7 +128,7 @@ exports[`manyAttributes.melody.twig 1`] = `
`;
exports[`oneLine.melody.twig 1`] = `
exports[`oneLine.melody.twig - melody-verify: oneLine.melody.twig 1`] = `
<a href="{{ url }}">
Next
</a>
Expand All @@ -137,7 +137,7 @@ exports[`oneLine.melody.twig 1`] = `
`;
exports[`selfClosing.melody.twig 1`] = `
exports[`selfClosing.melody.twig - melody-verify: selfClosing.melody.twig 1`] = `
<input type="text" name="user" />
<input attr1="one" attr2="two" attr3="three" attr4="four" attr5="five" attr6="six" attr7="seven" attr8="eight" />
Expand All @@ -161,14 +161,14 @@ exports[`selfClosing.melody.twig 1`] = `
`;
exports[`siblings.melody.twig 1`] = `
exports[`siblings.melody.twig - melody-verify: siblings.melody.twig 1`] = `
<span>One</span><b>Two</b><i>Three</i>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<span>One</span><b>Two</b><i>Three</i>
`;
exports[`whitespace.melody.twig 1`] = `
exports[`whitespace.melody.twig - melody-verify: whitespace.melody.twig 1`] = `
<span class="price">{{ price }} {{ currencySymbol }}</span>
<span class="price">Price: {{ price }} {{ currencySymbol }} per night</span>
Expand Down
22 changes: 11 additions & 11 deletions tests/Expressions/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`arrayExpression.melody.twig 1`] = `
exports[`arrayExpression.melody.twig - melody-verify: arrayExpression.melody.twig 1`] = `
{{ [2, 3, "cat"] }}
{{ [ 2, 3, "cat","dog", "mouse"] }}
Expand Down Expand Up @@ -42,7 +42,7 @@ exports[`arrayExpression.melody.twig 1`] = `
`;

exports[`binaryExpressions.melody.twig 1`] = `
exports[`binaryExpressions.melody.twig - melody-verify: binaryExpressions.melody.twig 1`] = `
{% set highlightValueForMoney = isFeatureEnabled('vFMV5') or isCTestActive('WEB-48935') or isCTestActive('WEB-48956') or isCTestActive('WEB-48955')%}
{% set name = condition1 or condition2 and condition3 or condition4 or condition5 and condition6 %}
Expand Down Expand Up @@ -95,7 +95,7 @@ exports[`binaryExpressions.melody.twig 1`] = `
`;

exports[`callExpression.melody.twig 1`] = `
exports[`callExpression.melody.twig - melody-verify: callExpression.melody.twig 1`] = `
{{ range(3) }}
{{ date('d/m/Y H:i', timezone="Europe/Paris") }}
Expand Down Expand Up @@ -155,7 +155,7 @@ exports[`callExpression.melody.twig 1`] = `
`;
exports[`conditionalExpression.melody.twig 1`] = `
exports[`conditionalExpression.melody.twig - melody-verify: conditionalExpression.melody.twig 1`] = `
{{ test ? "One" : "Two" }}
{{ test ? "This is a slightly longer string to overflow the line" : "and here is its counterpart" }}
Expand All @@ -172,7 +172,7 @@ exports[`conditionalExpression.melody.twig 1`] = `
`;
exports[`filterExpression.melody.twig 1`] = `
exports[`filterExpression.melody.twig - melody-verify: filterExpression.melody.twig 1`] = `
{{ 'test.foo' | split('.') }}
{{ range(3) | sort | join(',') }}
{{ 'SHOUTING' | lower|escape('html') | upper | escape('markdown') | lower | upper | escape('markdown') }}
Expand Down Expand Up @@ -224,14 +224,14 @@ exports[`filterExpression.melody.twig 1`] = `
`;
exports[`memberExpression.melody.twig 1`] = `
exports[`memberExpression.melody.twig - melody-verify: memberExpression.melody.twig 1`] = `
{{ alternativeMarriottRewardRates[deal.dealId].short }}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{{ alternativeMarriottRewardRates[deal.dealId].short }}
`;
exports[`objectExpression.melody.twig 1`] = `
exports[`objectExpression.melody.twig - melody-verify: objectExpression.melody.twig 1`] = `
{{ {
a: "foo",
"b#{ar}": "bar",
Expand Down Expand Up @@ -260,7 +260,7 @@ exports[`objectExpression.melody.twig 1`] = `
`;
exports[`operators.melody.twig 1`] = `
exports[`operators.melody.twig - melody-verify: operators.melody.twig 1`] = `
{{ a b-and b }}
{{ a b-or b }}
{{ a b-xor b }}
Expand Down Expand Up @@ -392,7 +392,7 @@ exports[`operators.melody.twig 1`] = `
`;
exports[`stringConcat.melody.twig 1`] = `
exports[`stringConcat.melody.twig - melody-verify: stringConcat.melody.twig 1`] = `
<div>
{{ first ~ second }}
</div>
Expand Down Expand Up @@ -423,7 +423,7 @@ exports[`stringConcat.melody.twig 1`] = `
`;
exports[`stringLiteral.melody.twig 1`] = `
exports[`stringLiteral.melody.twig - melody-verify: stringLiteral.melody.twig 1`] = `
{{ 'zzz\\\\bar\\\\baz' }}
{{ "College - Women's" }}
Expand All @@ -446,7 +446,7 @@ exports[`stringLiteral.melody.twig 1`] = `
`;
exports[`unaryNot.melody.twig 1`] = `
exports[`unaryNot.melody.twig - melody-verify: unaryNot.melody.twig 1`] = `
{% if not invalid %}
<p>All's well.</p>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions tests/Failing/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`controversial.melody.twig 1`] = `
exports[`controversial.melody.twig - melody-verify: controversial.melody.twig 1`] = `
{% set isRewardRate = isMarriottRewardRate or (rewardRateAltIds and deal.dealId in rewardRateAltIds[accommodation.id.id]) %}
<!-- Alternatively, introduce another variable -->
Expand Down Expand Up @@ -89,7 +89,7 @@ exports[`controversial.melody.twig 1`] = `
`;
exports[`failing.melody.twig 1`] = `
exports[`failing.melody.twig - melody-verify: failing.melody.twig 1`] = `
{# IF tag in element not allowed
<option {% if not purchasable.isAvailable %}disabled{% endif %}>
{{ purchasable.description }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`switch.melody.twig 1`] = `
exports[`switch.melody.twig - melody-verify: switch.melody.twig 1`] = `
{% switch matrixBlock.type %}
{% case "text" %}
Expand Down
14 changes: 7 additions & 7 deletions tests/GenericTags/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`cache.melody.twig 1`] = `
exports[`cache.melody.twig - melody-verify: cache.melody.twig 1`] = `
{% cache globally using key craft.some.rather.long.property.chain.request.path for 3 weeks %}
{% for block in entry.myMatrixField %}
<p>{{ block.text }}</p>
Expand Down Expand Up @@ -38,7 +38,7 @@ exports[`cache.melody.twig 1`] = `
`;

exports[`header.melody.twig 1`] = `
exports[`header.melody.twig - melody-verify: header.melody.twig 1`] = `
{% header "Cache-Control: max-age=" ~ (expiry.timestamp - now.timestamp) %}
{# prettier-ignore #}
Expand All @@ -51,14 +51,14 @@ exports[`header.melody.twig 1`] = `
`;

exports[`includeCssFile.melody.twig 1`] = `
exports[`includeCssFile.melody.twig - melody-verify: includeCssFile.melody.twig 1`] = `
{% includeCssFile "/assets/css/layouts/" ~ entry.layout ~ ".css" %}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{% includeCssFile '/assets/css/layouts/' ~ entry.layout ~ '.css' %}
`;

exports[`nav.melody.twig 1`] = `
exports[`nav.melody.twig - melody-verify: nav.melody.twig 1`] = `
{% nav entry in entries %}
<li>
<a href="{{ entry.url }}">{{ entry.title }}</a>
Expand All @@ -83,7 +83,7 @@ exports[`nav.melody.twig 1`] = `
`;

exports[`paginate.melody.twig 1`] = `
exports[`paginate.melody.twig - melody-verify: paginate.melody.twig 1`] = `
{% paginate craft.entries.section('blog').limit(10) as pageInfo, pageEntries %}
{% paginate craft.entries.section('blog').limit(10) as pageInfo, pageEntries, pageProperties %}
Expand All @@ -99,14 +99,14 @@ exports[`paginate.melody.twig 1`] = `
`;

exports[`redirect.melody.twig 1`] = `
exports[`redirect.melody.twig - melody-verify: redirect.melody.twig 1`] = `
{% redirect "pricing" 301 %}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{% redirect 'pricing' 301 %}
`;

exports[`switch.melody.twig 1`] = `
exports[`switch.melody.twig - melody-verify: switch.melody.twig 1`] = `
{% switch matrixBlock.type %}
Expand Down
Loading

0 comments on commit 5343508

Please sign in to comment.