Skip to content

Deprecation checks in v7 break browser compatability #206

@tavogel

Description

@tavogel

The deprecation checks are using process, which is only available in a Node.js context.

node-lru-cache/index.js

Lines 27 to 31 in 2be1d24

const shouldWarn = (code) => !(process.noDeprecation || warned.has(code))
const warn = (code, what, instead, fn) => {
warned.add(code)
process.emitWarning(`The ${what} is deprecated. Please use ${instead} instead.`, 'DeprecationWarning', code, fn)
}

Uncaught (in promise) TypeError: process.emitWarning is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions