diff --git a/CHANGELOG.md b/CHANGELOG.md index bcc10b87..8e6f749b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.6.0 + +- Fix various `shared` comments which had `generic` instead of `general` in their name. +- Fix a bug with the parser that caused some solutions to blow up +- Add `makeParseErrorOutput` and `makeNoSourceOutput` to redirect to a mentor with helpful information + ## 0.5.3 - Fix `resistor-color` constant lookup, when name doesn't match "probably" diff --git a/package.json b/package.json index 35f70ad2..e50fd45f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@exercism/javascript-analyzer", - "version": "0.5.3", + "version": "0.6.0", "description": "Exercism analyzer for javascript", "repository": "https://github.com/exercism/javascript-analyzer", "author": "Derk-Jan Karrenbeld ", diff --git a/src/comments/shared.ts b/src/comments/shared.ts index 2365c52c..161494d7 100644 --- a/src/comments/shared.ts +++ b/src/comments/shared.ts @@ -74,7 +74,7 @@ Instead, in Javascript, prefixing a parameter with an underscore will stop most IDEs from highlighting that parameter if it's unused, which is actually a tool you probably want to keep in this case. Remove the underscore \`_\` from ${'parameter.name'} in order to fix this. -`('javascript.generic.prefer_unprefixed_underscore_parameters') +`('javascript.general.prefer_unprefixed_underscore_parameters') export const PARSE_ERROR = factory<'error' | 'details'>` There is something wrong with your submission, most likely a Syntax Error: @@ -84,14 +84,14 @@ Message: "${'error'}" \`\`\` ${'details'} \`\`\` -`('javascript.generic.parse_error') +`('javascript.general.parse_error') export const PREFER_CONST_OVER_LET_AND_VAR = factory<'kind' | 'name'>` Instead of \`${'kind'} ${'name'}\`, consider using \`const\`. \`const\` is a signal that the identifier won't be reassigned, which SHOULD be true for this top-level constant. (Not to be confused with _immutable values_). -`('javascript.generic.prefer_const_over_let_and_var') +`('javascript.general.prefer_const_over_let_and_var') export const BETA_COMMENTARY_PREFIX = factory` 🧪 This solution's output contains a new format of comments that is currently @@ -107,8 +107,8 @@ please open an issue [here](https://github.com/exercism/javascript-analyzer/issu this to the student directly. Use it to determine what you want to say. - If there is no icon, the commentary has not been updated to the latest standard. Proceed with caution. -`('javascript.generic.beta_disapprove_commentary_prefix') +`('javascript.general.beta_disapprove_commentary_prefix') export const ERROR_CAPTURED_NO_SOURCE = factory<'expected' | 'available'>` Expected source file "${'expected'}", found: ${'available'}. -`('javascript.generic.error_captured_no_source') +`('javascript.general.error_captured_no_source') diff --git a/test/analyzers/gigasecond/__snapshots__/snapshot.ts.snap b/test/analyzers/gigasecond/__snapshots__/snapshot.ts.snap index 70ae0e02..a3bf1176 100644 --- a/test/analyzers/gigasecond/__snapshots__/snapshot.ts.snap +++ b/test/analyzers/gigasecond/__snapshots__/snapshot.ts.snap @@ -241,7 +241,7 @@ exports[`When running analysis on gigasecond fixtures and expecting it to approv IsolatedAnalyzerOutput { "comments": Array [ CommentImpl { - "externalTemplate": "javascript.generic.prefer_const_over_let_and_var", + "externalTemplate": "javascript.general.prefer_const_over_let_and_var", "message": "Instead of \`var GIGASECOND\`, consider using \`const\`. \`const\` is a signal that the identifier won't be reassigned, which SHOULD be