Skip to content

Conversation

hf
Copy link
Contributor

@hf hf commented Oct 29, 2024

When using the library in non-browser environments like React Native or other JavaScript-based runtimes (Electron's main process for example) certain race conditions could still occur.

We've received some signal from customers using React Native that at scale these become more visible. This is why I'm introducing a processLock that developers can import like so:

import { processLock } from '@supabase/auth-js/lib/locks'

And add to their apps by specifying the lock option with the process lock.

@hf hf force-pushed the hf/add-process-lock branch from d41d2cd to e12fe4d Compare October 30, 2024 10:39
@hf hf force-pushed the hf/add-process-lock branch from e12fe4d to ffc9f8f Compare October 30, 2024 10:44
@hf hf marked this pull request as ready for review October 30, 2024 11:01
Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should update our react native guides to use this when creating the supabase client

@hf hf merged commit 8af88b6 into master Nov 1, 2024
5 checks passed
@hf hf deleted the hf/add-process-lock branch November 1, 2024 17:47
kangmingtay pushed a commit that referenced this pull request Nov 6, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.66.0](v2.65.1...v2.66.0)
(2024-11-01)


### Features

* add process lock for optional use in non-browser environments (React
Native) ([#977](#977))
([8af88b6](8af88b6))


### Bug Fixes

* typo in warning message
([#975](#975))
([4f21f93](4f21f93))
* update soft-deletion docs
([#973](#973))
([cb052a9](cb052a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
J0 pushed a commit that referenced this pull request Nov 12, 2024
…React Native) (#977)

When using the library in non-browser environments like React Native or
other JavaScript-based runtimes (Electron's main process for example)
certain race conditions could still occur.

We've received some signal from customers using React Native that at
scale these become more visible. This is why I'm introducing a
`processLock` that developers can import like so:

```typescript
import { processLock } from '@supabase/auth-js/lib/locks'
```

And add to their apps by specifying the lock option with the process
lock.
J0 pushed a commit that referenced this pull request Nov 12, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.66.0](v2.65.1...v2.66.0)
(2024-11-01)


### Features

* add process lock for optional use in non-browser environments (React
Native) ([#977](#977))
([8af88b6](8af88b6))


### Bug Fixes

* typo in warning message
([#975](#975))
([4f21f93](4f21f93))
* update soft-deletion docs
([#973](#973))
([cb052a9](cb052a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
hf added a commit that referenced this pull request May 16, 2025
Process lock was added in #977 but wasn't exported in top-level which
made imports hard.
mandarini pushed a commit to supabase/supabase-js that referenced this pull request Oct 2, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.66.0](supabase/auth-js@v2.65.1...v2.66.0)
(2024-11-01)


### Features

* add process lock for optional use in non-browser environments (React
Native) ([#977](supabase/auth-js#977))
([0f7b2b8](supabase/auth-js@0f7b2b8))


### Bug Fixes

* typo in warning message
([#975](supabase/auth-js#975))
([3185569](supabase/auth-js@3185569))
* update soft-deletion docs
([#973](supabase/auth-js#973))
([c569aca](supabase/auth-js@c569aca))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants