Releases: jfmengels/node-elm-review
v2.3.0-beta.3
v2.3.0-beta.2
Features
--template
now supports running with and initializing with configurations that link to parent directories (like "source-directories": ["src", "../src"]
)
The default configuration created by elm-review new-package
now contains more rules.
Performance
After first parsing a file, we store the parsed AST in the file system under elm-stuff
, so that we can avoid having to do the expensive parsing at every run. Previously, we were using elm-syntax
's encoder/decoder for that, but the total size of the cache was pretty big (roughly 6 to 8 times the total size of the Elm files of the project), which was a lot of data to load from the file system, which is a slow process.
Thanks to @MartinSStewart's hard work on elm-serialize
and on integrating it with elm-review
, we now write a way more compressed version of the AST, which is about a third of what it was before. On a 160k LoC project, that went from 41MB of data to about 14MB. This cuts roughly 15% of the time both on the first initial run (writing the files is faster) and on the successive runs (loading the files is faster).
List of commits
- Upgrade xo ee277bf
- Remove unused return value a569897
- Remove unused catch bindings 60609b3
- Run flow in a one-off manner 0077694
- new-package: Add no debug rules to default configuration 4bec40c
- new-package: Add NoMissingTypeExpose to default configuration 7c3e21b
- new-rule: Do not add a rule to the README if it already exists d984891
- new-rule: Do not add a rule to elm.json if it already exists 1e1c779
- Improve detection of "provided rules" section 67d7136
- Capitalize Watch module 8e08660
- Capitalize ErrorMessage module 3b5a7ca
- Capitalize AppWrapper module c26f5cc
- Capitalize AppState module d729032
- Capitalize Runner module e5cc0fe
- Capitalize Help module 0f83cf3
- Capitalize Init module 930d477
- Capitalize NewRule module a17be1c
- Template: Support directories with .. when running init 8ee0cf9
- Template: Support directories with .. when building/reviewing ceac00e
- Make the spinner succeed if the template has already been built 9365a31
- Make the spinner show as failed when a crash happens 59330fa
- Re-order imports in Main d68f714
- Add the project name to the license, and add dummy values for tests 92f9d49
- Remove remaining absolute paths from CLI output 65b3776
- CLI tests: Hide messages about files not being removed 71ba143
- CLI tests: Don't compare elm-stuff 38d35d8
- CLI tests: hide build output 4598b40
- Fix crash when running with --FOR-TESTS and there is a compilation error 9cc1eea
- Add thanks to @MartinSStewart 0cb577c
- Simplify File codec 66132cd
- Add ability to specify GitHub auth token for CLI tests through and an ENV variable 6f2442f
- Remove bytes related code in vendored serialize 7b598a7
- Remove need for Toop dependency ac45855
- WIP Vendorize elm-serialize b530495
- Move AstCodec module to avoid conflicts with configuration files 43b55a7
- Re-order top 10 expression variants aad93bf
- Rename expression variants b766179
- Reduce size of cache files by encoding Node as a list of 5 elements 0837f41
- Reduce size of cache files by encoding range as a list of 4 elements cd0fb78
- Cache files using elm-serialize encode from json functions e5616a1
- Fix compilation errors and finish the wiring 81a7d23
- Small change 89d20c4
- Wire everything up 8591515
- Finish codecs b0e0271
- Start adding elm-syntax codecs 99d25d7
- Build the project when running the CLI tests 57ff70f
- Write elm.json with 4 tabs 9ac2d5e
- new-package: Ignore common editor files in the generated gitignore 1ce3748
- Remove ignored Git directory 93c8534
- Format package.json with indentation of 2 873c1d5
- Add warning about the use of CLI errors' "message" field in JSON output mode 19d9414
- Fix encoding: change "str" to "string" eaed787
- Add test cases for when there are compilation errors 1cb2399
- Format error messages in JSON just like other reports 054001d
- Separate styledMessage.log into 2 functions 7bcecd3
- Use cross-spawn-promise 3007a9d
- JSON report: Make the output look like the Elm compiler 83e1caf
- Turn color from "formatted" field in JSON report into a hex string 5eb51a3
- Generate fake Elm files in init tests in order to make test more consistent 52c5211
- Fix --elmjson not working 813dc27
- Bump elliptic from 6.5.2 to 6.5.3 (#16) 3845dfe
- Simplify report message when there are no errors 92ceee7
- Extract parts of the init procedure into separate functions 8df97e4
- Add try it out sections to new rules and packages 8120684
- Fix typo in generated new-rule source file ce9167b
- new-rule: Add new rule to the example 9d822fe
- new-package: Generate example/ folder c3cdb08
- Fix typo in new-rule error message 9a96fff
- Remove init tests from package.json 03d9316
- Add test for init with --template in the CLI tests b019f58
- Refactor CLI tests wrt checking generated files 55021b2
- Add test for init in the CLI tests f682351
- Fix linting 31af425
- Create CLI test for new-rule c7efa82
- Create test for new-package 8625a52
- Fix rule name regex allowing incorrect characters e554e98
- Pre-fill answers for new-package 80b60f3
- Add missing word in error message 6d577c0
- Download all files from the remote config when running init 354a4aa
- Disable Spinner when running CLI tests be1ccc2
- Detect major version differences of the elm-review dependency 39d6174
- Make elm-review outdated test configuration even more outdated 99b49a0
- Add spinner to explain what is going on 300ffb5
- Upgrade dependencies of downloaded templates 5425529
- Re-organize template-dependencies 01ee796
- Explain to use --github-auth on rate limiting problems 77e53d6
v2.3.0-beta.1
- Add a section to try elm-review out easily 053d3ac
- Add test to check that init with a template works c08e186
- Add --template flag to the init subcommand b4a980b
- Extract remote template operations out into a separate module cab7fb2
- Simplify internal template representation by merging userName and repoName 7e60166
- Allow empty trailing commas when specifying the pat to a template 51a151d
- Have a nice error message when config's elm.json happens to be an application 020f3a7
- Template downloading: Only download Elm files 6e5e497
- Remove outdated comment 8159335
- Print an error if the configuration is empty 1e72c78
- Add --template to the --help information 6311ae3
- Throw an error when using both --config and --template in review mode 4a06866
- Update paths to the review elm.json in snapshots c2cfb9d
- Remove personal token 0db610e
- Make --template work when no path is given d77f7f6
- Give different names to the compiled file based on the build arguments 787831c
- Make Flow happy fd7b73a
- Remove/move comments b667633
- Remove commit information from the app state a96cdf9
- Print pretty JSON when running CLI tests 71e06c7
- Fix --template not building the right configuration 223d927
- Download template files directly to the temporary build folder a880d2b
- Delete remote-template downloads when running tests eefaeef
- Reword error when remote template has missing/outdated elm-review dependency 9972f05
- Add color for missing/outdated elm-review dependencies b475ae8
- Add a test for when elm-review is not a direct dependency 7dd0b0f
- Add a test for when the elm-review version is outdated 5b4b2e8
- Inline downloadTemplate cad119f
- Avoid re-downloading and building if the template already exists 4ae4e28
- Duplicate local and remote builds d7a8e9a
- Refactor template downloading code 1d7a1a0
- Remote template: Add ability to specify template folder 64775a9
- Remote template: Give a nice error message when the repo does not have the template folder bcac11b
- Add ability to run with a GitHub access token fc0422c
- Do not run in debug mode for most cases e72a9a3
- Remote template: Give a nice error message when a branch/commit is not found 16500b8
- Remote template: Give a nice error message when the repository is not found and a branch is given 9beec1c
- Remote template: Give a nice error message when the repository is not found and no branch is given 4578924
- Add test for using --template in review mode 2e4c3f6
- Use commit when downloading the contents of the example folder 64aa047
- Fix Flow warnings 32bc9b3
- Fix XO problems 1bcb9c8
- Use non-mocked commit when getting user source to compile 3e0eb8c
- Rename --from-example to --template 2241682
- Use the default branch given by the GitHub API c140951
- Make --from-example use the user args, not mocked data 0d57b51
- Fetch commit associated to the example configuration 2afc078
- filelisting 27fc465
- Store commit associated with the current branch in the state 0e5c3c7
- Compile and analyze using the downloaded example configuration 41fd96d
- Download all files from the example 29c25a4
- Download elm.json of an example configuration bc91fe6
- Add --from-example flag da48712
- Anonymize paths in stack traces ea3227b
- Separate debug logs and anonymization into different modules 5c27060
- Print all error messages to stdout 0aea378
- Re-organize tests a bit 191b80c
- CLI tests: Delete elm-stuff before running f18f61a
- Disconnect --debug and --FOR-TESTS 3c1d238
- Replace version in messages by something that will not break at every version d4c5589
- Make debug paths relative for CLI tests 8ecf526
- Make the API of the debug module more like a module a6041f8
- Improve diff output in CLI tests 38583b5
- Fix output difference 0ed01bb
- Add tests suite for --help 06393bc
- Add test suite when there is no error and when using --config 799957b
- Rename snapshot name de5cf1f
- Print test title when recording CLI tests 4569bac
- Remove outdated snapshots when tests disappear c1767cc
- Run tests in several configurations 8701c9f
- Remove probably not useful test 13582c8
- Introducing test failure, to be fixed later 084faef
- Remove useless exit command fd6dbf5
- Make test run output more readable beb5e15
- CLI tests: Make it possible to run them from different folders 93e03df
- CLI tests: Fail nicely if a snapshot is missing eff326a
- Add snapshot to test debug+JSON mode f292101
- CLI tests: Have a single list of tests ca6e101
- Fix errors in test script 9cdaf8b
- Add more tests 66272c7
- Add record script 6f5fb9d
- Creating tests for running the review e70aebe
- Simplify catch clauses 838ad09
Fix --fix not working without watch mode
Fix crash after initial re-compile and other improvements
A crash would occur after the initial compilation of the configuration, which is a regression introduced in v2.2.4.
Additional improvements:
Bug fixes around watch mode
v2.2.3
- Fix incorrect relative file path for README.md 0b728a9
- Update elm-syntax in parseElm binary (fixes truqu/elm-review-noleftpizza#3 (comment), where you can read the explanation) df8a675
Bugfix: Passing Elm files to the CLI does not lead to an error anymore
- Fix Elm files being passed directly as CLI arguments e4f2f0a
Stop ignoring Elm files in `node_modules`
new-package, new-rule, report changes, and perf
New subcommands
First of all, there are 2 new subcommands:
new-package
: Creates a new package aimed at publishingelm-review
rulesnew-rule
: Adds a new rule to your review configuration/project
These aim to help you create good rules and consistent review packages. Try them out, and let us know what you think!
Changes to the error report
- Running with
--no-details
hides the details from an error message. - The separator between errors now includes the name of the file. This helps avoid having to scroll to know which file the error is for.
- The header (and separator) now contain the line and column for each error, which allows you to go straight from your terminal to the error.
- There is now a summary of the number of errors at the end of the report.
- In watch mode, a message is shown when the analysis is running after a change.
Performance
- Changes in watch mode are being batched more than before. This should prevent the CLI from running over and over for each file or from crashing.
elm-json
has been upgraded to0.2.7
, which contains a lot of performance improvements thatelm-review
will benefit from.
Bug fixes
- The compilation error message was not being shown.
- Debug messages were not being shown.