Skip to content

fix(deps): update dependency lowdb to ^6.1.0#64

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/all-minor-patch
Oct 17, 2023
Merged

fix(deps): update dependency lowdb to ^6.1.0#64
renovate[bot] merged 1 commit intomainfrom
renovate/all-minor-patch

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Oct 17, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
lowdb ^6.0.1 -> ^6.1.0 age adoption passing confidence

Release Notes

typicode/lowdb (lowdb)

v6.1.0

Compare Source

Added

  • Presets for common use cases (JSON, localStorage and sessionStorage)

Instead of writing this:

import { Low } from 'lowdb'
import { JSONFile } from 'lowdb/node'

const adapter = new JSONFile(file)
const defaultData = { posts: [] }
const db = new Low(adapter, defaultData)

await db.read()

You can now do:

import { JSONPreset } from 'lowdb/node'

const defaultData = { posts: [] }
const db = await JSONPreset('db.json', defaultData)

This will also use the Memory adapter automatically when NODE_ENV=test making tests faster.

  • TypeScript: lowdb supports the broader fs.PathLike type which lets you use URL in addition to string.
// This is now possible and will read from 'db.json' relatively to the current module path
JSONPreset(new URL('db.json', import.meta.url), defaultData)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) October 17, 2023 04:01
@renovate renovate bot merged commit b889cf6 into main Oct 17, 2023
@renovate renovate bot deleted the renovate/all-minor-patch branch October 17, 2023 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants