Commit Graph
29 Commits
Author SHA1 Message Date
88ee8a5b3e Update babel to v8.0.0-rc.1 (#18822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-01 08:57:18 +08:00
fisker 21f2ea0f1e Fix 2022-06-19 11:28:28 +08:00
fisker 0e0f879c1a Merge branch 'main' into next
# Conflicts:
#	docs/browser.md
#	package.json
#	scripts/release/yarn.lock
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/expand-patterns.js
#	src/cli/format.js
#	src/cli/utils.js
#	src/language-js/index.js
#	src/language-js/parse/postprocess/index.js
#	src/language-js/parse/postprocess/typescript.js
#	tests/format/misc/errors/invalid/jsfmt.spec.js
#	tests/integration/__tests__/__snapshots__/support-info.js.snap
#	website/playground/sidebar/SidebarOptions.js
#	yarn.lock
2022-06-19 11:12:22 +08:00
Sosuke SuzukiandSimon Lydell fdccc0f48e Add --cache CLI option (#12800)
* Install `file-entry-cache` and types

* Implement `FormatResultsCache`

* Add `--cache` and `--cache-location` option

* Implement `--cache` and `--cache-location`

* Add tests for `--cache`

* Add tests for `--cache-location`

* Avoid spellcheck error

* Update snapshots for new options

* Add `groupBy` for website

* Use `fs.promises` instead of `fs/promises`

* Use `rimraf` instead of `fs.rm`

* Fix properties order of `options`

* Install `find-cache-dir` and types

* Change default cache file location to `node_modules/.cache/prettier`

* Fix tests following to change default cache file location

* Update snapshots for changing default cache file location

* Set `os.tmpdir()` as a fallback for default cache dir

* Add docs for `--cache` and `--cache-location`

* Use `sdbm` instead of `node:crypto`

* Add changelog

* Fix `getHashOfOptions`

* Remove `cache-location`

* `prettiercache` -> `prettier-cache`

* Remove cache file when run Prettier without `--cache` option

* Implement `--cache-strategy`

* Add tests for invalid cache strategy

* Fix lint problems

* Tweaks tests

* Add tests for timestamp

* Add tests for `--cache-strategy`

* Add docs for cache-strategy

* Address review

* Fix `findCacheFile`

* Use Set.prototype.has

* Throw error with --stdin-filepath

* Update snapshots

* Fix error for cache and stdin

* Use string constructor instead of toString

* Update changelog

* Use flag validation

* Fix `cache-strategy` definition

* Update docs

* Mark highlihgt

* Throw error for `--cache-strategy` without `--cache`

* Update docs

* Fix typo

* Updates snapshots

* Update docs/cli.md

Co-authored-by: Simon Lydell <simon.lydell@gmail.com>

* Fix error message

* Remove `:::` syntax

* Defaults `content`

* Update docs

* Fix by Prettier

Co-authored-by: Simon Lydell <simon.lydell@gmail.com>
2022-06-11 23:32:32 +09:00
fisker Cheung 11991d0de7 Fix jest.config.js 2022-04-25 14:54:38 +08:00
fisker Cheung a85f38f096 Merge branch 'main' into next
# Conflicts:
#	.github/workflows/dev-test.yml
#	jest.config.mjs
#	package.json
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/format.js
#	src/cli/options/create-minimist-options.js
#	src/cli/options/parse-cli-arguments.js
#	src/cli/usage.js
#	src/cli/utils.js
#	src/common/create-ignorer.js
#	src/common/load-plugins.js
#	src/config/resolve-config.js
#	src/index.js
#	src/language-css/utils/css-units.evaluate.js
#	src/language-html/ast.js
#	src/language-html/print-preprocess.js
#	src/language-html/utils/index.js
#	src/main/multiparser.js
#	tests/format/markdown/auto-link/jsfmt.spec.js
#	tests/integration/__tests__/__snapshots__/config-resolution.js.snap
#	tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap
#	tests/integration/__tests__/file-info.js
#	yarn.lock
2022-04-25 14:28:27 +08:00
dependabot[bot]andfisker Cheung 586a4b2a87 Build(deps): Bump css-units-list from 0.0.5 to 1.1.0 (#12684)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-25 14:02:59 +08:00
dependabot[bot] c23e24ee11 Build(deps): Bump leven from 3.1.0 to 4.0.0 (#11349) 2022-04-02 11:47:46 +00:00
dependabot[bot] f4d4dc1177 Build(deps): Bump strip-ansi from 6.0.0 to 7.0.0 (#10731) 2022-04-02 11:24:18 +00:00
dependabot[bot]andfisker Cheung 237e681936 Build(deps): Bump escape-string-regexp from 4.0.0 to 5.0.0 (#10725)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-02 18:34:21 +08:00
dependabot[bot]andfisker Cheung bf148376fa Build(deps): Bump html-tag-names from 1.1.5 to 2.0.0 (#10612)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-02 14:02:39 +08:00
dependabot[bot]andfisker Cheung 141bd80c02 Build(deps): Bump html-element-attributes from 2.3.0 to 3.0.0 (#10617)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-04-01 09:39:29 +08:00
dependabot[bot]andfisker Cheung 1be154650b Build(deps): Bump html-void-elements from 1.0.5 to 2.0.0 (#10623)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-03-31 22:21:37 +08:00
dependabot[bot]andSosuke Suzuki 529312e9ac Build(deps): Bump micromatch from 4.0.4 to 4.0.5 (#12550)
* Build(deps): Bump micromatch from 4.0.4 to 4.0.5

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Build(deps): Bump micromatch from 4.0.4 to 4.0.5

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update vendors

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2022-03-28 02:18:16 +09:00
fisker Cheung a22e3a9ac1 Fix 2022-03-17 09:54:48 +08:00
fisker Cheung c95c899b6f Merge branch 'main' into next
# Conflicts:
#	package.json
#	scripts/build/bundler.mjs
#	scripts/build/config.mjs
#	scripts/vendors/vendor-meta.json
#	scripts/vendors/vendors.mjs
#	src/cli/format.js
#	src/cli/logger.js
#	src/cli/options/get-options-for-file.js
#	src/cli/options/parse-cli-arguments.js
#	src/main/core.js
#	tests/config/install-prettier.js
#	vendors/execa.js
#	vendors/mem.js
#	vendors/string-width.js
#	vendors/tempy.js
#	yarn.lock
2022-03-17 09:44:08 +08:00
dependabot[bot] b26a24558a Build(deps-dev): Bump esbuild from 0.14.26 to 0.14.27 (#12461) 2022-03-15 14:45:31 +00:00
fisker Cheung 4b7a39c936 Update chalk to v5 (#12446) 2022-03-15 09:40:25 +08:00
fisker Cheung 9b599ccaad Regenerate vendors (#12386) 2022-03-02 22:00:41 +08:00
fisker Cheung a67a5c2f94 Remove vendors/ (#12377) 2022-02-28 19:48:14 +08:00
fisker Cheung 52c9a20e2c Merge branch 'main' into next
# Conflicts:
#	package.json
#	src/cli/index.js
#	tests/config/install-prettier.js
#	tests/format/yaml/block-literal/jsfmt.spec.js
#	tests/integration/__tests__/file-info.js
#	yarn.lock
2022-02-21 16:12:59 +08:00
dependabot[bot]andsosukesuzuki e11ea84efe Build(deps-dev): Bump execa from 6.0.0 to 6.1.0 (#12301)
* Build(deps-dev): Bump execa from 6.0.0 to 6.1.0

Bumps [execa](https://github.com/sindresorhus/execa) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/sindresorhus/execa/releases)
- [Commits](https://github.com/sindresorhus/execa/compare/v6.0.0...v6.1.0)

---
updated-dependencies:
- dependency-name: execa
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update vendors

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com>
2022-02-16 08:33:48 +08:00
Sosuke Suzuki b14b13d2cf Update tempy to 2.0.0 (#12247)
* Update `tempy`

* require `tempy` directly

* Fix

* Fix

* Vendors

* Remove `vendord.d.tsd`

* Fix path
2022-02-12 18:23:50 +09:00
fisker Cheung be0739ec22 Add type:"module" to package.json (#12272) 2022-02-12 15:39:16 +08:00
Sosuke Suzuki 34fbd099de Update execa to 6.0.0 (#12245)
* Update execa

* Fix

* require `execa` directly

* Run `vendors:bundle`

* Run `vendors:bundle`

* Generate dts with considering defautl export

* Remove `vendors-versions.json`
2022-02-12 12:07:22 +09:00
Jed Fox 98f560839c Include vendors/ when installing from GitHub (#12250) 2022-02-06 23:22:44 -05:00
Sosuke Suzuki 6819dc91f6 Add an esbuild plugin to add @ts-nocheck annotation for vendors (#12248)
* Enable prettier

* Add `esbuildPluginTsNocheck`

* Run build

* Update cspell.json
2022-02-06 23:25:29 +09:00
Sosuke Suzuki fce558e97a Tweaks vendors (#12246)
* Add `scripts` for vendors

* Add links to README
2022-02-06 21:44:54 +09:00
Sosuke Suzuki 0abd1907bb Bundle Pure ESM Packages into /vendors/*.js as CommonJS (#12217)
* string-width

* Add bundle script

* Update package.json

* mem

* Add version validator

* Throw error

* Change filename

* Add documents

* Generate d.ts

* Fix lint problems

* globby

* Add workflow to validate vendor versions

* Fix eslintignore

* Fix

* Fix spell

* Address review

* process.exitCode = 1

* test validation

* Revert "test validation"

This reverts commit 5a86d5f71212e0e900709238a8cc109716678864.

* Remove exists files

* Fix conflicts

* Clean

* Remove globby
2022-02-06 17:31:50 +09:00