Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency prettier to v3 #2226

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/publish-ci/cra4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/node": "^20.10.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"prettier": "^2.8.4",
"prettier": "^3.1.1",
"serve": "^14.2.0",
"typescript": "^4.9.4"
}
Expand Down
12 changes: 6 additions & 6 deletions .github/publish-ci/cra4/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12091,12 +12091,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.8.4":
version: 2.8.4
resolution: "prettier@npm:2.8.4"
"prettier@npm:^3.1.1":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
bin:
prettier: bin-prettier.js
checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
languageName: node
linkType: hard

Expand Down Expand Up @@ -13142,7 +13142,7 @@ __metadata:
"@types/node": ^20.10.4
"@types/react": ^18.0.26
"@types/react-dom": ^18.0.10
prettier: ^2.8.4
prettier: ^3.1.1
react: ^18.2.0
react-dom: ^18.2.0
react-scripts: ^4
Expand Down
2 changes: 1 addition & 1 deletion .github/publish-ci/cra5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/node": "^20.10.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"prettier": "^2.8.4",
"prettier": "^3.1.1",
"typescript": "^4.9.4"
}
}
12 changes: 6 additions & 6 deletions .github/publish-ci/cra5/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10197,12 +10197,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.8.4":
version: 2.8.4
resolution: "prettier@npm:2.8.4"
"prettier@npm:^3.1.1":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
bin:
prettier: bin-prettier.js
checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
languageName: node
linkType: hard

Expand Down Expand Up @@ -10926,7 +10926,7 @@ __metadata:
"@types/node": ^20.10.4
"@types/react": ^18.0.26
"@types/react-dom": ^18.0.10
prettier: ^2.8.4
prettier: ^3.1.1
react: ^18.2.0
react-dom: ^18.2.0
react-scripts: 5
Expand Down
2 changes: 1 addition & 1 deletion .github/publish-ci/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/node": "^20.10.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"prettier": "^2.8.4",
"prettier": "^3.1.1",
"typescript": "^4.9.4"
},
"msw": {
Expand Down
12 changes: 6 additions & 6 deletions .github/publish-ci/next/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.8.4":
version: 2.8.4
resolution: "prettier@npm:2.8.4"
"prettier@npm:^3.1.1":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
bin:
prettier: bin-prettier.js
checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
languageName: node
linkType: hard

Expand Down Expand Up @@ -389,7 +389,7 @@ __metadata:
"@types/react": ^18.0.26
"@types/react-dom": ^18.0.10
next: ^13.2
prettier: ^2.8.4
prettier: ^3.1.1
react: ^18.2.0
react-dom: ^18.2.0
typescript: ^4.9.4
Expand Down
2 changes: 1 addition & 1 deletion .github/publish-ci/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^4.1.0",
"prettier": "^2.8.4",
"prettier": "^3.1.1",
"typescript": "^4.9.4",
"vite": "^4.0.0"
},
Expand Down
12 changes: 6 additions & 6 deletions .github/publish-ci/vite/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1619,12 +1619,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.8.4":
version: 2.8.4
resolution: "prettier@npm:2.8.4"
"prettier@npm:^3.1.1":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
bin:
prettier: bin-prettier.js
checksum: c173064bf3df57b6d93d19aa98753b9b9dd7657212e33b41ada8e2e9f9884066bb9ca0b4005b89b3ab137efffdf8fbe0b462785aba20364798ff4303aadda57e
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
languageName: node
linkType: hard

Expand Down Expand Up @@ -1751,7 +1751,7 @@ __metadata:
"@types/react": ^18.0.26
"@types/react-dom": ^18.0.10
"@vitejs/plugin-react": ^4.1.0
prettier: ^2.8.4
prettier: ^3.1.1
react: ^18.2.0
react-dom: ^18.2.0
typescript: ^4.9.4
Expand Down
2 changes: 1 addition & 1 deletion demo/src/sandboxes/notification-hub/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function MessageHub({
})
)
},
config: (item, index, phase) => key => phase === 'enter' && key === 'life' ? { duration: timeout } : config,
config: (item, index, phase) => key => (phase === 'enter' && key === 'life' ? { duration: timeout } : config),
})

React.useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/Code/H.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface HProps {
export const H = ({ index, id, ...props }: HProps) => {
const getHighlightedWords = (): [
targetIndex: number[],
allHighlightWords: Element[]
allHighlightWords: Element[],
] => {
const codeBlock = document.getElementById(id)
if (!codeBlock) return [[], []]
Expand Down
2 changes: 1 addition & 1 deletion docs/app/helpers/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export enum EventNames {

type EventFactory<
TEventName extends EventNames,
TAdditionalProps extends object = object
TAdditionalProps extends object = object,
> = {
name: TEventName
additionalProps?: TAdditionalProps
Expand Down
2 changes: 1 addition & 1 deletion docs/app/hooks/useAnimatedHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const useAnimatedHeader = ({
styles: { top: SpringValue<number> },
isStuck: boolean,
scrollTop: number,
direction: SCROLL_DIR | undefined
direction: SCROLL_DIR | undefined,
] => {
const [direction, scrollTop] = useWindowScrolling({
active: true,
Expand Down
3 changes: 0 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,5 @@
"concurrently": "^8.0.1",
"ts-node": "^10.9.1"
},
"engines": {
"node": ">=20.10.0"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"jest-environment-jsdom": "^29.5.0",
"konva": "^9.2.3",
"mock-raf": "npm:@react-spring/mock-raf@1.1.1",
"prettier": "^2.8.4",
"prettier": "^3.1.1",
"pretty-quick": "^3.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/animated/src/AnimatedArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Source = AnimatedValue<Value>[]

/** An array of animated nodes */
export class AnimatedArray<
T extends ReadonlyArray<Value> = Value[]
T extends ReadonlyArray<Value> = Value[],
> extends AnimatedObject {
protected declare source: Source
constructor(source: T) {
Expand Down
4 changes: 2 additions & 2 deletions packages/animated/src/createHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ const getDisplayName = (arg: AnimatableComponent) =>
is.str(arg)
? arg
: arg && is.str(arg.displayName)
? arg.displayName
: (is.fun(arg) && arg.name) || null
? arg.displayName
: (is.fun(arg) && arg.name) || null
8 changes: 4 additions & 4 deletions packages/animated/src/getAnimatedType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export function getAnimatedType(value: any): AnimatedType {
return parentNode
? (parentNode.constructor as any)
: is.arr(value)
? AnimatedArray
: isAnimatedString(value)
? AnimatedString
: AnimatedValue
? AnimatedArray
: isAnimatedString(value)
? AnimatedString
: AnimatedValue
}
5 changes: 4 additions & 1 deletion packages/animated/src/withAnimated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export const withAnimated = (Component: any, host: HostConfig) => {
}

class PropsObserver {
constructor(readonly update: () => void, readonly deps: Set<FluidValue>) {}
constructor(
readonly update: () => void,
readonly deps: Set<FluidValue>
) {}
eventObserved(event: FluidEvent) {
if (event.type == 'change') {
raf.write(this.update)
Expand Down
14 changes: 7 additions & 7 deletions packages/core/src/AnimationResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const getCombinedResult = <T extends Readable>(
results.length == 1
? results[0]
: results.some(result => result.cancelled)
? getCancelledResult(target.get())
: results.every(result => result.noop)
? getNoopResult(target.get())
: getFinishedResult(
target.get(),
results.every(result => result.finished)
)
? getCancelledResult(target.get())
: results.every(result => result.noop)
? getNoopResult(target.get())
: getFinishedResult(
target.get(),
results.every(result => result.finished)
)

/** No-op results are for updates that never start an animation. */
export const getNoopResult = (value: any) => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Interpolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
*/
export class Interpolation<
Input = any,
Output = any
Output = any,
> extends FrameValue<Output> {
/** Useful for debugging. */
key?: string
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/SpringRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export interface ControllerUpdateFn<State extends Lookup = Lookup> {
}

export interface SpringRef<State extends Lookup = Lookup> {
(props?: ControllerUpdate<State> | ControllerUpdateFn<State>): AsyncResult<
Controller<State>
>[]
(
props?: ControllerUpdate<State> | ControllerUpdateFn<State>
): AsyncResult<Controller<State>>[]
current: Controller<State>[]

/** Add a controller to this ref */
Expand Down Expand Up @@ -77,7 +77,7 @@ export interface SpringRef<State extends Lookup = Lookup> {
}

export const SpringRef = <
State extends Lookup = Lookup
State extends Lookup = Lookup,
>(): SpringRef<State> => {
const current: Controller<State>[] = []

Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/SpringValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ export class SpringValue<T = any> extends FrameValue<T> {
node.constructor == AnimatedString
? 1
: payload
? payload[i].lastPosition
: toValues![i]
? payload[i].lastPosition
: toValues![i]

let finished = anim.immediate
let position = to
Expand Down Expand Up @@ -800,8 +800,8 @@ export class SpringValue<T = any> extends FrameValue<T> {
anim.toValues = hasFluidValue(to)
? null
: goalType == AnimatedString
? [1]
: toArray(goal)
? [1]
: toArray(goal)
}

if (anim.immediate != immediate) {
Expand Down
14 changes: 7 additions & 7 deletions packages/core/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const getDefaultProp = <T extends Lookup, P extends keyof T>(
props.default === true
? props[key]
: props.default
? props.default[key]
: undefined
? props.default[key]
: undefined

const noopTransform = (value: any) => value

Expand Down Expand Up @@ -187,11 +187,11 @@ export function computeGoal<T>(value: T | FluidValue<T>): T {
return is.arr(value)
? value.map(computeGoal)
: isAnimatedString(value)
? (G.createStringInterpolator({
range: [0, 1],
output: [value, value] as any,
})(1) as any)
: value
? (G.createStringInterpolator({
range: [0, 1],
output: [value, value] as any,
})(1) as any)
: value
}

export function hasProps(props: object) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export type RawValues<T extends object> = {
export type IsPlainObject<T> = T extends ReadonlyArray<any>
? Any
: T extends object
? object
: Any
? object
: Any

export type StringKeys<T> = T extends IsPlainObject<T>
? string & keyof T
Expand Down
Loading
Loading