New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@supabase/auth-js

Package Overview
Dependencies
Maintainers
12
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/auth-js - npm Package Compare versions

Comparing version 2.66.1 to 2.67.0-rc.1

11

dist/main/lib/locks.js

@@ -74,3 +74,10 @@ "use strict";

// MDN article: https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request
return await globalThis.navigator.locks.request(name, acquireTimeout === 0
// Wrapping navigator.locks.request() with a plain Promise is done as some
// libraries like zone.js patch the Promise object to track the execution
// context. However, it appears that most browsers use an internal promise
// implementation when using the navigator.locks.request() API causing them
// to lose context and emit confusing log messages or break certain features.
// This wrapping is believed to help zone.js track the execution context
// better.
return await Promise.resolve().then(() => globalThis.navigator.locks.request(name, acquireTimeout === 0
? {

@@ -122,3 +129,3 @@ mode: 'exclusive',

}
});
}));
}

@@ -125,0 +132,0 @@ exports.navigatorLock = navigatorLock;

2

dist/main/lib/version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "2.66.1";
export declare const version = "2.67.0-rc.1";
//# sourceMappingURL=version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '2.66.1';
exports.version = '2.67.0-rc.1';
//# sourceMappingURL=version.js.map

@@ -68,3 +68,10 @@ import { supportsLocalStorage } from './helpers';

// MDN article: https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request
return await globalThis.navigator.locks.request(name, acquireTimeout === 0
// Wrapping navigator.locks.request() with a plain Promise is done as some
// libraries like zone.js patch the Promise object to track the execution
// context. However, it appears that most browsers use an internal promise
// implementation when using the navigator.locks.request() API causing them
// to lose context and emit confusing log messages or break certain features.
// This wrapping is believed to help zone.js track the execution context
// better.
return await Promise.resolve().then(() => globalThis.navigator.locks.request(name, acquireTimeout === 0
? {

@@ -116,3 +123,3 @@ mode: 'exclusive',

}
});
}));
}

@@ -119,0 +126,0 @@ const PROCESS_LOCKS = {};

@@ -1,2 +0,2 @@

export declare const version = "2.66.1";
export declare const version = "2.67.0-rc.1";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export const version = '2.66.1';
export const version = '2.67.0-rc.1';
//# sourceMappingURL=version.js.map
{
"name": "@supabase/auth-js",
"version": "2.66.1",
"version": "2.67.0-rc.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "Official client library for Supabase Auth",

@@ -81,64 +81,73 @@ import { supportsLocalStorage } from './helpers'

return await globalThis.navigator.locks.request(
name,
acquireTimeout === 0
? {
mode: 'exclusive',
ifAvailable: true,
}
: {
mode: 'exclusive',
signal: abortController.signal,
},
async (lock) => {
if (lock) {
if (internals.debug) {
console.log('@supabase/gotrue-js: navigatorLock: acquired', name, lock.name)
}
try {
return await fn()
} finally {
if (internals.debug) {
console.log('@supabase/gotrue-js: navigatorLock: released', name, lock.name)
// Wrapping navigator.locks.request() with a plain Promise is done as some
// libraries like zone.js patch the Promise object to track the execution
// context. However, it appears that most browsers use an internal promise
// implementation when using the navigator.locks.request() API causing them
// to lose context and emit confusing log messages or break certain features.
// This wrapping is believed to help zone.js track the execution context
// better.
return await Promise.resolve().then(() =>
globalThis.navigator.locks.request(
name,
acquireTimeout === 0
? {
mode: 'exclusive',
ifAvailable: true,
}
}
} else {
if (acquireTimeout === 0) {
: {
mode: 'exclusive',
signal: abortController.signal,
},
async (lock) => {
if (lock) {
if (internals.debug) {
console.log('@supabase/gotrue-js: navigatorLock: not immediately available', name)
console.log('@supabase/gotrue-js: navigatorLock: acquired', name, lock.name)
}
throw new NavigatorLockAcquireTimeoutError(
`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`
)
try {
return await fn()
} finally {
if (internals.debug) {
console.log('@supabase/gotrue-js: navigatorLock: released', name, lock.name)
}
}
} else {
if (internals.debug) {
try {
const result = await globalThis.navigator.locks.query()
if (acquireTimeout === 0) {
if (internals.debug) {
console.log('@supabase/gotrue-js: navigatorLock: not immediately available', name)
}
console.log(
'@supabase/gotrue-js: Navigator LockManager state',
JSON.stringify(result, null, ' ')
)
} catch (e: any) {
console.warn(
'@supabase/gotrue-js: Error when querying Navigator LockManager state',
e
)
throw new NavigatorLockAcquireTimeoutError(
`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`
)
} else {
if (internals.debug) {
try {
const result = await globalThis.navigator.locks.query()
console.log(
'@supabase/gotrue-js: Navigator LockManager state',
JSON.stringify(result, null, ' ')
)
} catch (e: any) {
console.warn(
'@supabase/gotrue-js: Error when querying Navigator LockManager state',
e
)
}
}
}
// Browser is not following the Navigator LockManager spec, it
// returned a null lock when we didn't use ifAvailable. So we can
// pretend the lock is acquired in the name of backward compatibility
// and user experience and just run the function.
console.warn(
'@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request'
)
// Browser is not following the Navigator LockManager spec, it
// returned a null lock when we didn't use ifAvailable. So we can
// pretend the lock is acquired in the name of backward compatibility
// and user experience and just run the function.
console.warn(
'@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request'
)
return await fn()
return await fn()
}
}
}
}
)
)

@@ -145,0 +154,0 @@ }

@@ -1,1 +0,1 @@

export const version = '2.66.1'
export const version = '2.67.0-rc.1'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc