node-elm-review

CLI for elm-review

BSD-3-CLAUSE License

Downloads
59.8K
Stars
48
Committers
15

Bot releases are visible (Hide)

node-elm-review - Batch changes when a lot of files change

Published by jfmengels over 4 years ago

  • Add a message when the review is running in watch mode 7c876cc
  • Batch changes when multiple files are changed at the same time 7e84f3e
  • Fix debug messages not showing up c51311d
  • Update chokidar 7e26192
  • Bump elm-json to 0.2.7 772e29e
  • Fix missing error message when elm-json could not be found 9f7e094
  • Make all elm-review packages start with elm-review 15dccda

https://github.com/jfmengels/node-elm-review/compare/v2.2.0-beta0...v2.2.0-beta2

node-elm-review - Add new-package and new-rule subcommands

Published by jfmengels over 4 years ago

Adds 2 new subcommands:

  • new-package: Creates a new package aimed at publishing elm-review rules
  • new-rule: Adds a new rule to your review configuration/project

Individual commits

  • Validate package name a211519
  • Add new-rule command 0b87073
  • Add new-package command 882968a

https://github.com/jfmengels/node-elm-review/compare/v2.1.4...v2.2.0-beta0

node-elm-review - Fixed output sometimes being partially text-less

Published by jfmengels over 4 years ago

In some cases, the output of the report (in non-json output) got hidden, and you couldn't see the text in the terminal.

I haven't investigated enough, but basically, it's because of trying to wrap a colored output with terminal link which ended up creating this problem.

This problem was introduced in v2.1.2

Individual commits:

  • Fix human output being partially hidden 7748708
  • Disable max-params linting rule f5a039b

https://github.com/jfmengels/node-elm-review/compare/v2.1.3...v2.1.4

node-elm-review - Bug fixes, and less disk space in elm-stuff

Published by jfmengels over 4 years ago

Bug fixes

  • Fix files not being ignored when cwd is not the project root 3df4c61
  • Add missing abortWithDetails port in app-wrapper 50b8467

Taking less disk space in elm-stuff

The compilation now happens in a temporary folder, getting rid of the review application's compilation artifacts inside elm-stuff (one that is nested in your project's elm-stuff)

  • Move compilation from elm-stuff to a temporary folder f5f66aa
  • Avoid copying the template-source every time f0ebb9d
  • Make copying over elm-review-src easier cd9becf
  • Remove unused parameter 6371e13

https://github.com/jfmengels/node-elm-review/compare/v2.1.2...v2.1.3

node-elm-review - Links to rule docs and bug fixes

Published by jfmengels over 4 years ago

Highlights

  • In the terminals that support it, you will now be able to click the name of the rule to get linked to its documentation on the Elm packages website.
  • Adds --ignore-problematic-dependencies flag, to work around https://github.com/elm/project-metadata-utils/issues/12
  • Fix not being able to ignore errors in elm.json and README using a relative path
  • Fix unexpected errors not being formatted as advertised when using --report=json

List of commits:

  • Add --ignore-problematic-dependencies option d53ef70
  • Fix elm.json and README not having an absolute path d8d0771
  • Add clarification about the name in the tooling integration document 17cd64a
  • Remove duplicate word in init help cad7d5c
  • Display only the last report in new fix-all e22db59
  • Add new CLI option b79c8a5
  • Remove the need to stringify/parse docs links 28b0137
  • Give a nice error message when the project's elm.json can't be found f26ee67
  • Avoid trying to find the project elm.json when in running --help/--init d77a923
  • Format unexpected errors like expected errors 8efcbce
  • Add stack trace to unexpected errors in debug mode b0f6adc
  • Document links in the JSON output in the tooling-integration document 2960186
  • Display link to rule's documentation in terminal 4c28b9b
  • Add link in formatted JSON dda2ad6
  • Add link to a rule's documentation in the JSON report b0cba99
  • Store the links in the review application d7329b6
  • Collect links to the rule's documentation 645ac26
  • Make it possible for files/folders to review to be absolute paths a5bf1c7
  • Specify the version where --report=json was added a5d350e

https://github.com/jfmengels/node-elm-review/compare/v2.1.1...v2.1.2

node-elm-review -

Published by jfmengels over 4 years ago

Add files that were not published and prevented the CLI from working.

  • Add missing vendor/ files 734aba1

https://github.com/jfmengels/node-elm-review/compare/v2.1.0...v2.1.1

node-elm-review -

Published by jfmengels over 4 years ago

New requirements

New requirement, this version of node-elm-review requires you to use at least version 2.1.0 of the jfmengels/elm-review package. This is necessary to add new features useful for JSON reporting. You can run the following commands to update it.

cd your-project/
cd review/
npx elm-json install jfmengels/elm-review@2

Highlights

  • JSON reports: You can now use --report=json to get a report in the JSON format. This will pave the way to supporting running elm-review in editors (🎉) and other environments than just the terminal.
  • I wrote about how editor and other tools should work with node-elm-review https://github.com/jfmengels/node-elm-review/blob/master/documentation/tooling-integration.md.
  • Parallelization of parsing: When you run elm-review, the files that are not parsed into ASTs (and cached) yet get parsed. This is now done in parallel in separate worker_threads. This will not be available if you use Node.js v10, but it will if you use v12 or higher (due to the availability of worker_threads).
  • Stability: A lot of work went into making the CLI more stable
    • Avoiding memory leaks in watch mode: We now run the review application in a separate worker_thread, which we can dispose of to avoid memory leaks. Changing your configuration while in watch should now not increase the memory usage until it all explodes. Also, re-running after the configuration has changed should be a bit faster now.
    • elm-format is now applied to the fixed files without it first being written to the file system. Much thanks to @sparksp for tackling this! (I failed at making this work months ago and he made it work easily. That's embarassing.)
    • Better offline support: We used to download dependencies' information at every run if they could not be found in ELM_HOME. These are now downloaded and cached separately. This should let you run elm-review while offline.
  • The diff you see in fix proposals now shows only the changed sections, instead of all the code between the first and last changed lines.

Individual commits

  • Create SUPPORT.md 5d39f79
  • Fix configuration watcher not being closed 44574e5
  • Don't print watch errors in JSON report e782887
  • Don't quit the watch mode on a compilation error 3be8065
  • Move node-elm-compiler fdeea38
  • Remove unused functions from vendored node-elm-compiler ec4619d
  • Remove Lodash from vendorized node-elm-compiler afaa4ce
  • Vendorize node-elm-compiler 0298497
  • Get the compilation errors inside the JSON output, and improve error messages 43841e1
  • Avoid copying unnecessary files ef9251d
  • Remove note about running elm-format after saving to the file system 8a04fb3
  • Use --stdin option of elm-format (#11) eae4962
  • Fix recommended version in version mismatch error 002e411
  • Bump xo a038ccc
  • Fix the npm audit issues 72edbeb
  • Fix typo in tooling documentation (#10) eacf99d
  • Write how other tooling should work with elm-review 571f121
  • Make it clearer for "elm.json not found" that we are looking into a directory ad7bf0a
  • Fix XO and Flow warnings 77954c1
  • Bump template dependencies 1a126e7
  • Change ruleName to rule in JSON output 2692337
  • Wrap JSON report and errors reports inside a record b4ddc90
  • Remove unused exports 5023151
  • Remove unused File.encode function bbda136
  • Don't validate the version when you are running a local version of the Elm package c95329e
  • Introduce namespaces for the elm-stuff 647b68a
  • Use custom errors when we can't find the comiler binary e34d834
  • Use custom errors for abort errors 4df01b2
  • Run elm-json using npx --no-install aa394e7
  • Use custom errors for missing Internet access a740627
  • Use custom errors in autofix 359e746
  • Refactor custom error messages 5e21e47
  • Add stacktraces to errors 78d6953
  • Add file paths to custom errors 066a019
  • Add warnings when using jfmengels/elm-review < v1.1 4c7ecb7
  • Add fixes in the JSON report f780183
  • Fix fixed files not being reloaded deed05e
  • Make applyAllFixes tail-recursive fa6ba88
  • Wrap errors in JSON when using the JSON format 4d33126
  • Change the separator between diff sections 5d27936
  • Remove wrapping of JSON output 4b15775
  • Split chunks into sections 911fe55
  • Simplify/shorten the JSON format output e5dfc08
  • Add formatted output to the JSON format b509378
  • Align line numbers to the right in reports e96a89b
  • Group errors by file in JSON format 5aa4798
  • Explicit the ports to subscribe to in the template 721dd63
  • Wrap file data in non-primitive types 78fa2c6
  • Get JSON format closer to Elm's JSON output 8948959
  • Remove background color from Text d464a37
  • Compute and send over ports only the requested report mode 368a8b0
  • Move reporting out into a separate module b656874
  • Group Texts together when they have the same styling a1fcdfd
  • Avoid re-computing the AST when the timestamp has changed but not the source 89159a7
  • Avoid re-reading a file in watch mode if we still have it in memory b89f93f
  • Only subscribe to flushing stdin once 5acbab8
  • Avoid patching console.warn multiple times in watch mode 64e2323
  • Only run app in worker thread in watch mode 55521f5
  • Wrap the Elm app and run it in a worker 3c9c38a
  • Create a wrapper around app, to run the Elm application in a disposabl thread 22bf431
  • Cache dependencies' information 75082d3
  • Display an error message when dependencies' information could not be found/downloaded d9676c3
  • Avoid compiling the project if there is no Internet access b7d3162
  • Fix formatReport tests d5b8704
  • Say "no more" when fixes have previously been applied 04d9b98
  • Simplify Reporter.formatReport 4347fa4
  • Add option to get for a JSON-formatted report 2c9cb26
  • Create debug utility module 191714d
  • Move README state from watch to state ecdce50
  • Move state in autofix to state abcca56
  • Format fixable files with elm-format only if they are Elm files c093c9c
  • Simplify startReview port 6547700
  • Create utility to promisify sending and receiving data from Elm bf7b6c7
  • Store unsubscription logic in state 47d3e31
  • Make in-memory cache handling more TEA-like 3cb9e7e
  • Create local builds with the -local suffix 3348804
  • Fix compilation when using local elm-review package 4d374a0
  • Move the in-memory file cache to state.js ba7c675
  • Rename the model file to state 748d8c9
  • Make update in model.js mutate the model 538dd3e
  • Terminate the workers once all the parsing has finished 61fcbad
  • Remove unnecessary argument to xo 8eaa5f3
  • Remove need to send & return the file path when parsing an Elm file 641c0de
  • Split the Elm parsing worker from the main thread a444688
  • Reorder test suite 53ceaed
  • Make worker queue a bit faster dd28517
  • Fine-tune number of worker threads to spawn 567717b
  • Prevent crash on Node v10, due to unavailability of worker_threads 9f11f3b
  • Create a pool of worker threads to parse the Elm code in parallel 3eecbdf
  • Spawn a worker to parse Elm files 7c6e714
  • Re-organize local states around a single central state 8d84f98
  • Wait until all cache writes have finished before exiting. 315c182
  • Cache parsed files 98b6933
  • Add parseElm sub-project, to parse Elm code in workers 4e9d4af

https://github.com/jfmengels/node-elm-review/compare/v2.0.2......v2.1.0

node-elm-review - JSON support and performance & stability improvements

Published by jfmengels over 4 years ago

  • Write how other tooling should work with elm-review 571f121
  • Make it clearer for "elm.json not found" that we are looking into a directory ad7bf0a
  • Fix XO and Flow warnings 77954c1
  • Bump template dependencies 1a126e7
  • Change ruleName to rule in JSON output 2692337
  • Wrap JSON report and errors reports inside a record b4ddc90
  • Remove unused exports 5023151
  • Remove unused File.encode function bbda136
  • Don't validate the version when you are running a local version of the Elm package c95329e
  • Introduce namespaces for the elm-stuff 647b68a
  • Use custom errors when we can't find the comiler binary e34d834
  • Use custom errors for abort errors 4df01b2
  • Run elm-json using npx --no-install aa394e7
  • Use custom errors for missing Internet access a740627
  • Use custom errors in autofix 359e746
  • Refactor custom error messages 5e21e47
  • Add stacktraces to errors 78d6953
  • Add file paths to custom errors 066a019
  • Add warnings when using jfmengels/elm-review < v1.1 4c7ecb7
  • Add fixes in the JSON report f780183
  • Fix fixed files not being reloaded deed05e
  • Make applyAllFixes tail-recursive fa6ba88
  • Wrap errors in JSON when using the JSON format 4d33126
  • Change the separator between diff sections 5d27936
  • Remove wrapping of JSON output 4b15775
  • Split chunks into sections 911fe55
  • Simplify/shorten the JSON format output e5dfc08
  • Add formatted output to the JSON format b509378
  • Align line numbers to the right in reports e96a89b
  • Group errors by file in JSON format 5aa4798
  • Explicit the ports to subscribe to in the template 721dd63
  • Wrap file data in non-primitive types 78fa2c6
  • Get JSON format closer to Elm's JSON output 8948959
  • Remove background color from Text d464a37
  • Compute and send over ports only the requested report mode 368a8b0
  • Move reporting out into a separate module b656874
  • Group Texts together when they have the same styling a1fcdfd
  • Avoid re-computing the AST when the timestamp has changed but not the source 89159a7
  • Avoid re-reading a file in watch mode if we still have it in memory b89f93f
  • Only subscribe to flushing stdin once 5acbab8
  • Avoid patching console.warn multiple times in watch mode 64e2323
  • Only run app in worker thread in watch mode 55521f5
  • Wrap the Elm app and run it in a worker 3c9c38a
  • Create a wrapper around app, to run the Elm application in a disposabl thread 22bf431
  • Cache dependencies' information 75082d3
  • Display an error message when dependencies' information could not be found/downloaded d9676c3
  • Avoid compiling the project if there is no Internet access b7d3162
  • Fix formatReport tests d5b8704
  • Say "no more" when fixes have previously been applied 04d9b98
  • Simplify Reporter.formatReport 4347fa4
  • Add option to get for a JSON-formatted report 2c9cb26
  • Create debug utility module 191714d
  • Move README state from watch to state ecdce50
  • Move state in autofix to state abcca56
  • Format fixable files with elm-format only if they are Elm files c093c9c
  • Simplify startReview port 6547700
  • Create utility to promisify sending and receiving data from Elm bf7b6c7
  • Store unsubscription logic in state 47d3e31
  • Make in-memory cache handling more TEA-like 3cb9e7e
  • Create local builds with the -local suffix 3348804
  • Fix compilation when using local elm-review package 4d374a0
  • Move the in-memory file cache to state.js ba7c675
  • Rename the model file to state 748d8c9
  • Make update in model.js mutate the model 538dd3e
  • Terminate the workers once all the parsing has finished 61fcbad
  • Remove unnecessary argument to xo 8eaa5f3
  • Remove need to send & return the file path when parsing an Elm file 641c0de
  • Split the Elm parsing worker from the main thread a444688
  • Reorder test suite 53ceaed
  • Make worker queue a bit faster dd28517
  • Fine-tune number of worker threads to spawn 567717b
  • Prevent crash on Node v10, due to unavailability of worker_threads 9f11f3b
  • Create a pool of worker threads to parse the Elm code in parallel 3eecbdf
  • Spawn a worker to parse Elm files 7c6e714
  • Re-organize local states around a single central state 8d84f98
  • Wait until all cache writes have finished before exiting. 315c182
  • Cache parsed files 98b6933
  • Add parseElm sub-project, to parse Elm code in workers 4e9d4af

https://github.com/jfmengels/node-elm-review/compare/v2.0.2...v2.1.0-beta.1

node-elm-review -

Published by jfmengels over 4 years ago

  • Fix init crash on Node v14 60f4e8b (thanks @sparksp!)
  • Speed up init, and fix elm-explorations/test not being properly removed on init fb531b4

https://github.com/jfmengels/node-elm-review/compare/v2.0.1...v2.0.2

node-elm-review -

Published by jfmengels over 4 years ago

Highlight:

  • Made it possible to run elm-test with elm-review init. A bug in elm-test prevents that.

  • Warn about readme changing only in debug mode c30c7aa

  • Make tests pass on other machines 64c5a89

  • Delete 'elm-explorations/test' from indirect deps on init 597b2dc

  • Install latest compatible elm/core and elm/json on init 32bd912

https://github.com/jfmengels/node-elm-review/compare/v2.0.0...v2.0.1

node-elm-review -

Published by jfmengels over 4 years ago

node-elm-review - v2.0.0 (beta 1)

Published by jfmengels over 4 years ago

Follow the migration guide!

Blog post announcing all the new things will be available in the non-beta v2.0.0 release.

  • Install jfmengels/elm-review v2 on init 4583543
  • Support fixing README in fix-all mode 4ce6aff
  • Apply fixes for README 4fce9be
  • Remove unused import 88526e1
  • Update to Review.Fix API changes 8b74d48
  • Support fixing README fd1b8ac
  • Adapt to Review.Fix API change e02db67
  • Bump minimist from 1.2.2 to 1.2.3 (#5) 24f8c40
  • Fix crash on init when review/ doesn't already exist f62efbe
  • Add files to package.json to reduce bundle size c724524
  • Fix test errors 737897f
  • Drop support for Node.js < 10 d08929a
  • Follow xo guidelines ed42a73
  • Update dependencies: xo 201ce05
  • Update dependencies: flow-bin c164574
  • Update dependencies: which a02d04d
  • Update dependencies: got 098980a
  • Update dependencies: fs-extra 315dd4d
  • Update dependencies: cross-spawn 077181e
  • Update dependencies: chalk f752173
  • Avoid crashing on startup when no elm.json could be found 1d95653
  • Deal with ReviewError rather than Error 7ae777f
  • Remove wrench emoji for to indicate something is fixable 93a8a3d
  • Rename filesThatFailedToParse to modulesThatFailedToParse ceba9a3
  • Fix docs.json and elm.json not correctly being read when fetching from the packages website. 171ab6d
  • Fix --config not working with absolute paths a1ab618
  • Fix file caches not being written before the program exits 16dc0da
  • Watch changes to README.md 6f6c949
  • Load and report errors for README c8ba7b6
  • Rename Project.withDependency and Project.withElmJson to Project.add* 15be6e0
  • Bump acorn from 6.2.0 to 6.4.1 (#4) 4ae783c
  • Bump minimist from 1.2.0 to 1.2.2 (#3) e59fc5e
  • Ignore .idea files 0d90b30
  • Add comment for File 1e7a870
  • Have a single mention that errors are fixable, instead for every fixable error 3a14941
  • Add separator between errors in report 5caf505
  • Make the colors more consistent accross error messages and help 2029e16
  • Add warning about using/depending on undocumented options cfa31c3
  • Add simple support for outputting JSON for errors instead of the normal reporting 3b4469f
  • Color elm-review in error message e159755
  • Remove import alias to avoid confusion a02eed9
  • Build Dependency using Dependency.create 4496a8b
  • Call console.log inside the styled message module e69eeac
  • Wrap lines so that they look less weird in the terminal eb25122
  • Add missing dev dependencies f6c0a80
  • Format package.json c8394da
  • Move Diff to Vendor/Diff.elm 227fc3e
  • Remove elm-commmunity/graph and elm-community/intdict deps b08df99
  • Add env variable to use local elm-review source code 139bebe
  • Re-add colors on build errors cbf5b93
  • Add elm-explorations/test to test-dependencies by default 82c5883
  • Move ReviewConfig to a src/ folder, so as to facilitate adding tests ce8717b
  • Add summary of errors that were fixed in --fix-all 4359c1e
  • Show the errors that were fixed in the fix-all suggestion 2103e65
  • Change files when --fix-all is accepted 39568ac
  • Add prompt for fix-all 558958d
  • Add in tests from jinjor/elm-diff ae1e3ae
  • Add in tests from elm-review-reporter d085707
  • Compute the result of applying all autofixes a3888c8
  • Compile the template in tests d67d81f
  • Move jinjor/elm-diff over to this project 9a7bfd6
  • Move elm-review-reporter code over to this project 25943ac
  • Add --fix-all option 034ae3c
  • Mention tests/ will be reviewed by default in --help 4b5b2ef
  • Have a separate build for applications built using --debug than for regular ones e42ea19
  • Send more information about the project's dependencies 0998556
  • Collect and send test-dependencies 5863642
  • Fix watching of elm.json f2d5c79
  • Report errors for the project's elm.json 4c0ce7b
  • Include tests/ by default d369dcc
  • Do not ignore "GLOBAL ERROR"s 10236f3
  • Fix watch bug where deleted files that get re-added were not sent to the application a4913d3
  • Cache the result of elm-json solve 41df5e9
  • Rename dependencies modules 7d02317
  • Allow specifying files to review instead of whole directories ecaf363
  • Reformat using xo and fix Flow errors 0ab18af
  • Rename withModule to addModule and withParsedModule to addParsedModule afb0275
  • Replace Review.review by Rule.review 038d0b6
  • Replace references to Lint in the README ac41270
  • Properly exit when Elm fails the build due to a missing Internet access 8c72b13
  • Rename file to module 58bce6e
  • Make watch recover when the configuration fails to compile on change 6c52743
  • Fix the autofix mode when configuration changes 6963d5a
  • Prevent displaying the report twice when a fix has been canceled by a file change in watch mode 934ae2a
  • Prevent running the review twice after a fix has been applied d327202
  • Prevent multiple prompts if a file is changed while we're proposing a fix 8b6d02e
  • Watch: Restart the process on config change without spawning a new elm-review process eb4ef27
  • Restart process when configuration changes 64aba9f
  • Hide "Compiled in DEV" mode for Elm 0.19.1 01a4b93
  • Don't clear the console in debug mode c2e4e39
  • Watch elm.json in watch mode 579b6f3
  • Handle file addition and deletion in watch mode 36dd488
  • Clear the console when run in watch mode 80d4555
  • Make autofixing work well with watch mode 288cbe8
  • Add a watch mode 9a125c0
  • Refactor the runner to be prepare for watch mode 1f96431
  • Reorganize how options and values dependent upon options are computed d99fc54
  • Remove RawFile in favor of a record type a14e388
  • Caching: Store and read parsed files f978da2
  • Do not rebuild the application if the review/elm.json and it's source-directories have not changed 8c7aa75
  • Precompute the module graph once we have all the files 33e2797
  • Pass files to the rules using the project, rather than a list of files 3b33d56
  • Add new elm-review dependencies in template be36a61
  • Make getting dependencies work for application projects 5da3962
  • interfaces -> modules 3646472
  • Read docs.json files from file system, and fallback to HTTP 72700c3
  • Use Elm.Docs instead of custom made docs.json wrapper 3b5c871
  • Change port signature for collectFile 2e557b6
  • Collect dependencies' interface 5684ca1
  • Rename dependencies to template-dependencies 366e891
  • Re-enable fix mode 04601ac
  • Store the rules in the model, as they now contain some sort of cache 2ff77d0
  • Use Review.Rule.Error instead of Review.Error b462a02
  • Include parsing errors in the report dc6a9d5
  • Run elm-review with the review Review.reviewFiles b3f2e1c
  • TMP work with local source 93211ad

https://github.com/jfmengels/node-elm-review/compare/v1.0.2...v2.0.0-beta.1

node-elm-review -

Published by jfmengels almost 5 years ago

A few improvements:

  • We now only install a version of the elm-review package that is compatible with the CLI. This is to prepare for a new major version. Previous versions of node-elm-review will likely break once that version is released, so I highly suggest you update your version to at least this one before then 5c185e1
  • We now default to Elm v0.19.1 when initializing a project, if the version could not be determined 72ed544
  • The dependencies used to write rules (stil4m/elm-syntax and elm/project-metadata-utils) are now installed as direct dependencies, which should make it a bit easier to start writing your own rules 8e5cb93
  • Improved error message when compilation fails 0cdfa34

https://github.com/jfmengels/node-elm-review/compare/v1.0.1...v1.0.2

node-elm-review -

Published by jfmengels about 5 years ago

v1.0.1 improves support for Windows.

A bug occurred on Windows when trying to find files to review, which caused no files to be found.

Thanks @miyamoen for helping with this!