Downgrade to using nanoid@3 to support its use in CJS module bundle #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #306
Starting from nanoid v4, it only works with ESM projects. We need to support both CJS and ESM bundles for the
spaces
SDK, so we have the following options to use the nanoid package:require('nanoid')
imports with asyncawait import('nanoid')
. This solution is not suitable as the methods we currently use nanoid in are not async, and changing them to async will create cascading effects for a bunch of other methods and change the public API for users.crypto
packages for its browser and Node.js bundles with some other platform-specific optimizations. Including them locally would not be a trivial change.This PR also disables major version updates for
nanoid
package by GitHub dependabot.