chore: run prettier for docs (#1007)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Daishi Kato · committed by GitHub · parent e85bd2b · Browse files · 8 files·+365 added−548 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
8 files+365 added−548 removed
- other:+365 added−548 removed
Provenance
- Commit
2b698fb- Tree
e91bc04- Author
Daishi Kato <dai-shi@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
e85bd2b
8 files changed+365 added−548 removed
modified:.github/workflows/lint-and-type.yml+2 added
16 unmodified lines1718192021222324252616 unmodified lines cache: yarn - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: yarn install --frozen-lockfile --check-files - run: cd examples && yarn install --frozen-lockfile --check-files - name: Prettier run: yarn prettier:ci - name: Lint run: yarn eslint:ci - name: Type run: yarn pretestdeleted:.husky/.gitignore-1 removed
1-_deleted:.husky/pre-commit-4 removed
1-#!/bin/sh2-. "$(dirname "$0")/_/husky.sh"3-4-yarn lint-stagedmodified:docs/typescript.md+166 added-136 removed
3 unmodified lines4 5 When using TypeScript you just have to make a tiny change that instead of writing `create(...)` you'll have to write `create<T>()(...)` where `T` would be type of the state so as to annotate it. Example...6 7 ```ts8-import create from "zustand"8+import create from 'zustand'9 10 interface BearState {11 bears: number12 increase: (by: number) => void9 unmodified lines22 <summary>Why can't we just simply infer the type from initial state?</summary>23 24 <br/>25 26- **TLDR**: Because state generic `T` is invariant.27- 28- Consider this minimal version `create`...26+**TLDR**: Because state generic `T` is invariant.27 30- ```ts31- declare const create: <T>(f: (get: () => T) => T) => T28+Consider this minimal version `create`...29 33- const x = create((get) => ({34- foo: 0,35- bar: () => get()36- }))37- // `x` is inferred as `unknown` instead of38- // interface X {39- // foo: number,40- // bar: () => X41- // }42- ```30+```ts31+declare const create: <T>(f: (get: () => T) => T) => T32 44- Here if you look at the type of `f` in `create` ie `(get: () => T) => T` it "gives" `T` as it returns `T` but then it also "takes" `T` via `get` so where does `T` come from TypeScript thinks... It's a like that chicken or egg problem. At the end TypeScript gives up and infers `T` as `unknown`.33+const x = create((get) => ({34+ foo: 0,35+ bar: () => get(),36+}))37+// `x` is inferred as `unknown` instead of38+// interface X {39+// foo: number,40+// bar: () => X41+// }42+```43 46- So as long as the generic to be inferred is invariant TypeScript won't be able to infer it. Another simple example would be this...44+Here if you look at the type of `f` in `create` ie `(get: () => T) => T` it "gives" `T` as it returns `T` but then it also "takes" `T` via `get` so where does `T` come from TypeScript thinks... It's a like that chicken or egg problem. At the end TypeScript gives up and infers `T` as `unknown`.45 48- ```ts49- declare const createFoo: <T>(f: (t: T) => T) => T50- const x = createFoo(_ => "hello")51- ```46+So as long as the generic to be inferred is invariant TypeScript won't be able to infer it. Another simple example would be this...47 53- Here again `x` is `unknown` instead of `string`.54- 55- Now one can argue it's impossible to write an implementation for `createFoo`, and that's true. But then it's also impossible to write Zustand's `create`... Wait but Zustand exists? So what do I mean by that?48+```ts49+declare const createFoo: <T>(f: (t: T) => T) => T50+const x = createFoo((_) => 'hello')51+```52 57- The thing is Zustand is lying in it's type, the simplest way to prove it by showing unsoundness. Consider this example...53+Here again `x` is `unknown` instead of `string`.54 59- ```ts60- import create from "zustand/vanilla"55+Now one can argue it's impossible to write an implementation for `createFoo`, and that's true. But then it's also impossible to write Zustand's `create`... Wait but Zustand exists? So what do I mean by that?56 62- const useStore = create<{ foo: number }>()((_, get) => ({63- foo: get().foo,64- }))65- ```57+The thing is Zustand is lying in it's type, the simplest way to prove it by showing unsoundness. Consider this example...58 67- This code compiles, but guess what happens when you run it? You'll get an exception "Uncaught TypeError: Cannot read properties of undefined (reading 'foo') because after all `get` would return `undefined` before the initial state is created (hence kids don't call `get` when creating the initial state). But the types tell that get is `() => { foo: number }` which is exactly the lie I was taking about, `get` is that eventually but first it's `() => undefined`.59+```ts60+import create from 'zustand/vanilla'61 62+const useStore = create<{ foo: number }>()((_, get) => ({63+ foo: get().foo,64+}))65+```66+67+This code compiles, but guess what happens when you run it? You'll get an exception "Uncaught TypeError: Cannot read properties of undefined (reading 'foo') because after all `get` would return `undefined` before the initial state is created (hence kids don't call `get` when creating the initial state). But the types tell that get is `() => { foo: number }` which is exactly the lie I was taking about, `get` is that eventually but first it's `() => undefined`.68+69- Okay we're quite deep in the rabbit hole haha, long story short zustand has a bit crazy runtime behavior that can't be typed in a sound way and inferrable way. We could make it inferrable with the right TypeScript features that don't exist today. And hey that tiny bit of unsoundness is not a problem.69+Okay we're quite deep in the rabbit hole haha, long story short zustand has a bit crazy runtime behavior that can't be typed in a sound way and inferrable way. We could make it inferrable with the right TypeScript features that don't exist today. And hey that tiny bit of unsoundness is not a problem.70+71 </details>72 73 <details>74 <summary>Why that currying `()(...)`?</summary>1 unmodified line76 <br/>77 78 **TLDR**: It's a workaround for [microsoft/TypeScript#10571](https://github.com/microsoft/TypeScript/issues/10571).79 79- Imagine you have a scenario like this...80+Imagine you have a scenario like this...81 81- ```ts82- declare const withError: <T, E>(p: Promise<T>) =>83- Promise<[error: undefined, value: T] | [error: E, value: undefined]>84- declare const doSomething: () => Promise<string>82+```ts83+declare const withError: <T, E>(84+ p: Promise<T>85+) => Promise<[error: undefined, value: T] | [error: E, value: undefined]>86+declare const doSomething: () => Promise<string>87 86- const main = async () => {87- let [error, value] = await withError(doSomething())88- }89- ```88+const main = async () => {89+ let [error, value] = await withError(doSomething())90+}91+```92 91- Here `T` is inferred as `string` and `E` is inferred as `unknown`. Now for some reason you want to annotate `E` as `Foo` because you're certain what shape of error `doSomething()` would throw. But too bad you can't do that, you can either pass all generics or none. So now along with annotating `E` as `Foo` you'll also have to annotate `T` as `string` which gets inferred anyway. So what to do? What you do is make a curried version of `withError` that does nothing in runtime, it's purpose is to just allow you annotate `E`...93+Here `T` is inferred as `string` and `E` is inferred as `unknown`. Now for some reason you want to annotate `E` as `Foo` because you're certain what shape of error `doSomething()` would throw. But too bad you can't do that, you can either pass all generics or none. So now along with annotating `E` as `Foo` you'll also have to annotate `T` as `string` which gets inferred anyway. So what to do? What you do is make a curried version of `withError` that does nothing in runtime, it's purpose is to just allow you annotate `E`...94 93- ```ts94- declare const withError: {95- <E>(): <T>(p: Promise<T>) =>96- Promise<[error: undefined, value: T] | [error: E, value: undefined]>97- <T, E>(p: Promise<T>):98- Promise<[error: undefined, value: T] | [error: E, value: undefined]>99- }100- declare const doSomething: () => Promise<string>101- interface Foo { bar: string }95+```ts96+declare const withError: {97+ <E>(): <T>(98+ p: Promise<T>99+ ) => Promise<[error: undefined, value: T] | [error: E, value: undefined]>100+ <T, E>(p: Promise<T>): Promise<101+ [error: undefined, value: T] | [error: E, value: undefined]102+ >103+}104+declare const doSomething: () => Promise<string>105+interface Foo {106+ bar: string107+}108 103- const main = async () => {104- let [error, value] = await withError<Foo>()(doSomething())105- }106- ```109+const main = async () => {110+ let [error, value] = await withError<Foo>()(doSomething())111+}112+```113 108- And now `T` gets inferred and you get to annotate `E` too. Zustand has the same use case we want to annotate the state (the first type parameter) but allow the rest type parameters to get inferred.114+And now `T` gets inferred and you get to annotate `E` too. Zustand has the same use case we want to annotate the state (the first type parameter) but allow the rest type parameters to get inferred.115+116 </details>117 118 Alternatively you can also use `combine` which infers the state instead of you having to type it...119 10 unmodified lines130 <summary>But be a little careful...</summary>131 132 <br/>133 127- We achieve the inference by lying a little in the types of `set`, `get` and `store` that you receive as parameters. The lie is that they're typed in a way as if the state is the first parameter only when in fact the state is the shallow-merge (`{ ...a, ...b }`) of both first parameter and the second parameter's return. So for example `get` from the second parameter has type `() => { bears: number }` and that's a lie as it should be `() => { bears: number, increase: (by: number) => void }`. And `useStore` still has the correct type, ie for example `useStore.getState` is typed as `() => { bears: number, increase: (by: number) => void }`.134+We achieve the inference by lying a little in the types of `set`, `get` and `store` that you receive as parameters. The lie is that they're typed in a way as if the state is the first parameter only when in fact the state is the shallow-merge (`{ ...a, ...b }`) of both first parameter and the second parameter's return. So for example `get` from the second parameter has type `() => { bears: number }` and that's a lie as it should be `() => { bears: number, increase: (by: number) => void }`. And `useStore` still has the correct type, ie for example `useStore.getState` is typed as `() => { bears: number, increase: (by: number) => void }`.135 129- It's not a lie lie because `{ bears: number }` is still a subtype `{ bears: number, increase: (by: number) => void }`, so in most cases there won't be a problem. Just you have to be careful while using replace. For eg `set({ bears: 0 }, true)` would compile but will be unsound as it'll delete the `increase` function. (If you set from "outside" ie `useStore.setState({ bears: 0 }, true)` then it won't compile because the "outside" store knows that `increase` is missing.) Another instance where you should be careful you're doing `Object.keys`, `Object.keys(get())` will return `["bears", "increase"]` and not `["bears"]` (the return type of `get` can make you fall for this).136+It's not a lie lie because `{ bears: number }` is still a subtype `{ bears: number, increase: (by: number) => void }`, so in most cases there won't be a problem. Just you have to be careful while using replace. For eg `set({ bears: 0 }, true)` would compile but will be unsound as it'll delete the `increase` function. (If you set from "outside" ie `useStore.setState({ bears: 0 }, true)` then it won't compile because the "outside" store knows that `increase` is missing.) Another instance where you should be careful you're doing `Object.keys`, `Object.keys(get())` will return `["bears", "increase"]` and not `["bears"]` (the return type of `get` can make you fall for this).137 131- So `combine` trades-off a little type-safety for the convenience of not having to write a type for state. Hence you should use `combine` accordingly, usually it's not a big deal and it's okay to use it.138+So `combine` trades-off a little type-safety for the convenience of not having to write a type for state. Hence you should use `combine` accordingly, usually it's not a big deal and it's okay to use it.139+140 </details>141 142 Also note that we're not using the curried version when using `combine` because `combine` "creates" the state. When using a middleware that creates the state, it's not necessary to use the curried version because the state now can be inferred. Another middleware that creates state is `redux`. So when using `combine`, `redux` or any other custom middleware that creates the state, it's not recommended to use the curried version.143 1 unmodified line145 146 You don't have to do anything special to use middlewares in TypeScript.147 148 ```ts141-import create from "zustand"142-import { devtools, persist } from "zustand/middleware"149+import create from 'zustand'150+import { devtools, persist } from 'zustand/middleware'151 152 interface BearState {153 bears: number154 increase: (by: number) => void155 }156 157+const useStore = create<BearState>()(158+ devtools(149-const useStore = create<BearState>()(devtools(persist((set) => ({150- bears: 0,151- increase: (by) => set((state) => ({ bears: state.bears + by })),152-}))))159+ persist((set) => ({160+ bears: 0,161+ increase: (by) => set((state) => ({ bears: state.bears + by })),162+ }))163+ )164+)165 ```166 167 Just make sure you're using them immediately inside `create` so as to make the contextual inference work. Doing something even remotely fancy like the following `myMiddlewares` would require more advanced types.168 169 ```ts158-import create from "zustand"159-import { devtools, persist } from "zustand/middleware"170+import create from 'zustand'171+import { devtools, persist } from 'zustand/middleware'172 161-const myMiddlewares = f => devtools(persist(f))173+const myMiddlewares = (f) => devtools(persist(f))174 175 interface BearState {176 bears: number177 increase: (by: number) => void178 }179 180+const useStore = create<BearState>()(168-const useStore = create<BearState>()(myMiddlewares((set) => ({169- bears: 0,170- increase: (by) => set((state) => ({ bears: state.bears + by })),171-})))181+ myMiddlewares((set) => ({182+ bears: 0,183+ increase: (by) => set((state) => ({ bears: state.bears + by })),184+ }))185+)186 ```187 188 ## Authoring middlewares and advanced usage189 190 Imagine you had to write this hypothetical middleware...191 192 ```ts179-import create from "zustand"193+import create from 'zustand'194 195 const foo = (f, bar) => (set, get, store) => {196 store.foo = bar183- return f(set, get, store);197+ return f(set, get, store)198 }199 186-const useStore = create(foo(() => ({ bears: 0 }), "hello"))200+const useStore = create(foo(() => ({ bears: 0 }), 'hello'))201 console.log(useStore.foo.toUpperCase())202 ```203 204 Yes, if you didn't know Zustand middlewares do and are allowed to mutate the store. But how could we possibly encode the mutation on the type-level? That is to say how could do we type `foo` so that this code compiles?6 unmodified lines211 212 ### Middleware that does not change the store type213 214 ```ts201-import create, { State, StateCreator, StoreMutatorIdentifier } from "zustand"215+import create, { State, StateCreator, StoreMutatorIdentifier } from 'zustand'216 203-type Logger =204- < T extends State205- , Mps extends [StoreMutatorIdentifier, unknown][] = []206- , Mcs extends [StoreMutatorIdentifier, unknown][] = []207- >208- ( f: StateCreator<T, Mps, Mcs>209- , name?: string210- ) =>211- StateCreator<T, Mps, Mcs>217+type Logger = <218+ T extends State,219+ Mps extends [StoreMutatorIdentifier, unknown][] = [],220+ Mcs extends [StoreMutatorIdentifier, unknown][] = []221+>(222+ f: StateCreator<T, Mps, Mcs>,223+ name?: string224+) => StateCreator<T, Mps, Mcs>225 213-type LoggerImpl =214- <T extends State>215- ( f: PopArgument<StateCreator<T, [], []>>216- , name?: string217- ) =>218- PopArgument<StateCreator<T, [], []>>226+type LoggerImpl = <T extends State>(227+ f: PopArgument<StateCreator<T, [], []>>,228+ name?: string229+) => PopArgument<StateCreator<T, [], []>>230 231 const loggerImpl: LoggerImpl = (f, name) => (set, get, store) => {232 type T = ReturnType<typeof f>233 const loggedSet: typeof set = (...a) => {6 unmodified lines240 }241 242 export const logger = loggerImpl as unknown as Logger243 233-type PopArgument<T extends (...a: never[]) => unknown> =234- T extends (...a: [...infer A, infer _]) => infer R235- ? (...a: A) => R236- : never244+type PopArgument<T extends (...a: never[]) => unknown> = T extends (245+ ...a: [...infer A, infer _]246+) => infer R247+ ? (...a: A) => R248+ : never249 250 // ---251 240-const useStore = create<BearState>()(logger((set) => ({241- bears: 0,242- increase: (by) => set((state) => ({ bears: state.bears + by })),243-}), "bear-store"))252+const useStore = create<BearState>()(253+ logger(254+ (set) => ({255+ bears: 0,256+ increase: (by) => set((state) => ({ bears: state.bears + by })),257+ }),258+ 'bear-store'259+ )260+)261 ```262 263 ### Middleware that changes the store type264 265 ```ts249-import create, { State, StateCreator, StoreMutatorIdentifier, Mutate, StoreApi } from "zustand"266+import create, {267+ State,268+ StateCreator,269+ StoreMutatorIdentifier,270+ Mutate,271+ StoreApi,272+} from 'zustand'273 251-type Foo =252- < T extends State253- , A254- , Mps extends [StoreMutatorIdentifier, unknown][] = []255- , Mcs extends [StoreMutatorIdentifier, unknown][] = []256- >257- ( f: StateCreator<T, [...Mps, ['foo', A]], Mcs>258- , bar: A259- ) =>260- StateCreator<T, Mps, [['foo', A], ...Mcs]>274+type Foo = <275+ T extends State,276+ A,277+ Mps extends [StoreMutatorIdentifier, unknown][] = [],278+ Mcs extends [StoreMutatorIdentifier, unknown][] = []279+>(280+ f: StateCreator<T, [...Mps, ['foo', A]], Mcs>,281+ bar: A282+) => StateCreator<T, Mps, [['foo', A], ...Mcs]>283 284 declare module 'zustand' {285 interface StoreMutators<S, A> {286 foo: Write<Cast<S, object>, { foo: A }>287 }288 }289 268-type FooImpl =269- <T extends State, A>270- ( f: PopArgument<StateCreator<T, [], []>>271- , bar: A272- ) => PopArgument<StateCreator<T, [], []>>290+type FooImpl = <T extends State, A>(291+ f: PopArgument<StateCreator<T, [], []>>,292+ bar: A293+) => PopArgument<StateCreator<T, [], []>>294 295 const fooImpl: FooImpl = (f, bar) => (set, get, _store) => {296 type T = ReturnType<typeof f>297 type A = typeof bar4 unmodified lines302 }303 304 export const foo = fooImpl as unknown as Foo305 285-type PopArgument<T extends (...a: never[]) => unknown> =286- T extends (...a: [...infer A, infer _]) => infer R287- ? (...a: A) => R288- : never306+type PopArgument<T extends (...a: never[]) => unknown> = T extends (307+ ...a: [...infer A, infer _]308+) => infer R309+ ? (...a: A) => R310+ : never311 290-type Write<T extends object, U extends object> =291- Omit<T, keyof U> & U312+type Write<T extends object, U extends object> = Omit<T, keyof U> & U313 293-type Cast<T, U> =294- T extends U ? T : U;314+type Cast<T, U> = T extends U ? T : U315 316 // ---317 298-const useStore = create(foo(() => ({ bears: 0 }), "hello"))318+const useStore = create(foo(() => ({ bears: 0 }), 'hello'))319 console.log(useStore.foo.toUpperCase())320 ```321 322 ### `create` without curried workaround22 unmodified lines345 346 ### Independent slices pattern347 348 ```ts329-import create, { StateCreator } from "zustand"349+import create, { StateCreator } from 'zustand'350 351 interface BearSlice {352 bears: number353 addBear: () => void354 }355 const createBearSlice: StateCreator<BearSlice, [], []> = (set) => ({356 bears: 0,337- addBear: () => set((state) => ({ bears: state.bears + 1 }))357+ addBear: () => set((state) => ({ bears: state.bears + 1 })),358 })359 360 interface FishSlice {361 fishes: number362 addFish: () => void363 }364 const createFishSlice: StateCreator<FishSlice, [], []> = (set) => ({365 fishes: 0,346- addFish: () => set((state) => ({ fishes: state.fishes + 1 }))366+ addFish: () => set((state) => ({ fishes: state.fishes + 1 })),367 })368 369 const useStore = create<BearSlice & FishSlice>()((...a) => ({370 ...createBearSlice(...a),351- ...createFishSlice(...a)371+ ...createFishSlice(...a),372 }))373 ```374 375 If you have some middlewares then replace `StateCreator<MySlice, [], []>` with `StateCreator<MySlice, Mutators, []>`. Eg if you're using `devtools` then it'll be `StateCreator<MySlice, [["zustand/devtools", never]], []>`.2 unmodified lines378 379 ### Interdependent slices pattern380 381 ```ts362-import create, { StateCreator } from "zustand"382+import create, { StateCreator } from 'zustand'383 384 interface BearSlice {385 bears: number386 addBear: () => void387 eatFish: () => void388 }369-const createBearSlice: StateCreator<BearSlice & FishSlice, [], [], BearSlice> = (set) => ({389+const createBearSlice: StateCreator<390+ BearSlice & FishSlice,391+ [],392+ [],393+ BearSlice394+> = (set) => ({395 bears: 0,396 addBear: () => set((state) => ({ bears: state.bears + 1 })),372- eatFish: () => set((state) => ({ fishes: state.fishes - 1 }))397+ eatFish: () => set((state) => ({ fishes: state.fishes - 1 })),398 })399 400 interface FishSlice {401 fishes: number402 addFish: () => void403 }379-const createFishSlice: StateCreator<BearSlice & FishSlice, [], [], FishSlice> = (set) => ({404+const createFishSlice: StateCreator<405+ BearSlice & FishSlice,406+ [],407+ [],408+ FishSlice409+> = (set) => ({410 fishes: 0,381- addFish: () => set((state) => ({ fishes: state.fishes + 1 }))411+ addFish: () => set((state) => ({ fishes: state.fishes + 1 })),412 })413 414 const useStore = create<BearSlice & FishSlice>()((...a) => ({415 ...createBearSlice(...a),386- ...createFishSlice(...a)416+ ...createFishSlice(...a),417 }))418 ```419 420 If you have some middlewares then replace `StateCreator<MyState, [], [], MySlice>` with `StateCreator<MyState, Mutators, [], MySlice>`. Eg if you're using `devtools` then it'll be `StateCreator<MyState, [["zustand/devtools", never]], [], MySlice>`.modified:docs/v4-migration.md+1 added-1 removed
104 unmodified lines105 If you're not passing any type parameters to `useStore` then there is no migration needed. If you are then it's recommended to remove them, or pass the store type instead of the state type as the first parameter.106 107 ## `UseBoundStore` (from `zustand` and `zustand/react`)108 109-### Change 109+### Change110 111 ```diff112 - type UseBoundStore<113 - State,92 unmodified linesmodified:package.json+3 added-8 removed
66 unmodified lines67 "build:middleware:immer": "rollup -c --config-middleware_immer",68 "build:shallow": "rollup -c --config-shallow",69 "build:context": "rollup -c --config-context",70 "postbuild": "yarn copy",71+ "prettier": "prettier '*.{js,json,md}' '{src,tests,docs}/**/*.{ts,tsx,md,mdx}' --write",72+ "prettier:ci": "prettier '*.{js,json,md}' '{src,tests,docs}/**/*.{ts,tsx,md,mdx}' --list-different",73 "eslint": "eslint --fix '*.{js,json}' '{src,tests}/**/*.{ts,tsx}'",74 "eslint:ci": "eslint '*.{js,json}' '{src,tests}/**/*.{ts,tsx}'",75 "pretest": "tsc --noEmit",76 "test": "jest",77 "test:ci": "jest",78 "test:dev": "jest --watch --no-coverage",79 "test:coverage:watch": "jest --watch",78- "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/src && shx rm -rf dist/{src,tests} && downlevel-dts dist dist/ts3.4 && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined; this.jest=undefined; this['lint-staged']=undefined;\""80+ "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/src && shx rm -rf dist/{src,tests} && downlevel-dts dist dist/ts3.4 && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined; this.jest=undefined;\""81 },82 "engines": {83 "node": ">=12.7.0"84 },4 unmodified lines89 "bracketSameLine": true,90 "tabWidth": 2,91 "printWidth": 8092 },91- "lint-staged": {92- "*.{js,ts,tsx}": [93- "prettier --write"94- ]95- },93 "repository": {94 "type": "git",95 "url": "git+https://github.com/pmndrs/zustand.git"96 },82 unmodified lines179 "eslint-plugin-jest": "^26.1.5",180 "eslint-plugin-prettier": "^4.0.0",181 "eslint-plugin-react": "^7.29.4",182 "eslint-plugin-react-hooks": "^4.5.0",186- "husky": "^7.0.4",183 "immer": "^9.0.12",184 "jest": "^28.0.3",185 "jest-environment-jsdom": "^28.0.2",186 "json": "^11.0.0",191- "lint-staged": "^12.4.1",187 "prettier": "^2.6.2",188 "react": "^18.1.0",189 "react-dom": "^18.1.0",190 "redux": "^5.0.0-alpha.0",22 unmodified linesmodified:readme.md+189 added-151 removed
18 unmodified lines19 ```20 21 ## First create a store22 23-Your store is a hook! You can put anything in it: primitives, objects, functions. The `set` function *merges* state.23+Your store is a hook! You can put anything in it: primitives, objects, functions. The `set` function _merges_ state.24 25 ```jsx26 import create from 'zustand'27 28-const useStore = create(set => ({28+const useStore = create((set) => ({29 bears: 0,30- increasePopulation: () => set(state => ({ bears: state.bears + 1 })),31- removeAllBears: () => set({ bears: 0 })30+ increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),31+ removeAllBears: () => set({ bears: 0 }),32 }))33 ```34 35 ## Then bind your components, and that's it!1 unmodified line37 Use the hook anywhere, no providers needed. Select your state and the component will re-render on changes.38 39 ```jsx40 function BearCounter() {41- const bears = useStore(state => state.bears)41+ const bears = useStore((state) => state.bears)42 return <h1>{bears} around here ...</h1>43 }44 45 function Controls() {46- const increasePopulation = useStore(state => state.increasePopulation)46+ const increasePopulation = useStore((state) => state.increasePopulation)47 return <button onClick={increasePopulation}>one up</button>48 }49 ```50 51 ### Why zustand over redux?52 53-* Simple and un-opinionated54-* Makes hooks the primary means of consuming state55-* Doesn't wrap your app in context providers56-* [Can inform components transiently (without causing render)](#transient-updates-for-often-occurring-state-changes)53+- Simple and un-opinionated54+- Makes hooks the primary means of consuming state55+- Doesn't wrap your app in context providers56+- [Can inform components transiently (without causing render)](#transient-updates-for-often-occurring-state-changes)57 58 ### Why zustand over context?59 60-* Less boilerplate61-* Renders components only on changes62-* Centralized, action-based state management60+- Less boilerplate61+- Renders components only on changes62+- Centralized, action-based state management63 64 ---65 66 # Recipes10 unmodified lines77 78 It detects changes with strict-equality (old === new) by default, this is efficient for atomic state picks.79 80 ```jsx81-const nuts = useStore(state => state.nuts)82-const honey = useStore(state => state.honey)81+const nuts = useStore((state) => state.nuts)82+const honey = useStore((state) => state.honey)83 ```84 85 If you want to construct a single object with multiple state-picks inside, similar to redux's mapStateToProps, you can tell zustand that you want the object to be diffed shallowly by passing the `shallow` equality function.86 87 ```jsx88 import shallow from 'zustand/shallow'89 90 // Object pick, re-renders the component when either state.nuts or state.honey change91-const { nuts, honey } = useStore(state => ({ nuts: state.nuts, honey: state.honey }), shallow)91+const { nuts, honey } = useStore(92+ (state) => ({ nuts: state.nuts, honey: state.honey }),93+ shallow94+)95 96 // Array pick, re-renders the component when either state.nuts or state.honey change94-const [nuts, honey] = useStore(state => [state.nuts, state.honey], shallow)97+const [nuts, honey] = useStore((state) => [state.nuts, state.honey], shallow)98 99 // Mapped picks, re-renders the component when state.treats changes in order, count or keys97-const treats = useStore(state => Object.keys(state.treats), shallow)100+const treats = useStore((state) => Object.keys(state.treats), shallow)101 ```102 103 For more control over re-rendering, you may provide any custom equality function.104 105 ```jsx106 const treats = useStore(104- state => state.treats,107+ (state) => state.treats,108 (oldTreats, newTreats) => compare(oldTreats, newTreats)109 )110 ```111 1 unmodified line113 114 The `set` function has a second argument, `false` by default. Instead of merging, it will replace the state model. Be careful not to wipe out parts you rely on, like actions.115 116 ```jsx114-import omit from "lodash-es/omit"117+import omit from 'lodash-es/omit'118 116-const useStore = create(set => ({119+const useStore = create((set) => ({120 salmon: 1,121 tuna: 2,119- deleteEverything: () => set({ }, true), // clears the entire store, actions included120- deleteTuna: () => set(state => omit(state, ['tuna']), true)122+ deleteEverything: () => set({}, true), // clears the entire store, actions included123+ deleteTuna: () => set((state) => omit(state, ['tuna']), true),124 }))125 ```126 127 ## Async actions128 129 Just call `set` when you're ready, zustand doesn't care if your actions are async or not.130 131 ```jsx129-const useStore = create(set => ({132+const useStore = create((set) => ({133 fishies: {},131- fetch: async pond => {134+ fetch: async (pond) => {135 const response = await fetch(pond)136 set({ fishies: await response.json() })134- }137+ },138 }))139 ```140 141 ## Read from state in actions38 unmodified lines180 If you need to subscribe with selector,181 `subscribeWithSelector` middleware will help.182 183 With this middleware `subscribe` accepts an additional signature:184+185 ```ts186 subscribe(selector, callback, options?: { equalityFn, fireImmediately }): Unsubscribe187 ```188 189 ```js190 import { subscribeWithSelector } from 'zustand/middleware'187-const useStore = create(subscribeWithSelector(() => ({ paw: true, snout: true, fur: true })))191+const useStore = create(192+ subscribeWithSelector(() => ({ paw: true, snout: true, fur: true }))193+)194 195 // Listening to selected changes, in this case when "paw" changes190-const unsub2 = useStore.subscribe(state => state.paw, console.log)196+const unsub2 = useStore.subscribe((state) => state.paw, console.log)197 // Subscribe also exposes the previous value192-const unsub3 = useStore.subscribe(state => state.paw, (paw, previousPaw) => console.log(paw, previousPaw))198+const unsub3 = useStore.subscribe(199+ (state) => state.paw,200+ (paw, previousPaw) => console.log(paw, previousPaw)201+)202 // Subscribe also supports an optional equality function194-const unsub4 = useStore.subscribe(state => [state.paw, state.fur], console.log, { equalityFn: shallow })203+const unsub4 = useStore.subscribe(204+ (state) => [state.paw, state.fur],205+ console.log,206+ { equalityFn: shallow }207+)208 // Subscribe and fire immediately196-const unsub5 = useStore.subscribe(state => state.paw, console.log, { fireImmediately: true })209+const unsub5 = useStore.subscribe((state) => state.paw, console.log, {210+ fireImmediately: true,211+})212 ```213 214 ## Using zustand without React215 39 unmodified lines255 256 ```jsx257 import produce from 'immer'258 244-const useStore = create(set => ({245- lush: { forest: { contains: { a: "bear" } } },246- clearForest: () => set(produce(state => {247- state.lush.forest.contains = null248- }))259+const useStore = create((set) => ({260+ lush: { forest: { contains: { a: 'bear' } } },261+ clearForest: () =>262+ set(263+ produce((state) => {264+ state.lush.forest.contains = null265+ })266+ ),267 }))268 251-const clearForest = useStore(state => state.clearForest)252-clearForest();269+const clearForest = useStore((state) => state.clearForest)270+clearForest()271 ```272 273 [Alternatively, there are some other solutions.](https://github.com/pmndrs/zustand/wiki/Updating-nested-state-object-values)274 2 unmodified lines277 You can functionally compose your store any way you like.278 279 ```jsx280 // Log every time state is changed263-const log = (config) => (set, get, api) => config((...args) => {264- console.log(" applying", args)265- set(...args)266- console.log(" new state", get())267-}, get, api)281+const log = (config) => (set, get, api) =>282+ config(283+ (...args) => {284+ console.log(' applying', args)285+ set(...args)286+ console.log(' new state', get())287+ },288+ get,289+ api290+ )291 292+const useStore = create(269-const useStore = create(log((set) => ({270- bees: false,271- setBees: (input) => set({ bees: input }),272-})))293+ log((set) => ({294+ bees: false,295+ setBees: (input) => set({ bees: input }),296+ }))297+)298 ```299 300 ## Persist middleware301 302 You can persist your store's data using any kind of storage.303 304 ```jsx280-import create from "zustand"281-import { persist } from "zustand/middleware"305+import create from 'zustand'306+import { persist } from 'zustand/middleware'307 308+const useStore = create(283-const useStore = create(persist(284- (set, get) => ({285- fishes: 0,286- addAFish: () => set({ fishes: get().fishes + 1 })287- }),288- {289- name: "food-storage", // unique name290- getStorage: () => sessionStorage, // (optional) by default, 'localStorage' is used291- }292-))309+ persist(310+ (set, get) => ({311+ fishes: 0,312+ addAFish: () => set({ fishes: get().fishes + 1 }),313+ }),314+ {315+ name: 'food-storage', // unique name316+ getStorage: () => sessionStorage, // (optional) by default, 'localStorage' is used317+ }318+ )319+)320 ```321 322 [See the full documentation for this middleware.](https://github.com/pmndrs/zustand/wiki/Persisting-the-store's-data)323 1 unmodified line325 326 Immer is available as middleware too.327 328 ```jsx302-import create from "zustand"303-import { immer } from "zustand/middleware/immer"329+import create from 'zustand'330+import { immer } from 'zustand/middleware/immer'331 305-const useStore = create(immer((set) => ({306- bees: 0,307- addBees: (by) => set((state) => { state.bees += by }),308-})))332+const useStore = create(333+ immer((set) => ({334+ bees: 0,335+ addBees: (by) =>336+ set((state) => {337+ state.bees += by338+ }),339+ }))340+)341 ```342 343 ## Can't live without redux-like reducers and action types?344 345 ```jsx314-const types = { increase: "INCREASE", decrease: "DECREASE" }346+const types = { increase: 'INCREASE', decrease: 'DECREASE' }347 348 const reducer = (state, { type, by = 1 }) => {349 switch (type) {318- case types.increase: return { grumpiness: state.grumpiness + by }319- case types.decrease: return { grumpiness: state.grumpiness - by }350+ case types.increase:351+ return { grumpiness: state.grumpiness + by }352+ case types.decrease:353+ return { grumpiness: state.grumpiness - by }354 }355 }356 323-const useStore = create(set => ({357+const useStore = create((set) => ({358 grumpiness: 0,325- dispatch: args => set(state => reducer(state, args)),359+ dispatch: (args) => set((state) => reducer(state, args)),360 }))361 328-const dispatch = useStore(state => state.dispatch)362+const dispatch = useStore((state) => state.dispatch)363 dispatch({ type: types.increase, by: 2 })364 ```365 366 Or, just use our redux-middleware. It wires up your main-reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla api. Try [this](https://codesandbox.io/s/amazing-kepler-swxol) example.14 unmodified lines381 // Usage with a redux store, it will log full action types382 const useStore = create(devtools(redux(reducer, initialState)))383 ```384 351-devtools takes the store function as its first argument, optionally you can name the store or configure [serialize](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#serialize) options with a second argument. 352- 385+devtools takes the store function as its first argument, optionally you can name the store or configure [serialize](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#serialize) options with a second argument.386+387 Name store: `devtools(store, {name: "MyStore"})`, which will create a separate instance named "MyStore" in the devtools.388 389 Serialize options: `devtools(store, { serialize: { options: true } })`.356- 390+391 #### Logging Actions392 359-devtools will only log actions from each separated store unlike in a typical *combined reducers* redux store. See an approach to combining stores https://github.com/pmndrs/zustand/issues/163393+devtools will only log actions from each separated store unlike in a typical _combined reducers_ redux store. See an approach to combining stores https://github.com/pmndrs/zustand/issues/163394 395 You can log a specific action type for each `set` function by passing a third parameter:396 397 ```jsx1 unmodified line399 eatFish: () =>400 set(401 (prev) => ({ fishes: prev.fishes > 1 ? prev.fishes - 1 : 0 }),402 false,369- "bear/eatFish"403+ 'bear/eatFish'404 ),405 })406 ```407 374-If an action type is not provided, it is defaulted to "anonymous". You can customize this default value by providing an `anonymousActionType` parameter: 408+If an action type is not provided, it is defaulted to "anonymous". You can customize this default value by providing an `anonymousActionType` parameter:409 410 ```jsx411 devtools(..., { anonymousActionType: 'unknown', ... })412 ```51 unmodified lines464 465 <details>466 <summary>createContext usage in real components</summary>467 434- ```jsx435- import create from "zustand";436- import createContext from "zustand/context";468+```jsx469+import create from "zustand";470+import createContext from "zustand/context";471 438- // Best practice: You can move the below createContext() and createStore to a separate file(store.js) and import the Provider, useStore here/wherever you need.472+// Best practice: You can move the below createContext() and createStore to a separate file(store.js) and import the Provider, useStore here/wherever you need.473 440- const { Provider, useStore } = createContext();474+const { Provider, useStore } = createContext();475 442- const createStore = () =>443- create((set) => ({444- bears: 0,445- increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),446- removeAllBears: () => set({ bears: 0 })447- }));476+const createStore = () =>477+ create((set) => ({478+ bears: 0,479+ increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),480+ removeAllBears: () => set({ bears: 0 })481+ }));482 449- const Button = () => {450- return (451- {/** store() - This will create a store for each time using the Button component instead of using one store for all components **/}452- <Provider createStore={createStore}> 453- <ButtonChild />454- </Provider>455- );456- };483+const Button = () => {484+ return (485+ {/** store() - This will create a store for each time using the Button component instead of using one store for all components **/}486+ <Provider createStore={createStore}>487+ <ButtonChild />488+ </Provider>489+ );490+};491 458- const ButtonChild = () => {459- const state = useStore();460- return (461- <div>462- {state.bears}463- <button464- onClick={() => {465- state.increasePopulation();466- }}467- >468- +469- </button>470- </div>471- );472- };492+const ButtonChild = () => {493+ const state = useStore();494+ return (495+ <div>496+ {state.bears}497+ <button498+ onClick={() => {499+ state.increasePopulation();500+ }}501+ >502+ +503+ </button>504+ </div>505+ );506+};507 474- export default function App() {475- return (476- <div className="App">477- <Button />478- <Button />479- </div>480- );481- }482- ```508+export default function App() {509+ return (510+ <div className="App">511+ <Button />512+ <Button />513+ </div>514+ );515+}516+```517+518 </details>519 520 <details>521 <summary>createContext usage with initialization from props</summary>522 488- ```tsx489- import create from "zustand";490- import createContext from "zustand/context";523+```tsx524+import create from 'zustand'525+import createContext from 'zustand/context'526 492- const { Provider, useStore } = createContext();527+const { Provider, useStore } = createContext()528 494- export default function App({ initialBears }) {495- return (496- <Provider497- createStore={() =>498- create((set) => ({499- bears: initialBears,500- increase: () => set((state) => ({ bears: state.bears + 1 })),501- }))502- }503- >504- <Button />505- </Provider>506- )507- }508- ```529+export default function App({ initialBears }) {530+ return (531+ <Provider532+ createStore={() =>533+ create((set) => ({534+ bears: initialBears,535+ increase: () => set((state) => ({ bears: state.bears + 1 })),536+ }))537+ }>538+ <Button />539+ </Provider>540+ )541+}542+```543+544 </details>545 546 ## TypeScript Usage547 548 Basic typescript usage doesn't require anything special except for writing `create<State>()(...)` instead of `create(...)`...549 550 ```ts516-import create from "zustand"517-import { devtools, persist } from "zustand/middleware"551+import create from 'zustand'552+import { devtools, persist } from 'zustand/middleware'553 554 interface BearState {555 bears: number556 increase: (by: number) => void557 }558 559+const useStore = create<BearState>()(560+ devtools(524-const useStore = create<BearState>()(devtools(persist((set) => ({525- bears: 0,526- increase: (by) => set((state) => ({ bears: state.bears + by })),527-}))))561+ persist((set) => ({562+ bears: 0,563+ increase: (by) => set((state) => ({ bears: state.bears + by })),564+ }))565+ )566+)567 ```568 569 A more complete TypeScript guide is [here](https://github.com/pmndrs/zustand/blob/main/docs/typescript.md).570 571 ## Best practices533- 534-* You may wonder how to organize your code for better maintenance: [Splitting the store into seperate slices](https://github.com/pmndrs/zustand/wiki/Splitting-the-store-into-separate-slices).535- 536-* Recommended usage for this unopinionated library: [Flux inspired practice](https://github.com/pmndrs/zustand/wiki/Flux-inspired-practice).537- 572+573+- You may wonder how to organize your code for better maintenance: [Splitting the store into seperate slices](https://github.com/pmndrs/zustand/wiki/Splitting-the-store-into-separate-slices).574+- Recommended usage for this unopinionated library: [Flux inspired practice](https://github.com/pmndrs/zustand/wiki/Flux-inspired-practice).575+576 <details>577 <summary>Calling actions outside a React event handler in pre React 18</summary>578 579 <br/>5 unmodified lines585 import { unstable_batchedUpdates } from 'react-dom' // or 'react-native'586 587 const useStore = create((set) => ({588 fishes: 0,551- increaseFishes: () => set((prev) => ({ fishes: prev.fishes + 1 }))589+ increaseFishes: () => set((prev) => ({ fishes: prev.fishes + 1 })),590 }))591 592 const nonReactCallback = () => {593 unstable_batchedUpdates(() => {20 unmodified linesmodified:yarn.lock+4 added-247 removed
1767 unmodified lines1768 integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==1769 dependencies:1770 debug "4"1771 1772-aggregate-error@^3.0.0:1773- version "3.1.0"1774- resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"1775- integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==1776- dependencies:1777- clean-stack "^2.0.0"1778- indent-string "^4.0.0"1779-1772 ajv@^6.10.0, ajv@^6.12.4:1773 version "6.12.6"1774 resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"1775 integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==2 unmodified lines1778 fast-json-stable-stringify "^2.0.0"1779 json-schema-traverse "^0.4.1"1780 uri-js "^4.2.2"1781 1790-ansi-escapes@^4.2.1, ansi-escapes@^4.3.0:1782+ansi-escapes@^4.2.1:1783 version "4.3.2"1784 resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"1785 integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==1786 dependencies:3 unmodified lines1790 version "5.0.1"1791 resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"1792 integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==1793 1802-ansi-regex@^6.0.1:1803- version "6.0.1"1804- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"1805- integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==1806-1794 ansi-styles@^3.2.1:1795 version "3.2.1"1796 resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"1797 integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==11 unmodified lines1809 version "5.2.0"1810 resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"1811 integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==1812 1826-ansi-styles@^6.0.0:1827- version "6.1.0"1828- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3"1829- integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==1830-1813 anymatch@^3.0.3:1814 version "3.1.2"1815 resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"1816 integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==53 unmodified lines1870 define-properties "^1.1.3"1871 es-abstract "^1.19.2"1872 es-shim-unscopables "^1.0.0"1873 1892-astral-regex@^2.0.0:1893- version "2.0.0"1894- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"1895- integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==1896-1874 asynckit@^0.4.0:1875 version "0.4.0"1876 resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"1877 integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=201 unmodified lines2079 version "1.2.2"2080 resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"2081 integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==2082 2106-clean-stack@^2.0.0:2107- version "2.2.0"2108- resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"2109- integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==2110-2111-cli-cursor@^3.1.0:2112- version "3.1.0"2113- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"2114- integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==2115- dependencies:2116- restore-cursor "^3.1.0"2117-2118-cli-truncate@^2.1.0:2119- version "2.1.0"2120- resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"2121- integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==2122- dependencies:2123- slice-ansi "^3.0.0"2124- string-width "^4.2.0"2125-2126-cli-truncate@^3.1.0:2127- version "3.1.0"2128- resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389"2129- integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==2130- dependencies:2131- slice-ansi "^5.0.0"2132- string-width "^5.0.0"2133-2083 cliui@^7.0.2:2084 version "7.0.4"2085 resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"2086 integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==35 unmodified lines2122 version "1.1.4"2123 resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"2124 integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==2125 2177-colorette@^2.0.16:2178- version "2.0.16"2179- resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da"2180- integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==2181-2126 combined-stream@^1.0.8:2127 version "1.0.8"2128 resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"2129 integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==4 unmodified lines2134 version "2.20.3"2135 resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"2136 integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==2137 2194-commander@^8.3.0:2195- version "8.3.0"2196- resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"2197- integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==2198-2138 concat-map@0.0.1:2139 version "0.0.1"2140 resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"2141 integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=182 unmodified lines2324 semver "^7.3.2"2325 shelljs "^0.8.3"2326 typescript next2327 2389-eastasianwidth@^0.2.0:2390- version "0.2.0"2391- resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"2392- integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==2393-2328 electron-to-chromium@^1.4.118:2329 version "1.4.127"2330 resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.127.tgz#4ef19d5d920abe2676d938f4170729b44f7f423a"2331 integrity sha512-nhD6S8nKI0O2MueC6blNOEZio+/PWppE/pevnf3LOlQA/fKPCrDp2Ao4wx4LFwmIkJpVdFdn2763YWLy9ENIZg==7 unmodified lines2339 version "8.0.0"2340 resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"2341 integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==2342 2409-emoji-regex@^9.2.2:2410- version "9.2.2"2411- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"2412- integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==2413-2343 error-ex@^1.3.1:2344 version "1.3.2"2345 resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"2346 integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==415 unmodified lines2762 version "2.0.3"2763 resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"2764 integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==2765 2837-execa@^5.0.0, execa@^5.1.1:2766+execa@^5.0.0:2767 version "5.1.1"2768 resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"2769 integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==2770 dependencies:310 unmodified lines3081 version "2.1.0"3082 resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"3083 integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==3084 3156-husky@^7.0.4:3157- version "7.0.4"3158- resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"3159- integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==3160-3085 iconv-lite@0.6.3:3086 version "0.6.3"3087 resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"3088 integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==30 unmodified lines3119 version "0.1.4"3120 resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"3121 integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=3122 3199-indent-string@^4.0.0:3200- version "4.0.0"3201- resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"3202- integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==3203-3123 inflight@^1.0.4:3124 version "1.0.6"3125 resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"3126 integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=68 unmodified lines3195 version "3.0.0"3196 resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"3197 integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==3198 3280-is-fullwidth-code-point@^4.0.0:3281- version "4.0.0"3282- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88"3283- integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==3284-3199 is-generator-fn@^2.0.0:3200 version "2.1.0"3201 resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"3202 integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==663 unmodified lines3866 dependencies:3867 prelude-ls "~1.1.2"3868 type-check "~0.3.2"3869 3956-lilconfig@2.0.4:3957- version "2.0.4"3958- resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082"3959- integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==3960-3870 lines-and-columns@^1.1.6:3871 version "1.2.4"3872 resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"3873 integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==3874 3966-lint-staged@^12.4.1:3967- version "12.4.1"3968- resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.4.1.tgz#63fa27bfc8a33515f6902f63f6670864f1fb233c"3969- integrity sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==3970- dependencies:3971- cli-truncate "^3.1.0"3972- colorette "^2.0.16"3973- commander "^8.3.0"3974- debug "^4.3.3"3975- execa "^5.1.1"3976- lilconfig "2.0.4"3977- listr2 "^4.0.1"3978- micromatch "^4.0.4"3979- normalize-path "^3.0.0"3980- object-inspect "^1.12.0"3981- pidtree "^0.5.0"3982- string-argv "^0.3.1"3983- supports-color "^9.2.1"3984- yaml "^1.10.2"3985-3986-listr2@^4.0.1:3987- version "4.0.5"3988- resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5"3989- integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==3990- dependencies:3991- cli-truncate "^2.1.0"3992- colorette "^2.0.16"3993- log-update "^4.0.0"3994- p-map "^4.0.0"3995- rfdc "^1.3.0"3996- rxjs "^7.5.5"3997- through "^2.3.8"3998- wrap-ansi "^7.0.0"3999-3875 locate-path@^2.0.0:3876 version "2.0.0"3877 resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"3878 integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=27 unmodified lines3906 version "4.17.21"3907 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"3908 integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==3909 4035-log-update@^4.0.0:4036- version "4.0.0"4037- resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1"4038- integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==4039- dependencies:4040- ansi-escapes "^4.3.0"4041- cli-cursor "^3.1.0"4042- slice-ansi "^4.0.0"4043- wrap-ansi "^6.2.0"4044-3910 loose-envify@^1.1.0, loose-envify@^1.4.0:3911 version "1.4.0"3912 resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"3913 integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==193 unmodified lines4107 integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=4108 dependencies:4109 wrappy "1"4110 4246-onetime@^5.1.0, onetime@^5.1.2:4111+onetime@^5.1.2:4112 version "5.1.2"4113 resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"4114 integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==4115 dependencies:50 unmodified lines4166 integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==4167 dependencies:4168 p-limit "^2.2.0"4169 4305-p-map@^4.0.0:4306- version "4.0.0"4307- resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"4308- integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==4309- dependencies:4310- aggregate-error "^3.0.0"4311-4170 p-try@^1.0.0:4171 version "1.0.0"4172 resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"4173 integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=64 unmodified lines4238 version "2.3.1"4239 resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"4240 integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==4241 4384-pidtree@^0.5.0:4385- version "0.5.0"4386- resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.5.0.tgz#ad5fbc1de78b8a5f99d6fbdd4f6e4eee21d1aca1"4387- integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==4388-4242 pirates@^4.0.4:4243 version "4.0.5"4244 resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"4245 integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==234 unmodified lines4480 dependencies:4481 is-core-module "^2.2.0"4482 path-parse "^1.0.6"4483 4631-restore-cursor@^3.1.0:4632- version "3.1.0"4633- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"4634- integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==4635- dependencies:4636- onetime "^5.1.0"4637- signal-exit "^3.0.2"4638-4484 reusify@^1.0.4:4485 version "1.0.4"4486 resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"4487 integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==4488 4644-rfdc@^1.3.0:4645- version "1.3.0"4646- resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"4647- integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==4648-4489 rimraf@^3.0.0, rimraf@^3.0.2:4490 version "3.0.2"4491 resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"4492 integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==41 unmodified lines4534 integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==4535 dependencies:4536 tslib "^1.9.0"4537 4698-rxjs@^7.5.5:4699- version "7.5.5"4700- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f"4701- integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==4702- dependencies:4703- tslib "^2.1.0"4704-4538 safe-buffer@^5.1.0:4539 version "5.2.1"4540 resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"4541 integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==83 unmodified lines4625 call-bind "^1.0.0"4626 get-intrinsic "^1.0.2"4627 object-inspect "^1.9.0"4628 4796-signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:4629+signal-exit@^3.0.3, signal-exit@^3.0.7:4630 version "3.0.7"4631 resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"4632 integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==4633 6 unmodified lines4640 version "3.0.0"4641 resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"4642 integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==4643 4811-slice-ansi@^3.0.0:4812- version "3.0.0"4813- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"4814- integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==4815- dependencies:4816- ansi-styles "^4.0.0"4817- astral-regex "^2.0.0"4818- is-fullwidth-code-point "^3.0.0"4819-4820-slice-ansi@^4.0.0:4821- version "4.0.0"4822- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"4823- integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==4824- dependencies:4825- ansi-styles "^4.0.0"4826- astral-regex "^2.0.0"4827- is-fullwidth-code-point "^3.0.0"4828-4829-slice-ansi@^5.0.0:4830- version "5.0.0"4831- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a"4832- integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==4833- dependencies:4834- ansi-styles "^6.0.0"4835- is-fullwidth-code-point "^4.0.0"4836-4644 source-map-support@0.5.13:4645 version "0.5.13"4646 resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"4647 integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==47 unmodified lines4695 integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==4696 dependencies:4697 escape-string-regexp "^2.0.0"4698 4892-string-argv@^0.3.1:4893- version "0.3.1"4894- resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"4895- integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==4896-4699 string-length@^4.0.1:4700 version "4.0.2"4701 resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"4702 integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==9 unmodified lines4712 emoji-regex "^8.0.0"4713 is-fullwidth-code-point "^3.0.0"4714 strip-ansi "^6.0.1"4715 4914-string-width@^5.0.0:4915- version "5.1.2"4916- resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"4917- integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==4918- dependencies:4919- eastasianwidth "^0.2.0"4920- emoji-regex "^9.2.2"4921- strip-ansi "^7.0.1"4922-4716 string.prototype.matchall@^4.0.6:4717 version "4.0.7"4718 resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d"4719 integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==29 unmodified lines4749 integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==4750 dependencies:4751 ansi-regex "^5.0.1"4752 4960-strip-ansi@^7.0.1:4961- version "7.0.1"4962- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2"4963- integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==4964- dependencies:4965- ansi-regex "^6.0.1"4966-4753 strip-bom@^3.0.0:4754 version "3.0.0"4755 resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"4756 integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=33 unmodified lines4790 integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==4791 dependencies:4792 has-flag "^4.0.0"4793 5008-supports-color@^9.2.1:5009- version "9.2.2"5010- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.2.tgz#502acaf82f2b7ee78eb7c83dcac0f89694e5a7bb"5011- integrity sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==5012-4794 supports-hyperlinks@^2.0.0:4795 version "2.2.0"4796 resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"4797 integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==47 unmodified lines4845 version "6.0.1"4846 resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375"4847 integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==4848 5068-through@^2.3.8:5069- version "2.3.8"5070- resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"5071- integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=5072-4849 tmpl@1.0.5:4850 version "1.0.5"4851 resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"4852 integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==52 unmodified lines4905 version "1.14.1"4906 resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"4907 integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==4908 5133-tslib@^2.1.0:5134- version "2.4.0"5135- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"5136- integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==5137-4909 tsutils@^3.21.0:4910 version "3.21.0"4911 resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"4912 integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==193 unmodified lines5106 version "1.2.3"5107 resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"5108 integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==5109 5339-wrap-ansi@^6.2.0:5340- version "6.2.0"5341- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"5342- integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==5343- dependencies:5344- ansi-styles "^4.0.0"5345- string-width "^4.1.0"5346- strip-ansi "^6.0.0"5347-5110 wrap-ansi@^7.0.0:5111 version "7.0.0"5112 resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"5113 integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==39 unmodified lines5153 version "4.0.0"5154 resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"5155 integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==5156 5395-yaml@^1.10.2:5396- version "1.10.2"5397- resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"5398- integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==5399-5157 yargs-parser@^20.2.2:5158 version "20.2.9"5159 resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"5160 integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==31 unmodified lines