Skip to content

Use a cache for prettier#4731

Merged
julienw merged 1 commit into
firefox-devtools:mainfrom
julienw:prettier-cache
Sep 1, 2023
Merged

Use a cache for prettier#4731
julienw merged 1 commit into
firefox-devtools:mainfrom
julienw:prettier-cache

Conversation

@julienw

@julienw julienw commented Aug 25, 2023

Copy link
Copy Markdown
Contributor

This is a follow-up for #4727: by configuring the cache option, this makes running prettier much faster.
Please look at the last commit only.

@julienw julienw requested a review from canova August 25, 2023 13:37
Comment thread package.json
Comment on lines +22 to +23
"prettier-run": "prettier --check . --cache --cache-strategy content --cache-location .prettiercache",
"prettier-fix": "prettier --write . --cache --cache-strategy content --cache-location .prettiercache",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default cache location is somewhere in node_modules, I was worried that it might get picked up by the cache happening in the CI. In CI I'd prefer to run without a cache, that's why I thought it would be better to explicitely set this cache location. Note that the eslint cache is in .eslintcache so it looked like a good idea to use a similar name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I would also like to run the CI without a cache. Also it would be easy to remove the cache from the root directory if we want to, when we are developing locally.

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread package.json
Comment on lines +22 to +23
"prettier-run": "prettier --check . --cache --cache-strategy content --cache-location .prettiercache",
"prettier-fix": "prettier --write . --cache --cache-strategy content --cache-location .prettiercache",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I would also like to run the CI without a cache. Also it would be easy to remove the cache from the root directory if we want to, when we are developing locally.

@julienw julienw merged commit 3fd8dfd into firefox-devtools:main Sep 1, 2023
tenderlove added a commit to tenderlove/profiler that referenced this pull request Jan 16, 2024
* main: (37 commits)
  Show the hovered time in the ruler at the top of the timeline. (PR firefox-devtools#4748)
  Hardcode 'project' to 'firefox-profiler' in .taskcluster.yml (PR firefox-devtools#4759)
  Update all Yarn dependencies (2023-09-27) (PR firefox-devtools#4758)
  Update the uploading command in the developer documentation (PR firefox-devtools#4752)
  Make prettier ignore the taskcluster files
  Add taskcluster
  Update all Yarn dependencies (2023-09-20) (PR firefox-devtools#4756)
  Add a robots.txt file to disallow indexing our profile links (PR firefox-devtools#4753)
  Avoid showing the calltree panel in profiles without samples. (PR firefox-devtools#4744)
  Display the vertical line in the timeline when hovering the marker chart or stack chart (PR firefox-devtools#4742)
  Draw a single rectangle for 2 markers in bar charts only if both the start and end horizontal pixels match. (PR firefox-devtools#4734)
  Update all Yarn dependencies (2023-09-13) (firefox-devtools#4746)
  Update all Yarn dependencies (2023-09-06) (PR firefox-devtools#4741)
  Remove prefer-wait-for rule in our config because it's been removed from the plugin
  ⬆️ Update eslint-plugin-testing-library to version 6.0.1
  Use a cache for prettier (PR firefox-devtools#4731)
  Remove leftover eslint error
  Run prettier on the codebase
  Upgrade prettier to latest version
  Ignore the coverage directory when present
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants