Skip to content

Deprecation Warning: redisDriver uses deprecated url.parse() instead of WHATWG URL API #690

@missish

Description

@missish

Environment

unstorage: 1.17.1
bun: 1.x
OS: Ubuntu (WSL2) / Linux
ioredis: 5.8.1

Reproduction

import { env } from "@/env"
import { createStorage } from "unstorage"
import redisDriver from "unstorage/drivers/redis"

export const cacheStorage = createStorage({
  driver: redisDriver({
    url: env.REDIS_URL,
  }),
})

Environment variable example:

REDIS_URL=redis://localhost:6379

Command:

bun run start

Describe the bug

When using unstorage with the Redis driver, Node.js emits a deprecation warning due to usage of the legacy url.parse() API.

This warning appears even though the code runs successfully:

(node:217155) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized...

The cause is likely internal usage of url.parse() in unstorage/drivers/redis.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions