Το ελληνικό αλφάβητο αποτελείται από 24 γράμματα, το καθένα με κεφαλαία και πεζά γράμματα. Το σίγμα έχει μια πρόσθετη πεζή μορφή (ς) που χρησιμοποιείται στο τέλος μιας λέξης:
-
-
diff --git a/packages/yoastseo/spec/fullTextTests/testTexts/el/greekPaper.js b/packages/yoastseo/spec/fullTextTests/testTexts/el/greekPaper.js
index 486cf4eb010..7d45dda1316 100644
--- a/packages/yoastseo/spec/fullTextTests/testTexts/el/greekPaper.js
+++ b/packages/yoastseo/spec/fullTextTests/testTexts/el/greekPaper.js
@@ -66,7 +66,7 @@ const expectedResults = {
textLength: {
isApplicable: true,
score: 9,
- resultText: " tags as paragraphs", function() {
- const text = "A piece of text
More piece of text
Another piece of text.";
- const expected = [ "A piece of text", "
More piece of text
", "Another piece of text." ];
-
- const actual = matchParagraphs( text );
-
- expect( actual ).toEqual( expected );
- } );
-} );
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js
index 99b875a679e..7d0a949f3d7 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js
@@ -41,7 +41,6 @@ describe( "Counts the occurences of a word in a string", function() {
expect( wordMatch( "Yoast's analyzer", "Yoast’s", "en_US" ).matches ).toEqual( [ "Yoast's" ] );
} );
- // eslint-disable-next-line max-statements
it( "should match special characters", function() {
expect( wordMatch( "a string with diacritics äöüß oompaloomp", "äöüß oompaloomp", "de_DE" ).count ).toBe( 1 );
expect( wordMatch( "a string with diacritics äöüß oompaloomp", "äöüß oompaloomp", "de_DE" ).matches ).toEqual( [ "äöüß oompaloomp" ] );
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/morphology/baseStemmerSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/morphology/baseStemmerSpec.js
index 3969ee56dd9..9c17791f9a4 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/morphology/baseStemmerSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/morphology/baseStemmerSpec.js
@@ -2,6 +2,6 @@ import baseStemmer from "../../../../src/languageProcessing/helpers/morphology/b
describe( "Test for the base stemmer where it returns the input word", () => {
it( "returns the input word", () => {
- expect( baseStemmer( "cats" ) ).toBe( "cats" );
+ expect( baseStemmer( "cats" ) ).toBe( "cats" );
} );
} );
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/morphology/exceptionListHelpersSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/morphology/exceptionListHelpersSpec.js
index e3605e1075d..21d826849d1 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/morphology/exceptionListHelpersSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/morphology/exceptionListHelpersSpec.js
@@ -12,7 +12,7 @@ const prefixes = {
describe( "Returns true if a word has the same ending as one of the entries in an array", () => {
it( "Returns true if a word has the same ending as one of the entries in an array", () => {
expect( checkIfWordEndingIsOnExceptionList( "ziekenhuis", [ "huis", "keuken" ] ) ).toEqual( true
- );
+ );
} );
it( "Returns true if a word is the same as one of the entries in an array", () => {
expect( checkIfWordEndingIsOnExceptionList( "huis", [ "huis", "keuken" ] ) ).toEqual( true
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/sentence/sentencesLengthSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/sentence/sentencesLengthSpec.js
index 0b50b8e7b7b..d3ed5253dc4 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/sentence/sentencesLengthSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/sentence/sentencesLengthSpec.js
@@ -1,41 +1,81 @@
import sentencesLength from "../../../../src/languageProcessing/helpers/sentence/sentencesLength";
+import getSentencesFromTree from "../../../../src/languageProcessing/helpers/sentence/getSentencesFromTree";
import JapaneseResearcher from "../../../../src/languageProcessing/languages/ja/Researcher";
import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher";
import Paper from "../../../../src/values/Paper";
+import buildTree from "../../../specHelpers/parse/buildTree";
describe( "A test to count sentence lengths.", function() {
it( "should not return a length for an empty sentence", function() {
- const sentences = [ "", "A sentence" ];
- const mockResearcher = new EnglishResearcher( new Paper( "" ) );
+ const mockPaper = new Paper( "
A sentence
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
- const lengths = sentencesLength( sentences, mockResearcher );
+ const sentenceLengths = sentencesLength( getSentencesFromTree( mockPaper ), mockResearcher );
- expect( lengths ).toEqual( [
- { sentence: "A sentence", sentenceLength: 2 },
- ] );
+ expect( sentenceLengths.length ).toEqual( 1 );
+ expect( sentenceLengths[ 0 ].sentenceLength ).toEqual( 2 );
+ expect( sentenceLengths[ 0 ].sentence.text ).toEqual( "A sentence" );
} );
it( "should return the sentences and their length (the HTML tags should not be counted if present)", function() {
- const sentences = [ "A
good text", "this is a
textstring " ];
- const mockResearcher = new EnglishResearcher( new Paper( "" ) );
+ const mockPaper = new Paper( "
A good text
" +
+ "
this is a string
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
- const lengths = sentencesLength( sentences, mockResearcher );
+ const sentenceLengths = sentencesLength( getSentencesFromTree( mockPaper ), mockResearcher );
- expect( lengths ).toEqual( [
- { sentence: "A
good text", sentenceLength: 3 },
- { sentence: "this is a
textstring ", sentenceLength: 4 },
- ] );
+ expect( sentenceLengths.length ).toEqual( 2 );
+ expect( sentenceLengths[ 0 ].sentenceLength ).toEqual( 3 );
+ expect( sentenceLengths[ 0 ].sentence.text ).toEqual( "A good text" );
+ expect( sentenceLengths[ 1 ].sentenceLength ).toEqual( 4 );
+ expect( sentenceLengths[ 1 ].sentence.text ).toEqual( "this is a string" );
+ } );
+
+ it( "should return the correct length for sentences containing hyphens", function() {
+ const mockPaper = new Paper(
+ "
My know-it-all mother-in-law made a state-of-the-art U-turn.
" +
+ "
Her ex-husband found that low-key amazing.
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentenceLengths = sentencesLength( getSentencesFromTree( mockPaper ), mockResearcher );
+
+ expect( sentenceLengths.length ).toEqual( 2 );
+ expect( sentenceLengths[ 0 ].sentenceLength ).toEqual( 7 );
+ expect( sentenceLengths[ 1 ].sentenceLength ).toEqual( 6 );
+ } );
+
+ it( "should return the correct length for sentences containing leading and trailing spaces including the first and last token that is not spaces", function() {
+ const mockPaper = new Paper(
+ "
The first sentence.
The second sentence.
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentenceLengths = sentencesLength( getSentencesFromTree( mockPaper ), mockResearcher );
+
+ expect( sentenceLengths.length ).toEqual( 2 );
+ expect( sentenceLengths[ 0 ].sentenceLength ).toEqual( 3 );
+ expect( sentenceLengths[ 0 ].firstToken ).toEqual( { sourceCodeRange: { endOffset: 7, startOffset: 4 }, text: "The" } );
+ expect( sentenceLengths[ 0 ].lastToken ).toEqual( { sourceCodeRange: { endOffset: 23, startOffset: 22 }, text: "." } );
+ expect( sentenceLengths[ 1 ].sentenceLength ).toEqual( 3 );
+ expect( sentenceLengths[ 1 ].firstToken ).toEqual( { sourceCodeRange: { endOffset: 33, startOffset: 30 }, text: "The" } );
+ expect( sentenceLengths[ 1 ].lastToken ).toEqual( { sourceCodeRange: { endOffset: 50, startOffset: 49 }, text: "." } );
} );
it( "should return the sentences and their length for Japanese (so counting characters)", function() {
- const sentences = [ "自然おのずから存在しているもの", "歩くさわやかな森
自然 " ];
- const mockJapaneseResearcher = new JapaneseResearcher( new Paper( "" ) );
+ const mockPaper = new Paper( "
自然おのずから存在しているもの
" +
+ "
歩くさわやかな森 自然
" );
+ const mockJapaneseResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockJapaneseResearcher );
- const lengths = sentencesLength( sentences, mockJapaneseResearcher );
+ const sentenceLengths = sentencesLength( getSentencesFromTree( mockPaper ), mockJapaneseResearcher );
- expect( lengths ).toEqual( [
- { sentence: "自然おのずから存在しているもの", sentenceLength: 15 },
- { sentence: "歩くさわやかな森
自然 ", sentenceLength: 10 },
- ] );
+ expect( sentenceLengths.length ).toEqual( 2 );
+ expect( sentenceLengths[ 0 ].sentenceLength ).toEqual( 15 );
+ expect( sentenceLengths[ 0 ].sentence.text ).toEqual( "自然おのずから存在しているもの" );
+ expect( sentenceLengths[ 1 ].sentenceLength ).toEqual( 10 );
+ expect( sentenceLengths[ 1 ].sentence.text ).toEqual( "歩くさわやかな森 自然 " );
} );
} );
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js
index 8ed67fa4ece..4b227e50e78 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js
@@ -1,6 +1,5 @@
import transliteration from "../../../../src/languageProcessing/helpers/transliterate/transliterate.js";
-// eslint-disable-next-line max-statements
describe( "A test for removing special characters from text.", function() {
it( "returns a Spanish string without special characters.", function() {
expect( transliteration( "ñáéíóúüÑÁÉÍÓÚÜ", "es_AR" ) ).toBe( "naeiouuNAEIOUU" );
diff --git a/packages/yoastseo/spec/languageProcessing/helpers/word/markWordsInSentenceSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/word/markWordsInSentenceSpec.js
index 912e4a02c8a..edb4713fde6 100644
--- a/packages/yoastseo/spec/languageProcessing/helpers/word/markWordsInSentenceSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/helpers/word/markWordsInSentenceSpec.js
@@ -166,7 +166,7 @@ describe( "Adds Yoast marks to specific words in a sentence for languages with c
new Mark( {
marked: "
小さい花の刺繍しかし、それは在庫切れでしたマキシドレス。",
original: "小さい花の刺繍しかし、それは在庫切れでしたマキシドレス。" } ),
- ]
+ ]
);
} );
diff --git a/packages/yoastseo/spec/languageProcessing/languages/ar/ResearcherSpec.js b/packages/yoastseo/spec/languageProcessing/languages/ar/ResearcherSpec.js
index ada24ba85ff..32310196451 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/ar/ResearcherSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/ar/ResearcherSpec.js
@@ -1,6 +1,7 @@
import Researcher from "../../../../src/languageProcessing/languages/ar/Researcher.js";
import Paper from "../../../../src/values/Paper.js";
import getMorphologyData from "../../../specHelpers/getMorphologyData";
+import buildTree from "../../../specHelpers/parse/buildTree";
import functionWords from "../../../../src/languageProcessing/languages/ar/config/functionWords";
import transitionWords from "../../../../src/languageProcessing/languages/ar/config/transitionWords";
import firstWordExceptions from "../../../../src/languageProcessing/languages/ar/config/firstWordExceptions";
@@ -9,10 +10,12 @@ import twoPartTransitionWords from "../../../../src/languageProcessing/languages
const morphologyDataAR = getMorphologyData( "ar" );
describe( "a test for Arabic Researcher", function() {
- const researcher = new Researcher( new Paper( "This is another paper!" ) );
+ const paper = new Paper( "This is another paper!" );
+ const researcher = new Researcher( paper );
+ buildTree( paper, researcher );
it( "checks if the Arabic Researcher still inherit the Abstract Researcher", function() {
- expect( researcher.getResearch( "getParagraphLength" ) ).toEqual( [ { text: "This is another paper!", countLength: 4 } ] );
+ expect( researcher.getResearch( "getParagraphLength" )[ 0 ].paragraphLength ).toEqual( 4 );
} );
it( "returns false if the default research is deleted in Arabic Researcher", function() {
diff --git a/packages/yoastseo/spec/languageProcessing/languages/ar/helpers/createBasicWordFormsSpec.js b/packages/yoastseo/spec/languageProcessing/languages/ar/helpers/createBasicWordFormsSpec.js
index 6dd1212d613..571c059a361 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/ar/helpers/createBasicWordFormsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/ar/helpers/createBasicWordFormsSpec.js
@@ -1,13 +1,13 @@
import { createBasicWordForms } from "../../../../../src/languageProcessing/languages/ar/helpers/createBasicWordForms";
const wordsToStem = [
- // Creates prefixed forms based on an input word that starts with a valid prefix.
- /*
+ // Creates prefixed forms based on an input word that starts with a valid prefix.
+ /*
* Prefix ل "to, because"
* To ignore "لتجاهل"
* Ignore "تجاهل"
*/
- {
+ {
original: "لتجاهل",
forms: [
// Prefixed forms based on original:
@@ -57,13 +57,13 @@ const wordsToStem = [
"وللتجاهل",
"وبالتجاهل",
],
- },
- /*
+ },
+ /*
* Prefix ب "with, in, by"
* With happiness "بسعادة"
* Happiness "سعادة"
*/
- {
+ {
original: "بسعادة",
forms: [
// Prefixed forms based on original:
@@ -113,13 +113,13 @@ const wordsToStem = [
"وللسعادة",
"وبالسعادة",
],
- },
- /*
+ },
+ /*
* Prefix ال "the"
* The home "المنزل"
* Home "منزل"
*/
- {
+ {
original: "المنزل",
forms: [
// Prefixed forms based on original:
@@ -169,13 +169,13 @@ const wordsToStem = [
"وللمنزل",
"وبالمنزل",
],
- },
- /*
+ },
+ /*
* Prefix ك "like, as"
* Like a bird "كطائر"
* Bird "طائر"
*/
- {
+ {
original: "كطائر",
forms: [
// Prefixed forms based on original:
@@ -225,13 +225,13 @@ const wordsToStem = [
"وللطائر",
"وبالطائر",
],
- },
- /*
+ },
+ /*
* Prefix و "and"
* And key "ومفتاح"
* Key "مفتاح"
*/
- {
+ {
original: "ومفتاح",
forms: [
// Prefixed forms based on original:
@@ -281,13 +281,13 @@ const wordsToStem = [
"وللمفتاح",
"وبالمفتاح",
],
- },
- /*
+ },
+ /*
* Prefix ف "so, then"
* So I answered you "فأجبتك"
* I answered you "أجبتك"
*/
- {
+ {
original: "فأجبتك",
forms: [
// Prefixed forms based on original:
@@ -337,13 +337,13 @@ const wordsToStem = [
"وللأجبتك",
"وبالأجبتك",
],
- },
- /*
+ },
+ /*
* Prefix س "will, being willing"
* He will write "سيكتب"
* He writes "يكتب"
*/
- {
+ {
original: "سيكتب",
forms: [
// Prefixed forms based on original:
@@ -393,13 +393,13 @@ const wordsToStem = [
"ولليكتب",
"وباليكتب",
],
- },
- /*
+ },
+ /*
* Prefix أ "Questioning prefix"
* Did you eat? "أأكلت"
* You ate "أكلت"
*/
- {
+ {
original: "أأكلت",
forms: [
// Prefixed forms based on original:
@@ -449,7 +449,7 @@ const wordsToStem = [
"وللأكلت",
"وبالأكلت",
],
- },
+ },
/*
* Prefix وب "and with"
* and with freedom "وبحرية"
@@ -506,7 +506,7 @@ const wordsToStem = [
"وبالحرية",
],
},
- /*
+ /*
* Prefix لل and (to) for
* and (to) for freedom "للحرية"
* freedom "حرية"
diff --git a/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js
index 14507e7bbbd..d09930b4e82 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js
@@ -1,7 +1,6 @@
import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js";
import germanSyllables from "../../../../../src/languageProcessing/languages/de/config/syllables.json";
-// eslint-disable-next-line max-statements
describe( "a syllable counter for German text strings", function() {
it( "returns the number of syllables of words containing the subtract syllable ouil", function() {
expect( countSyllableFunction( "bouillon", germanSyllables ) ).toBe( 2 );
diff --git a/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js
index 447b4a870c5..c5b5179cb58 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js
@@ -1,7 +1,6 @@
import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js";
import englishSyllables from "../../../../../src/languageProcessing/languages/en/config/syllables.json";
-// eslint-disable-next-line max-statements
describe( "a syllable counter for English text strings", function() {
it( "returns the number of syllables of words containing the subtract syllable cial", function() {
expect( countSyllableFunction( "special", englishSyllables ) ).toBe( 2 );
diff --git a/packages/yoastseo/spec/languageProcessing/languages/en/helpers/internal/getVerbStemSpec.js b/packages/yoastseo/spec/languageProcessing/languages/en/helpers/internal/getVerbStemSpec.js
index ddaba3255bb..ddc6d577571 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/en/helpers/internal/getVerbStemSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/en/helpers/internal/getVerbStemSpec.js
@@ -4,7 +4,7 @@ import {
checkIrregulars,
normalizePrefixed,
} from "../../../../../../src/languageProcessing/languages/en/helpers/internal/getVerbStem";
-import isUndefined from "lodash-es/isUndefined";
+import isUndefined from "lodash/isUndefined";
const morphologyData = getMorphologyData( "en" );
const regexVerb = morphologyData.en.verbs.regexVerb;
diff --git a/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js
index f6dc99c7dd9..292ecf27990 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js
@@ -1,7 +1,6 @@
import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js";
import italianSyllables from "../../../../../src/languageProcessing/languages/it/config/syllables.json";
-// eslint-disable-next-line max-statements
describe( "a syllable counter for Italian text strings", function() {
// I cannot find an example for 'aí', but theoretically this combination would be 2 syllables.
it( "returns the number of syllables of words containing the subtract syllable a[íúeo]", function() {
diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js
index 3599519f43c..6ab0d544ddc 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js
@@ -1,7 +1,6 @@
import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js";
import dutchSyllables from "../../../../../src/languageProcessing/languages/nl/config/syllables.json";
-// eslint-disable-next-line max-statements
describe( "a syllable counter for Dutch text strings", function() {
it( "returns the number of syllables of words containing the subtract syllable ue$", function() {
expect( countSyllableFunction( "cue", dutchSyllables ) ).toBe( 1 );
diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js
index 9132f86b440..58840fcc88e 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js
@@ -1,4 +1,3 @@
-// eslint-disable-next-line max-len
import { detectAndStemRegularParticiple } from "../../../../../../src/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple";
import getMorphologyData from "../../../../../specHelpers/getMorphologyData";
diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/determineStemSpec.js b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/determineStemSpec.js
index eccdedca29e..ade50e5dfc4 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/determineStemSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/determineStemSpec.js
@@ -179,12 +179,12 @@ const wordsToStem = [
[ "klimmen", "klim" ],
[ "afklimmen", "afklim" ],
[ "beklimmen", "beklim" ],
- // Word that gets suffix -en and is in getVowelDoubling list and does not end in t/d (9di-12)
+ // Word that gets suffix -en and is in getVowelDoubling list and does not end in t/d (9di-12)
[ "nivelleren", "nivelleer" ],
[ "verafgoden", "verafgood" ],
// Word that gets suffix -en and is in noVowelOrConsonantDoubling list and is in noun exception list (9dii-10)
[ "vaten", "vat" ],
- // Word that gets suffix -en and is in noVowelOrConsonantDoubling list and is in verb exception list (9dii-11)
+ // Word that gets suffix -en and is in noVowelOrConsonantDoubling list and is in verb exception list (9dii-11)
[ "traden", "treed" ],
// Word that gets suffix -en and does not end in t/d (9c-12)
[ "werken", "werk" ],
diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js
index 3d078ead69a..72529930bb9 100644
--- a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js
+++ b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js
@@ -1,4 +1,3 @@
-// eslint-disable-next-line max-len
import { generateCorrectStemWithTAndDEnding } from "../../../../../../src/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding";
import getMorphologyData from "../../../../../specHelpers/getMorphologyData";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js b/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js
index 325c4dd0eb2..f929030f02f 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import Researcher from "../../../src/languageProcessing/languages/en/Researcher";
import getMorphologyData from "../../specHelpers/getMorphologyData";
import altTagCountFunction from "../../../src/languageProcessing/researches/altTagCount";
@@ -21,11 +20,11 @@ describe( "Counts images in a text", function() {
expect( stringToCheck.withAltNonKeyword ).toBe( 0 );
} );
- it( "returns object with the withAltKeyword as 1 when the keyword is set and present (1-word keyword)", function() {
+ it( "returns object with the withAltKeyword as 1 when the keyword is set and present (1-word keyword)", function() {
const paper = new Paper( "string
", { keyword: "keyword", synonyms: "synonym, another synonym" } );
const researcher = new Researcher( paper );
researcher.addResearchData( "morphology", morphologyData );
- buildTree( paper, researcher );
+ buildTree( paper, researcher );
const stringToCheck = altTagCountFunction( paper, researcher );
expect( stringToCheck.noAlt ).toBe( 0 );
@@ -303,7 +302,7 @@ describe( "Counts images in a text", function() {
} );
} );
-/*describe( "test for alt tag attributes in Japanese", () => {
+/* describe( "test for alt tag attributes in Japanese", () => {
it( "returns result when no morphology data is supplied", () => {
const paper = new Paper( "
" +
"
",
diff --git a/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js b/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js
index 79fca670a80..0b65b6c2ae5 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js
@@ -1,68 +1,122 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import getSentences from "../../../src/languageProcessing/researches/countSentencesFromText.js";
import Paper from "../../../src/values/Paper";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
+import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher";
+import buildTree from "../../specHelpers/parse/buildTree";
describe( "counts words in sentences from text", function() {
- let paper;
-
it( "returns sentences with question mark", function() {
- paper = new Paper( "Hello. How are you? Bye" );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 1 );
- expect( getSentences( paper, new EnglishResearcher() )[ 1 ].sentenceLength ).toBe( 3 );
- expect( getSentences( paper, new EnglishResearcher() )[ 2 ].sentenceLength ).toBe( 1 );
+ const mockPaper = new Paper( "Hello. How are you? Bye" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 1 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 3 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 1 );
} );
it( "returns sentences with exclamation mark", function() {
- paper = new Paper( "Hello. How are you! Bye" );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 1 );
- expect( getSentences( paper, new EnglishResearcher() )[ 1 ].sentenceLength ).toBe( 3 );
- expect( getSentences( paper, new EnglishResearcher() )[ 2 ].sentenceLength ).toBe( 1 );
+ const mockPaper = new Paper( "Hello. How are you! Bye" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 1 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 3 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 1 );
} );
it( "returns sentences with many spaces", function() {
- paper = new Paper( "Hello. How are you! Bye" );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 1 );
- expect( getSentences( paper, new EnglishResearcher() )[ 1 ].sentenceLength ).toBe( 3 );
- expect( getSentences( paper, new EnglishResearcher() )[ 2 ].sentenceLength ).toBe( 1 );
+ const mockPaper = new Paper( "Hello. How are you! Bye" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 1 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 3 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 1 );
} );
it( "returns sentences with html-tags, should only count words", function() {
- paper = new Paper( "This is a text
" );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 4 );
+ const mockPaper = new Paper( "This is a text
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 4 );
} );
it( "returns sentences with html-tags, should only count words", function() {
- paper = new Paper( "This is a text
. Another sentence." );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 4 );
- expect( getSentences( paper, new EnglishResearcher() )[ 1 ].sentenceLength ).toBe( 2 );
+ const mockPaper = new Paper( "This is a text
. Another sentence." );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 4 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 2 );
} );
it( "should not count sentences inside elements we want to exclude from the analysis", function() {
- paper = new Paper( "This is a text.
With some code.
. Another sentence." );
- expect( getSentences( paper, new EnglishResearcher() )[ 0 ].sentenceLength ).toBe( 4 );
- expect( getSentences( paper, new EnglishResearcher() )[ 1 ].sentenceLength ).toBe( 2 );
+ const mockPaper = new Paper( "This is a text.
With some code.
. Another sentence." );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 4 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 2 );
} );
- /*it( "returns sentences with question mark in Japanese", function() {
- paper = new Paper( "雨が降っている。 いつ終わるの? さようなら" );
- expect( getSentences( paper, new JapaneseResearcher() )[ 0 ].sentenceLength ).toBe( 8 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 1 ].sentenceLength ).toBe( 7 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 2 ].sentenceLength ).toBe( 5 );
+ it( "returns sentences with question mark in Japanese", function() {
+ const mockPaper = new Paper( "雨が降っている。 いつ終わるの? さようなら" );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 8 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 7 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 5 );
} );
it( "returns sentences with exclamation mark", function() {
- paper = new Paper( "雨が降っている. いつ終わるの!さようなら" );
- expect( getSentences( paper, new JapaneseResearcher() )[ 0 ].sentenceLength ).toBe( 8 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 1 ].sentenceLength ).toBe( 7 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 2 ].sentenceLength ).toBe( 5 );
+ const mockPaper = new Paper( "雨が降っている. いつ終わるの!さようなら" );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 8 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 7 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 5 );
} );
it( "returns sentences with many spaces", function() {
- paper = new Paper( "雨が降っている。 いつ終わるの? さようなら" );
- expect( getSentences( paper, new JapaneseResearcher() )[ 0 ].sentenceLength ).toBe( 8 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 1 ].sentenceLength ).toBe( 7 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 2 ].sentenceLength ).toBe( 5 );
+ const mockPaper = new Paper( "雨が降っている。 いつ終わるの? さようなら" );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 8 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 7 );
+ expect( sentences[ 2 ].sentenceLength ).toBe( 5 );
} );
it( "returns sentences with html-tags, should count characters in Japanese", function() {
- paper = new Paper( "いつ終わるの
" );
- expect( getSentences( paper, new JapaneseResearcher() )[ 0 ].sentenceLength ).toBe( 6 );
+ const mockPaper = new Paper( "いつ終わるの
" );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 6 );
} );
it( "returns sentences with html-tags, should count characters in Japanese", function() {
- paper = new Paper( "いつ終わるの
. 春がやってきます。" );
- expect( getSentences( paper, new JapaneseResearcher() )[ 0 ].sentenceLength ).toBe( 7 );
- expect( getSentences( paper, new JapaneseResearcher() )[ 1 ].sentenceLength ).toBe( 9 );
- } );*/
+ const mockPaper = new Paper( "いつ終わるの
. 春がやってきます。" );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const sentences = getSentences( mockPaper, mockResearcher );
+
+ expect( sentences[ 0 ].sentenceLength ).toBe( 7 );
+ expect( sentences[ 1 ].sentenceLength ).toBe( 9 );
+ } );
} );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js
index eb2167f499f..6a361eaf5f6 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js
@@ -23,7 +23,6 @@ const morphologyDataHE = getMorphologyData( "he" );
let result;
-// eslint-disable-next-line max-statements
describe( "Matches keyphrase in SEO title", function() {
it( "returns the exact match and its position", function() {
const mockPaper = new Paper( "", {
diff --git a/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js
index acc7d5109cc..2f565556281 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher";
import firstParagraph from "../../../src/languageProcessing/researches/findKeywordInFirstParagraph.js";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js
index 69234009b9f..a9d588a7d8c 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import transitionWordsResearch from "../../../src/languageProcessing/researches/findTransitionWords.js";
import Paper from "../../../src/values/Paper.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
@@ -19,7 +18,6 @@ import RussianResearcher from "../../../src/languageProcessing/languages/ru/Rese
import HebrewResearcher from "../../../src/languageProcessing/languages/he/Researcher";
import ArabicResearcher from "../../../src/languageProcessing/languages/ar/Researcher";
-// eslint-disable-next-line max-statements
describe( "a test for finding transition words from a string", function() {
let mockPaper, result;
diff --git a/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js b/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js
index 07e7be15571..276ebe7d356 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import functionWordsInKeyphrase from "../../../src/languageProcessing/researches/functionWordsInKeyphrase.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
import IndonesianResearcher from "../../../src/languageProcessing/languages/id/Researcher";
@@ -8,7 +7,7 @@ import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Res
import Paper from "../../../src/values/Paper.js";
describe( "Test for checking if the keyphrase contains function words only", function() {
- /*it( "returns true if the keyphrase contains function words only", function() {
+ /* it( "returns true if the keyphrase contains function words only", function() {
const mockPaper = new Paper( "", { keyword: "un deux", locale: "fr_FR" } );
expect( functionWordsInKeyphrase( mockPaper, new FrenchResearcher( mockPaper ) ) ).toBe( true );
} );*/
@@ -49,14 +48,14 @@ describe( "Test for checking if the keyphrase contains function words only", fun
expect( functionWordsInKeyphrase( mockPaper, new EnglishResearcher( mockPaper ) ) ).toBe( false );
} );
- /*it( "returns false if there are content words in the keyphrase", function() {
+ /* it( "returns false if there are content words in the keyphrase", function() {
const mockPaper = new Paper( "", { keyword: "daar zat iets en het was mooi", locale: "nl_NL" } );
expect( functionWordsInKeyphrase( mockPaper, new DutchResearcher( mockPaper ) ) ).toBe( false );
} );*/
} );
describe( "Test for checking if the keyphrase contains only function words for a language that uses a custom getWords helper (Japanese)", () => {
- /*it( "returns false if the keyphrase is embedded in Japanese quotes", () => {
+ /* it( "returns false if the keyphrase is embedded in Japanese quotes", () => {
let mockPaper = new Paper( "私の猫は愛らしいです。", { keyword: "「私の猫」", locale: "ja" } );
expect( functionWordsInKeyphrase( mockPaper, new JapaneseResearcher( mockPaper ) ) ).toBe( false );
@@ -80,7 +79,7 @@ describe( "Test for checking if the keyphrase contains only function words for a
expect( functionWordsInKeyphrase( mockPaper, new JapaneseResearcher( mockPaper ) ) ).toBe( true );
} );
- /*it( "returns true if all the words in the keyphrase are function words (separated by spaces)", () => {
+ /* it( "returns true if all the words in the keyphrase are function words (separated by spaces)", () => {
const mockPaper = new Paper( "私の猫は愛らしいです。", { keyword: "かしら かい を ばっかり", locale: "ja" } );
expect( functionWordsInKeyphrase( mockPaper, new JapaneseResearcher( mockPaper ) ) ).toBe( true );
} );*/
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js
index e014c721217..75258af56b9 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments */
import fleschFunction, { DIFFICULTY } from "../../../src/languageProcessing/researches/getFleschReadingScore";
import Paper from "../../../src/values/Paper.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js b/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js
index 511bbc3e5a9..f41eed894b1 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import getKeywordDensity from "../../../src/languageProcessing/researches/getKeywordDensity.js";
import Paper from "../../../src/values/Paper.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js
index a2efeb825d9..c7e5099fea0 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js
@@ -4,7 +4,6 @@ import Paper from "../../../src/values/Paper.js";
let foundLinks;
-// eslint-disable-next-line max-statements
describe( "Tests a string for anchors and its attributes", function() {
const paperAttributes = {
keyword: "link",
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getParagraphLengthSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getParagraphLengthSpec.js
index 858b85c4259..034c84e12dd 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getParagraphLengthSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getParagraphLengthSpec.js
@@ -2,109 +2,162 @@ import getParagraphLength from "../../../src/languageProcessing/researches/getPa
import Paper from "../../../src/values/Paper.js";
import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher.js";
+import buildTree from "../../specHelpers/parse/buildTree";
describe( "a test for getting paragraph length", function() {
it( "returns the paragraph length of a paragraph between p tags", function() {
- const mockPaper = new Paper( "
Lorem ipsum
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 2 );
+ const mockPaper = new Paper( "
Lorem ipsum, hyphens all-over-the-place
" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 4 );
} );
it( "returns the paragraph length of a paragraph in Japanese between p tags", function() {
const mockPaper = new Paper( "
これに対し日本国有鉄道
" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 11 );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 11 );
} );
it( "returns the paragraph length of two paragraphs divided by double linebreaks and ends with a double linebreak", function() {
+ // After using the HTML parser, we don't split paragraphs on double linebreaks, so this should be one paragraph.
const mockPaper = new Paper( "Lorem \n\n ipsum two \n\n" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 1 );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 1 ].countLength ).toBe( 2 );
- } );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
- it( "returns the paragraph length of two paragraphs in Japanese divided by double linebreaks and ends with a double linebreak", function() {
- const mockPaper = new Paper( "1964年 \n\n (昭和39年) \n\n" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 5 );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 1 ].countLength ).toBe( 7 );
- } );
-
- it( "returns the paragraph length of two paragraphs divided by double linebreaks that don't end with a double linebreak", function() {
- const mockPaper = new Paper( "Lorem \n\n ipsum two" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 1 );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 1 ].countLength ).toBe( 2 );
- } );
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
- it( "returns the paragraph length of two paragraphs in Japanese divided by double linebreaks that don't end with a double linebreak", function() {
- const mockPaper = new Paper( "1964年 \n\n (昭和39年)" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 5 );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 1 ].countLength ).toBe( 7 );
+ expect( paragraphLengths.length ).toBe( 1 );
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 3 );
} );
it( "returns the paragraph length of a paragraph without tags or double linebreaks", function() {
const mockPaper = new Paper( "Lorem ipsum dolor sit amet" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 5 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 5 );
} );
it( "returns the paragraph length of a paragraph in Japanese without tags or double linebreaks", function() {
const mockPaper = new Paper( "東京オリンピック開会直前の1964年(昭和39年)10月1日に開業した。" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 36 );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 36 );
} );
it( "returns the paragraph length of 2 paragraphs, both between p tags", function() {
const mockPaper = new Paper( "
Lorem ipsum
dolor sit amet
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 2 );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 1 ].countLength ).toBe( 3 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 2 );
+ expect( paragraphLengths[ 1 ].paragraphLength ).toBe( 3 );
} );
it( "returns the paragraph length of 2 paragraphs in Japanese, both between p tags", function() {
const mockPaper = new Paper( "
東京オリンピック開会直前の1964年
(昭和39年)10月1日に開業した。
" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 18 );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 1 ].countLength ).toBe( 18 );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 18 );
+ expect( paragraphLengths[ 1 ].paragraphLength ).toBe( 18 );
} );
it( "returns the paragraph length of 2 paragraphs, both between p tags, divided by double linebreaks", function() {
const mockPaper = new Paper( "
Lorem ipsum
\n\n
dolor sit amet
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 2 );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 1 ].countLength ).toBe( 3 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 2 );
+ expect( paragraphLengths[ 1 ].paragraphLength ).toBe( 3 );
} );
it( "returns the paragraph length of 2 paragraphs in Japanese, both between p tags, divided by double linebreaks", function() {
const mockPaper = new Paper( "
東京オリンピック開会直前の1964年
\n\n
(昭和39年)10月1日に開業した。
" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 18 );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 1 ].countLength ).toBe( 18 );
+ const mockResearcher = new JapaneseResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 18 );
+ expect( paragraphLengths[ 1 ].paragraphLength ).toBe( 18 );
} );
it( "returns the paragraph length, with empty paragraphs", function() {
const mockPaper = new Paper( "
test
more text
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() ).length ).toBe( 2 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 2 );
} );
it( "returns the paragraph length, ignoring text inside an element we want to exclude from the analysis", function() {
const mockPaper = new Paper( "
test ignore me
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() ).length ).toBe( 1 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 1 );
} );
it( "returns the paragraph length, ignoring shortcodes", function() {
const mockPaper = new Paper( "
test [shortcode]
", { shortcodes: [ "shortcode" ] } );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() ).length ).toBe( 1 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 1 );
} );
- it( "returns the paragraph length of paragraph without p tags or double linebreaks, but with h2 tags", function() {
+ it( "should not recognize heading as paragraph", function() {
const mockPaper = new Paper( "
Lorem ipsum dolor sit amet
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() )[ 0 ].countLength ).toBe( 5 );
- } );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
- it( "returns the paragraph length of paragraph in Japanese without p tags or double linebreaks, but with h2 tags", function() {
- const mockPaper = new Paper( "
(昭和39年)10月1日に開業した。
" );
- expect( getParagraphLength( mockPaper, new JapaneseResearcher() )[ 0 ].countLength ).toBe( 18 );
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 0 );
} );
- xit( "returns the paragraph length of an empty paragraph with p tags", function() {
+ it( "should not count an empty paragraph", function() {
const mockPaper = new Paper( "
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() ).countLength ).not.toContain( 0 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 0 );
} );
- xit( "returns the paragraph length of an empty paragraph without p tags or double line breaks", function() {
+ it( "should not count an empty paragraph without p tags or double line breaks", function() {
const mockPaper = new Paper( "" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher() ).countLength ).not.toContain( 0 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 0 );
} );
} );
@@ -112,17 +165,32 @@ describe( "a test for getting paragraph length of a text with image(s)", () => {
it( "should not count a paragraph containing only an image", function() {
// The paper contains 3 paragraphs: 2 paragraphs with text and one paragraph with only an image.
const mockPaper = new Paper( "
test
more text
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher( mockPaper ) ).length ).toBe( 2 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 2 );
} );
it( "should return 0 for paragraphs count when all paragraphs only contain images", function() {
const mockPaper = new Paper( "
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher( mockPaper ) ).length ).toBe( 0 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 0 );
} );
it( "should not include the image in the paragraph length calculation", function() {
const mockPaper = new Paper( "
test
test
" );
- expect( getParagraphLength( mockPaper, new EnglishResearcher( mockPaper ) ).length ).toBe( 2 );
- expect( getParagraphLength( mockPaper, new EnglishResearcher( mockPaper ) )[ 0 ].countLength ).toBe( 1 );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const paragraphLengths = getParagraphLength( mockPaper, mockResearcher );
+
+ expect( paragraphLengths.length ).toBe( 2 );
+ expect( paragraphLengths[ 0 ].paragraphLength ).toBe( 1 );
} );
} );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js
index 525f07ba971..c8915ee57d7 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js
@@ -3,7 +3,6 @@ import Paper from "../../../../src/values/Paper.js";
import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher";
// Tests inspired by the examples on http://www.englishpage.com/verbpage/activepassive.html
-// eslint-disable-next-line max-statements
describe( "detecting passive voice in sentences", function() {
it( "returns active voice (Simple Present)", function() {
const paper = new Paper( "Once a week, Tom cleans the house." );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js
index 38233f8de23..a8289d9803e 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js
@@ -2,7 +2,6 @@ import passiveVoice from "../../../../src/languageProcessing/researches/getPassi
import Paper from "../../../../src/values/Paper.js";
import Researcher from "../../../../src/languageProcessing/languages/fr/Researcher";
-// eslint-disable-next-line max-statements
describe( "detecting passive voice in sentences", function() {
it( "returns active voice (présent)", function() {
const paper = new Paper( "Je mange une pomme.", { locale: "fr_FR" } );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultSpec.js
index dadf38bd357..5ff191f7d82 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultSpec.js
@@ -18,7 +18,7 @@ describe( "detecting passive voice in sentences", function() {
expect( passiveVoice( paper, researcher ).passives.length ).toBe( 1 );
} );
- // For now the specs for Arabic and Hungarian are skipped. The shouldn't be skipped once Arabic and Hungarian passive voice are refactored.
+ // For now the specs for Arabic and Hungarian are skipped. The shouldn't be skipped once Arabic and Hungarian passive voice are refactored.
it( "returns active voice for morphological language", function() {
const paper = new Paper( "كتب الولد الخطاب.", { locale: "ar" } );
const researcher = new ArabicResearcher( paper );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js
index 4635d21cac8..429c3074cd3 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js
@@ -1,6 +1,4 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import getSentenceBeginnings from "../../../src/languageProcessing/researches/getSentenceBeginnings";
-
import Paper from "../../../src/values/Paper.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
import FrenchResearcher from "../../../src/languageProcessing/languages/fr/Researcher";
@@ -8,7 +6,6 @@ import SpanishResearcher from "../../../src/languageProcessing/languages/es/Rese
import GreekResearcher from "../../../src/languageProcessing/languages/el/Researcher";
import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher";
-// eslint-disable-next-line max-statements
describe( "gets the sentence beginnings and the count of consecutive duplicates.", function() {
let mockPaper = new Paper( "How are you? Bye!" );
let researcher = new EnglishResearcher( mockPaper );
@@ -206,7 +203,7 @@ describe( "gets the sentence beginnings and the count of consecutive duplicates.
expect( getSentenceBeginnings( mockPaper, researcher )[ 1 ].count ).toBe( 1 );
} );
- /*it( "returns an object with sentence beginnings and counts for two sentences in German starting with different words.", function() {
+ /* it( "returns an object with sentence beginnings and counts for two sentences in German starting with different words.", function() {
mockPaper = new Paper( "Ich bin wie du. Auf wiedersehen. ", { locale: "de_DE" } );
researcher = new GermanResearcher( mockPaper );
expect( getSentenceBeginnings( mockPaper, researcher )[ 0 ].word ).toBe( "ich" );
@@ -530,7 +527,7 @@ describe( "gets the sentence beginnings and the count of consecutive duplicates.
expect( getSentenceBeginnings( mockPaper, researcher )[ 0 ].count ).toBe( 2 );
} );*/
- /*it( "returns an object with sentence beginnings and counts for three sentences all starting with the same words", () => {
+ /* it( "returns an object with sentence beginnings and counts for three sentences all starting with the same words", () => {
mockPaper = new Paper( "Οι γάτες είναι χαριτωμένες. Οι γάτες είναι γλυκές. Οι γάτες είναι αξιολάτρευτες.", { locale: "el" } );
researcher = new GreekResearcher( mockPaper );
@@ -560,7 +557,7 @@ describe( "gets the sentence beginnings and the count of consecutive duplicates.
expect( getSentenceBeginnings( mockPaper, researcher )[ 2 ].word ).toBe( "αυτός ο άνδρας" );
} );
- /*it( "returns an object with sentence beginnings and counts for two sentences in Japanese starting with different words.", function() {
+ /* it( "returns an object with sentence beginnings and counts for two sentences in Japanese starting with different words.", function() {
// https://tatoeba.org/en/sentences/show/425148
// https://tatoeba.org/en/sentences/show/9431906
mockPaper = new Paper( "私たちはよくチェスをします。チェスは難しい。", { locale: "ja_JP" } );
diff --git a/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js
index cc63cb87b9e..65ca41e4b52 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
import ItalianResearcher from "../../../src/languageProcessing/languages/it/Researcher";
import SwedishResearcher from "../../../src/languageProcessing/languages/sv/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js b/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js
index 4feb5e06832..bfcc72b78f9 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import {
computeScoresPerSentenceShortTopic,
computeScoresPerSentenceLongTopic,
@@ -250,9 +249,9 @@ describe( "Test for the research", function() {
} );
} );
- //It’s the same as the English one above it, excepts the locale is Italian. But still the English morphology data is added.
+ // It’s the same as the English one above it, excepts the locale is Italian. But still the English morphology data is added.
- /*it( "returns a score (for a language without morphology support) over all sentences and all topic forms; returns markers for " +
+ /* it( "returns a score (for a language without morphology support) over all sentences and all topic forms; returns markers for " +
"sentences that contain the topic", function() {
const paper = new Paper(
sentencesIT.join( " " ),
diff --git a/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js b/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js
index c87922fb3ec..15265852c37 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments */
import { keywordCountInSlug as slugKeyword, keywordCountInUrl as urlKeyword } from "../../../src/languageProcessing/researches/keywordCountInUrl.js";
import Paper from "../../../src/values/Paper.js";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/keywordCountSpec.js b/packages/yoastseo/spec/languageProcessing/researches/keywordCountSpec.js
index 6007ea7c4a5..c1c121b4275 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/keywordCountSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/keywordCountSpec.js
@@ -2645,7 +2645,7 @@ describe( "Test for counting the keyphrase in a text for Japanese", () => {
expect( getKeyphraseCount( mockPaper, researcher ).markings ).toEqual( [
new Mark( { marked: "私の
猫はかわいい
猫です。",
original: "私の猫はかわいい猫です。",
- } ) ] );
+ } ) ] );
} );
it( "counts a string if text with no keyphrase in it.", function() {
diff --git a/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js
index 609d63776fd..b0b208730ff 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments */
import matchKeywordInSubheadings from "../../../src/languageProcessing/researches/matchKeywordInSubheadings";
import Paper from "../../../src/values/Paper";
import Researcher from "../../../src/languageProcessing/languages/en/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js
index 3ea65a77ae3..69f3b8089ff 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import metaDescriptionKeyword from "../../../src/languageProcessing/researches/metaDescriptionKeyword.js";
import Paper from "../../../src/values/Paper.js";
import Researcher from "../../../src/languageProcessing/languages/en/Researcher";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js
index 2d640141cba..a4cf0571404 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments */
import metaDescriptionLength from "../../../src/languageProcessing/researches/metaDescriptionLength.js";
import Paper from "../../../src/values/Paper.js";
diff --git a/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js b/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js
index 1d183cdd0e8..5f0ba8069b0 100644
--- a/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js
+++ b/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js
@@ -1,5 +1,3 @@
-/* eslint-disable max-statements */
-
import wordComplexity from "../../../src/languageProcessing/researches/wordComplexity.js";
import Paper from "../../../src/values/Paper";
import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher";
@@ -198,7 +196,6 @@ describe( "test with different language specific helper and config", () => {
} );
it( "should not recognize German function words to be complex, no matter whether they are capitalized or not", () => {
- // eslint-disable-next-line max-len
const paper = new Paper( "Nach der von Erzbischof Hinkmar von Reims gebildeten Legende hat gegen Ende des 5. Wahrscheinlichkeit verhältnismäßig." );
const researcher = new GermanResearcher( paper );
researcher.addHelper( "checkIfWordIsComplex", wordComplexityHelperGerman );
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js
index 9f6952c5768..f4771ac5d26 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js
@@ -55,7 +55,6 @@ describe( "A test for Culture Assessments", () => {
} );
} );
-// eslint-disable-next-line max-statements
describe( "a test for targeting non-inclusive phrases in culture assessments", () => {
it( "should return the appropriate score and feedback string for: 'Third World'", () => {
const testData = [
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js
index 006ac9493d5..787dbc82859 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js
@@ -391,7 +391,6 @@ describe( "A test for Disability assessments", function() {
} );
} );
-// eslint-disable-next-line max-statements
describe( "a test for targeting non-inclusive phrases in disability assessments", () => {
it( "should return the appropriate score and feedback string for: 'binge' and its other forms", () => {
const testData = [
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/otherAssessmentsSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/otherAssessmentsSpec.js
index 2e73c9f378b..4cb8ba0a97c 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/otherAssessmentsSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/otherAssessmentsSpec.js
@@ -86,7 +86,7 @@ describe( "Checks various conditions for the 'normal' and 'abnormal' assessments
} );
it( "targets potentially harmful phrases that include the word 'abnormal'", () => {
const testData = [
- {
+ {
identifier: "behaviorallyAbnormal",
text: "I'm afraid this is behaviorally abnormal.",
expectedFeedback: "Be careful when using
behaviorally abnormal as it is potentially harmful. " +
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js
index fc62b0df40a..2562dc6ec43 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js
@@ -12,7 +12,6 @@ describe( "Test isFollowedAndPrecededByException", () => {
const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( true );
} );
it( "returns false when a term is followed but not preceded by an exception", () => {
@@ -23,7 +22,6 @@ describe( "Test isFollowedAndPrecededByException", () => {
const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( false );
} );
it( "returns false when a term is preceded but not followed by an exception", () => {
@@ -34,7 +32,6 @@ describe( "Test isFollowedAndPrecededByException", () => {
const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( false );
} );
} );
@@ -48,7 +45,6 @@ describe( "Test isNotFollowedAndPrecededByException", () => {
const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( false );
} );
it( "returns true when a term is followed but not preceded by an exception", () => {
@@ -59,7 +55,6 @@ describe( "Test isNotFollowedAndPrecededByException", () => {
const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( true );
} );
it( "returns true when a term is preceded but not followed by an exception", () => {
@@ -70,7 +65,6 @@ describe( "Test isNotFollowedAndPrecededByException", () => {
const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( true );
} );
} );
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js
index 1f0818a430b..4cc74dd5d11 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js
@@ -11,7 +11,6 @@ describe( "Test isFollowedByException", () => {
const callback = isFollowedByException( words, consecutiveWords, exceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( true );
} );
it( "returns the right value when term is not followed by an exception", () => {
@@ -21,7 +20,6 @@ describe( "Test isFollowedByException", () => {
const callback = isFollowedByException( words, consecutiveWords, exceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( false );
} );
} );
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js
index d772312237a..535d30817df 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js
@@ -22,7 +22,7 @@ describe( "test isFollowedByParticiple and isNotFollowedByParticiple", () => {
const callback = isFollowedByParticiple( words, consecutiveWords );
const index = 1;
- // eslint-disable-next-line callback-return
+
expect( callback( index ) ).toEqual( true );
} );
it( "returns the right value when term is NOT followed by a participle", () => {
@@ -31,7 +31,7 @@ describe( "test isFollowedByParticiple and isNotFollowedByParticiple", () => {
const callback = isFollowedByParticiple( words, consecutiveWords );
const index = 1;
- // eslint-disable-next-line callback-return
+
expect( callback( index ) ).toEqual( false );
} );
} );
diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js
index 96becfa2877..1d42e0b87ab 100644
--- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js
@@ -10,7 +10,6 @@ xdescribe( "Test isFollowedByException", () => {
const callback = isNotPrecededByException( words, exceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( true );
} );
it( "returns the right value when term is not preceded by an exception", () => {
@@ -19,7 +18,6 @@ xdescribe( "Test isFollowedByException", () => {
const callback = isNotPrecededByException( words, exceptions );
const index = 1;
- // eslint-disable-next-line callback-return
expect( callback( index ) ).toEqual( false );
} );
} );
diff --git a/packages/yoastseo/spec/scoring/assessments/readability/ParagraphTooLongAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/ParagraphTooLongAssessmentSpec.js
index fc076f46ea4..5cf0fea9d5f 100644
--- a/packages/yoastseo/spec/scoring/assessments/readability/ParagraphTooLongAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/readability/ParagraphTooLongAssessmentSpec.js
@@ -5,6 +5,7 @@ import Factory from "../../../../src/helpers/factory.js";
import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher";
import JapaneseResearcher from "../../../../src/languageProcessing/languages/ja/Researcher";
import paragraphLengthJapanese from "../../../../src/languageProcessing/languages/ja/config/paragraphLength";
+import buildTree from "../../../specHelpers/parse/buildTree";
const paragraphTooLongAssessment = new ParagraphTooLongAssessment();
const shortTextJapanese = "は".repeat( 300 );
@@ -14,14 +15,14 @@ const veryLongTextJapanese = "は".repeat( 410 );
describe( "An assessment for scoring too long paragraphs.", function() {
const paper = new Paper( "" );
it( "should score 1 paragraph with ok length", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 60, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 60 } ] ) );
expect( assessment.getScore() ).toBe( 9 );
expect( assessment.getText() ).toBe( "
Paragraph length: None of the paragraphs" +
" are too long. Great job!" );
expect( assessment.hasMarks() ).toBe( false );
} );
it( "should score 1 slightly too long paragraph", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 160, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 160 } ] ) );
expect( assessment.getScore() ).toBe( 6 );
expect( assessment.getText() ).toBe( "
Paragraph length: 1 of the paragraphs" +
" contains more than the recommended maximum number of words (150)." +
@@ -29,7 +30,7 @@ describe( "An assessment for scoring too long paragraphs.", function() {
expect( assessment.hasMarks() ).toBe( true );
} );
it( "should score 1 extremely long paragraph", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 6000, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 6000 } ] ) );
expect( assessment.getScore() ).toBe( 3 );
expect( assessment.getText() ).toBe( "
Paragraph length: 1 of the paragraphs" +
" contains more than the recommended maximum number of words (150)." +
@@ -37,16 +38,16 @@ describe( "An assessment for scoring too long paragraphs.", function() {
expect( assessment.hasMarks() ).toBe( true );
} );
it( "should score 3 paragraphs with ok length", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 60, text: "" },
- { countLength: 71, text: "" }, { countLength: 83, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 60 },
+ { paragraphLength: 71 }, { paragraphLength: 83 } ] ) );
expect( assessment.getScore() ).toBe( 9 );
expect( assessment.getText() ).toBe( "
Paragraph length: None of the paragraphs" +
" are too long. Great job!" );
expect( assessment.hasMarks() ).toBe( false );
} );
it( "should score 3 paragraphs, one of which is too long", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 60, text: "" },
- { countLength: 71, text: "" }, { countLength: 183, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 60 },
+ { paragraphLength: 71 }, { paragraphLength: 183 } ] ) );
expect( assessment.getScore() ).toBe( 6 );
expect( assessment.getText() ).toBe( "
Paragraph length: 1 of the paragraphs" +
" contains more than the recommended maximum number of words (150)." +
@@ -54,8 +55,8 @@ describe( "An assessment for scoring too long paragraphs.", function() {
expect( assessment.hasMarks() ).toBe( true );
} );
it( "should score 3 paragraphs, two of which are too long", function() {
- const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { countLength: 60, text: "" },
- { countLength: 191, text: "" }, { countLength: 183, text: "" } ] ) );
+ const assessment = paragraphTooLongAssessment.getResult( paper, Factory.buildMockResearcher( [ { paragraphLength: 60 },
+ { paragraphLength: 191 }, { paragraphLength: 183 } ] ) );
expect( assessment.getScore() ).toBe( 6 );
expect( assessment.getText() ).toBe( "
Paragraph length: 2 of the paragraphs" +
" contain more than the recommended maximum number of words (150)." +
@@ -73,8 +74,11 @@ describe( "An assessment for scoring too long paragraphs in Japanese in which ch
"in the calculation instead of word length", function() {
it( "should score 1 slightly too long paragraph", function() {
const paper = new Paper( longTextJapanese );
+ const japaneseResearcher = new JapaneseResearcher( paper );
+ buildTree( paper, japaneseResearcher );
+
+ const assessment = paragraphTooLongAssessment.getResult( paper, japaneseResearcher );
- const assessment = paragraphTooLongAssessment.getResult( paper, new JapaneseResearcher( paper ) );
expect( assessment.getScore() ).toBe( 6 );
expect( assessment.getText() ).toBe( "
Paragraph length: 1 of the paragraphs" +
" contains more than the recommended maximum number of characters (300)." +
@@ -83,8 +87,11 @@ describe( "An assessment for scoring too long paragraphs in Japanese in which ch
} );
it( "should score 1 too long paragraph", function() {
const paper = new Paper( veryLongTextJapanese );
+ const japaneseResearcher = new JapaneseResearcher( paper );
+ buildTree( paper, japaneseResearcher );
+
+ const assessment = paragraphTooLongAssessment.getResult( paper, japaneseResearcher );
- const assessment = paragraphTooLongAssessment.getResult( paper, new JapaneseResearcher( paper ) );
expect( assessment.getScore() ).toBe( 3 );
expect( assessment.getText() ).toBe( "
Paragraph length: 1 of the paragraphs" +
" contains more than the recommended maximum number of characters (300)." +
@@ -93,7 +100,11 @@ describe( "An assessment for scoring too long paragraphs in Japanese in which ch
} );
it( "should score 2 slightly too long paragraphs", function() {
const paper = new Paper( `${shortTextJapanese}
${longTextJapanese}
${longTextJapanese}
` );
- const assessment = paragraphTooLongAssessment.getResult( paper, new JapaneseResearcher( paper ) );
+ const japaneseResearcher = new JapaneseResearcher( paper );
+ buildTree( paper, japaneseResearcher );
+
+ const assessment = paragraphTooLongAssessment.getResult( paper, japaneseResearcher );
+
expect( assessment.getScore() ).toBe( 6 );
expect( assessment.getText() ).toBe( "
Paragraph length: 2 of the paragraphs" +
" contain more than the recommended maximum number of characters (300)." +
@@ -127,8 +138,7 @@ describe( "Applicability of the assessment.", function() {
describe( "A test for marking the sentences", function() {
it( "should return markers for a default text", function() {
- const assessment = new ParagraphTooLongAssessment();
- const paper = new Paper( "You just got Yoast SEO, and you are ready to get the most out of it! Or, have you already been using it for a " +
+ const paper = new Paper( "
You just got Yoast SEO, and you are ready to get the most out of it! Or, have you already been using it for a " +
"while and know your way around it? Either way, you should use some essential Yoast SEO settings to let the plugin work at its best. " +
"That’s why we’ve created a Yoast SEO configuration workout! In five steps, we guide you in setting up Yoast SEO the right way! Read " +
"on to learn more about each step. If you just installed Yoast SEO, you’ll find a link to the workout at the top of your general " +
@@ -136,35 +146,27 @@ describe( "A test for marking the sentences", function() {
"screen, where you can find and access the Configuration workout by clicking the Start workout button. If you’ve finished the workout " +
"but want to revise some steps, you can find it in the Workouts menu item of the SEO menu (see bottom of image). Now, let’s go through " +
"the workout’s steps. Choose Organization if you have a professional or a company website. For example, if we were filling in the data " +
- "for yoast.com, we would choose Organization. You’ll then need to add the Organization’s name, logo, and tagline." );
- const paragraphTooLong = new EnglishResearcher( paper );
+ "for yoast.com, we would choose Organization. You’ll then need to add the Organization’s name, logo, and tagline.
" );
+ const englishResearcher = new EnglishResearcher( paper );
+ buildTree( paper, englishResearcher );
+
const expected = [
- new Mark( { original: "You just got Yoast SEO, and you are ready to get the most out of it! Or, have you already been using it for a " +
- "while and know your way around it? Either way, you should use some essential Yoast SEO settings to let the plugin work at its " +
- "best. That’s why we’ve created a Yoast SEO configuration workout! In five steps, we guide you in setting up Yoast SEO the " +
- "right way! Read on to learn more about each step. If you just installed Yoast SEO, you’ll find a link to the workout at the " +
- "top of your general WordPress Dashboard, as well as on top of all the screens of the Yoast SEO settings (see image). The link" +
- " takes you to the Workouts screen, where you can find and access the Configuration workout by clicking the Start workout " +
- "button. If you’ve finished the workout but want to revise some steps, you can find it in the Workouts menu item of the SEO " +
- "menu (see bottom of image). Now, let’s go through the workout’s steps. Choose Organization if you have a professional or a " +
- "company website. For example, if we were filling in the data for yoast.com, we would choose Organization. You’ll then need to" +
- " add the Organization’s name, logo, and tagline.", marked: "
You just got Yoast SEO, and " +
- "you are ready to get the most out of it! Or, have you already been using it for a while " +
- "and know your way around it? Either way, you should use some essential Yoast SEO settings to let the plugin work at its best. " +
- "That’s why we’ve created a Yoast SEO configuration workout! In five steps, we guide you in setting up Yoast SEO the right way!" +
- " Read on to learn more about each step. If you just installed Yoast SEO, you’ll find a link to the workout at the top of your" +
- " general WordPress Dashboard, as well as on top of all the screens of the Yoast SEO settings (see image). The link takes you " +
- "to the Workouts screen, where you can find and access the Configuration workout by clicking the Start workout button. If " +
- "you’ve finished the workout but want to revise some steps, you can find it in the Workouts menu item of the SEO menu (see " +
- "bottom of image). Now, let’s go through the workout’s steps. Choose Organization if you have a professional or a company " +
- "website. For example, if we were filling in the data for yoast.com, we would choose Organization. You’ll then need to add " +
- "the Organization’s name, logo, and tagline." } ),
+ new Mark( {
+ position: {
+ attributeId: "",
+ clientId: "",
+ startOffset: 3,
+ startOffsetBlock: 0,
+ endOffset: 1150,
+ endOffsetBlock: 1154,
+ isFirstSection: false,
+ },
+ } ),
];
- expect( assessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+ expect( new ParagraphTooLongAssessment().getMarks( paper, englishResearcher ) ).toEqual( expected );
} );
it( "should return markers for a default text where the text contains
tags with attribute," +
" where
has a closing tag", function() {
- const assessment = new ParagraphTooLongAssessment();
const paper = new Paper( "
Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, duis aliquid perfecto ius ea, ad pri " +
"corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti ut eam, " +
"eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima accumsan " +
@@ -182,34 +184,26 @@ describe( "A test for marking the sentences", function() {
"epicuri perfecto eam ne. Vis summo delicatissimi in, cu porro facete phaedrum nam.
" +
"
Utamur discere phaedrum eu nam. Ne quidam placerat per, qui inani diceret cu, " +
"at nec quot petentium efficiendi. Sea te persius vulputate. Docendi temporibus et quo. Ad duo appareat lobortis definitionem.!
" );
- const paragraphTooLong = new EnglishResearcher( paper );
+ const englishResearcher = new EnglishResearcher( paper );
+ buildTree( paper, englishResearcher );
+
const expected = [
new Mark( {
- original: "Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, duis aliquid perfecto ius ea, " +
- "ad pri corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti " +
- "ut eam, eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima " +
- "accumsan signiferumque ad. Nisl commune ei est, ut eum stet cibo, duo malis veniam ut. Cu est veritus adolescens " +
- "vituperatoribus, at eam movet perfecto. Magna consequat at cum. Vel ad fabellas accusata, vel ea erat lorem mediocritatem, " +
- "dissentiunt liberavisse per ex. Duo putant vituperata eu, sit at tota etiam deseruisse. Sed in autem mucius. Errem omnium " +
- "facilis mea an. Eu usu eripuit dissentiet, duo ei perfecto argumentum. Diceret forensibus cu has, quo alia nihil et, " +
- "convenire adversarium efficiantur per id. His mazim virtute ornatus ei, has id vocibus docendi percipitur. " +
- "Wisi nusquam pri no, putent menandri ad duo. Nullam nostrum salutandi eum id, per agam exerci an.",
- marked: "
Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, " +
- "duis aliquid perfecto ius ea, " +
- "ad pri corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti " +
- "ut eam, eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima " +
- "accumsan signiferumque ad. Nisl commune ei est, ut eum stet cibo, duo malis veniam ut. Cu est veritus adolescens " +
- "vituperatoribus, at eam movet perfecto. Magna consequat at cum. Vel ad fabellas accusata, vel ea erat lorem mediocritatem, " +
- "dissentiunt liberavisse per ex. Duo putant vituperata eu, sit at tota etiam deseruisse. Sed in autem mucius. Errem omnium " +
- "facilis mea an. Eu usu eripuit dissentiet, duo ei perfecto argumentum. Diceret forensibus cu has, quo alia nihil et, " +
- "convenire adversarium efficiantur per id. His mazim virtute ornatus ei, has id vocibus docendi percipitur. " +
- "Wisi nusquam pri no, putent menandri ad duo. Nullam nostrum salutandi eum id, per agam exerci an." } ),
+ position: {
+ attributeId: "",
+ clientId: "",
+ startOffset: 3,
+ startOffsetBlock: 0,
+ endOffset: 1002,
+ endOffsetBlock: 999,
+ isFirstSection: false,
+ },
+ } ),
];
- expect( assessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+ expect( new ParagraphTooLongAssessment().getMarks( paper, englishResearcher ) ).toEqual( expected );
} );
it( "should return markers for a default text where the text contains
tags with attribute," +
" where
doesn't have a closing tag", function() {
- const assessment = new ParagraphTooLongAssessment();
const paper = new Paper( "
Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, duis aliquid perfecto ius ea, ad pri " +
"corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti ut eam, " +
"eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima accumsan " +
@@ -227,30 +221,23 @@ describe( "A test for marking the sentences", function() {
"epicuri perfecto eam ne. Vis summo delicatissimi in, cu porro facete phaedrum nam.
" +
"
Utamur discere phaedrum eu nam. Ne quidam placerat per, qui inani diceret cu, " +
"at nec quot petentium efficiendi. Sea te persius vulputate. Docendi temporibus et quo. Ad duo appareat lobortis definitionem.!
" );
- const paragraphTooLong = new EnglishResearcher( paper );
+ const englishResearcher = new EnglishResearcher( paper );
+ buildTree( paper, englishResearcher );
+
const expected = [
new Mark( {
- original: "Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, duis aliquid perfecto ius ea, " +
- "ad pri corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti " +
- "ut eam, eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima " +
- "accumsan signiferumque ad. Nisl commune ei est, ut eum stet cibo, duo malis veniam ut. Cu est veritus adolescens " +
- "vituperatoribus, at eam movet perfecto. Magna consequat at cum. Vel ad fabellas accusata, vel ea erat lorem mediocritatem, " +
- "dissentiunt liberavisse per ex. Duo putant vituperata eu, sit at tota etiam deseruisse. Sed in autem mucius. Errem omnium " +
- "facilis mea an. Eu usu eripuit dissentiet, duo ei perfecto argumentum. Diceret forensibus cu has, quo alia nihil et, " +
- "convenire adversarium efficiantur per id. His mazim virtute ornatus ei, has id vocibus docendi percipitur. " +
- "Wisi nusquam pri no, putent menandri ad duo. Nullam nostrum salutandi eum id, per agam exerci an.",
- marked: "
Lorem ipsum dolor sit amet, in magna dolor voluptaria vel, " +
- "duis aliquid perfecto ius ea, " +
- "ad pri corpora petentium torquatos. Eu vidit rationibus vel. No vis partem nominavi neglegentur. Omnis dicat everti " +
- "ut eam, eos ne atqui facer antiopam. Et pri vivendo sensibus perpetua, aperiam epicurei menandri an vix, sea prima " +
- "accumsan signiferumque ad. Nisl commune ei est, ut eum stet cibo, duo malis veniam ut. Cu est veritus adolescens " +
- "vituperatoribus, at eam movet perfecto. Magna consequat at cum. Vel ad fabellas accusata, vel ea erat lorem mediocritatem, " +
- "dissentiunt liberavisse per ex. Duo putant vituperata eu, sit at tota etiam deseruisse. Sed in autem mucius. Errem omnium " +
- "facilis mea an. Eu usu eripuit dissentiet, duo ei perfecto argumentum. Diceret forensibus cu has, quo alia nihil et, " +
- "convenire adversarium efficiantur per id. His mazim virtute ornatus ei, has id vocibus docendi percipitur. " +
- "Wisi nusquam pri no, putent menandri ad duo. Nullam nostrum salutandi eum id, per agam exerci an." } ),
+ position: {
+ attributeId: "",
+ clientId: "",
+ startOffset: 3,
+ startOffsetBlock: 0,
+ endOffset: 1002,
+ endOffsetBlock: 999,
+ isFirstSection: false,
+ },
+ } ),
];
- expect( assessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+ expect( new ParagraphTooLongAssessment().getMarks( paper, englishResearcher ) ).toEqual( expected );
} );
it( "should return markers for a long paragraph inside image caption", function() {
const longText = " A study was carried out to determine the effect of dietary probiotic L on production performance," +
@@ -271,20 +258,29 @@ describe( "A test for marking the sentences", function() {
"beneficial conditions for nutrients’ utilisation, inhibit pathogenic bacteria in the host. Utilising probiotics " +
"in animal nutrition provides not only economic and health benefits they produce also safe foods. Blood haemoglobin, " +
"total protein and total cholesterol concentrations were not significantly affected by the probiotic.";
- const assessment = new ParagraphTooLongAssessment();
const paper = new Paper( "
A short text.
" +
"
" +
longText + "
\n" +
"
"
);
- const paragraphTooLong = new EnglishResearcher( paper );
+ const englishResearcher = new EnglishResearcher( paper );
+ buildTree( paper, englishResearcher );
+
const expected = [
new Mark( {
- original: longText,
- marked: `
${ longText }` } ),
+ position: {
+ attributeId: "",
+ clientId: "",
+ startOffset: 23,
+ startOffsetBlock: 0,
+ endOffset: 2147,
+ endOffsetBlock: 2124,
+ isFirstSection: false,
+ },
+ } ),
];
- expect( assessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+ expect( new ParagraphTooLongAssessment().getMarks( paper, englishResearcher ) ).toEqual( expected );
} );
it( "should return markers for a text in Japanese", function() {
const paper = new Paper( "接続詞は、文と文との中間に位置しています。前文と後文との間にあって、両者の関係を示している言葉です。学校文法では、接続詞は文の成分" +
@@ -292,28 +288,34 @@ describe( "A test for marking the sentences", function() {
"としており、芳賀やすしは接続詞を承前副詞と並立連体詞とに二分しています。時枝文法では「辞」として扱っています。つまり、接続詞は前文を受けて、後文の文末まで" +
"係っていく副詞のような働きをしているということです。独立語として中立的に結びつけている言葉ではありません。このように接続詞は前文の内容を後文へと持ち込んで、" +
"どんな関係になっているかを示し、後文の文末まで係っていく、そうした副詞と似た働きをしています。後文への修飾語的性格を持っています。" );
- const paragraphTooLong = new JapaneseResearcher( paper );
+
+ const japaneseResearcher = new JapaneseResearcher( paper );
+ buildTree( paper, japaneseResearcher );
+
+ const assessment = new ParagraphTooLongAssessment();
+
const expected = [
- new Mark( { original: "接続詞は、文と文との中間に位置しています。前文と後文との間にあって、両者の関係を示している言葉です。学校文法では、接続詞は文の成分" +
- "としては独立語として扱われておりますが、独立語でないとする文法学説もあります。松下文法では一品詞としないで副詞に含め、山田文法では副詞の一類として接続副詞" +
- "としており、芳賀やすしは接続詞を承前副詞と並立連体詞とに二分しています。時枝文法では「辞」として扱っています。つまり、接続詞は前文を受けて、後文の文末まで" +
- "係っていく副詞のような働きをしているということです。独立語として中立的に結びつけている言葉ではありません。このように接続詞は前文の内容を後文へと持ち込んで、" +
- "どんな関係になっているかを示し、後文の文末まで係っていく、そうした副詞と似た働きをしています。後文への修飾語的性格を持っています。", marked:
- "
接続詞は、文と文との中間に位置しています。前文と後文との間にあって、両者の関係を示している言葉です。" +
- "学校文法では、接続詞は文の成分としては独立語として扱われておりますが、独立語でないとする文法学説もあります。松下文法では一品詞としないで副詞に含め、" +
- "山田文法では副詞の一類として接続副詞としており、芳賀やすしは接続詞を承前副詞と並立連体詞とに二分しています。時枝文法では「辞」として扱っています。" +
- "つまり、接続詞は前文を受けて、後文の文末まで係っていく副詞のような働きをしているということです。独立語として中立的に結びつけている言葉ではありません。" +
- "このように接続詞は前文の内容を後文へと持ち込んで、どんな関係になっているかを示し、後文の文末まで係っていく、そうした副詞と似た働きをしています。" +
- "後文への修飾語的性格を持っています。" } ),
+ new Mark( {
+ position: {
+ attributeId: "",
+ clientId: "",
+ startOffset: 0,
+ startOffsetBlock: 0,
+ endOffset: 362,
+ endOffsetBlock: 362,
+ isFirstSection: false,
+ },
+ } ),
];
- expect( paragraphTooLongAssessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+
+ expect( assessment.getMarks( paper, japaneseResearcher ) ).toEqual( expected );
} );
it( "should return no markers when no paragraph is too long", function() {
const paper = new Paper( "This is a very interesting paper." );
- const paragraphTooLong = Factory.buildMockResearcher( [ { countLength: 60, text: "" }, { countLength: 11, text: "" },
- { countLength: 13, text: "" } ] );
+ const mockResearcher = Factory.buildMockResearcher(
+ [ { paragraphLength: 60 }, { paragraphLength: 11 }, { paragraphLength: 13 } ] );
const expected = [];
- expect( paragraphTooLongAssessment.getMarks( paper, paragraphTooLong ) ).toEqual( expected );
+ expect( paragraphTooLongAssessment.getMarks( paper, mockResearcher ) ).toEqual( expected );
} );
} );
@@ -327,9 +329,9 @@ describe( "test for paragraph too long assessment when is used in product page a
},
};
const result = new ParagraphTooLongAssessment( config ).getResult( paper, Factory.buildMockResearcher( [
- { countLength: 60, text: "" },
- { countLength: 11, text: "" },
- { countLength: 13, text: "" },
+ { paragraphLength: 60 },
+ { paragraphLength: 11 },
+ { paragraphLength: 13 },
] ) );
expect( result.getScore() ).toEqual( 9 );
expect( result.getText() ).toEqual( "
Paragraph length: " +
@@ -344,9 +346,9 @@ describe( "test for paragraph too long assessment when is used in product page a
},
};
const result = new ParagraphTooLongAssessment( config ).getResult( paper, Factory.buildMockResearcher( [
- { countLength: 110, text: "" },
- { countLength: 150, text: "" },
- { countLength: 150, text: "" },
+ { paragraphLength: 110 },
+ { paragraphLength: 150 },
+ { paragraphLength: 150 },
] ) );
expect( result.getScore() ).toEqual( 3 );
expect( result.getText() ).toEqual( "
Paragraph length: 3 of the paragraphs contain" +
@@ -361,9 +363,9 @@ describe( "test for paragraph too long assessment when is used in product page a
},
};
const result = new ParagraphTooLongAssessment( config ).getResult( paper, Factory.buildMockResearcher( [
- { countLength: 90, text: "" },
- { countLength: 75, text: "" },
- { countLength: 80, text: "" },
+ { paragraphLength: 90 },
+ { paragraphLength: 75 },
+ { paragraphLength: 80 },
] ) );
expect( result.getScore() ).toEqual( 6 );
expect( result.getText() ).toEqual( "
Paragraph length: 3 of the paragraphs contain " +
@@ -377,9 +379,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with paragraphs that contain less than characters (300) (green bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 200, text: "" },
- { countLength: 260, text: "" },
- { countLength: 100, text: "" },
+ { paragraphLength: 200 },
+ { paragraphLength: 260 },
+ { paragraphLength: 100 },
],
false,
false,
@@ -393,9 +395,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with two paragraphs that contain more than 400 characters (red bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 400, text: "" },
- { countLength: 300, text: "" },
- { countLength: 500, text: "" },
+ { paragraphLength: 400 },
+ { paragraphLength: 300 },
+ { paragraphLength: 500 },
],
false,
false,
@@ -409,9 +411,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with paragraphs that contain 300-400 characters (orange bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 350, text: "" },
- { countLength: 300, text: "" },
- { countLength: 390, text: "" },
+ { paragraphLength: 350 },
+ { paragraphLength: 300 },
+ { paragraphLength: 390 },
],
false,
false,
@@ -427,9 +429,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with paragraphs that contain less than characters (140) (green bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 100, text: "" },
- { countLength: 120, text: "" },
- { countLength: 90, text: "" },
+ { paragraphLength: 100 },
+ { paragraphLength: 120 },
+ { paragraphLength: 90 },
],
false,
false,
@@ -443,9 +445,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with three paragraphs that contain more than 200 characters (red bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 400, text: "" },
- { countLength: 300, text: "" },
- { countLength: 500, text: "" },
+ { paragraphLength: 400 },
+ { paragraphLength: 300 },
+ { paragraphLength: 500 },
],
false,
false,
@@ -459,9 +461,9 @@ describe( "test for paragraph too long assessment for languages that have langua
it( "should assess a paper with all paragraphs that contain 140-200 characters (orange bullet)", function() {
const paper = new Paper( "" );
const mockResearcher = Factory.buildMockResearcher( [
- { countLength: 150, text: "" },
- { countLength: 170, text: "" },
- { countLength: 200, text: "" },
+ { paragraphLength: 150 },
+ { paragraphLength: 170 },
+ { paragraphLength: 200 },
],
false,
false,
diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js
index 654d1e0c812..1dd2df820ca 100644
--- a/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js
@@ -7,7 +7,7 @@ import Mark from "../../../../src/values/Mark.js";
import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher";
let paper = new Paper();
-// eslint-disable-next-line max-statements
+
describe( "An assessment for scoring repeated sentence beginnings.", function() {
it( "scores one instance with 4 consecutive sentences starting with the same word.", function() {
const assessment = new SentenceBeginningsAssessment().getResult( paper, Factory.buildMockResearcher( [ { word: "hey", count: 2 },
diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js
index 10cc3eb3b68..d6547562c68 100644
--- a/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js
@@ -1,10 +1,8 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import SentenceLengthInTextAssessment from "../../../../src/scoring/assessments/readability/SentenceLengthInTextAssessment";
-
import Paper from "../../../../src/values/Paper.js";
import Mark from "../../../../src/values/Mark.js";
-import addMark from "../../../../src/markers/addMark";
import Factory from "../../../../src/helpers/factory.js";
+import buildTree from "../../../specHelpers/parse/buildTree";
import DefaultResearcher from "../../../../src/languageProcessing/languages/_default/Researcher";
import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher";
@@ -12,19 +10,20 @@ import PolishResearcher from "../../../../src/languageProcessing/languages/pl/Re
import RussianResearcher from "../../../../src/languageProcessing/languages/ru/Researcher";
import ItalianResearcher from "../../../../src/languageProcessing/languages/it/Researcher";
import TurkishResearcher from "../../../../src/languageProcessing/languages/tr/Researcher";
+import japaneseConfig from "../../../../src/languageProcessing/languages/ja/config/sentenceLength";
const shortSentenceDefault = "Word ".repeat( 18 ) + "word. ";
const longSentenceDefault = "Word ".repeat( 20 ) + "word. ";
const shortSentence15WordsLimit = "Word ".repeat( 13 ) + "word. ";
const longSentence15WordsLimit = "Word ".repeat( 15 ) + "word. ";
-import japaneseConfig from "../../../../src/languageProcessing/languages/ja/config/sentenceLength";
-
-// eslint-disable-next-line max-statements
describe( "An assessment for sentence length", function() {
it( "returns the score for all short sentences using the default config", function() {
const mockPaper = new Paper( shortSentenceDefault );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 9 );
@@ -34,7 +33,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 50% long sentences using the default config", function() {
const mockPaper = new Paper( shortSentenceDefault + longSentenceDefault );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -46,7 +48,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 100% long sentences using the default config", function() {
const mockPaper = new Paper( longSentenceDefault );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -58,7 +63,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 25% long sentences using the default config", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault + shortSentenceDefault + shortSentenceDefault );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 9 );
@@ -68,7 +76,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 30% long sentences using the default config", function() {
const mockPaper = new Paper( longSentenceDefault.repeat( 3 ) + shortSentenceDefault.repeat( 7 ) );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -80,7 +91,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 100% long sentences in a language that overrides the default recommended length config", function() {
const mockPaper = new Paper( longSentence15WordsLimit );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new RussianResearcher( mockPaper ) );
+ const mockResearcher = new RussianResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -90,13 +104,20 @@ describe( "An assessment for sentence length", function() {
expect( assessment.hasMarks() ).toBe( true );
expect( new SentenceLengthInTextAssessment().getMarks( mockPaper, new RussianResearcher( mockPaper ) ) ).toEqual( [
new Mark( {
- original: "Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word word.",
- marked: addMark( "Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word word." ),
+ position: {
+ startOffset: 0,
+ endOffset: 80,
+ startOffsetBlock: 0,
+ endOffsetBlock: 80,
+ clientId: "",
+ attributeId: "",
+ isFirstSection: false,
+ },
} ),
] );
} );
- /*it( "returns the score for 100% long sentences in a language with the sentence length limit of 25 words", function() {
+ /* it( "returns the score for 100% long sentences in a language with the sentence length limit of 25 words", function() {
const mockPaper = new Paper( longSentence25WordsLimit );
const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new ItalianResearcher( mockPaper ) );
@@ -126,7 +147,7 @@ describe( "An assessment for sentence length", function() {
expect( assessment.hasMarks() ).toBe( false );
} );*/
- /*it( "returns the score for 100% short sentences in a language that overrides the default with the maximum allowed percentage of long sentences of 15%", function() {
+ /* it( "returns the score for 100% short sentences in a language that overrides the default with the maximum allowed percentage of long sentences of 15%", function() {
const mockPaper = new Paper( shortSentenceDefault );
const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new PolishResearcher( mockPaper ) );
@@ -173,7 +194,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 20% long sentences in a language that overrides the default config" +
" for maximum allowed percentage of long sentences", function() {
const mockPaper = new Paper( longSentenceDefault.repeat( 4 ) + shortSentenceDefault.repeat( 16 ) );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new PolishResearcher( mockPaper ) );
+ const mockResearcher = new PolishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -186,7 +210,10 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 25% long sentences in a language that overrides the default config for both recommended " +
"maximum sentence length, and the maximum allowed percentage of long sentences", function() {
const mockPaper = new Paper( longSentence15WordsLimit + shortSentence15WordsLimit.repeat( 3 ) );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, new TurkishResearcher( mockPaper ) );
+ const mockResearcher = new TurkishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -196,7 +223,7 @@ describe( "An assessment for sentence length", function() {
expect( assessment.hasMarks() ).toBe( true );
} );
- /*it( "returns the score for 25% long sentences in Hebrew", function() {
+ /* it( "returns the score for 25% long sentences in Hebrew", function() {
const mockPaper = new Paper( "text", { locale: "he_IL" } );
const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, Factory.buildMockResearcher( [
{ sentence: "", sentenceLength: 16 },
@@ -223,7 +250,7 @@ describe( "An assessment for sentence length", function() {
expect( assessment.hasMarks() ).toBe( false );
} );*/
- /*it( "returns the score for 100% short sentences in Turkish", function() {
+ /* it( "returns the score for 100% short sentences in Turkish", function() {
const mockPaper = new Paper();
const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, Factory.buildMockResearcher( [
{ sentence: "", sentenceLength: 14 },
@@ -237,9 +264,12 @@ describe( "An assessment for sentence length", function() {
it( "returns the score for 100% long sentences in a language that should count sentence length in characters (Japanese)", function() {
const mockPaper = new Paper( "" );
- const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, Factory.buildMockResearcher( [
+ const mockResearcher = Factory.buildMockResearcher( [
{ sentence: "", sentenceLength: 41 },
- ], false, false, japaneseConfig ) );
+ ], false, false, japaneseConfig );
+ buildTree( mockPaper, mockResearcher );
+
+ const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -249,7 +279,7 @@ describe( "An assessment for sentence length", function() {
expect( assessment.hasMarks() ).toBe( true );
} );
- /*it( "returns the score for 100% short sentences in Japanese", function() {
+ /* it( "returns the score for 100% short sentences in Japanese", function() {
const mockPaper = new Paper( "" );
const assessment = new SentenceLengthInTextAssessment().getResult( mockPaper, Factory.buildMockResearcher( [
{ sentence: "", sentenceLength: 39 },
@@ -398,10 +428,13 @@ describe( "An assessment for sentence length for cornerstone content", function(
it( "returns the score for 25% long sentences in a language that overrides the default cornerstone configuration", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault.repeat( 3 ) );
+ const mockResearcher = new PolishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
farTooMany: 25,
- }, true ).getResult( mockPaper, new PolishResearcher( mockPaper ) );
+ }, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -411,7 +444,7 @@ describe( "An assessment for sentence length for cornerstone content", function(
expect( assessment.hasMarks() ).toBe( true );
} );
- /*it( "returns the score for 20% long sentences in Polish using the cornerstone configuration", function() {
+ /* it( "returns the score for 20% long sentences in Polish using the cornerstone configuration", function() {
const mockPaper = new Paper( longSentenceDefault.repeat( 4 ) + shortSentenceDefault.repeat( 16 ) );
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
@@ -428,10 +461,13 @@ describe( "An assessment for sentence length for cornerstone content", function(
it( "returns the score for 25% long sentences using the default cornerstone configuration", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault.repeat( 3 ) );
+ const mockResearcher = new DefaultResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
farTooMany: 25,
- }, true ).getResult( mockPaper, new DefaultResearcher( mockPaper ) );
+ }, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -445,10 +481,13 @@ describe( "An assessment for sentence length for cornerstone content", function(
describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 100% short sentences in English using the product page configuration", function() {
const mockPaper = new Paper( shortSentenceDefault );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
farTooMany: 25,
- }, false, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, false, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 9 );
@@ -458,10 +497,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 100% long sentences in English using the product page configuration", function() {
const mockPaper = new Paper( longSentenceDefault );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
farTooMany: 25,
- }, false, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, false, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -473,10 +515,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 25% long sentences in English using the product page configuration", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault.repeat( 3 ) );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 20,
farTooMany: 25,
- }, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -488,10 +533,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 100% short sentences in English using the cornerstone product page configuration", function() {
const mockPaper = new Paper( shortSentenceDefault );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 15,
farTooMany: 20,
- }, true, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, true, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 9 );
@@ -501,10 +549,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 100% long sentences in English using the cornerstone product page configuration", function() {
const mockPaper = new Paper( longSentenceDefault );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 15,
farTooMany: 20,
- }, true, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, true, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -516,10 +567,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 20% long sentences in English using the cornerstone product page configuration", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault.repeat( 4 ) );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 15,
farTooMany: 20,
- }, true, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, true, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 6 );
@@ -531,10 +585,13 @@ describe( "An assessment for sentence length for product pages", function() {
it( "returns the score for 25% long sentences in English using the cornerstone product page configuration", function() {
const mockPaper = new Paper( longSentenceDefault + shortSentenceDefault.repeat( 3 ) );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const assessment = new SentenceLengthInTextAssessment( {
slightlyTooMany: 15,
farTooMany: 20,
- }, true, true ).getResult( mockPaper, new EnglishResearcher( mockPaper ) );
+ }, true, true ).getResult( mockPaper, mockResearcher );
expect( assessment.hasScore() ).toBe( true );
expect( assessment.getScore() ).toEqual( 3 );
@@ -547,27 +604,78 @@ describe( "An assessment for sentence length for product pages", function() {
describe( "A test for marking too long sentences", function() {
it( "returns markers for too long sentences", function() {
- const paper = new Paper( "This is a too long sentence, because it has over twenty words, and that is hard too read, don't you think?" );
- const sentenceLengthInText = Factory.buildMockResearcher( [ { sentence: "This is a too long sentence, because it has over twenty" +
- " words, and that is hard too read, don't you think?", sentenceLength: 21 } ] );
+ const mockPaper = new Paper( "This is a too long sentence, because it has over twenty words, and that is hard too read, don't you think?" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
const expected = [
- new Mark( { original: "This is a too long sentence, because it has over twenty words, and that is hard too read, don't you think?",
- marked: "
This is a too long sentence, because it has over twenty words, and that is hard too" +
- " read, don't you think?" } ),
+ new Mark( {
+ position: {
+ startOffset: 0,
+ endOffset: 106,
+ startOffsetBlock: 0,
+ endOffsetBlock: 106,
+ attributeId: "",
+ clientId: "",
+ isFirstSection: false,
+ } } ),
];
- expect( new SentenceLengthInTextAssessment().getMarks( paper, sentenceLengthInText ) ).toEqual( expected );
+ expect( new SentenceLengthInTextAssessment().getMarks( mockPaper, mockResearcher ) ).toEqual( expected );
+ } );
+
+ it( "adjusts the startOffset when the long sentence starts with a space", () => {
+ const mockPaper = new Paper( " This is a too long sentence, because it has over twenty words, and that is hard too read, don't you think?" );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const expected = [
+ new Mark( {
+ position: {
+ startOffset: 1,
+ endOffset: 107,
+ startOffsetBlock: 1,
+ endOffsetBlock: 107,
+ attributeId: "",
+ clientId: "",
+ isFirstSection: false,
+ } } ),
+ ];
+ expect( new SentenceLengthInTextAssessment().getMarks( mockPaper, mockResearcher ) ).toEqual( expected );
+ } );
+
+ it( "adjusts the endOffset when the long sentence ends with a space", () => {
+ const mockPaper = new Paper( "This is a too long sentence, because it has over twenty words, and that is hard too read, don't you think? " );
+ const mockResearcher = new EnglishResearcher( mockPaper );
+ buildTree( mockPaper, mockResearcher );
+
+ const expected = [
+ new Mark( {
+ position: {
+ startOffset: 0,
+ endOffset: 106,
+ startOffsetBlock: 0,
+ endOffsetBlock: 106,
+ attributeId: "",
+ clientId: "",
+ isFirstSection: false,
+ } } ),
+ ];
+ expect( new SentenceLengthInTextAssessment().getMarks( mockPaper, mockResearcher ) ).toEqual( expected );
} );
it( "returns no markers if no sentences are too long", function() {
const paper = new Paper( "This is a short sentence." );
- const sentenceLengthInText = Factory.buildMockResearcher( [ { sentence: "This is a short sentence.", sentenceLength: 5 } ] );
+ // const sentenceLengthInText = Factory.buildMockResearcher( [ { sentence: "This is a short sentence.", sentenceLength: 5 } ] );
+ const mockResearcher = new EnglishResearcher( paper );
+ buildTree( paper, mockResearcher );
+
const expected = [];
- expect( new SentenceLengthInTextAssessment().getMarks( paper, sentenceLengthInText ) ).toEqual( expected );
+ expect( new SentenceLengthInTextAssessment().getMarks( paper, mockResearcher ) ).toEqual( expected );
} );
} );
-describe( "A test for marking too long sentences", function() {
- it( "calculatePercentage returns nothing if there are no sentences", function() {
+describe( "A test for calculatePercentage", function() {
+ it( "returns nothing if there are no sentences", function() {
expect( new SentenceLengthInTextAssessment().calculatePercentage( [] ) ).toEqual( 0 );
} );
} );
diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js
index 0139b6569f1..b5dcfeb68bb 100644
--- a/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import SubheadingDistributionTooLong from "../../../../src/scoring/assessments/readability/SubheadingDistributionTooLongAssessment.js";
import Paper from "../../../../src/values/Paper.js";
import Factory from "../../../../src/helpers/factory.js";
@@ -628,7 +627,7 @@ describe( "Language-specific configuration for specific types of content is used
expect( assessment._config.slightlyTooMany ).toEqual( japaneseConfig.cornerstoneParameters.slightlyTooMany );
expect( assessment._config.farTooMany ).toEqual( japaneseConfig.cornerstoneParameters.farTooMany );
} );
- //Only need one test for japanese to test getLanguageSpecificConfig. The other tests are redundant.
+ // Only need one test for japanese to test getLanguageSpecificConfig. The other tests are redundant.
// it( "should score short cornerstone content in Japanese (<500 characters), " +
// "which does not have subheadings, as OK.", function() {
// const paper = new Paper( shortCornerstoneTextJapanese );
@@ -665,7 +664,7 @@ describe( "A test for scoring too long text fragments without a subheading for l
"
Add subheadings to improve readability." );
} );
// you need 1 test to test the getLanguageSpecificConfig in the get result method. The rest of the tests is redundant.
- /*it( "Scores a text where multiple sections are slightly too long.", function() {
+ /* it( "Scores a text where multiple sections are slightly too long.", function() {
const paper = new Paper( shortTextJapanese + subheading + longTextJapanese + subheading + longTextJapanese );
const assessment = subheadingDistributionTooLong.getResult( paper, new JapaneseResearcher( paper ) );
diff --git a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js
index d29b4e950c1..63066df40e2 100644
--- a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import KeyphraseInImagesAssessment from "../../../../src/scoring/assessments/seo/KeyphraseInImageTextAssessment";
import Paper from "../../../../src/values/Paper.js";
import Factory from "../../../../src/helpers/factory.js";
diff --git a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js
index 4e61409f65d..481d68bb86b 100644
--- a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import { merge } from "lodash";
import KeyphraseLengthAssessment from "../../../../src/scoring/assessments/seo/KeyphraseLengthAssessment";
@@ -264,7 +263,7 @@ describe( "the keyphrase length assessment for regular posts and pages", functio
} );
} );
-//Japanese tests do test character specific logic. So not removed.
+// Japanese tests do test character specific logic. So not removed.
describe( "the keyphrase length assessment for Japanese", function() {
it( "should clear the memoized data", function() {
primeLanguageSpecificData.cache.clear();
diff --git a/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js
index f6c7751a5f3..ac938bc8cc6 100644
--- a/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import MetaDescriptionKeywordAssessment from "../../../../src/scoring/assessments/seo/MetaDescriptionKeywordAssessment";
import Paper from "../../../../src/values/Paper";
import Factory from "../../../../src/helpers/factory";
@@ -124,7 +123,7 @@ describe( "a test for the meta description keyword assessment when the exact mat
} );
- /*it( "returns a bad result when the meta description doesn't contain the exact match of the keyphrase in Japanese", function() {
+ /* it( "returns a bad result when the meta description doesn't contain the exact match of the keyphrase in Japanese", function() {
const mockPaper = new Paper( "", { keyword: "『小さい花の刺繍』",
synonyms: "野生のハーブの刺繡",
description: "小さくて可愛い花の刺繍に関する一般一般の記事です。私は美しい猫を飼っています。" } );
diff --git a/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js
index 086d2455bde..1a7956fbfe5 100644
--- a/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js
@@ -1,4 +1,3 @@
-/* eslint-disable capitalized-comments, spaced-comment */
import SubheadingsKeywordAssessment from "../../../../src/scoring/assessments/seo/SubHeadingsKeywordAssessment";
import Paper from "../../../../src/values/Paper";
import Factory from "../../../../src/helpers/factory";
diff --git a/packages/yoastseo/spec/scoring/assessments/seo/TextTitleAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/TextTitleAssessmentSpec.js
index c232f58867e..e26e3a31697 100644
--- a/packages/yoastseo/spec/scoring/assessments/seo/TextTitleAssessmentSpec.js
+++ b/packages/yoastseo/spec/scoring/assessments/seo/TextTitleAssessmentSpec.js
@@ -1,6 +1,6 @@
import TextTitleAssessment from "../../../../src/scoring/assessments/seo/TextTitleAssessment";
-import { values } from "yoastseo";
+import { values } from "../../../../src";
const { Paper } = values;
diff --git a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js
index 84a7924423f..cb9599b8048 100644
--- a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js
+++ b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js
@@ -36,7 +36,6 @@ import WordComplexityAssessment from "../../../../../src/scoring/assessments/rea
import testPapers from "./testTexts";
testPapers.forEach( function( testPaper ) {
- // eslint-disable-next-line max-statements
describe( "Full-text test for paper " + testPaper.name, function() {
const paper = testPaper.paper;
const locale = paper.getLocale();
diff --git a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper1.js b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper1.js
index 6d2ad1c18ac..778a3072204 100644
--- a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper1.js
+++ b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper1.js
@@ -93,7 +93,7 @@ const expectedResults = {
textSentenceLength: {
isApplicable: true,
score: 3,
- resultText: "
Sentence length: 50% of the sentences contain more " +
+ resultText: "
Sentence length: 45.5% of the sentences contain more " +
"than 20 words, which is more than the recommended maximum of 25%.
" +
"Try to shorten the sentences.",
},
diff --git a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper3.js b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper3.js
index f58a8c5e863..0dac860a15c 100644
--- a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper3.js
+++ b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/testTexts/en/englishPaper3.js
@@ -95,9 +95,8 @@ const expectedResults = {
},
textSentenceLength: {
isApplicable: true,
- score: 3,
-
- resultText: "
Sentence length: 32% of the sentences contain more than 20 words, " +
+ score: 6,
+ resultText: "
Sentence length: 26.9% of the sentences contain more than 20 words, " +
"which is more than the recommended maximum of 25%.
Try to shorten the sentences.",
},
textTransitionWords: {
diff --git a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js
index 0a70121e742..8faaef889a8 100644
--- a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js
+++ b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js
@@ -45,7 +45,6 @@ import WordComplexityAssessment from "../../../../../src/scoring/assessments/rea
import testPapers from "./testTexts";
testPapers.forEach( function( testPaper ) {
- // eslint-disable-next-line max-statements
describe( "Full-text test for paper " + testPaper.name, function() {
const paper = testPaper.paper;
const locale = paper.getLocale();
diff --git a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper1.js b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper1.js
index d3a68a271df..671c8cd0a10 100644
--- a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper1.js
+++ b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper1.js
@@ -136,8 +136,8 @@ const expectedResults = {
},
textSentenceLength: {
isApplicable: true,
- score: 9,
- resultText: "
Sentence length: Great!",
+ score: 3,
+ resultText: "
Sentence length: 28.6% of the sentences contain more than 20 words, which is more than the recommended maximum of 20%.
Try to shorten the sentences.",
},
textTransitionWords: {
isApplicable: true,
diff --git a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper2.js b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper2.js
index c31f33b97c8..3d34ce72ae3 100644
--- a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper2.js
+++ b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/testTexts/en/englishPaper2.js
@@ -149,7 +149,7 @@ const expectedResults = {
textSentenceLength: {
isApplicable: true,
score: 3,
- resultText: "
Sentence length: 50% of the sentences contain more than 20 words, " +
+ resultText: "
Sentence length: 46.7% of the sentences contain more than 20 words, " +
"which is more than the recommended maximum of 20%.
" +
"Try to shorten the sentences.",
},
diff --git a/packages/yoastseo/spec/scoring/helpers/assessments/checkForTooLongSentencesSpec.js b/packages/yoastseo/spec/scoring/helpers/assessments/checkForTooLongSentencesSpec.js
deleted file mode 100644
index e6bb9eff4b1..00000000000
--- a/packages/yoastseo/spec/scoring/helpers/assessments/checkForTooLongSentencesSpec.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import checkForTooLongSentences from "../../../../src/scoring/helpers/assessments/checkForTooLongSentences.js";
-
-describe( "Checks if sentences are too long", function() {
- it( "Returns no sentences, none are too long", function() {
- var sentences =
- [
- { sentence: "", sentenceLength: 32 },
- { sentence: "", sentenceLength: 64 },
- { sentence: "", sentenceLength: 128 },
- ];
- var recommendedValue = 256;
- expect( checkForTooLongSentences( sentences, recommendedValue ) ).toEqual( [ ] );
- } );
- it( "Returns all sentences, all are too long", function() {
- var sentences =
- [
- { sentence: "", sentenceLength: 32 },
- { sentence: "", sentenceLength: 64 },
- { sentence: "", sentenceLength: 128 },
- ];
- var recommendedValue = 16;
- expect( checkForTooLongSentences( sentences, recommendedValue ) ).toEqual( sentences );
- } );
- it( "Returns 2 sentences that exceed the recommended value", function() {
- var sentences =
- [
- { sentence: "", sentenceLength: 32 },
- { sentence: "", sentenceLength: 64 },
- { sentence: "", sentenceLength: 128 },
- { sentence: "", sentenceLength: 256 },
- ];
- var recommendedValue = 96;
- var expectedOutput =
- [
- { sentence: "", sentenceLength: 128 },
- { sentence: "", sentenceLength: 256 },
- ];
- expect( checkForTooLongSentences( sentences, recommendedValue ) ).toEqual( expectedOutput );
- } );
- it( "Returns no sentences, since they are the exact allowed length.", function() {
- var sentences =
- [
- { sentence: "", sentenceLength: 64 },
- { sentence: "", sentenceLength: 64 },
- { sentence: "", sentenceLength: 64 },
- ];
- var recommendedValue = 64;
- expect( checkForTooLongSentences( sentences, recommendedValue ) ).toEqual( [ ] );
- } );
-} );
diff --git a/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js b/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js
index 8f133b0dcaa..a446e5eaf46 100644
--- a/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js
+++ b/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js
@@ -117,7 +117,7 @@ class TreeFromYaml {
*
* @returns {module:parsedPaper/structure.Node} The parsed tree.
*/
- parse( parameters ) { // eslint-disable-line complexity
+ parse( parameters ) {
/*
Type of node to add.
The type should be the first (and only) key of the JSON object.
diff --git a/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js b/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js
index cf7f579feb3..72c24c8d850 100644
--- a/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js
+++ b/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js
@@ -4,7 +4,7 @@ import KeyphraseDistributionAssessment from "../../../src/scoring/assessments/se
import keyphraseDistribution from "../../../src/languageProcessing/researches/keyphraseDistribution";
/* eslint-disable complexity */
-/* eslint-disable max-statements */
+
/**
* Checks which assessment are available for an SEO assessor, given a certain Paper.
* @param {Assessor} assessor The SEO assessor.
@@ -167,7 +167,6 @@ export function checkAssessmentAvailability( assessor, isProductAssessor = false
} );
}
/* eslint-enable complexity */
-/* eslint-enable max-statements */
/**
* Checks the config overrides for a given SEO assessor.
diff --git a/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js b/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js
index 964d4d83977..0d558a1615f 100644
--- a/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js
+++ b/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js
@@ -625,7 +625,6 @@ describe( "AnalysisWebWorker", () => {
// Mock the console to see if it is used and to not output anything for real.
// eslint-disable-next-line no-console
console.log = jest.fn();
- // eslint-disable-next-line no-console
console.error = jest.fn();
// Mock the first function call in analyze to throw an error.
@@ -640,7 +639,6 @@ describe( "AnalysisWebWorker", () => {
expect( result.error ).toBe( "An error occurred while running the analysis.\n\tError: Simulated error!" );
// eslint-disable-next-line no-console
expect( console.log ).toHaveBeenCalled();
- // eslint-disable-next-line no-console
expect( console.error ).toHaveBeenCalled();
done();
};
@@ -1792,6 +1790,19 @@ describe( "AnalysisWebWorker", () => {
worker._paper = new Paper( "This is the content.", { keyword: "dogs" } );
expect( worker.shouldReadabilityUpdate( paper ) ).toBe( true );
} );
+
+ test( "returns true when the client IDs of the blocks inside attributes changes", () => {
+ const paper = new Paper( "This is the content.", { wpBlocks: [
+ { name: "block1", clientId: "1234" },
+ { name: "block2", clientId: "5678" },
+ ] } );
+
+ worker._paper = new Paper( "This is the content.", { wpBlocks: [
+ { name: "block1", clientId: "6783" },
+ { name: "block2", clientId: "0636" },
+ ] } );
+ expect( worker.shouldReadabilityUpdate( paper ) ).toBe( true );
+ } );
} );
describe( "shouldSeoUpdate", () => {
diff --git a/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js b/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js
index 59f393b517c..e54b4d36bd6 100644
--- a/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js
+++ b/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js
@@ -110,7 +110,6 @@ describe( "wrapTryAroundAction", function() {
// Mute the actual logs.
// eslint-disable-next-line no-console
console.debug = jest.fn();
- // eslint-disable-next-line no-console
console.error = jest.fn();
wrapper().then( result => {
@@ -118,7 +117,6 @@ describe( "wrapTryAroundAction", function() {
expect( result.error ).toBe( "Error: Testing error!" );
// eslint-disable-next-line no-console
expect( console.debug ).toHaveBeenCalledTimes( 1 );
- // eslint-disable-next-line no-console
expect( console.error ).toHaveBeenCalledTimes( 1 );
done();
diff --git a/packages/yoastseo/src/app.js b/packages/yoastseo/src/app.js
index 81aedbbf1d5..be791dd9b17 100644
--- a/packages/yoastseo/src/app.js
+++ b/packages/yoastseo/src/app.js
@@ -814,7 +814,6 @@ class App {
* @returns {void}
*/
switchAssessors( useCornerStone ) {
- // eslint-disable-next-line no-console
console.warn( "Switch assessor is deprecated since YoastSEO.js version 1.35.0" );
this.changeAssessorOptions( {
diff --git a/packages/yoastseo/src/config/transliterationsWPstyle.js b/packages/yoastseo/src/config/transliterationsWPstyle.js
index 6091dce554f..0d61fbeb29b 100644
--- a/packages/yoastseo/src/config/transliterationsWPstyle.js
+++ b/packages/yoastseo/src/config/transliterationsWPstyle.js
@@ -346,10 +346,10 @@ const transliterationsGeneral = [
* | U+1EF9 | ỹ | y | Latin small letter y with tilde |
*/
- // Currency signs:
+ // Currency signs:
{ letter: /[\u00A3]/g, alternative: "" },
{ letter: /[\u20AC]/g, alternative: "E" },
- // Decompositions for Latin-1 Supplement:
+ // Decompositions for Latin-1 Supplement:
{ letter: /[\u00AA]/g, alternative: "a" },
{ letter: /[\u00BA]/g, alternative: "o" },
{ letter: /[\u00C0]/g, alternative: "A" },
@@ -414,7 +414,7 @@ const transliterationsGeneral = [
{ letter: /[\u00FD]/g, alternative: "y" },
{ letter: /[\u00FE]/g, alternative: "th" },
{ letter: /[\u00FF]/g, alternative: "y" },
- // Decompositions for Latin Extended-A:
+ // Decompositions for Latin Extended-A:
{ letter: /[\u0100]/g, alternative: "A" },
{ letter: /[\u0101]/g, alternative: "a" },
{ letter: /[\u0102]/g, alternative: "A" },
@@ -563,12 +563,12 @@ const transliterationsGeneral = [
{ letter: /[\u01DA]/g, alternative: "u" },
{ letter: /[\u01DB]/g, alternative: "U" },
{ letter: /[\u01DC]/g, alternative: "u" },
- // Decompositions for Latin Extended-B:
+ // Decompositions for Latin Extended-B:
{ letter: /[\u0218]/g, alternative: "S" },
{ letter: /[\u0219]/g, alternative: "s" },
{ letter: /[\u021A]/g, alternative: "T" },
{ letter: /[\u021B]/g, alternative: "t" },
- // Vowels with diacritic (Chinese, Hanyu Pinyin):
+ // Vowels with diacritic (Chinese, Hanyu Pinyin):
{ letter: /[\u0251]/g, alternative: "a" },
{ letter: /[\u1EA0]/g, alternative: "A" },
{ letter: /[\u1EA1]/g, alternative: "a" },
diff --git a/packages/yoastseo/src/languageProcessing/helpers/html/matchParagraphs.js b/packages/yoastseo/src/languageProcessing/helpers/html/matchParagraphs.js
deleted file mode 100644
index 08c7ef8ac39..00000000000
--- a/packages/yoastseo/src/languageProcessing/helpers/html/matchParagraphs.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import { filter, flatMap, map } from "lodash";
-
-import { getBlocks } from "./html";
-
-/**
- * Matches the paragraphs in
-tags and returns the text in them.
- *
- * @param {string} text The text to match paragraph in.
- *
- * @returns {array} An array containing all paragraphs texts.
- */
-const getParagraphsInTags = function( text ) {
- let paragraphs = [];
- // Matches everything between the
and
tags.
- const regex = /
]+)?>(.*?)<\/p>/ig;
- let match;
-
- while ( ( match = regex.exec( text ) ) !== null ) {
- paragraphs.push( match );
- }
-
- // Returns only the text from within the paragraph tags.
- paragraphs = map( paragraphs, function( paragraph ) {
- return paragraph[ 1 ];
- } );
-
- return paragraphs.filter( paragraph => paragraph.length > 0 );
-};
-
-/**
- * Returns an array with all paragraphs from the text.
- *
- * @param {string} text The text to match paragraph in.
- *
- * @returns {Array} The array containing all paragraphs from the text.
- */
-export default function( text ) {
- let paragraphs = getParagraphsInTags( text );
-
- if ( paragraphs.length > 0 ) {
- return paragraphs;
- }
-
- // If no
tags found, split on double linebreaks.
- let blocks = getBlocks( text );
-
- blocks = filter( blocks, function( block ) {
- // Match explicit paragraph tags, or if a block has no HTML tags.
- return 0 !== block.indexOf( " 0 ) {
- return paragraphs;
- }
-
- // If no paragraphs are found, return an array containing the entire text.
- return [ text ];
-}
diff --git a/packages/yoastseo/src/languageProcessing/helpers/sentence/sentencesLength.js b/packages/yoastseo/src/languageProcessing/helpers/sentence/sentencesLength.js
index 382d94e5411..befa1152ca8 100644
--- a/packages/yoastseo/src/languageProcessing/helpers/sentence/sentencesLength.js
+++ b/packages/yoastseo/src/languageProcessing/helpers/sentence/sentencesLength.js
@@ -1,31 +1,36 @@
-import wordCount from "../word/countWords.js";
-import { forEach } from "lodash";
-import { stripFullTags as stripHTMLTags } from "../sanitize/stripHTMLTags.js";
+import { getWordsFromTokens } from "../word/getAllWordsFromTree";
+
+/**
+ * @typedef {Object} SentenceLength
+ * @property {Sentence} sentence The sentence.
+ * @property {number} sentenceLength The length of the sentence.
+ */
/**
* Returns an array with the length of each sentence.
*
- * @param {Array} sentences Array with sentences from text.
+ * @param {Sentence[]} sentences Array with sentences from text.
* @param {Researcher} researcher The researcher to use for analysis.
*
- * @returns {Array} Array with the length of each sentence.
+ * @returns {SentenceLength[]} Array with the length of each sentence.
*/
export default function( sentences, researcher ) {
- const sentencesWordCount = [];
- forEach( sentences, function( sentence ) {
- // For counting words we want to omit the HTMLtags.
- const strippedSentence = stripHTMLTags( sentence );
- // A helper to count characters for languages that don't count number of words for text length.
- const countCharacters = researcher.getHelper( "customCountLength" );
- const length = countCharacters ? countCharacters( strippedSentence ) : wordCount( strippedSentence );
- if ( length <= 0 ) {
- return;
- }
+ const customLengthHelper = researcher.getHelper( "customCountLength" );
- sentencesWordCount.push( {
- sentence: sentence,
- sentenceLength: length,
- } );
- } );
- return sentencesWordCount;
+ return sentences.map( sentence => {
+ const { tokens } = sentence;
+ const length = customLengthHelper ? customLengthHelper( sentence.text ) : getWordsFromTokens( tokens, false ).length;
+
+ if ( length > 0 ) {
+ const firstToken = tokens.find( ( { text } ) => text !== " " );
+ const lastToken = tokens.slice().reverse().find( ( { text } ) => text !== " " );
+
+ return {
+ sentence: sentence,
+ sentenceLength: length,
+ firstToken: firstToken ? firstToken : null,
+ lastToken: lastToken ? lastToken : null,
+ };
+ }
+ } ).filter( Boolean );
}
diff --git a/packages/yoastseo/src/languageProcessing/helpers/word/getAllWordsFromTree.js b/packages/yoastseo/src/languageProcessing/helpers/word/getAllWordsFromTree.js
index 7266af95299..79c73e00bb0 100644
--- a/packages/yoastseo/src/languageProcessing/helpers/word/getAllWordsFromTree.js
+++ b/packages/yoastseo/src/languageProcessing/helpers/word/getAllWordsFromTree.js
@@ -2,22 +2,55 @@ import getSentencesFromTree from "../sentence/getSentencesFromTree";
import { flatMap } from "lodash";
import removePunctuation from "../sanitize/removePunctuation";
+/**
+ * Merges words surrounding a separator into one word.
+ *
+ * @param {string[]} words The array of words to split and merge.
+ * @param {string} separator The separator to split on.
+ *
+ * @returns {void} This function mutates the `words` array through splicing.
+ */
+function mergeBy( words, separator ) {
+ while ( words.indexOf( separator ) !== -1 ) {
+ const currentSeparator = words.indexOf( separator );
+ const wordBefore = words[ currentSeparator - 1 ];
+ const wordAfter = words[ currentSeparator + 1 ];
+ words.splice( currentSeparator - 1, 3, wordBefore + separator + wordAfter );
+ }
+}
+
+/**
+ * Gets the words from the tokens.
+ *
+ * @param {Token[]} tokens The tokens to get the words from.
+ * @param {boolean} splitOnHyphens Whether to split words on hyphens.
+ *
+ * @returns {string[]} Array of words retrieved from the tokens.
+ */
+export function getWordsFromTokens( tokens, splitOnHyphens = true ) {
+ // Retrieve all texts from the tokens.
+ let words = tokens.map( token => token.text );
+ // Combine words separated by a hyphen, if needed.
+ if ( ! splitOnHyphens ) {
+ mergeBy( words, "-" );
+ }
+ // Remove punctuation and spaces.
+ words = words.map( token => removePunctuation( token ) );
+ // Filter out empty tokens.
+ return words.filter( word => word.trim() !== "" );
+}
+
/**
* Gets the words from the tree, i.e. from the paragraph and heading nodes.
* These two node types are the nodes that should contain words for the analysis.
*
* @param {Paper} paper The paper to get the tree and words from.
*
- * @returns {String[]} Array of words retrieved from the tree.
+ * @returns {string[]} Array of words retrieved from the tree.
*/
export default function( paper ) {
const sentences = getSentencesFromTree( paper );
// Get all the tokens from each sentence.
- const tokens = sentences.map( sentence => sentence.tokens );
- let words = flatMap( tokens ).map( token => token.text );
- // Remove punctuation and spaces.
- words = words.map( token => removePunctuation( token ) );
-
- // Filter out empty tokens.
- return words.filter( word => word.trim() !== "" );
+ const tokens = flatMap( sentences.map( sentence => sentence.tokens ) );
+ return getWordsFromTokens( tokens );
}
diff --git a/packages/yoastseo/src/languageProcessing/languages/it/helpers/internal/stem.js b/packages/yoastseo/src/languageProcessing/languages/it/helpers/internal/stem.js
index 12137d2d200..f3d2600c592 100644
--- a/packages/yoastseo/src/languageProcessing/languages/it/helpers/internal/stem.js
+++ b/packages/yoastseo/src/languageProcessing/languages/it/helpers/internal/stem.js
@@ -402,7 +402,7 @@ export default function stem( word, morphologyData ) {
// Step 2: Verb suffix removal.
if ( wordAfter0 === wordAfter1 ) {
word = removeVerbSuffixes( word, morphologyData, rvText );
- }
+ }
rvText = word.substring( rv );
diff --git a/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js b/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js
index a3fd70f5597..e8206922e40 100644
--- a/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js
+++ b/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js
@@ -1,4 +1,4 @@
-/* eslint-disable max-statements,complexity */
+/* eslint-disable complexity */
/*
* The MIT License (MIT)
*
diff --git a/packages/yoastseo/src/languageProcessing/researches/countSentencesFromText.js b/packages/yoastseo/src/languageProcessing/researches/countSentencesFromText.js
index 25932359050..59ce61e0489 100644
--- a/packages/yoastseo/src/languageProcessing/researches/countSentencesFromText.js
+++ b/packages/yoastseo/src/languageProcessing/researches/countSentencesFromText.js
@@ -1,19 +1,15 @@
-import getSentences from "../helpers/sentence/getSentences";
import sentencesLength from "../helpers/sentence/sentencesLength.js";
-import removeHtmlBlocks from "../helpers/html/htmlParser";
-import { filterShortcodesFromHTML } from "../helpers";
+import getSentencesFromTree from "../helpers/sentence/getSentencesFromTree";
/**
- * Count sentences in the text.
+ * Gets the sentences from the text and calculates the length of each sentence.
+ *
* @param {Paper} paper The Paper object to get text from.
* @param {Researcher} researcher The researcher to use for analysis.
- * @returns {Array} The sentences from the text.
+ *
+ * @returns {SentenceLength[]} The sentences from the text.
*/
export default function( paper, researcher ) {
- const memoizedTokenizer = researcher.getHelper( "memoizedTokenizer" );
- let text = paper.getText();
- text = removeHtmlBlocks( text );
- text = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );
- const sentences = getSentences( text, memoizedTokenizer );
+ const sentences = getSentencesFromTree( paper );
return sentencesLength( sentences, researcher );
}
diff --git a/packages/yoastseo/src/languageProcessing/researches/findKeywordInFirstParagraph.js b/packages/yoastseo/src/languageProcessing/researches/findKeywordInFirstParagraph.js
index 4a9bac02a1c..a8bfea9ef70 100644
--- a/packages/yoastseo/src/languageProcessing/researches/findKeywordInFirstParagraph.js
+++ b/packages/yoastseo/src/languageProcessing/researches/findKeywordInFirstParagraph.js
@@ -37,7 +37,7 @@ export default function( paper, researcher ) {
return ! ( paragraph.childNodes && paragraph.childNodes[ 0 ] &&
createShortcodeTagsRegex( [ "caption" ] ).test( paragraph.childNodes[ 0 ].value ) );
} );
- const firstParagraph = paragraphs[ 0 ];
+ const firstParagraph = paragraphs[ 0 ];
const topicForms = researcher.getResearch( "morphology" );
const matchWordCustomHelper = researcher.getHelper( "matchWordCustomHelper" );
diff --git a/packages/yoastseo/src/languageProcessing/researches/getParagraphLength.js b/packages/yoastseo/src/languageProcessing/researches/getParagraphLength.js
index 353d71a5648..3a27f0f1c4c 100644
--- a/packages/yoastseo/src/languageProcessing/researches/getParagraphLength.js
+++ b/packages/yoastseo/src/languageProcessing/researches/getParagraphLength.js
@@ -1,10 +1,10 @@
-import { imageRegex } from "../helpers/image/imageInText";
-import sanitizeLineBreakTag from "../helpers/sanitize/sanitizeLineBreakTag";
-import countWords from "../helpers/word/countWords.js";
-import matchParagraphs from "../helpers/html/matchParagraphs.js";
-import { filter } from "lodash";
-import removeHtmlBlocks from "../helpers/html/htmlParser";
-import { filterShortcodesFromHTML } from "../helpers";
+import { getWordsFromTokens } from "../helpers/word/getAllWordsFromTree";
+
+/**
+ * @typedef {Object} ParagraphLength
+ * @property {Paragraph} paragraph The paragraph.
+ * @property {number} paragraphLength The length of the paragraph.
+ */
/**
* Gets all paragraphs and their word counts or character counts from the text.
@@ -12,33 +12,23 @@ import { filterShortcodesFromHTML } from "../helpers";
* @param {Paper} paper The paper object to get the text from.
* @param {Researcher} researcher The researcher to use for analysis.
*
- * @returns {Array} The array containing an object with the paragraph word or character count and paragraph text.
+ * @returns {ParagraphLength[]} The array containing an object with the paragraph word or character count and paragraph text.
*/
export default function( paper, researcher ) {
- let text = paper.getText();
- text = removeHtmlBlocks( text );
- text = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );
-
- // Remove images from text before retrieving the paragraphs.
- // This step is done here so that applying highlight in captions is possible for ParagraphTooLongAssessment.
- text = text.replace( imageRegex, "" );
+ const paragraphs = paper.getTree().findAll( node => node.name === "p" );
+ const paragraphLengths = [];
- // Replace line break tags containing attribute(s) with paragraph tag.
- text = sanitizeLineBreakTag( text );
- const paragraphs = matchParagraphs( text );
- const paragraphsLength = [];
-
- // An optional custom helper to count length to use instead of countWords.
- const customCountLength = researcher.getHelper( "customCountLength" );
-
- paragraphs.map( function( paragraph ) {
- paragraphsLength.push( {
- countLength: customCountLength ? customCountLength( paragraph ) : countWords( paragraph ),
- text: paragraph,
- } );
+ paragraphs.forEach( paragraph => {
+ const customLengthHelper = researcher.getHelper( "customCountLength" );
+ const tokens = paragraph.sentences.map( sentence => sentence.tokens ).flat();
+ const length = customLengthHelper ? customLengthHelper( paragraph.innerText() ) : getWordsFromTokens( tokens, false ).length;
+ if ( length > 0 ) {
+ paragraphLengths.push( {
+ paragraph: paragraph,
+ paragraphLength: length,
+ } );
+ }
} );
- return filter( paragraphsLength, function( paragraphLength ) {
- return ( paragraphLength.countLength > 0 );
- } );
+ return paragraphLengths;
}
diff --git a/packages/yoastseo/src/languageProcessing/researches/getProminentWordsForInternalLinking.js b/packages/yoastseo/src/languageProcessing/researches/getProminentWordsForInternalLinking.js
index feca93e50b2..f95b51275c0 100644
--- a/packages/yoastseo/src/languageProcessing/researches/getProminentWordsForInternalLinking.js
+++ b/packages/yoastseo/src/languageProcessing/researches/getProminentWordsForInternalLinking.js
@@ -25,16 +25,20 @@ const sanitizeText = function( text ) {
return removeEmailAddresses( text );
};
+/**
+ * @typedef ProminentWordsForInternalLinking
+ * @property {ProminentWord[]} prominentWords Prominent words for this paper, filtered and sorted.
+ * @property {boolean} hasMetaDescription Whether the metadescription is available in the input paper.
+ * @property {boolean} hasTitle Whether the title is available in the input paper.
+ */
+
/**
* Retrieves the prominent words from the given paper.
*
* @param {Paper} paper The paper to determine the prominent words of.
* @param {Researcher} researcher The researcher to use for analysis.
*
- * @returns {Object} result A compound result object.
- * @returns {ProminentWord[]} result.prominentWords Prominent words for this paper, filtered and sorted.
- * @returns {boolean} result.hasMetaDescription Whether the metadescription is available in the input paper.
- * @returns {boolean} result.hasTitle Whether the title is available in the input paper.
+ * @returns {ProminentWordsForInternalLinking} result A compound result object.
*/
function getProminentWordsForInternalLinking( paper, researcher ) {
const functionWords = researcher.getConfig( "functionWords" );
diff --git a/packages/yoastseo/src/languageProcessing/researches/keywordCount.js b/packages/yoastseo/src/languageProcessing/researches/keywordCount.js
index 2512317c8b7..2cfac56e0f2 100644
--- a/packages/yoastseo/src/languageProcessing/researches/keywordCount.js
+++ b/packages/yoastseo/src/languageProcessing/researches/keywordCount.js
@@ -21,7 +21,7 @@ import { filterShortcodesFromHTML } from "../helpers";
* @returns {{markings: Mark[], count: number}} The number of keyphrase occurrences in the text and the Mark objects of the matches.
*/
export function countKeyphraseInText( sentences, keyphraseForms, locale, matchWordCustomHelper,
- isExactMatchRequested, customSplitIntoTokensHelper ) {
+ isExactMatchRequested, customSplitIntoTokensHelper ) {
const result = { count: 0, markings: [] };
sentences.forEach( sentence => {
diff --git a/packages/yoastseo/src/parse/language/LanguageProcessor.js b/packages/yoastseo/src/parse/language/LanguageProcessor.js
index 80d780c9de2..12224a25106 100644
--- a/packages/yoastseo/src/parse/language/LanguageProcessor.js
+++ b/packages/yoastseo/src/parse/language/LanguageProcessor.js
@@ -8,7 +8,7 @@ const whitespaceRegex = /^\s+$/;
/**
* Contains language-specific logic for splitting a text into sentences and tokens.
*/
-class LanguageProcessor {
+export default class LanguageProcessor {
/**
* Creates a new language processor.
*
@@ -71,4 +71,3 @@ class LanguageProcessor {
return tokenTexts.map( tokenText => new Token( tokenText ) );
}
}
-export default LanguageProcessor;
diff --git a/packages/yoastseo/src/parse/language/index.js b/packages/yoastseo/src/parse/language/index.js
new file mode 100644
index 00000000000..8ada2d20aa7
--- /dev/null
+++ b/packages/yoastseo/src/parse/language/index.js
@@ -0,0 +1,5 @@
+import LanguageProcessor from "./LanguageProcessor";
+
+export {
+ LanguageProcessor,
+};
diff --git a/packages/yoastseo/src/parsedPaper/research/researches/Research.js b/packages/yoastseo/src/parsedPaper/research/researches/Research.js
index 5066f00b8cf..97f918282e1 100644
--- a/packages/yoastseo/src/parsedPaper/research/researches/Research.js
+++ b/packages/yoastseo/src/parsedPaper/research/researches/Research.js
@@ -17,7 +17,7 @@ class Research {
* @returns {boolean} If the given node is considered a leaf node for this research.
*
*/
- isLeafNode( node ) { // eslint-disable-line no-unused-vars
+ isLeafNode( node ) {
return node instanceof LeafNode;
}
@@ -42,7 +42,7 @@ class Research {
*
* @returns {*} The merged results.
*/
- mergeChildrenResults( results ) { // eslint-disable-line no-unused-vars
+ mergeChildrenResults( results ) {
return flatten( results );
}
}
diff --git a/packages/yoastseo/src/scoring/assessments/inclusiveLanguage/InclusiveLanguageAssessment.js b/packages/yoastseo/src/scoring/assessments/inclusiveLanguage/InclusiveLanguageAssessment.js
index da92d1bdd14..25877b3f8d5 100644
--- a/packages/yoastseo/src/scoring/assessments/inclusiveLanguage/InclusiveLanguageAssessment.js
+++ b/packages/yoastseo/src/scoring/assessments/inclusiveLanguage/InclusiveLanguageAssessment.js
@@ -38,7 +38,7 @@ export default class InclusiveLanguageAssessment {
* @returns {void}
*/
constructor( { identifier, nonInclusivePhrases, inclusiveAlternatives,
- score, feedbackFormat, learnMoreUrl, rule, ruleDescription, caseSensitive, category } ) {
+ score, feedbackFormat, learnMoreUrl, rule, ruleDescription, caseSensitive, category } ) {
this.identifier = identifier;
this.nonInclusivePhrases = nonInclusivePhrases;
this.inclusiveAlternatives = inclusiveAlternatives;
diff --git a/packages/yoastseo/src/scoring/assessments/readability/ParagraphTooLongAssessment.js b/packages/yoastseo/src/scoring/assessments/readability/ParagraphTooLongAssessment.js
index bf9216d705f..6f08493aa3b 100644
--- a/packages/yoastseo/src/scoring/assessments/readability/ParagraphTooLongAssessment.js
+++ b/packages/yoastseo/src/scoring/assessments/readability/ParagraphTooLongAssessment.js
@@ -1,7 +1,6 @@
import { __, _n, sprintf } from "@wordpress/i18n";
-import { filter, map, merge } from "lodash";
-import { stripBlockTagsAtStartEnd as stripHTMLTags } from "../../../languageProcessing/helpers/sanitize/stripHTMLTags";
-import marker from "../../../markers/addMark";
+import { merge } from "lodash";
+
import { createAnchorOpeningTag } from "../../../helpers";
import { inRangeEndInclusive as inRange } from "../../helpers/assessments/inRange";
import AssessmentResult from "../../../values/AssessmentResult";
@@ -9,16 +8,14 @@ import Mark from "../../../values/Mark";
import Assessment from "../assessment";
/**
- * Represents the assessment that will look if the text has too long paragraphs.
+ * Represents the assessment that will look if the Paper contains paragraphs that are considered too long.
*/
export default class ParagraphTooLongAssessment extends Assessment {
/**
* Sets the identifier and the config.
- *
+ * @constructor
* @param {object} config The configuration to use.
* @param {boolean} isProduct Whether product configuration should be used.
- *
- * @returns {void}
*/
constructor( config = {}, isProduct = false ) {
super();
@@ -41,16 +38,13 @@ export default class ParagraphTooLongAssessment extends Assessment {
/**
* Returns an array containing only the paragraphs longer than the recommended length.
*
- * @param {array} paragraphsLength The array containing the lengths of individual paragraphs.
- * @param {object} config The config to use.
+ * @param {ParagraphLength[]} paragraphsLength The array containing the lengths of individual paragraphs.
+ * @param {object} config The config to use.
*
- * @returns {array} The number of too long paragraphs.
+ * @returns {ParagraphLength[]} An array containing too long paragraphs.
*/
getTooLongParagraphs( paragraphsLength, config ) {
- const recommendedLength = config.parameters.recommendedLength;
- return filter( paragraphsLength, function( paragraph ) {
- return paragraph.countLength > recommendedLength;
- } );
+ return paragraphsLength.filter( paragraph => paragraph.paragraphLength > config.parameters.recommendedLength );
}
/**
@@ -77,23 +71,16 @@ export default class ParagraphTooLongAssessment extends Assessment {
}
/**
- * Returns the scores and text for the ParagraphTooLongAssessment.
- *
- * @param {array} paragraphsLength The array containing the lengths of individual paragraphs.
- * @param {array} tooLongParagraphs The number of too long paragraphs.
- * @param {object} config The config to use.
- *
- * @returns {{score: number, text: string }} The assessmentResult.
+ * Returns the score for the ParagraphTooLongAssessment.
+ * @param {ParagraphLength[]} paragraphsLength The array containing the lengths of individual paragraphs.
+ * @param {object} config The config to use.
+ * @returns {number} The score.
*/
- calculateResult( paragraphsLength, tooLongParagraphs, config ) {
- let score;
-
- if ( paragraphsLength.length === 0 ) {
- return {};
- }
-
- const longestParagraphLength = paragraphsLength[ 0 ].countLength;
+ getScore( paragraphsLength, config ) {
+ const sortedParagraphsLength = paragraphsLength.sort( ( a, b ) => b.paragraphLength - a.paragraphLength );
+ const longestParagraphLength = sortedParagraphsLength[ 0 ].paragraphLength;
+ let score;
if ( longestParagraphLength <= config.parameters.recommendedLength ) {
// Green indicator.
score = 9;
@@ -108,22 +95,42 @@ export default class ParagraphTooLongAssessment extends Assessment {
// Red indicator.
score = 3;
}
+ return score;
+ }
+
+ /**
+ * Returns the scores and text for the ParagraphTooLongAssessment.
+ *
+ * @param {ParagraphLength[]} paragraphsLength The array containing the lengths of individual paragraphs.
+ * @param {object} config The config to use.
+ *
+ * @returns {AssessmentResult} The assessmentResult.
+ */
+ calculateResult( paragraphsLength, config ) {
+ const tooLongParagraphs = this.getTooLongParagraphs( paragraphsLength, config );
+
+ const assessmentResult = new AssessmentResult();
+
+ if ( paragraphsLength.length === 0 ) {
+ return assessmentResult;
+ }
+
+ const score = this.getScore( paragraphsLength, config );
+
+ assessmentResult.setScore( score );
if ( score >= 7 ) {
- return {
- score: score,
- hasMarks: false,
-
- text: sprintf(
- /* translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag */
- __(
- "%1$sParagraph length%2$s: None of the paragraphs are too long. Great job!",
- "wordpress-seo"
- ),
- config.urlTitle,
- ""
+ assessmentResult.setHasMarks( false );
+ assessmentResult.setText( sprintf(
+ /* translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag */
+ __(
+ "%1$sParagraph length%2$s: None of the paragraphs are too long. Great job!",
+ "wordpress-seo"
),
- };
+ config.urlTitle,
+ ""
+ ) );
+ return assessmentResult;
}
const wordFeedback = sprintf(
@@ -157,12 +164,11 @@ export default class ParagraphTooLongAssessment extends Assessment {
config.parameters.recommendedLength,
config.urlCallToAction
);
+ assessmentResult.setHasMarks( true );
+ assessmentResult.setText( config.countCharacters ? characterFeedback : wordFeedback );
+ assessmentResult.setHasAIFixes( true );
- return {
- score: score,
- hasMarks: true,
- text: config.countCharacters ? characterFeedback : wordFeedback,
- };
+ return assessmentResult;
}
/**
@@ -183,20 +189,26 @@ export default class ParagraphTooLongAssessment extends Assessment {
/**
* Creates a marker for the paragraphs.
*
- * @param {object} paper The paper to use for the assessment.
- * @param {Researcher} researcher The researcher used for calling research.
+ * @param {Paper} paper The paper to use for the assessment.
+ * @param {Researcher} researcher The researcher used for calling research.
*
- * @returns {Array} An array with marked paragraphs.
+ * @returns {Mark[]} An array with marked paragraphs.
*/
getMarks( paper, researcher ) {
const paragraphsLength = researcher.getResearch( "getParagraphLength" );
const tooLongParagraphs = this.getTooLongParagraphs( paragraphsLength, this.getConfig( researcher ) );
- return map( tooLongParagraphs, function( paragraph ) {
- const paragraphText = stripHTMLTags( paragraph.text );
- const marked = marker( paragraphText );
+ return tooLongParagraphs.flatMap( ( { paragraph } ) => {
+ const scl = paragraph.sourceCodeLocation;
return new Mark( {
- original: paragraphText,
- marked: marked,
+ position: {
+ startOffset: scl.startTag ? scl.startTag.endOffset : scl.startOffset,
+ endOffset: scl.endTag ? scl.endTag.startOffset : scl.endOffset,
+ startOffsetBlock: 0,
+ endOffsetBlock: scl.endOffset - scl.startOffset,
+ clientId: paragraph.clientId || "",
+ attributeId: paragraph.attributeId || "",
+ isFirstSection: paragraph.isFirstSection || false,
+ },
} );
} );
}
@@ -207,24 +219,13 @@ export default class ParagraphTooLongAssessment extends Assessment {
* @param {Paper} paper The paper to use for the assessment.
* @param {Researcher} researcher The researcher used for calling research.
*
- * @returns {object} The assessment result.
+ * @returns {AssessmentResult} The assessment result.
*/
getResult( paper, researcher ) {
- let paragraphsLength = researcher.getResearch( "getParagraphLength" );
+ const paragraphsLength = researcher.getResearch( "getParagraphLength" );
this._config.countCharacters = !! researcher.getConfig( "countCharacters" );
- paragraphsLength = this.sortParagraphs( paragraphsLength );
- const config = this.getConfig( researcher );
-
- const tooLongParagraphs = this.getTooLongParagraphs( paragraphsLength, config );
- const paragraphLengthResult = this.calculateResult( paragraphsLength, tooLongParagraphs, config );
- const assessmentResult = new AssessmentResult();
-
- assessmentResult.setScore( paragraphLengthResult.score );
- assessmentResult.setText( paragraphLengthResult.text );
- assessmentResult.setHasMarks( paragraphLengthResult.hasMarks );
-
- return assessmentResult;
+ return this.calculateResult( paragraphsLength, this.getConfig( researcher ) );
}
/**
diff --git a/packages/yoastseo/src/scoring/assessments/readability/SentenceLengthInTextAssessment.js b/packages/yoastseo/src/scoring/assessments/readability/SentenceLengthInTextAssessment.js
index b1b24c886db..cac01ad8807 100644
--- a/packages/yoastseo/src/scoring/assessments/readability/SentenceLengthInTextAssessment.js
+++ b/packages/yoastseo/src/scoring/assessments/readability/SentenceLengthInTextAssessment.js
@@ -1,13 +1,10 @@
import { __, _n, sprintf } from "@wordpress/i18n";
-import { map, merge } from "lodash";
+import { merge } from "lodash";
import Assessment from "../assessment";
-import getTooLongSentences from "../../helpers/assessments/checkForTooLongSentences";
import formatNumber from "../../../helpers/formatNumber";
import { inRangeEndInclusive as inRange } from "../../helpers/assessments/inRange";
-import addMark from "../../../markers/addMark";
import { createAnchorOpeningTag } from "../../../helpers";
-import { stripIncompleteTags as stripTags } from "../../../languageProcessing/helpers/sanitize/stripHTMLTags";
import AssessmentResult from "../../../values/AssessmentResult";
import Mark from "../../../values/Mark";
@@ -64,10 +61,13 @@ class SentenceLengthInTextAssessment extends Assessment {
const score = this.calculateScore( percentage );
const assessmentResult = new AssessmentResult();
+ if ( score < 9 ) {
+ assessmentResult.setHasAIFixes( true );
+ }
assessmentResult.setScore( score );
assessmentResult.setText( this.translateScore( score, percentage ) );
- assessmentResult.setHasMarks( ( percentage > 0 ) );
+ assessmentResult.setHasMarks( percentage > 0 );
return assessmentResult;
}
@@ -96,13 +96,24 @@ class SentenceLengthInTextAssessment extends Assessment {
if ( researcher.getConfig( "sentenceLength" ) ) {
this._config = this.getLanguageSpecificConfig( researcher );
}
- const sentenceObjects = this.getTooLongSentences( sentenceCount );
+ const tooLongSentences = this.getTooLongSentences( sentenceCount );
+
+ return tooLongSentences.map( tooLongSentence => {
+ const { sentence, firstToken, lastToken } = tooLongSentence;
+
+ const startOffset = firstToken.sourceCodeRange.startOffset;
+ const endOffset = lastToken.sourceCodeRange.endOffset;
- return map( sentenceObjects, function( sentenceObject ) {
- const sentence = stripTags( sentenceObject.sentence );
return new Mark( {
- original: sentence,
- marked: addMark( sentence ),
+ position: {
+ startOffset,
+ endOffset,
+ startOffsetBlock: startOffset - ( sentence.parentStartOffset || 0 ),
+ endOffsetBlock: endOffset - ( sentence.parentStartOffset || 0 ),
+ clientId: sentence.parentClientId || "",
+ attributeId: sentence.parentAttributeId || "",
+ isFirstSection: sentence.isParentFirstSectionOfBlock || false,
+ },
} );
} );
}
@@ -157,7 +168,7 @@ class SentenceLengthInTextAssessment extends Assessment {
const wordFeedback = sprintf(
/* translators: %1$s and %6$s expand to links on yoast.com, %2$s expands to the anchor end tag,
- %3$d expands to percentage of sentences, %4$s expands to the recommended maximum sentence length,
+ %3$s expands to percentage of sentences, %4$d expands to the recommended maximum sentence length,
%5$s expands to the recommended maximum percentage. */
_n(
"%1$sSentence length%2$s: %3$s of the sentences contain more than %4$d word, which is more than the recommended maximum of %5$s. %6$sTry to shorten the sentences%2$s.",
@@ -175,7 +186,7 @@ class SentenceLengthInTextAssessment extends Assessment {
const characterFeedback = sprintf(
/* translators: %1$s and %6$s expand to links on yoast.com, %2$s expands to the anchor end tag,
- %3$d expands to percentage of sentences, %4$s expands to the recommended maximum sentence length,
+ %3$s expands to percentage of sentences, %4$d expands to the recommended maximum sentence length,
%5$s expands to the recommended maximum percentage. */
_n(
"%1$sSentence length%2$s: %3$s of the sentences contain more than %4$d character, which is more than the recommended maximum of %5$s. %6$sTry to shorten the sentences%2$s.",
@@ -197,14 +208,14 @@ class SentenceLengthInTextAssessment extends Assessment {
/**
* Calculates the percentage of sentences that are too long.
*
- * @param {Array} sentences The sentences to calculate the percentage for.
+ * @param {SentenceLength[]} sentences The sentences to calculate the percentage for.
* @returns {number} The calculates percentage of too long sentences.
*/
calculatePercentage( sentences ) {
let percentage = 0;
if ( sentences.length !== 0 ) {
- const tooLongTotal = this.countTooLongSentences( sentences );
+ const tooLongTotal = this.getTooLongSentences( sentences ).length;
percentage = formatNumber( ( tooLongTotal / sentences.length ) * 100 );
}
@@ -240,23 +251,12 @@ class SentenceLengthInTextAssessment extends Assessment {
}
/**
- * Gets the sentences that are qualified as being too long.
- *
- * @param {array} sentences The sentences to filter through.
- * @returns {array} Array with all the sentences considered to be too long.
+ * Returns the sentences that are qualified as being too long.
+ * @param {SentenceLength[]} sentences The sentences to filter.
+ * @returns {SentenceLength[]} Array with all the sentences considered to be too long.
*/
getTooLongSentences( sentences ) {
- return getTooLongSentences( sentences, this._config.recommendedLength );
- }
-
- /**
- * Get the total amount of sentences that are qualified as being too long.
- *
- * @param {Array} sentences The sentences to filter through.
- * @returns {Number} The amount of sentences that are considered too long.
- */
- countTooLongSentences( sentences ) {
- return this.getTooLongSentences( sentences ).length;
+ return sentences.filter( sentence => sentence.sentenceLength > this._config.recommendedLength );
}
}
diff --git a/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js b/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js
index 09556b3ed93..39a5fdc66af 100644
--- a/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js
+++ b/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js
@@ -138,7 +138,6 @@ export default class TextLengthAssessment extends Assessment {
%4$s expands to the anchor end tag, %5$d expands to the recommended minimum of words / characters,
%6$s expands to the word 'words' or 'characters'. */
__(
- // eslint-disable-next-line max-len
"%2$sText length%4$s: The text contains %1$d %6$s. This is slightly below the recommended minimum of %5$d %6$s. %3$sAdd more content%4$s.",
"wordpress-seo"
),
@@ -160,9 +159,7 @@ export default class TextLengthAssessment extends Assessment {
%4$s expands to the anchor end tag, %5$d expands to the recommended minimum of words / characters,
%6$s expands to the word 'word' or 'character', %7$s expands to the word 'words' or 'characters'. */
_n(
- // eslint-disable-next-line max-len
"%2$sText length%4$s: The text contains %1$d %6$s. This is below the recommended minimum of %5$d %7$s. %3$sAdd more content%4$s.",
- // eslint-disable-next-line max-len
"%2$sText length%4$s: The text contains %1$d %7$s. This is below the recommended minimum of %5$d %7$s. %3$sAdd more content%4$s.",
wordCount,
"wordpress-seo"
diff --git a/packages/yoastseo/src/scoring/helpers/assessments/checkForTooLongSentences.js b/packages/yoastseo/src/scoring/helpers/assessments/checkForTooLongSentences.js
deleted file mode 100644
index 088ba70fe39..00000000000
--- a/packages/yoastseo/src/scoring/helpers/assessments/checkForTooLongSentences.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import { filter } from "lodash";
-
-/**
- * Checks for too long sentences.
- * @param {array} sentences The array with objects containing sentences and their lengths.
- * @param {number} recommendedValue The recommended maximum length of sentence.
- * @returns {array} The array with objects containing too long sentences and their lengths.
- */
-export default function( sentences, recommendedValue ) {
- return filter( sentences, function( sentence ) {
- return sentence.sentenceLength > recommendedValue;
- } );
-}
diff --git a/packages/yoastseo/src/worker/AnalysisWebWorker.js b/packages/yoastseo/src/worker/AnalysisWebWorker.js
index f077e17495f..452a69dfd74 100644
--- a/packages/yoastseo/src/worker/AnalysisWebWorker.js
+++ b/packages/yoastseo/src/worker/AnalysisWebWorker.js
@@ -1,8 +1,8 @@
-/* eslint-disable max-statements,complexity */
+/* eslint-disable complexity */
// External dependencies.
import { enableFeatures } from "@yoast/feature-flag";
import { __, setLocaleData, sprintf } from "@wordpress/i18n";
-import { forEach, has, includes, isEmpty, isNull, isObject, isString, isUndefined, merge, pickBy } from "lodash";
+import { forEach, has, includes, isEmpty, isEqual, isNull, isObject, isString, isUndefined, merge, pickBy } from "lodash";
import { getLogger } from "loglevel";
// Internal dependencies.
@@ -955,6 +955,12 @@ export default class AnalysisWebWorker {
return true;
}
+ // Perform deep comparison between the list of Gutenberg blocks as we want to update the readability analysis
+ // if the client IDs of the blocks inside `wpBlocks` change.
+ if ( ! isEqual( this._paper._attributes.wpBlocks, paper._attributes.wpBlocks ) ) {
+ return true;
+ }
+
return this._paper.getLocale() !== paper.getLocale();
}
diff --git a/readme.txt b/readme.txt
index 9b56ec19733..4a469efb329 100644
--- a/readme.txt
+++ b/readme.txt
@@ -5,7 +5,7 @@ License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
Tags: SEO, XML sitemap, Content analysis, Readability, Schema
Tested up to: 6.7
-Stable tag: 24.1
+Stable tag: 24.2
Requires PHP: 7.2.5
Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO plugin.
@@ -274,43 +274,45 @@ Your question has most likely been answered on our help center: [yoast.com/help/
== Changelog ==
-= 24.2 =
+= 24.3 =
-Release date: 2024-12-31
+Release date: 2025-01-21
#### Enhancements
-* Improves the tooltips accessibility in the related keyphrase suggestions modal.
+* Introduces more robust HTML processing and highlighting for the _sentence length_ and _paragraph length_ assessments.
#### Bugfixes
-* Fixes a bug where a deprecation message would appear in PHP 8+ when saving a post containing images with invalid sources. Props to [kkmuffme](https://github.com/kkmuffme).
-* Fixes a bug where TypeError would occur when checking for capabilities of SEO Manager user role when the roles were not passed as an array. Props to [kfeinUI](https://github.com/kfeinUI).
+* Fixes a bug where the Semrush request would be executed twice when opening the related keyphrases modal.
+* Fixes a bug where the text color in the search on our settings page would not change correctly when active, resulting in bad contrast.
+* Fixes a bug where the _View_ button label in the Yoast dashboard would not be available for translation.
#### Other
-* Changes the title text on the Yoast installation success page.
-* Fixes a console warning about ReactDOM.render being no longer supported in React 18.
+* Improves contrast in the related keyphrase suggestions table.
+* Improves contrast in the RSS supported variables explainer table.
-= 24.1 =
+= 24.2 =
-Release date: 2024-12-18
+Release date: 2025-01-07
-Yoast SEO 24.1 adds the Yoast SEO Dashboard to monitor your site's SEO performance in one overview. Find more about Yoast SEO 24.1 in [our release post](https://yoa.st/release-18-12-24)!
+Yoast SEO 24.2 brings more enhancements and bugfixes. [Find more information about our software releases and updates here](https://yoa.st/release-7-1-25).
#### Enhancements
-* Introduces the Yoast Dashboard, a place where site administrators can check the SEO and Readability performance of the site's posts.
-* Adds `Not analyzed` as an option in the readability filter in the posts page.
-* Enhances the existing `Needs improvement` option in the readability filter in the posts page, to include posts that don't have enough content as well.
+* Improves the tooltips accessibility in the related keyphrase suggestions modal.
#### Bugfixes
-* Fixes a bug where posts that have been set to explicitly not be noindexed and had no keyword set would not appear in the relevant SEO filter in the posts page.
+* Fixes a bug where a deprecation message would appear in PHP 8+ when saving a post containing images with invalid sources. Props to [kkmuffme](https://github.com/kkmuffme).
+* Fixes a bug where a TypeError would occur when checking for capabilities of SEO Manager user role when the roles were not passed as an array. Props to [kfeinUI](https://github.com/kfeinUI).
+* Fixes a bug where styles on buttons, intent badge and modal links would not adjust the direction when on RTL view.
#### Other
-* Improves the translatability of feedback for the _paragraph length_ and the _sentence length_ assessments.
+* Changes the title text on the Yoast installation success page.
+* Fixes a console warning about ReactDOM.render being no longer supported in React 18.
= Earlier versions =
For the changelog of earlier versions, please refer to [the changelog on yoast.com](https://yoa.st/yoast-seo-changelog).
diff --git a/src/conditionals/google-site-kit-feature-conditional.php b/src/conditionals/google-site-kit-feature-conditional.php
new file mode 100644
index 00000000000..75ad9ab1899
--- /dev/null
+++ b/src/conditionals/google-site-kit-feature-conditional.php
@@ -0,0 +1,18 @@
+ $this->helpers->schema->html->smart_strip_tags( $this->helpers->post->get_post_title_with_fallback( $this->context->id ) ),
'datePublished' => $this->helpers->date->format( $this->context->post->post_date_gmt ),
- 'dateModified' => $this->helpers->date->format( $this->context->post->post_modified_gmt ),
- 'mainEntityOfPage' => [ '@id' => $this->context->main_schema_id ],
- 'wordCount' => $this->word_count( $this->context->post->post_content, $this->context->post->post_title ),
];
+ if ( \strtotime( $this->context->post->post_modified_gmt ) > \strtotime( $this->context->post->post_date_gmt ) ) {
+ $data['dateModified'] = $this->helpers->date->format( $this->context->post->post_modified_gmt );
+ }
+
+ $data['mainEntityOfPage'] = [ '@id' => $this->context->main_schema_id ];
+ $data['wordCount'] = $this->word_count( $this->context->post->post_content, $this->context->post->post_title );
+
if ( $this->context->post->comment_status === 'open' ) {
$data['commentCount'] = \intval( $this->context->post->comment_count, 10 );
}
diff --git a/src/generators/schema/webpage.php b/src/generators/schema/webpage.php
index 615b21da6c7..e5abc2e456d 100644
--- a/src/generators/schema/webpage.php
+++ b/src/generators/schema/webpage.php
@@ -52,7 +52,10 @@ public function generate() {
if ( $this->context->indexable->object_type === 'post' ) {
$data['datePublished'] = $this->helpers->date->format( $this->context->post->post_date_gmt );
- $data['dateModified'] = $this->helpers->date->format( $this->context->post->post_modified_gmt );
+
+ if ( \strtotime( $this->context->post->post_modified_gmt ) > \strtotime( $this->context->post->post_date_gmt ) ) {
+ $data['dateModified'] = $this->helpers->date->format( $this->context->post->post_modified_gmt );
+ }
if ( $this->context->indexable->object_sub_type === 'post' ) {
$data = $this->add_author( $data, $this->context->post );
diff --git a/src/integrations/admin/link-count-columns-integration.php b/src/integrations/admin/link-count-columns-integration.php
index 3f2d2a8b3cc..c9f72bc7ab9 100644
--- a/src/integrations/admin/link-count-columns-integration.php
+++ b/src/integrations/admin/link-count-columns-integration.php
@@ -136,7 +136,7 @@ public function add_post_columns( $columns ) {
$columns[ 'wpseo-' . self::COLUMN_LINKS ] = \sprintf(
'%2$s',
- \esc_attr__( 'Number of outgoing internal links in this post. See "Yoast Columns" text in the help tab for more info.', 'wordpress-seo' ),
+ \esc_attr__( 'Number of outgoing internal links in this post.', 'wordpress-seo' ),
/* translators: Hidden accessibility text. */
\esc_html__( 'Outgoing internal links', 'wordpress-seo' )
);
@@ -144,7 +144,7 @@ public function add_post_columns( $columns ) {
if ( $this->post_link_indexing_action->get_total_unindexed() === 0 ) {
$columns[ 'wpseo-' . self::COLUMN_LINKED ] = \sprintf(
'%2$s',
- \esc_attr__( 'Number of internal links linking to this post. See "Yoast Columns" text in the help tab for more info.', 'wordpress-seo' ),
+ \esc_attr__( 'Number of internal links linking to this post.', 'wordpress-seo' ),
/* translators: Hidden accessibility text. */
\esc_html__( 'Received internal links', 'wordpress-seo' )
);
diff --git a/src/presentations/indexable-post-type-presentation.php b/src/presentations/indexable-post-type-presentation.php
index 018e4eedec8..e497ef14abf 100644
--- a/src/presentations/indexable-post-type-presentation.php
+++ b/src/presentations/indexable-post-type-presentation.php
@@ -285,7 +285,7 @@ public function generate_open_graph_article_published_time() {
* @return string The open graph article modified time.
*/
public function generate_open_graph_article_modified_time() {
- if ( $this->source->post_modified_gmt !== $this->source->post_date_gmt ) {
+ if ( \strtotime( $this->source->post_modified_gmt ) > \strtotime( $this->source->post_date_gmt ) ) {
return $this->date->format( $this->source->post_modified_gmt );
}
diff --git a/tests/Unit/Generators/Schema_Generator_Test.php b/tests/Unit/Generators/Schema_Generator_Test.php
index 07f487e73f4..e4e8fd160eb 100644
--- a/tests/Unit/Generators/Schema_Generator_Test.php
+++ b/tests/Unit/Generators/Schema_Generator_Test.php
@@ -430,8 +430,8 @@ public function test_generate_with_blocks() {
$this->context->indexable->object_type = 'post';
$this->context->indexable->object_sub_type = 'post';
$this->context->post = (object) [
- 'post_date_gmt' => 'date',
- 'post_modified_gmt' => 'date',
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:09',
];
$this->context->has_image = false;
@@ -448,9 +448,15 @@ public function test_generate_with_blocks() {
$this->date
->expects( 'format' )
- ->twice()
- ->with( 'date' )
- ->andReturn( 'date' );
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:09' )
+ ->andReturn( '2024-12-13 09:58:09' );
Monkey\Functions\expect( 'is_search' )
->andReturn( false );
@@ -629,8 +635,8 @@ public function test_generate_with_block_not_having_generated_output() {
$this->context->indexable->object_type = 'post';
$this->context->indexable->object_sub_type = 'post';
$this->context->post = (object) [
- 'post_date_gmt' => 'date',
- 'post_modified_gmt' => 'date',
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:09',
];
$this->context->has_image = false;
@@ -647,9 +653,15 @@ public function test_generate_with_block_not_having_generated_output() {
$this->date
->expects( 'format' )
- ->twice()
- ->with( 'date' )
- ->andReturn( 'date' );
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:09' )
+ ->andReturn( '2024-12-13 09:58:09' );
Monkey\Functions\expect( 'is_search' )
->andReturn( false );
@@ -694,8 +706,8 @@ public function test_validate_type_singular_array() {
$this->context->indexable->object_type = 'post';
$this->context->indexable->object_sub_type = 'post';
$this->context->post = (object) [
- 'post_date_gmt' => 'date',
- 'post_modified_gmt' => 'date',
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:09',
];
$this->context->has_image = false;
@@ -712,9 +724,15 @@ public function test_validate_type_singular_array() {
$this->date
->expects( 'format' )
- ->twice()
- ->with( 'date' )
- ->andReturn( 'date' );
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:09' )
+ ->andReturn( '2024-12-13 09:58:09' );
Monkey\Functions\expect( 'is_search' )
->andReturn( false );
@@ -802,8 +820,8 @@ public function test_validate_type_unique_array() {
$this->context->indexable->object_type = 'post';
$this->context->indexable->object_sub_type = 'post';
$this->context->post = (object) [
- 'post_date_gmt' => 'date',
- 'post_modified_gmt' => 'date',
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:09',
];
$this->context->has_image = false;
@@ -820,9 +838,15 @@ public function test_validate_type_unique_array() {
$this->date
->expects( 'format' )
- ->twice()
- ->with( 'date' )
- ->andReturn( 'date' );
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:09' )
+ ->andReturn( '2024-12-13 09:58:09' );
Monkey\Functions\expect( 'is_search' )
->andReturn( false );
@@ -905,8 +929,8 @@ public function test_get_graph_pieces_on_single_post_with_password_required() {
$this->context->indexable->object_type = 'post';
$this->context->indexable->object_sub_type = 'post';
$this->context->post = (object) [
- 'post_date_gmt' => 'date',
- 'post_modified_gmt' => 'date',
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:09',
];
$this->context->has_image = false;
@@ -917,9 +941,15 @@ public function test_get_graph_pieces_on_single_post_with_password_required() {
$this->date
->expects( 'format' )
- ->twice()
- ->with( 'date' )
- ->andReturn( 'date' );
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:09' )
+ ->andReturn( '2024-12-13 09:58:09' );
Monkey\Functions\expect( 'is_search' )
->andReturn( false );
@@ -1100,6 +1130,79 @@ public function test_generate_with_search_page() {
);
}
+ /**
+ * Tests with the generate with a post page that was published with schedule (aka, has a modified date earlier than a published date).
+ *
+ * @covers ::__construct
+ * @covers ::generate
+ * @covers ::get_graph_pieces
+ *
+ * @return void
+ */
+ public function test_get_graph_pieces_on_scheduled_post() {
+ $this->stubEscapeFunctions();
+ $this->current_page->expects( 'is_paged' )->andReturns( false );
+
+ $this->context->alternate_site_name = '';
+ $this->context->indexable->object_type = 'post';
+ $this->context->indexable->object_sub_type = 'post';
+ $this->context->post = (object) [
+ 'post_date_gmt' => '2024-12-13 09:58:08',
+ 'post_modified_gmt' => '2024-12-13 09:58:07',
+ ];
+ $this->context->has_image = false;
+
+ Monkey\Functions\expect( 'post_password_required' )
+ ->once()
+ ->with( $this->context->post )
+ ->andReturnFalse();
+
+ $this->article
+ ->expects( 'is_author_supported' )
+ ->twice()
+ ->with( 'post' )
+ ->andReturnFalse();
+
+ $this->date
+ ->expects( 'format' )
+ ->once()
+ ->with( '2024-12-13 09:58:08' )
+ ->andReturn( '2024-12-13 09:58:08' );
+
+ Monkey\Functions\expect( 'is_search' )
+ ->andReturn( false );
+
+ $this->current_page
+ ->expects( 'is_front_page' )
+ ->andReturnTrue();
+
+ $this->html
+ ->expects( 'smart_strip_tags' )
+ ->times( 3 )
+ ->andReturnArg( 0 );
+
+ $this->replace_vars_helper
+ ->expects( 'register_replace_vars' )
+ ->once();
+
+ Monkey\Actions\expectDone( 'wpseo_pre_schema_block_type_yoast/faq-block' )
+ ->with( $this->context->blocks['yoast/faq-block'], $this->context );
+
+ Monkey\Filters\expectApplied( 'wpseo_schema_needs_faq' )
+ ->with( true );
+
+ $this->current_page->expects( 'is_home_static_page' )->andReturns( false );
+ $this->current_page->expects( 'is_home_posts_page' )->andReturns( false );
+
+ $expected_schema = $this->get_expected_schema();
+ unset( $expected_schema['@graph'][0]['dateModified'] );
+
+ $this->assertEquals(
+ $expected_schema,
+ $this->instance->generate( $this->context )
+ );
+ }
+
/**
* The generated schema that is applicable for almost every test scenario in this file.
*
@@ -1132,8 +1235,8 @@ public function get_expected_schema() {
'@id' => '#id-1',
],
],
- 'datePublished' => 'date',
- 'dateModified' => 'date',
+ 'datePublished' => '2024-12-13 09:58:08',
+ 'dateModified' => '2024-12-13 09:58:09',
],
[
'@type' => 'WebSite',
diff --git a/wp-seo-main.php b/wp-seo-main.php
index ec8f7c371c1..b237f2a40a9 100644
--- a/wp-seo-main.php
+++ b/wp-seo-main.php
@@ -15,7 +15,7 @@
* {@internal Nobody should be able to overrule the real version number as this can cause
* serious issues with the options, so no if ( ! defined() ).}}
*/
-define( 'WPSEO_VERSION', '24.2-RC1' );
+define( 'WPSEO_VERSION', '24.3-RC2' );
if ( ! defined( 'WPSEO_PATH' ) ) {
diff --git a/wp-seo.php b/wp-seo.php
index 5f2eaabffc6..37c4e413e9e 100644
--- a/wp-seo.php
+++ b/wp-seo.php
@@ -8,7 +8,7 @@
*
* @wordpress-plugin
* Plugin Name: Yoast SEO
- * Version: 24.2-RC1
+ * Version: 24.3-RC2
* Plugin URI: https://yoa.st/1uj
* Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
* Author: Team Yoast
@@ -20,7 +20,7 @@
* Requires PHP: 7.2.5
*
* WC requires at least: 7.1
- * WC tested up to: 9.4
+ * WC tested up to: 9.5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/yarn.lock b/yarn.lock
index 5faeb09e595..42113076074 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -162,7 +162,7 @@
json5 "^2.2.3"
semver "^6.3.1"
-"@babel/eslint-parser@^7.16.0", "@babel/eslint-parser@^7.17.0":
+"@babel/eslint-parser@^7.16.0":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz#7bf0db1c53b54da0c8a12627373554a0828479ca"
integrity sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==
@@ -171,38 +171,6 @@
eslint-visitor-keys "^2.1.0"
semver "^6.3.1"
-"@babel/eslint-parser@^7.23.9":
- version "7.23.10"
- resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.10.tgz#2d4164842d6db798873b40e0c4238827084667a2"
- integrity sha512-3wSYDPZVnhseRnxRJH6ZVTNknBz76AEnyC+AYYhasjP3Yy23qz0ERR7Fcd2SHmYuSFJ2kY9gaaDd3vyqU09eSw==
- dependencies:
- "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1"
- eslint-visitor-keys "^2.1.0"
- semver "^6.3.1"
-
-"@babel/eslint-parser@^7.25.9":
- version "7.25.9"
- resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz#603c68a63078796527bc9d0833f5e52dd5f9224c"
- integrity sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==
- dependencies:
- "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1"
- eslint-visitor-keys "^2.1.0"
- semver "^6.3.1"
-
-"@babel/eslint-plugin@^7.17.7", "@babel/eslint-plugin@^7.23.5":
- version "7.23.5"
- resolved "https://registry.yarnpkg.com/@babel/eslint-plugin/-/eslint-plugin-7.23.5.tgz#77d4703e9f83b81e9fc13382810372beb2f10f94"
- integrity sha512-03+E/58Hoo/ui69gR+beFdGpplpoVK0BSIdke2iw4/Bz7eGN0ssRenNlnU4nmbkowNQOPCStKSwFr8H6DiY49g==
- dependencies:
- eslint-rule-composer "^0.3.0"
-
-"@babel/eslint-plugin@^7.25.9":
- version "7.25.9"
- resolved "https://registry.yarnpkg.com/@babel/eslint-plugin/-/eslint-plugin-7.25.9.tgz#a5b6cc46085e0a7d45c5dae36055ce30c5125dab"
- integrity sha512-MWg1lz+JiP9l1fXkE0qCUVo+1XwgNRPs6GTc88hmw6qN3AdgmfTSkyHt0e1xOTsKdXW5xlh2Lsk3wrFZbW5rzQ==
- dependencies:
- eslint-rule-composer "^0.3.0"
-
"@babel/generator@^7.23.0", "@babel/generator@^7.23.6", "@babel/generator@^7.7.2":
version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e"
@@ -2255,13 +2223,6 @@
dependencies:
regenerator-runtime "^0.14.0"
-"@babel/runtime@^7.23.2":
- version "7.24.4"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.4.tgz#de795accd698007a66ba44add6cc86542aff1edd"
- integrity sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==
- dependencies:
- regenerator-runtime "^0.14.0"
-
"@babel/template@^7.22.15", "@babel/template@^7.3.3":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
@@ -2739,6 +2700,15 @@
esquery "^1.5.0"
jsdoc-type-pratt-parser "~4.0.0"
+"@es-joy/jsdoccomment@~0.49.0":
+ version "0.49.0"
+ resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz#e5ec1eda837c802eca67d3b29e577197f14ba1db"
+ integrity sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==
+ dependencies:
+ comment-parser "1.4.1"
+ esquery "^1.6.0"
+ jsdoc-type-pratt-parser "~4.1.0"
+
"@esbuild/aix-ppc64@0.23.1":
version "0.23.1"
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353"
@@ -2969,6 +2939,13 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699"
integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==
+"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.4.1":
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56"
+ integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==
+ dependencies:
+ eslint-visitor-keys "^3.4.3"
+
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
@@ -2976,11 +2953,30 @@
dependencies:
eslint-visitor-keys "^3.3.0"
+"@eslint-community/regexpp@^4.11.0", "@eslint-community/regexpp@^4.12.1":
+ version "4.12.1"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
+ integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
+
"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1":
version "4.10.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
+"@eslint/config-array@^0.19.0":
+ version "0.19.0"
+ resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519"
+ integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==
+ dependencies:
+ "@eslint/object-schema" "^2.1.4"
+ debug "^4.3.1"
+ minimatch "^3.1.2"
+
+"@eslint/core@^0.9.0":
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd"
+ integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==
+
"@eslint/eslintrc@^2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d"
@@ -2996,15 +2992,15 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/eslintrc@^2.1.4":
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad"
- integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==
+"@eslint/eslintrc@^3.2.0":
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c"
+ integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
- espree "^9.6.0"
- globals "^13.19.0"
+ espree "^10.0.1"
+ globals "^14.0.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
js-yaml "^4.1.0"
@@ -3016,10 +3012,27 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.53.0.tgz#bea56f2ed2b5baea164348ff4d5a879f6f81f20d"
integrity sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==
-"@eslint/js@8.57.0":
- version "8.57.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
- integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==
+"@eslint/js@9.16.0":
+ version "9.16.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4"
+ integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==
+
+"@eslint/js@^9.14.0":
+ version "9.14.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.14.0.tgz#2347a871042ebd11a00fd8c2d3d56a265ee6857e"
+ integrity sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==
+
+"@eslint/object-schema@^2.1.4":
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843"
+ integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==
+
+"@eslint/plugin-kit@^0.2.3":
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8"
+ integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==
+ dependencies:
+ levn "^0.4.1"
"@fal-works/esbuild-plugin-global-externals@^2.1.2":
version "2.1.2"
@@ -3109,6 +3122,19 @@
resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.6.tgz#35dd26987228b39ef2316db3b1245c42eb19e324"
integrity sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ==
+"@humanfs/core@^0.19.1":
+ version "0.19.1"
+ resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77"
+ integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==
+
+"@humanfs/node@^0.16.6":
+ version "0.16.6"
+ resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e"
+ integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==
+ dependencies:
+ "@humanfs/core" "^0.19.1"
+ "@humanwhocodes/retry" "^0.3.0"
+
"@humanwhocodes/config-array@^0.11.13":
version "0.11.13"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297"
@@ -3118,15 +3144,6 @@
debug "^4.1.1"
minimatch "^3.0.5"
-"@humanwhocodes/config-array@^0.11.14":
- version "0.11.14"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
- integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
- dependencies:
- "@humanwhocodes/object-schema" "^2.0.2"
- debug "^4.3.1"
- minimatch "^3.0.5"
-
"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
@@ -3137,10 +3154,15 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044"
integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==
-"@humanwhocodes/object-schema@^2.0.2":
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
- integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
+"@humanwhocodes/retry@^0.3.0":
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a"
+ integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==
+
+"@humanwhocodes/retry@^0.4.1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b"
+ integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==
"@hutson/parse-repository-url@^3.0.0":
version "3.0.2"
@@ -4819,6 +4841,11 @@
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
+"@pkgr/core@^0.1.0":
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
+ integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==
+
"@pkgr/utils@^2.3.1":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc"
@@ -6315,12 +6342,12 @@
"@types/express" "^4.7.0"
file-system-cache "2.3.0"
-"@stylistic/eslint-plugin@^2.10.1":
- version "2.10.1"
- resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.10.1.tgz#809924752a1a13ebff2b0b6d7884fd61d389a907"
- integrity sha512-U+4yzNXElTf9q0kEfnloI9XbOyD4cnEQCxjUI94q0+W++0GAEQvJ/slwEj9lwjDHfGADRSr+Tco/z0XJvmDfCQ==
+"@stylistic/eslint-plugin@^2.11.0":
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.11.0.tgz#50d0289f36f7201055b7fa1729fdc1d8c46e93fa"
+ integrity sha512-PNRHbydNG5EH8NK4c+izdJlxajIR6GxcUhzsYNRsn6Myep4dsZt0qFCz3rCPnkvgO5FYibDcMqgNHUT+zvjYZw==
dependencies:
- "@typescript-eslint/utils" "^8.12.2"
+ "@typescript-eslint/utils" "^8.13.0"
eslint-visitor-keys "^4.2.0"
espree "^10.3.0"
estraverse "^5.3.0"
@@ -6790,6 +6817,11 @@
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
+"@types/estree@^1.0.6":
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
+ integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
+
"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33":
version "4.17.41"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz#5077defa630c2e8d28aa9ffc2c01c157c305bef6"
@@ -6894,7 +6926,7 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
-"@types/json-schema@^7.0.12":
+"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.15":
version "7.0.15"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
@@ -7326,13 +7358,13 @@
"@typescript-eslint/types" "6.10.0"
"@typescript-eslint/visitor-keys" "6.10.0"
-"@typescript-eslint/scope-manager@8.13.0":
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz#2f4aed0b87d72360e64e4ea194b1fde14a59082e"
- integrity sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==
+"@typescript-eslint/scope-manager@8.16.0":
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz#ebc9a3b399a69a6052f3d88174456dd399ef5905"
+ integrity sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==
dependencies:
- "@typescript-eslint/types" "8.13.0"
- "@typescript-eslint/visitor-keys" "8.13.0"
+ "@typescript-eslint/types" "8.16.0"
+ "@typescript-eslint/visitor-keys" "8.16.0"
"@typescript-eslint/type-utils@6.10.0":
version "6.10.0"
@@ -7354,10 +7386,10 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.10.0.tgz#f4f0a84aeb2ac546f21a66c6e0da92420e921367"
integrity sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==
-"@typescript-eslint/types@8.13.0":
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.13.0.tgz#3f35dead2b2491a04339370dcbcd17bbdfc204d8"
- integrity sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==
+"@typescript-eslint/types@8.16.0":
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737"
+ integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==
"@typescript-eslint/typescript-estree@5.18.0":
version "5.18.0"
@@ -7385,13 +7417,13 @@
semver "^7.5.4"
ts-api-utils "^1.0.1"
-"@typescript-eslint/typescript-estree@8.13.0":
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz#db8c93dd5437ca3ce417a255fb35ddc3c12c3e95"
- integrity sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==
+"@typescript-eslint/typescript-estree@8.16.0":
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz#9d741e56e5b13469b5190e763432ce5551a9300c"
+ integrity sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==
dependencies:
- "@typescript-eslint/types" "8.13.0"
- "@typescript-eslint/visitor-keys" "8.13.0"
+ "@typescript-eslint/types" "8.16.0"
+ "@typescript-eslint/visitor-keys" "8.16.0"
debug "^4.3.4"
fast-glob "^3.3.2"
is-glob "^4.0.3"
@@ -7424,15 +7456,15 @@
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
-"@typescript-eslint/utils@^8.12.2":
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.13.0.tgz#f6d40e8b5053dcaeabbd2e26463857abf27d62c0"
- integrity sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==
+"@typescript-eslint/utils@^8.13.0":
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3"
+ integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
- "@typescript-eslint/scope-manager" "8.13.0"
- "@typescript-eslint/types" "8.13.0"
- "@typescript-eslint/typescript-estree" "8.13.0"
+ "@typescript-eslint/scope-manager" "8.16.0"
+ "@typescript-eslint/types" "8.16.0"
+ "@typescript-eslint/typescript-estree" "8.16.0"
"@typescript-eslint/visitor-keys@5.18.0":
version "5.18.0"
@@ -7450,13 +7482,13 @@
"@typescript-eslint/types" "6.10.0"
eslint-visitor-keys "^3.4.1"
-"@typescript-eslint/visitor-keys@8.13.0":
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz#e97b0d92b266ef38a1faf40a74da289b66683a5b"
- integrity sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==
+"@typescript-eslint/visitor-keys@8.16.0":
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz#d5086afc060b01ff7a4ecab8d49d13d5a7b07705"
+ integrity sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==
dependencies:
- "@typescript-eslint/types" "8.13.0"
- eslint-visitor-keys "^3.4.3"
+ "@typescript-eslint/types" "8.16.0"
+ eslint-visitor-keys "^4.2.0"
"@ungap/structured-clone@^1.0.0", "@ungap/structured-clone@^1.2.0":
version "1.2.0"
@@ -10117,13 +10149,18 @@ aria-query@^4.2.2:
"@babel/runtime" "^7.10.2"
"@babel/runtime-corejs3" "^7.10.2"
-aria-query@^5.0.0, aria-query@^5.3.0:
+aria-query@^5.0.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e"
integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==
dependencies:
dequal "^2.0.3"
+aria-query@^5.3.2:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.2.tgz#93f81a43480e33a338f19163a3d10a50c01dcd59"
+ integrity sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==
+
arr-diff@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
@@ -10223,17 +10260,6 @@ array-includes@^3.1.6:
get-intrinsic "^1.1.3"
is-string "^1.0.7"
-array-includes@^3.1.7:
- version "3.1.7"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda"
- integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- get-intrinsic "^1.2.1"
- is-string "^1.0.7"
-
array-includes@^3.1.8:
version "3.1.8"
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d"
@@ -10286,7 +10312,7 @@ array.prototype.find@^2.1.1:
define-properties "^1.1.3"
es-abstract "^1.17.4"
-array.prototype.findlast@^1.2.4, array.prototype.findlast@^1.2.5:
+array.prototype.findlast@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904"
integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==
@@ -10298,17 +10324,6 @@ array.prototype.findlast@^1.2.4, array.prototype.findlast@^1.2.5:
es-object-atoms "^1.0.0"
es-shim-unscopables "^1.0.2"
-array.prototype.findlastindex@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207"
- integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- es-shim-unscopables "^1.0.0"
- get-intrinsic "^1.2.1"
-
array.prototype.findlastindex@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d"
@@ -10390,16 +10405,6 @@ array.prototype.flatmap@^1.3.2:
es-abstract "^1.22.1"
es-shim-unscopables "^1.0.0"
-array.prototype.toreversed@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba"
- integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- es-shim-unscopables "^1.0.0"
-
array.prototype.tosorted@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532"
@@ -10411,17 +10416,6 @@ array.prototype.tosorted@^1.1.1:
es-shim-unscopables "^1.0.0"
get-intrinsic "^1.1.3"
-array.prototype.tosorted@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8"
- integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==
- dependencies:
- call-bind "^1.0.5"
- define-properties "^1.2.1"
- es-abstract "^1.22.3"
- es-errors "^1.1.0"
- es-shim-unscopables "^1.0.2"
-
array.prototype.tosorted@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc"
@@ -10660,16 +10654,16 @@ axe-core@4.7.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0"
integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==
-axe-core@=4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf"
- integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==
-
axe-core@^4.0.2:
version "4.1.3"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.3.tgz#64a4c85509e0991f5168340edc4bedd1ceea6966"
integrity sha512-vwPpH4Aj4122EW38mxO/fxhGKtwWTMLDIJfZ1He0Edbtjcfna/R3YB67yVhezUMzqc3Jr3+Ii50KRntlENL4xQ==
+axe-core@^4.10.0:
+ version "4.10.2"
+ resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.2.tgz#85228e3e1d8b8532a27659b332e39b7fa0e022df"
+ integrity sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==
+
axe-core@^4.2.0, axe-core@^4.3.5:
version "4.4.1"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413"
@@ -10703,12 +10697,10 @@ axobject-query@^2.2.0:
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==
-axobject-query@^3.2.1:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a"
- integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==
- dependencies:
- dequal "^2.0.3"
+axobject-query@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.1.0.tgz#28768c76d0e3cff21bc62a9e2d0b6ac30042a1ee"
+ integrity sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==
b4a@^1.6.4:
version "1.6.4"
@@ -13070,6 +13062,15 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"
+cross-spawn@^7.0.5:
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
+ integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
crypto-random-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
@@ -14783,6 +14784,14 @@ enhanced-resolve@^5.15.0:
graceful-fs "^4.2.4"
tapable "^2.2.0"
+enhanced-resolve@^5.17.1:
+ version "5.17.1"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15"
+ integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==
+ dependencies:
+ graceful-fs "^4.2.4"
+ tapable "^2.2.0"
+
enquirer@^2.3.6:
version "2.4.1"
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56"
@@ -14936,10 +14945,10 @@ es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.18.0-next.1, es-abstrac
string.prototype.trimstart "^1.0.4"
unbox-primitive "^1.0.0"
-es-abstract@^1.17.5, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2, es-abstract@^1.23.3:
- version "1.23.3"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0"
- integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==
+es-abstract@^1.17.5, es-abstract@^1.23.3:
+ version "1.23.4"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.4.tgz#f006871f484d6a78229d2343557f2597f8333ed4"
+ integrity sha512-HR1gxH5OaiN7XH7uiWH0RLw0RcFySiSoW1ctxmD1ahTw3uGBtkmm/ng0tDU1OtYx5OK6EOL5Y6O21cDflG3Jcg==
dependencies:
array-buffer-byte-length "^1.0.1"
arraybuffer.prototype.slice "^1.0.3"
@@ -14956,7 +14965,7 @@ es-abstract@^1.17.5, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23
function.prototype.name "^1.1.6"
get-intrinsic "^1.2.4"
get-symbol-description "^1.0.2"
- globalthis "^1.0.3"
+ globalthis "^1.0.4"
gopd "^1.0.1"
has-property-descriptors "^1.0.2"
has-proto "^1.0.3"
@@ -14972,10 +14981,10 @@ es-abstract@^1.17.5, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23
is-string "^1.0.7"
is-typed-array "^1.1.13"
is-weakref "^1.0.2"
- object-inspect "^1.13.1"
+ object-inspect "^1.13.3"
object-keys "^1.1.1"
object.assign "^4.1.5"
- regexp.prototype.flags "^1.5.2"
+ regexp.prototype.flags "^1.5.3"
safe-array-concat "^1.1.2"
safe-regex-test "^1.0.3"
string.prototype.trim "^1.2.9"
@@ -15118,6 +15127,58 @@ es-abstract@^1.22.1:
unbox-primitive "^1.0.2"
which-typed-array "^1.1.13"
+es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2:
+ version "1.23.3"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0"
+ integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==
+ dependencies:
+ array-buffer-byte-length "^1.0.1"
+ arraybuffer.prototype.slice "^1.0.3"
+ available-typed-arrays "^1.0.7"
+ call-bind "^1.0.7"
+ data-view-buffer "^1.0.1"
+ data-view-byte-length "^1.0.1"
+ data-view-byte-offset "^1.0.0"
+ es-define-property "^1.0.0"
+ es-errors "^1.3.0"
+ es-object-atoms "^1.0.0"
+ es-set-tostringtag "^2.0.3"
+ es-to-primitive "^1.2.1"
+ function.prototype.name "^1.1.6"
+ get-intrinsic "^1.2.4"
+ get-symbol-description "^1.0.2"
+ globalthis "^1.0.3"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.2"
+ has-proto "^1.0.3"
+ has-symbols "^1.0.3"
+ hasown "^2.0.2"
+ internal-slot "^1.0.7"
+ is-array-buffer "^3.0.4"
+ is-callable "^1.2.7"
+ is-data-view "^1.0.1"
+ is-negative-zero "^2.0.3"
+ is-regex "^1.1.4"
+ is-shared-array-buffer "^1.0.3"
+ is-string "^1.0.7"
+ is-typed-array "^1.1.13"
+ is-weakref "^1.0.2"
+ object-inspect "^1.13.1"
+ object-keys "^1.1.1"
+ object.assign "^4.1.5"
+ regexp.prototype.flags "^1.5.2"
+ safe-array-concat "^1.1.2"
+ safe-regex-test "^1.0.3"
+ string.prototype.trim "^1.2.9"
+ string.prototype.trimend "^1.0.8"
+ string.prototype.trimstart "^1.0.8"
+ typed-array-buffer "^1.0.2"
+ typed-array-byte-length "^1.0.1"
+ typed-array-byte-offset "^1.0.2"
+ typed-array-length "^1.0.6"
+ unbox-primitive "^1.0.2"
+ which-typed-array "^1.1.15"
+
es-define-property@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845"
@@ -15125,7 +15186,7 @@ es-define-property@^1.0.0:
dependencies:
get-intrinsic "^1.2.4"
-es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0:
+es-errors@^1.2.1, es-errors@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
@@ -15165,30 +15226,10 @@ es-iterator-helpers@^1.0.12:
iterator.prototype "^1.1.2"
safe-array-concat "^1.0.1"
-es-iterator-helpers@^1.0.15, es-iterator-helpers@^1.0.17:
- version "1.0.18"
- resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz#4d3424f46b24df38d064af6fbbc89274e29ea69d"
- integrity sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.0"
- es-errors "^1.3.0"
- es-set-tostringtag "^2.0.3"
- function-bind "^1.1.2"
- get-intrinsic "^1.2.4"
- globalthis "^1.0.3"
- has-property-descriptors "^1.0.2"
- has-proto "^1.0.3"
- has-symbols "^1.0.3"
- internal-slot "^1.0.7"
- iterator.prototype "^1.1.2"
- safe-array-concat "^1.1.2"
-
es-iterator-helpers@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz#f6d745d342aea214fe09497e7152170dc333a7a6"
- integrity sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.2.0.tgz#2f1a3ab998b30cb2d10b195b587c6d9ebdebf152"
+ integrity sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==
dependencies:
call-bind "^1.0.7"
define-properties "^1.2.1"
@@ -15198,6 +15239,7 @@ es-iterator-helpers@^1.1.0:
function-bind "^1.1.2"
get-intrinsic "^1.2.4"
globalthis "^1.0.4"
+ gopd "^1.0.1"
has-property-descriptors "^1.0.2"
has-proto "^1.0.3"
has-symbols "^1.0.3"
@@ -15215,7 +15257,7 @@ es-module-lexer@^1.4.1:
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
-es-module-lexer@^1.5.0:
+es-module-lexer@^1.5.0, es-module-lexer@^1.5.3:
version "1.5.4"
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78"
integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==
@@ -15399,6 +15441,13 @@ escodegen@^2.1.0:
optionalDependencies:
source-map "~0.6.1"
+eslint-compat-utils@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4"
+ integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==
+ dependencies:
+ semver "^7.5.4"
+
eslint-config-prettier@^8.3.0:
version "8.10.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11"
@@ -15443,12 +15492,14 @@ eslint-module-utils@^2.7.3:
debug "^3.2.7"
find-up "^2.1.0"
-eslint-module-utils@^2.8.0:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49"
- integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==
+eslint-plugin-es-x@^7.8.0:
+ version "7.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz#a207aa08da37a7923f2a9599e6d3eb73f3f92b74"
+ integrity sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==
dependencies:
- debug "^3.2.7"
+ "@eslint-community/eslint-utils" "^4.1.2"
+ "@eslint-community/regexpp" "^4.11.0"
+ eslint-compat-utils "^0.5.1"
eslint-plugin-import@^2.25.2:
version "2.26.0"
@@ -15469,29 +15520,6 @@ eslint-plugin-import@^2.25.2:
resolve "^1.22.0"
tsconfig-paths "^3.14.1"
-eslint-plugin-import@^2.29.1:
- version "2.29.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643"
- integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==
- dependencies:
- array-includes "^3.1.7"
- array.prototype.findlastindex "^1.2.3"
- array.prototype.flat "^1.3.2"
- array.prototype.flatmap "^1.3.2"
- debug "^3.2.7"
- doctrine "^2.1.0"
- eslint-import-resolver-node "^0.3.9"
- eslint-module-utils "^2.8.0"
- hasown "^2.0.0"
- is-core-module "^2.13.1"
- is-glob "^4.0.3"
- minimatch "^3.1.2"
- object.fromentries "^2.0.7"
- object.groupby "^1.0.1"
- object.values "^1.1.7"
- semver "^6.3.1"
- tsconfig-paths "^3.15.0"
-
eslint-plugin-import@^2.31.0:
version "2.31.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7"
@@ -15539,6 +15567,23 @@ eslint-plugin-jsdoc@^46.4.6:
semver "^7.5.4"
spdx-expression-parse "^3.0.1"
+eslint-plugin-jsdoc@^50.5.0:
+ version "50.5.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.5.0.tgz#3b34b7846eb6c40750e68e97ae9441455fde7a75"
+ integrity sha512-xTkshfZrUbiSHXBwZ/9d5ulZ2OcHXxSvm/NPo494H/hadLRJwOq5PMV0EUpMqsb9V+kQo+9BAgi6Z7aJtdBp2A==
+ dependencies:
+ "@es-joy/jsdoccomment" "~0.49.0"
+ are-docs-informative "^0.0.2"
+ comment-parser "1.4.1"
+ debug "^4.3.6"
+ escape-string-regexp "^4.0.0"
+ espree "^10.1.0"
+ esquery "^1.6.0"
+ parse-imports "^2.1.1"
+ semver "^7.6.3"
+ spdx-expression-parse "^4.0.0"
+ synckit "^0.9.1"
+
eslint-plugin-jsx-a11y@^6.1.1:
version "6.4.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd"
@@ -15556,6 +15601,27 @@ eslint-plugin-jsx-a11y@^6.1.1:
jsx-ast-utils "^3.1.0"
language-tags "^1.0.5"
+eslint-plugin-jsx-a11y@^6.10.2:
+ version "6.10.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz#d2812bb23bf1ab4665f1718ea442e8372e638483"
+ integrity sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==
+ dependencies:
+ aria-query "^5.3.2"
+ array-includes "^3.1.8"
+ array.prototype.flatmap "^1.3.2"
+ ast-types-flow "^0.0.8"
+ axe-core "^4.10.0"
+ axobject-query "^4.1.0"
+ damerau-levenshtein "^1.0.8"
+ emoji-regex "^9.2.2"
+ hasown "^2.0.2"
+ jsx-ast-utils "^3.3.5"
+ language-tags "^1.0.9"
+ minimatch "^3.1.2"
+ object.fromentries "^2.0.8"
+ safe-regex-test "^1.0.3"
+ string.prototype.includes "^2.0.1"
+
eslint-plugin-jsx-a11y@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8"
@@ -15574,27 +15640,19 @@ eslint-plugin-jsx-a11y@^6.5.1:
language-tags "^1.0.5"
minimatch "^3.0.4"
-eslint-plugin-jsx-a11y@^6.8.0:
- version "6.8.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2"
- integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==
- dependencies:
- "@babel/runtime" "^7.23.2"
- aria-query "^5.3.0"
- array-includes "^3.1.7"
- array.prototype.flatmap "^1.3.2"
- ast-types-flow "^0.0.8"
- axe-core "=4.7.0"
- axobject-query "^3.2.1"
- damerau-levenshtein "^1.0.8"
- emoji-regex "^9.2.2"
- es-iterator-helpers "^1.0.15"
- hasown "^2.0.0"
- jsx-ast-utils "^3.3.5"
- language-tags "^1.0.9"
- minimatch "^3.1.2"
- object.entries "^1.1.7"
- object.fromentries "^2.0.7"
+eslint-plugin-n@^17.13.1:
+ version "17.13.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-17.13.1.tgz#3178c87989ad23417d22c5f66a13ecb1e9c5245e"
+ integrity sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.4.1"
+ enhanced-resolve "^5.17.1"
+ eslint-plugin-es-x "^7.8.0"
+ get-tsconfig "^4.8.1"
+ globals "^15.11.0"
+ ignore "^5.3.2"
+ minimatch "^9.0.5"
+ semver "^7.6.3"
eslint-plugin-playwright@^0.15.3:
version "0.15.3"
@@ -15654,31 +15712,7 @@ eslint-plugin-react@^7.27.0:
semver "^6.3.1"
string.prototype.matchall "^4.0.8"
-eslint-plugin-react@^7.34.1:
- version "7.34.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz#6806b70c97796f5bbfb235a5d3379ece5f4da997"
- integrity sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==
- dependencies:
- array-includes "^3.1.7"
- array.prototype.findlast "^1.2.4"
- array.prototype.flatmap "^1.3.2"
- array.prototype.toreversed "^1.1.2"
- array.prototype.tosorted "^1.1.3"
- doctrine "^2.1.0"
- es-iterator-helpers "^1.0.17"
- estraverse "^5.3.0"
- jsx-ast-utils "^2.4.1 || ^3.0.0"
- minimatch "^3.1.2"
- object.entries "^1.1.7"
- object.fromentries "^2.0.7"
- object.hasown "^1.1.3"
- object.values "^1.1.7"
- prop-types "^15.8.1"
- resolve "^2.0.0-next.5"
- semver "^6.3.1"
- string.prototype.matchall "^4.0.10"
-
-eslint-plugin-react@^7.37.2:
+eslint-plugin-react@^7.35.0:
version "7.37.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz#cd0935987876ba2900df2f58339f6d92305acc7a"
integrity sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==
@@ -15709,11 +15743,6 @@ eslint-plugin-yoast@^1.0.1:
dependencies:
requireindex "~1.1.0"
-eslint-rule-composer@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
- integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==
-
eslint-scope@3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
@@ -15746,6 +15775,14 @@ eslint-scope@^7.2.2:
esrecurse "^4.3.0"
estraverse "^5.2.0"
+eslint-scope@^8.2.0:
+ version "8.2.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442"
+ integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==
+ dependencies:
+ esrecurse "^4.3.0"
+ estraverse "^5.2.0"
+
eslint-utils@^1.3.1:
version "1.4.3"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
@@ -15876,51 +15913,47 @@ eslint@^8.3.0:
strip-ansi "^6.0.1"
text-table "^0.2.0"
-eslint@^8.57.0:
- version "8.57.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
- integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==
+eslint@^9.16.0:
+ version "9.16.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6"
+ integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
- "@eslint-community/regexpp" "^4.6.1"
- "@eslint/eslintrc" "^2.1.4"
- "@eslint/js" "8.57.0"
- "@humanwhocodes/config-array" "^0.11.14"
+ "@eslint-community/regexpp" "^4.12.1"
+ "@eslint/config-array" "^0.19.0"
+ "@eslint/core" "^0.9.0"
+ "@eslint/eslintrc" "^3.2.0"
+ "@eslint/js" "9.16.0"
+ "@eslint/plugin-kit" "^0.2.3"
+ "@humanfs/node" "^0.16.6"
"@humanwhocodes/module-importer" "^1.0.1"
- "@nodelib/fs.walk" "^1.2.8"
- "@ungap/structured-clone" "^1.2.0"
+ "@humanwhocodes/retry" "^0.4.1"
+ "@types/estree" "^1.0.6"
+ "@types/json-schema" "^7.0.15"
ajv "^6.12.4"
chalk "^4.0.0"
- cross-spawn "^7.0.2"
+ cross-spawn "^7.0.5"
debug "^4.3.2"
- doctrine "^3.0.0"
escape-string-regexp "^4.0.0"
- eslint-scope "^7.2.2"
- eslint-visitor-keys "^3.4.3"
- espree "^9.6.1"
- esquery "^1.4.2"
+ eslint-scope "^8.2.0"
+ eslint-visitor-keys "^4.2.0"
+ espree "^10.3.0"
+ esquery "^1.5.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
- file-entry-cache "^6.0.1"
+ file-entry-cache "^8.0.0"
find-up "^5.0.0"
glob-parent "^6.0.2"
- globals "^13.19.0"
- graphemer "^1.4.0"
ignore "^5.2.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
- is-path-inside "^3.0.3"
- js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.4.1"
lodash.merge "^4.6.2"
minimatch "^3.1.2"
natural-compare "^1.4.0"
optionator "^0.9.3"
- strip-ansi "^6.0.1"
- text-table "^0.2.0"
-espree@^10.3.0:
+espree@^10.0.1, espree@^10.1.0, espree@^10.3.0:
version "10.3.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a"
integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==
@@ -15971,6 +16004,13 @@ esquery@^1.4.2, esquery@^1.5.0:
dependencies:
estraverse "^5.1.0"
+esquery@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7"
+ integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==
+ dependencies:
+ estraverse "^5.1.0"
+
esrecurse@^4.1.0, esrecurse@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
@@ -16611,6 +16651,13 @@ file-entry-cache@^6.0.1:
dependencies:
flat-cache "^3.0.4"
+file-entry-cache@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
+ integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==
+ dependencies:
+ flat-cache "^4.0.0"
+
file-sync-cmp@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz#a5e7a8ffbfa493b43b923bbd4ca89a53b63b612b"
@@ -16931,6 +16978,14 @@ flat-cache@^3.0.4:
flatted "^3.1.0"
rimraf "^3.0.2"
+flat-cache@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c"
+ integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==
+ dependencies:
+ flatted "^3.2.9"
+ keyv "^4.5.4"
+
flat@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
@@ -16946,6 +17001,11 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469"
integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==
+flatted@^3.2.9:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27"
+ integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==
+
flopmang@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/flopmang/-/flopmang-1.0.0.tgz#22c82f12b537d5d440d5f0ad87ac39109ff31e26"
@@ -17475,6 +17535,13 @@ get-symbol-description@^1.0.2:
es-errors "^1.3.0"
get-intrinsic "^1.2.4"
+get-tsconfig@^4.8.1:
+ version "4.8.1"
+ resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471"
+ integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==
+ dependencies:
+ resolve-pkg-maps "^1.0.0"
+
get-uri@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.2.tgz#e019521646f4a8ff6d291fbaea2c46da204bb75b"
@@ -17799,6 +17866,21 @@ globals@^13.12.0, globals@^13.19.0:
dependencies:
type-fest "^0.20.2"
+globals@^14.0.0:
+ version "14.0.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
+ integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
+
+globals@^15.11.0, globals@^15.12.0:
+ version "15.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-15.12.0.tgz#1811872883ad8f41055b61457a130221297de5b5"
+ integrity sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==
+
+globals@^15.13.0:
+ version "15.13.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc"
+ integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==
+
globalthis@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
@@ -19001,6 +19083,11 @@ ignore@^5.1.9, ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
+ignore@^5.3.2:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
+ integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
+
iltorb@^2.4.3:
version "2.4.5"
resolved "https://registry.yarnpkg.com/iltorb/-/iltorb-2.4.5.tgz#d64434b527099125c6839ed48b666247a172ef87"
@@ -19529,7 +19616,7 @@ is-color-stop@^1.0.0:
rgb-regex "^1.0.1"
rgba-regex "^1.0.0"
-is-core-module@^2.13.0, is-core-module@^2.13.1:
+is-core-module@^2.13.0:
version "2.13.1"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
@@ -21256,7 +21343,7 @@ jscodeshift@^0.15.1:
temp "^0.8.4"
write-file-atomic "^2.3.0"
-jsdoc-type-pratt-parser@^4.0.0:
+jsdoc-type-pratt-parser@^4.0.0, jsdoc-type-pratt-parser@~4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz#ff6b4a3f339c34a6c188cbf50a16087858d22113"
integrity sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==
@@ -21351,6 +21438,11 @@ json-buffer@3.0.0:
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
+json-buffer@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
+ integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
+
json-parse-better-errors@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
@@ -21523,6 +21615,13 @@ keyv@3.0.0:
dependencies:
json-buffer "3.0.0"
+keyv@^4.5.4:
+ version "4.5.4"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
+ integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
+ dependencies:
+ json-buffer "3.0.1"
+
kind-of@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5"
@@ -22715,7 +22814,7 @@ minimatch@^9.0.1:
dependencies:
brace-expansion "^2.0.1"
-minimatch@^9.0.4:
+minimatch@^9.0.4, minimatch@^9.0.5:
version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
@@ -23666,6 +23765,11 @@ object-inspect@^1.13.1:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2"
integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==
+object-inspect@^1.13.3:
+ version "1.13.3"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a"
+ integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==
+
object-inspect@^1.7.0, object-inspect@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a"
@@ -23750,7 +23854,7 @@ object.entries@^1.1.6:
define-properties "^1.1.4"
es-abstract "^1.20.4"
-object.entries@^1.1.7, object.entries@^1.1.8:
+object.entries@^1.1.8:
version "1.1.8"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41"
integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==
@@ -23787,15 +23891,6 @@ object.fromentries@^2.0.6:
define-properties "^1.1.4"
es-abstract "^1.20.4"
-object.fromentries@^2.0.7:
- version "2.0.7"
- resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616"
- integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
-
object.fromentries@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65"
@@ -23815,16 +23910,6 @@ object.getownpropertydescriptors@^2.1.0:
define-properties "^1.1.3"
es-abstract "^1.18.0-next.2"
-object.groupby@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee"
- integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- get-intrinsic "^1.2.1"
-
object.groupby@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e"
@@ -23842,15 +23927,6 @@ object.hasown@^1.1.2:
define-properties "^1.1.4"
es-abstract "^1.20.4"
-object.hasown@^1.1.3:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc"
- integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==
- dependencies:
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-object-atoms "^1.0.0"
-
object.map@^1.0.0, object.map@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37"
@@ -23894,15 +23970,6 @@ object.values@^1.1.5:
define-properties "^1.1.3"
es-abstract "^1.19.1"
-object.values@^1.1.7:
- version "1.1.7"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a"
- integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
-
object.values@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b"
@@ -24405,6 +24472,14 @@ parse-filepath@^1.0.1:
map-cache "^0.2.0"
path-root "^0.1.1"
+parse-imports@^2.1.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/parse-imports/-/parse-imports-2.2.1.tgz#0a6e8b5316beb5c9905f50eb2bbb8c64a4805642"
+ integrity sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==
+ dependencies:
+ es-module-lexer "^1.5.3"
+ slashes "^3.0.12"
+
parse-json@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
@@ -27491,6 +27566,16 @@ regexp.prototype.flags@^1.5.2:
es-errors "^1.3.0"
set-function-name "^2.0.1"
+regexp.prototype.flags@^1.5.3:
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42"
+ integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==
+ dependencies:
+ call-bind "^1.0.7"
+ define-properties "^1.2.1"
+ es-errors "^1.3.0"
+ set-function-name "^2.0.2"
+
regexpp@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
@@ -27789,6 +27874,11 @@ resolve-pathname@^3.0.0:
resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd"
integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==
+resolve-pkg-maps@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
+ integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==
+
resolve-pkg@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/resolve-pkg/-/resolve-pkg-0.1.0.tgz#02cc993410e2936962bd97166a1b077da9725531"
@@ -28665,6 +28755,11 @@ slash@^5.1.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce"
integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==
+slashes@^3.0.12:
+ version "3.0.12"
+ resolved "https://registry.yarnpkg.com/slashes/-/slashes-3.0.12.tgz#3d664c877ad542dc1509eaf2c50f38d483a6435a"
+ integrity sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==
+
slice-ansi@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
@@ -28933,6 +29028,14 @@ spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1:
spdx-exceptions "^2.1.0"
spdx-license-ids "^3.0.0"
+spdx-expression-parse@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794"
+ integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==
+ dependencies:
+ spdx-exceptions "^2.1.0"
+ spdx-license-ids "^3.0.0"
+
spdx-license-ids@^3.0.0:
version "3.0.7"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65"
@@ -29208,7 +29311,16 @@ string-width@^5.0.1, string-width@^5.1.2:
emoji-regex "^9.2.2"
strip-ansi "^7.0.1"
-string.prototype.matchall@^4.0.10, string.prototype.matchall@^4.0.11:
+string.prototype.includes@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz#eceef21283640761a81dbe16d6c7171a4edf7d92"
+ integrity sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==
+ dependencies:
+ call-bind "^1.0.7"
+ define-properties "^1.2.1"
+ es-abstract "^1.23.3"
+
+string.prototype.matchall@^4.0.11:
version "4.0.11"
resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a"
integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==
@@ -29898,6 +30010,14 @@ synckit@^0.8.5:
"@pkgr/utils" "^2.3.1"
tslib "^2.5.0"
+synckit@^0.9.1:
+ version "0.9.2"
+ resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.2.tgz#a3a935eca7922d48b9e7d6c61822ee6c3ae4ec62"
+ integrity sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==
+ dependencies:
+ "@pkgr/core" "^0.1.0"
+ tslib "^2.6.2"
+
table@^5.2.3:
version "5.4.6"
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
@@ -30505,9 +30625,9 @@ ts-api-utils@^1.0.1:
integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==
ts-api-utils@^1.3.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c"
- integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064"
+ integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==
ts-dedent@^2.0.0:
version "2.2.0"
@@ -30577,6 +30697,11 @@ tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
+tslib@^2.6.2:
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
+ integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
+
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"