From 4bc5ab40582921f5283af4ff5d6511b58d25ec00 Mon Sep 17 00:00:00 2001 From: Konv Suu Date: Sun, 28 Jun 2026 06:37:51 +0800 Subject: [PATCH 1/5] Update file-entry-cache to 11.1.5 (#19483) Co-authored-by: fisker --- changelog_unreleased/cli/19483.md | 3 ++ package.json | 2 +- src/cli/format.js | 4 --- website/blog/2026-06-27-3.9.0.md | 2 +- yarn.lock | 52 +++++++++++++++---------------- 5 files changed, 31 insertions(+), 32 deletions(-) create mode 100644 changelog_unreleased/cli/19483.md diff --git a/changelog_unreleased/cli/19483.md b/changelog_unreleased/cli/19483.md new file mode 100644 index 000000000..55eae66d8 --- /dev/null +++ b/changelog_unreleased/cli/19483.md @@ -0,0 +1,3 @@ +#### Fix ignored file has been cached incorrectly (#19483 by @kovsu) + +Bug details https://github.com/prettier/prettier/issues/18016 diff --git a/package.json b/package.json index 09ec1cbec..378c51ec9 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "espree": "11.2.0", "fast-glob": "3.3.3", "fast-json-stable-stringify": "2.1.0", - "file-entry-cache": "11.1.3", + "file-entry-cache": "11.1.5", "find-cache-directory": "6.0.0", "flow-parser": "0.321.0", "get-east-asian-width": "1.6.0", diff --git a/src/cli/format.js b/src/cli/format.js index 84de34946..c2434b803 100644 --- a/src/cli/format.js +++ b/src/cli/format.js @@ -321,10 +321,6 @@ async function formatFiles(context) { context.argv.check || context.argv.listDifferent) ) { - // If the file is ignored remove it from the cache - // - it won't be formatted anymore - // - if it has been restored, we shouldn't keep the old cache entry - formatResultsCache?.removeFormatResultsCache(filename); continue; } diff --git a/website/blog/2026-06-27-3.9.0.md b/website/blog/2026-06-27-3.9.0.md index 377b80663..6fc88261e 100644 --- a/website/blog/2026-06-27-3.9.0.md +++ b/website/blog/2026-06-27-3.9.0.md @@ -1,6 +1,6 @@ --- authors: "fisker" -title: "Prettier 3.9: New Parser Foundations and Formatting Improvements" +title: "Prettier 3.9: Major parser upgrades and Formatting improvements" --- We are excited to announce Prettier 3.9! diff --git a/yarn.lock b/yarn.lock index 2f6c90a26..cba91e579 100644 --- a/yarn.lock +++ b/yarn.lock @@ -484,25 +484,25 @@ __metadata: languageName: node linkType: hard -"@cacheable/memory@npm:^2.0.8": - version: 2.0.9 - resolution: "@cacheable/memory@npm:2.0.9" +"@cacheable/memory@npm:^2.2.0": + version: 2.2.0 + resolution: "@cacheable/memory@npm:2.2.0" dependencies: - "@cacheable/utils": "npm:^2.4.1" + "@cacheable/utils": "npm:^2.5.0" "@keyv/bigmap": "npm:^1.3.1" hookified: "npm:^1.15.1" keyv: "npm:^5.6.0" - checksum: 10/2e1b159ad59c54599ecd0d313b95950d23f883bc99e363fd9a76b528e96374b6294bd270a94c5930a1081abfda5396939d2db1a6ff49d0e6b5179114d8e45d00 + checksum: 10/97db83d7a74979accca9de56cf278e42c22b4273e752d7e23c44fbec4a47450716c4920903424fd19184a7bee6325064b6c453afc6f96bf92b39eecfe0b40648 languageName: node linkType: hard -"@cacheable/utils@npm:^2.4.1": - version: 2.4.1 - resolution: "@cacheable/utils@npm:2.4.1" +"@cacheable/utils@npm:^2.5.0": + version: 2.5.0 + resolution: "@cacheable/utils@npm:2.5.0" dependencies: hashery: "npm:^1.5.1" keyv: "npm:^5.6.0" - checksum: 10/5fbea553fd53c8ffe4f3a2e746ce6ecf76f3d90f599b49f2c677c3922e4f643a40f3e90a13727b6e866b7ab3c8e267368d98b54d88d08181050a8d066997cfe7 + checksum: 10/a77a7e682926b984cb28b6993f4595638ce8799de3223dbdcdb796a077a02de763687bdc5669779019aba44d27693260ef92d860a19330d7eaa4dfcca3433c3b languageName: node linkType: hard @@ -3341,16 +3341,16 @@ __metadata: languageName: node linkType: hard -"cacheable@npm:^2.3.4": - version: 2.3.5 - resolution: "cacheable@npm:2.3.5" +"cacheable@npm:^2.5.0": + version: 2.5.0 + resolution: "cacheable@npm:2.5.0" dependencies: - "@cacheable/memory": "npm:^2.0.8" - "@cacheable/utils": "npm:^2.4.1" + "@cacheable/memory": "npm:^2.2.0" + "@cacheable/utils": "npm:^2.5.0" hookified: "npm:^1.15.0" keyv: "npm:^5.6.0" qified: "npm:^0.10.1" - checksum: 10/5d64b477ad1546857efcd8dc3ba62c8bf5acafc7e4e77a0cf93cd96101098e550f69816c55830e74e75f709020ce9e8fc0999552dc06d2f543606efb7a5eb63f + checksum: 10/216a896e17dfa9c598a69e2fff31216126e94286f6c0ceb1bfab1d34e6c1a8791e8dc34dbd28660ec72a84f1d370c3733a9fc481e00a5512fd4e0cfc35775db6 languageName: node linkType: hard @@ -4753,12 +4753,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:11.1.3": - version: 11.1.3 - resolution: "file-entry-cache@npm:11.1.3" +"file-entry-cache@npm:11.1.5": + version: 11.1.5 + resolution: "file-entry-cache@npm:11.1.5" dependencies: - flat-cache: "npm:^6.1.22" - checksum: 10/1602c186377488b8b80909c9f6c0ce57744561e84ce38a3df01022906ca6c948c61abe277e180a8619eaa5a30356f0c67fc3a835bc7caa471ff0b19402c13921 + flat-cache: "npm:^6.1.23" + checksum: 10/a4a6c45c9561fbceb6511b3483e299e636e5c67e225ea4445c8cbdbe6c571da8505b29b29fc4c62fe9cf28ffe33314f401fad3da09e4b62321c92f0d3a113135 languageName: node linkType: hard @@ -4852,14 +4852,14 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^6.1.22": - version: 6.1.22 - resolution: "flat-cache@npm:6.1.22" +"flat-cache@npm:^6.1.23": + version: 6.1.23 + resolution: "flat-cache@npm:6.1.23" dependencies: - cacheable: "npm:^2.3.4" + cacheable: "npm:^2.5.0" flatted: "npm:^3.4.2" hookified: "npm:^1.15.0" - checksum: 10/1133b75077c87260324b5b768af742242eacdbcb78e7260e365caef74dd4f31625e95661d25dce8c823b889d657a030f6a8a0b7ef3719223de267cbb1c647143 + checksum: 10/63ad3682f399e3e7b7255493b07469f80c418034a10e12e1c7043b41d666ff69b20be924984a0b91cd767a4f71540e4fb4421651d15adc736fca1c04b8505758 languageName: node linkType: hard @@ -7974,7 +7974,7 @@ __metadata: espree: "npm:11.2.0" fast-glob: "npm:3.3.3" fast-json-stable-stringify: "npm:2.1.0" - file-entry-cache: "npm:11.1.3" + file-entry-cache: "npm:11.1.5" find-cache-directory: "npm:6.0.0" flow-estree: "npm:0.321.0" flow-parser: "npm:0.321.0" From 06159aa254e662514d1c6f4de13fbac805984232 Mon Sep 17 00:00:00 2001 From: fisker Date: Sun, 28 Jun 2026 06:40:45 +0800 Subject: [PATCH 2/5] Fix bug in release script --- scripts/changelog-for-patch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/changelog-for-patch.js b/scripts/changelog-for-patch.js index 048bc7fb3..560bb1dd4 100644 --- a/scripts/changelog-for-patch.js +++ b/scripts/changelog-for-patch.js @@ -18,7 +18,7 @@ const entries = fs .readdirSync(changelogUnreleasedDirectory, { withFileTypes: true }) .filter((entry) => entry.isDirectory()) .flatMap((dir) => { - const dirPath = path.join(dir.path, dir.name); + const dirPath = path.join(dir.parentPath, dir.name); const { title } = categories.find((category) => category.dir === dir.name); return getEntries(dirPath).map((entry) => { From c47654c003fe525572e10d5cc1ea64d7b9c0ee55 Mon Sep 17 00:00:00 2001 From: fisker Date: Sun, 28 Jun 2026 06:49:47 +0800 Subject: [PATCH 3/5] Release 3.9.1 --- .github/ISSUE_TEMPLATE/formatting.md | 2 +- .github/ISSUE_TEMPLATE/integration.md | 2 +- CHANGELOG.md | 8 +++++ package.json | 2 +- .../versioned_docs/version-stable/browser.md | 36 +++++++++---------- .../versioned_docs/version-stable/install.md | 10 +++--- .../version-stable/sharing-configurations.md | 4 +-- 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index f7331818c..5d6d3a27f 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 3.9.0** +**Prettier 3.9.1** [Playground link](https://prettier.io/playground/#.....) ```sh diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index f88bd091c..0cdaaa6ec 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 3.9.0 +- Prettier Version: 3.9.1 - Running Prettier via: - Runtime: - Operating System: diff --git a/CHANGELOG.md b/CHANGELOG.md index fab879528..889a1f80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 3.9.1 + +[diff](https://github.com/prettier/prettier/compare/3.9.0...3.9.1) + +#### CLI: Fix ignored file has been cached incorrectly ([#19483](https://github.com/prettier/prettier/pull/19483) by [@kovsu](https://github.com/kovsu)) + +Bug details https://github.com/prettier/prettier/issues/18016 + # 3.9.0 [diff](https://github.com/prettier/prettier/compare/3.8.5...3.9.0) diff --git a/package.json b/package.json index 378c51ec9..8924dc897 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "3.10.0-dev", + "version": "3.9.1", "description": "Prettier is an opinionated code formatter", "bin": "./bin/prettier.cjs", "repository": "prettier/prettier", diff --git a/website/versioned_docs/version-stable/browser.md b/website/versioned_docs/version-stable/browser.md index b3a8824aa..aeb13c183 100644 --- a/website/versioned_docs/version-stable/browser.md +++ b/website/versioned_docs/version-stable/browser.md @@ -21,7 +21,7 @@ Required options: - **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use. -- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@3.9.0/plugins](https://unpkg.com/browse/prettier@3.9.0/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. +- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@3.9.1/plugins](https://unpkg.com/browse/prettier@3.9.1/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option. @@ -32,8 +32,8 @@ See below for examples. ### Global ```html - - + +