Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 13, 2025

This PR contains the following updates:

Package Change Age Confidence
fake-indexeddb 3.1.86.2.5 age confidence

Release Notes

dumbmatter/fakeIndexedDB (fake-indexeddb)

v6.2.5

Compare Source

v6.2.4

Compare Source

v6.2.3

Compare Source

v6.2.2

Compare Source

  • Fixed regression in v6.2.0 where overwriting the global indexedDB variable created by fake-indexeddb/auto (such as with indexedDB = new IDBFactory();) was no longer working (#​135 by @​nolanlawson)

v6.2.1

Compare Source

  • Fixed the IDBDatabase variable created by a CommonJS require of fake-indexeddb/auto, which was broken in v6.2.0 (#​131 by @​nolanlawson)

v6.2.0

Compare Source

  • Fixed regression in v6.2.0 where overwriting the global indexedDB variable created by fake-indexeddb/auto (such as with indexedDB = new IDBFactory();) was no longer working (#​135 by @​nolanlawson)

v6.1.0

Compare Source

  • Added support for new IndexedDB features: querying keys and values at the same time with getAllRecords, and passing a descending direction into getAll/getAllKeys. (#​112 by @​nolanlawson)

  • Better DOMStringList polyfill that doesn't include various inappropriate array methods. (#​66 by @​dumbmatter)

  • Updated the Web Platform Tests from 2019 to 2025 which improved test coverage and uncovered a few minor bugs that were fixed. (#​117 by @​nolanlawson)

v6.0.1

Compare Source

  • #​110 - Fix handling of "undefined value" vs "missing value" in IDBObjectStore.add/put when that value is at the keyPath and autoIncrement is true - it should throw an error if the keyPath value is undefined, but previously it was not.

v6.0.0

Compare Source

I made this a new major version because it includes a few changes that could in theory break something in some weird situations. But I think the vast majority of users (possibly all users?) won't have any issue upgrading.

  • #​48 - Switched to using DOMException errors rather than normal errors, since that's what the IndexedDB spec says to use, and Node.js now has a built-in DOMException in all supported versions.

  • #​93 - @​bryan-codaio made the latest tweak to event scheduling, this time improving how setImmediate is used in some situations where people are mocking timers.

  • #​99 - @​sjnho fixed handling of Date objects to account for some edge cases, including jsdom overriding the native Date constructor.

v5.0.2

Compare Source

  • #​94 - Improved performance of IDBObjectStore.count and IDBIndex.count.

v5.0.1

Compare Source

  • #​89 - Fixed bug where ArrayBuffer views were not being correctly handled when used as keys.

  • #​88 - Added explanation to README.md about how to use fake-indexeddb v5+ with jsdom, since a structuredClone polyfill is not included anymore.

v5.0.0

Compare Source

  • Dropped support for Node.js 16, which allows me to get rid of the structuredClone polyfill, which reduces the package size by roughly 50%.

v4.0.2

Compare Source

  • #​84 - Fix the TypeScript types in some situations.

v4.0.1

Compare Source

  • #​79 - Added missing request accessor to the FDBCursor object. Thank you @​mmacfadden for the PR!

v4.0.0

Compare Source

TLDR: Most users can upgrade without doing any extra work, but you might need to change require("fake-indexeddb") to require("fake-indexeddb").default. All other ways of importing fake-indexeddb (such as with import, or requiring sub-modules like require("fake-indexeddb/auto") or require("fake-indexeddb/lib/FDBKeyRange")) should continue working like normal.

Details:

  • #​23 - TypeScript support! As of version 4, fake-indexeddb includes TypeScript types. As you can see in types.d.ts, it's just using TypeScript's built-in IndexedDB types, rather than generating types from the fake-indexeddb code base. The reason I did this is for compatibility with your application code that may already be using TypeScript's IndexedDB types, so if I used something different for fake-indexeddb, it could lead to spurious type errors. In theory this could lead to other errors if there are differences between Typescript's IndexedDB types and fake-indexeddb's API, but currently I'm not aware of any difference.

  • Added support for ES modules in addition to CommonJS modules. That means you can import or require and it should just work.

  • Breaking change: The easiest way to use this module is still to import/require "fake-indexeddb/auto". If instead you want to import an individual variable rather than populate the global scope with all of them, previously you would do const indexedDB = require("fake-indexeddb"); for the main indexedDB variable and const IDBKeyRange = require("fake-indexeddb/lib/FDBKeyRange"); for any of the other IndexedDB variables. In this release, I made everything a named export of the main package, so you can do:

    import { indexedDB, IDBKeyRange } from "fake-indexeddb";

    or

    const { indexedDB, IDBKeyRange } = require("fake-indexeddb");

    For backwards compatibility, the require("fake-indexeddb/lib/FDBKeyRange") syntax still is supported, but the new exports of the main module are a breaking change. indexedDB is still the default export, but in CommonJS you can't have both default and named exports, so the default export is really just an property named "default". This may requrie changing requires of the root module like require("fake-indexeddb") to require("fake-indexeddb").default. Or switch to ES modules and import it :)

  • Breaking change: Dropped support for versions of Node.js older than Node 12.

  • Breaking change: For environments with a built-in structuredClone function (such as Node.js 17+), that is used rather than the realistic-structured-clone NPM module. There are some differences between the two implementations of the structured cloning algorithm, but probably nothing noticable, and probably all is in the direction of better spec compliance such as this or this. There is also a minor performance increase with the built-in function - the test suite of fake-indexeddb runs about 5% faster.


Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the renovate label Aug 13, 2025
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch 2 times, most recently from 8a261ee to 57b248c Compare August 19, 2025 19:43
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch from 57b248c to b91d76c Compare August 31, 2025 10:38
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch from b91d76c to 5aa3b31 Compare September 25, 2025 20:40
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch 2 times, most recently from 27540c3 to f074a7a Compare October 17, 2025 04:37
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch from f074a7a to 265d9c2 Compare November 7, 2025 16:33
@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch 3 times, most recently from 538ec9d to cca431c Compare November 16, 2025 04:52
@hawkrives
Copy link
Owner

@copilot please take over this PR. The package has been updated, but we need to look at the breaking changes since v3 and see how the API has evolved.

Currently, on this branch, the Jest tests are failing.

Below are the release notes for all of the in-between versions:


v6.2.5

Compare Source

v6.2.4

Compare Source

v6.2.3

Compare Source

v6.2.2

Compare Source

  • Fixed regression in v6.2.0 where overwriting the global indexedDB variable created by fake-indexeddb/auto (such as with indexedDB = new IDBFactory();) was no longer working (#​135 by @​nolanlawson)

v6.2.1

Compare Source

  • Fixed the IDBDatabase variable created by a CommonJS require of fake-indexeddb/auto, which was broken in v6.2.0 (#​131 by @​nolanlawson)

v6.2.0

Compare Source

  • Fixed regression in v6.2.0 where overwriting the global indexedDB variable created by fake-indexeddb/auto (such as with indexedDB = new IDBFactory();) was no longer working (#​135 by @​nolanlawson)

v6.1.0

Compare Source

  • Added support for new IndexedDB features: querying keys and values at the same time with getAllRecords, and passing a descending direction into getAll/getAllKeys. (#​112 by @​nolanlawson)

  • Better DOMStringList polyfill that doesn't include various inappropriate array methods. (#​66 by @​dumbmatter)

  • Updated the Web Platform Tests from 2019 to 2025 which improved test coverage and uncovered a few minor bugs that were fixed. (#​117 by @​nolanlawson)

v6.0.1

Compare Source

  • #​110 - Fix handling of "undefined value" vs "missing value" in IDBObjectStore.add/put when that value is at the keyPath and autoIncrement is true - it should throw an error if the keyPath value is undefined, but previously it was not.

v6.0.0

Compare Source

I made this a new major version because it includes a few changes that could in theory break something in some weird situations. But I think the vast majority of users (possibly all users?) won't have any issue upgrading.

  • #​48 - Switched to using DOMException errors rather than normal errors, since that's what the IndexedDB spec says to use, and Node.js now has a built-in DOMException in all supported versions.

  • #​93 - @​bryan-codaio made the latest tweak to event scheduling, this time improving how setImmediate is used in some situations where people are mocking timers.

  • #​99 - @​sjnho fixed handling of Date objects to account for some edge cases, including jsdom overriding the native Date constructor.

v5.0.2

Compare Source

  • #​94 - Improved performance of IDBObjectStore.count and IDBIndex.count.

v5.0.1

Compare Source

  • #​89 - Fixed bug where ArrayBuffer views were not being correctly handled when used as keys.

  • #​88 - Added explanation to README.md about how to use fake-indexeddb v5+ with jsdom, since a structuredClone polyfill is not included anymore.

v5.0.0

Compare Source

  • Dropped support for Node.js 16, which allows me to get rid of the structuredClone polyfill, which reduces the package size by roughly 50%.

v4.0.2

Compare Source

  • #​84 - Fix the TypeScript types in some situations.

v4.0.1

Compare Source

  • #​79 - Added missing request accessor to the FDBCursor object. Thank you @​mmacfadden for the PR!

v4.0.0

Compare Source

TLDR: Most users can upgrade without doing any extra work, but you might need to change require("fake-indexeddb") to require("fake-indexeddb").default. All other ways of importing fake-indexeddb (such as with import, or requiring sub-modules like require("fake-indexeddb/auto") or require("fake-indexeddb/lib/FDBKeyRange")) should continue working like normal.

Details:

  • #​23 - TypeScript support! As of version 4, fake-indexeddb includes TypeScript types. As you can see in types.d.ts, it's just using TypeScript's built-in IndexedDB types, rather than generating types from the fake-indexeddb code base. The reason I did this is for compatibility with your application code that may already be using TypeScript's IndexedDB types, so if I used something different for fake-indexeddb, it could lead to spurious type errors. In theory this could lead to other errors if there are differences between Typescript's IndexedDB types and fake-indexeddb's API, but currently I'm not aware of any difference.

  • Added support for ES modules in addition to CommonJS modules. That means you can import or require and it should just work.

  • Breaking change: The easiest way to use this module is still to import/require "fake-indexeddb/auto". If instead you want to import an individual variable rather than populate the global scope with all of them, previously you would do const indexedDB = require("fake-indexeddb"); for the main indexedDB variable and const IDBKeyRange = require("fake-indexeddb/lib/FDBKeyRange"); for any of the other IndexedDB variables. In this release, I made everything a named export of the main package, so you can do:

    import { indexedDB, IDBKeyRange } from "fake-indexeddb";

    or

    const { indexedDB, IDBKeyRange } = require("fake-indexeddb");

    For backwards compatibility, the require("fake-indexeddb/lib/FDBKeyRange") syntax still is supported, but the new exports of the main module are a breaking change. indexedDB is still the default export, but in CommonJS you can't have both default and named exports, so the default export is really just an property named "default". This may requrie changing requires of the root module like require("fake-indexeddb") to require("fake-indexeddb").default. Or switch to ES modules and import it :)

  • Breaking change: Dropped support for versions of Node.js older than Node 12.

  • Breaking change: For environments with a built-in structuredClone function (such as Node.js 17+), that is used rather than the realistic-structured-clone NPM module. There are some differences between the two implementations of the structured cloning algorithm, but probably nothing noticable, and probably all is in the direction of better spec compliance such as this or this. There is also a minor performance increase with the built-in function - the test suite of fake-indexeddb runs about 5% faster.

Copy link
Contributor

Copilot AI commented Nov 16, 2025

@hawkrives I've opened a new pull request, #3069, to work on those changes. Once the pull request is ready, I'll request review from you.

@renovate renovate bot force-pushed the renovate/fake-indexeddb-6.x branch from cca431c to 8bf85b7 Compare November 18, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants