Upgrading universal-cookie 3 to 4
Review needed3.1.0 → 4.0.4New4Changed5Fixed2Other3
Review neededUpgrade verdict
5 behavior changes.
In plain terms
- Bundlers can now drop unused parts of the package more reliably, which can make your app bundle smaller.
- When running in a simulated browser environment (JSDOM), cookies are now read from and written to the actual browser cookie store.
- The package now uses newer versions of the libraries it depends on.
- Memoizes setCookie and removeCookie in react-cookie so they no longer change unnecessarily.
Must act Nothing to change
No breaking, platform, security or deprecated items in this range.
Drops @types/object-assign, object-assign.
Installs 2 packages in all (was 4).
Nothing in this upgrade needs a code or configuration change.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
property Cookies.TESTING_ONETWO: number - changed:
constructor Cookies(cookies?: string | object | null) → constructor Cookies(cookies?: string | object | null, options?: CookieParseOptions) - changed:
method Cookies.getAll(options?: CookieGetOptions): { [name: string]: any } → method Cookies.getAll(options?: CookieGetOptions): any - added:
method Cookies.get<T>(name: string, options?: CookieGetOptions): T - added:
method Cookies.getAll<T>(options?: CookieGetOptions): T
- changed:
property CookieSetOptions.sameSite?: boolean | 'lax' | 'strict' → property CookieSetOptions.sameSite?: boolean | 'none' | 'lax' | 'strict' - added:
interface CookieParseOptions - added:
property CookieParseOptions.decode: (value: string) => string - added:
property CookieSetOptions.encode?: (value: string) => string
- changed:
function parseCookies(cookies?: string | object | null): object → function parseCookies(cookies?: string | object | null, options?: CookieParseOptions): object
- removed:
property Cookies.TESTING_ONETWO: number - changed:
constructor Cookies(cookies?: string | object | null) → constructor Cookies(cookies?: string | object | null, options?: CookieParseOptions) - changed:
method Cookies.getAll(options?: CookieGetOptions): { [name: string]: any } → method Cookies.getAll(options?: CookieGetOptions): any - added:
method Cookies.get<T>(name: string, options?: CookieGetOptions): T - added:
method Cookies.getAll<T>(options?: CookieGetOptions): T
- changed:
property CookieSetOptions.sameSite?: boolean | 'lax' | 'strict' → property CookieSetOptions.sameSite?: boolean | 'none' | 'lax' | 'strict' - added:
interface CookieParseOptions - added:
property CookieParseOptions.decode: (value: string) => string - added:
property CookieSetOptions.encode?: (value: string) => string
- changed:
function parseCookies(cookies?: string | object | null): object → function parseCookies(cookies?: string | object | null, options?: CookieParseOptions): object
- removed:
property Cookies.TESTING_ONETWO: number - changed:
constructor Cookies(cookies?: string | object | null) → constructor Cookies(cookies?: string | object | null, options?: CookieParseOptions) - changed:
method Cookies.getAll(options?: CookieGetOptions): { [name: string]: any } → method Cookies.getAll(options?: CookieGetOptions): any - added:
method Cookies.get<T>(name: string, options?: CookieGetOptions): T - added:
method Cookies.getAll<T>(options?: CookieGetOptions): T
- changed:
property CookieSetOptions.sameSite?: boolean | 'lax' | 'strict' → property CookieSetOptions.sameSite?: boolean | 'none' | 'lax' | 'strict' - added:
interface CookieParseOptions - added:
property CookieParseOptions.decode: (value: string) => string - added:
property CookieSetOptions.encode?: (value: string) => string
- changed:
function parseCookies(cookies?: string | object | null): object → function parseCookies(cookies?: string | object | null, options?: CookieParseOptions): object