prettier/prettier

Cache invalidation on plugin upgrade with optional metadata

Open

#17,260 建立於 2025年3月17日

在 GitHub 查看
 (5 留言) (3 反應) (0 負責人)JavaScript (51,868 star) (4,716 fork)batch import
help wanted

描述

Hi there, I have an external plugin that I use, and when I update it, I would like to invalidate the cache. This was discussed and implemented in ESLint. This was originally shot down in prettier since there was no obvious way to do it. Can prettier allow the same thing? An optional meta field that can be exposed by plugins, and then pulled into the cache key logic?

E.g. let plugins define some information about themselves, that doesn't need to be read from a package.json.

    meta: {
        name: "eslint-plugin-custom",
        version: "1.2.3"
    }

貢獻者指南