Skip to content

putout v23.2.0

Choose a tag to compare

@coderaiser coderaiser released this 25 Dec 19:19
· 12447 commits to master since this release

More stores to save the data

image

I hear the song of the nightingale.
The sun is warm, the wind is mild,
willows are green along the shore -
Here no Ox can hide!
What artist can draw that massive head,
those majestic horns?
(c) Zen Ten Bulls

Hi folks!
A couple updates for today 🎁.

💪 Rule reuse-duplicate-init now supports MemberExpression

And such code:

const {operator} = require('putout');
const {replaceWith} = require('putout').operator

Will be easily transformed to 😏:

const {operator} = require('putout');
const {replaceWith} = operator

New guy on the stores block

When you need to store the data of traversing for future processing, and want to do it right: use Stores.
There was two types of stores:

  • store - to store simple values to objects;
  • listStore to store array items;

And now we have upstore, that hav ability to update information you put in accordance to the name you provide.

not-rule- prefix for Rules

When you using rules specific to your project, and don't want to publish them (but do want to keep them in repository) - use --rulesdir:

putout --rulesdir rules

Similar to the way to it's done in 🐊Putout repository in directory /ruels 🎉

That's all for today! Happy holidays 🥳!

🔥 feature

  • (package) @putout/plugin-reuse-duplicate-init v3.0.0
  • (package) @putout/plugin-remove-unused-types v2.0.0
  • (package) @putout/engine-runner v12.0.0
  • (@putout/plugin-reuse-duplicate-init) drop support of putout < 23
  • (@putout/plugin-reuse-duplicate-init) add support of MemberExpression
  • (@putout/plugin-remove-unused-types) drop support of putout < 23
  • (@putout/plugin-remove-unused-types) store -> upstore
  • (@putout/engine-runner) add support of upstore
  • (@putout/engine-runner) improve support of Program: exit + exclude
  • (@putout/plugin-github) traverse-property: callback -> return array
  • (putout) rules: exclude "not-rule-*" glob
  • (@putout/rule-add-readme-to-homepage) add