Skip to content

Commit

Permalink
chore(deps-dev): bump prettier from 3.2.5 to 3.3.0 (#11240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Jun 4, 2024
1 parent e6e14ec commit bad5f91
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 48 deletions.
38 changes: 17 additions & 21 deletions client/src/playground/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,23 @@ const Editor = forwardRef<EditorHandle, any>(function EditorInner(
return () => {};
}, [language, colorScheme]);

useImperativeHandle(
ref,
() => {
return {
getContent() {
return editor.current?.state.doc.toString();
},
setContent(content: string) {
let state = EditorState.create({
doc: content,
extensions: [
...cmExtensions(colorScheme, language),
updateListenerExtension.current,
],
});
editor.current?.setState(state);
},
};
},
[language, colorScheme]
);
useImperativeHandle(ref, () => {
return {
getContent() {
return editor.current?.state.doc.toString();
},
setContent(content: string) {
let state = EditorState.create({
doc: content,
extensions: [
...cmExtensions(colorScheme, language),
updateListenerExtension.current,
],
});
editor.current?.setState(state);
},
};
}, [language, colorScheme]);
return (
<details className="editor-container" open={true}>
<summary>{language.toUpperCase()}</summary>
Expand Down
18 changes: 7 additions & 11 deletions client/src/ui/atoms/form/expanding-textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ const ExpandingTextarea = forwardRef(function ExpandingTextarea(
const { value } = props as AreaProps;
const textAreaRef = useRef<HTMLTextAreaElement>(null);

useImperativeHandle(
ref,
() => {
return {
focus() {
textAreaRef.current?.focus();
},
};
},
[]
);
useImperativeHandle(ref, () => {
return {
focus() {
textAreaRef.current?.focus();
},
};
}, []);
useEffect(() => {
const node = textAreaRef.current;

Expand Down
9 changes: 5 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@

This is how we ship the site, as static files served through a CDN with sensible
caching. It allows for viewing and searching through documents.\
This mode needs to optimize for quick response times and small page sizes and can
do so at the expense of longer build times.
This mode needs to optimize for quick response times and small page sizes and
can do so at the expense of longer build times.

### Local

This is how writers interact with our content. It runs locally on a writer's
machine and behaves similarly to production URL structure and appearance.\
In this mode we optimize for being able to quickly see documents after starting the
server or making changes. We can have larger page sizes as they are served locally.
In this mode we optimize for being able to quickly see documents after starting
the server or making changes. We can have larger page sizes as they are served
locally.

## Modules

Expand Down
14 changes: 7 additions & 7 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
We're using TypeScript in parts of the codebase. The intention for it is to be a
net developer productivity win, but there is bound to be a price to it in the
beginning, in learning how to solve type errors.\
In many cases they are useful pointers to errors that could happen at runtime. In
other cases they are circumstantial to the tools we are using. In both cases you
should not feel blocked by it from writing code you trust. Fortunately TypeScript
offers escape-hatches through which you can tell it to back off.
In many cases they are useful pointers to errors that could happen at runtime.
In other cases they are circumstantial to the tools we are using. In both cases
you should not feel blocked by it from writing code you trust. Fortunately
TypeScript offers escape-hatches through which you can tell it to back off.

## Escape Hatches

These allow you to tell TypeScript to be more accepting. They are generally
considered code smells and should ultimately not be needed. But pragmatically
they are better than being told by a robot that it will not run your code.\
Also a 50% type-checked codebase is better than a 0% type-checked codebase, which
is basically what most dynamically typed codebases look like. So do feel free to
rely on these to be productive!\
Also a 50% type-checked codebase is better than a 0% type-checked codebase,
which is basically what most dynamically typed codebases look like. So do feel
free to rely on these to be productive!\
Also tag Gregor (and whoever wants to take on the type-fight) in those PRs so
that they can slowly work on reducing untyped code.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"postcss-loader": "^8.1.1",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^9.5.14",
"prettier": "^3.2.5",
"prettier": "^3.3.0",
"prettier-plugin-packagejson": "^2.5.0",
"prompts": "^2.4.2",
"react": "^18.3.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12814,10 +12814,10 @@ prettier-plugin-packagejson@^2.5.0:
sort-package-json "2.10.0"
synckit "0.9.0"

prettier@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
prettier@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.0.tgz#d173ea0524a691d4c0b1181752f2b46724328cdf"
integrity sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==

pretty-error@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit bad5f91

Please sign in to comment.