Skip to content

Commit

Permalink
update supabase js (#327)
Browse files Browse the repository at this point in the history
* update supabase-js

* Switch to refreshSession

* remove auth-helpers-shared dependency in react package

* add missing supabase-js peerDependency
  • Loading branch information
david-plugge authored Oct 25, 2022
1 parent acb03f1 commit 2fda843
Show file tree
Hide file tree
Showing 13 changed files with 1,303 additions and 3,540 deletions.
7 changes: 7 additions & 0 deletions .changeset/light-eggs-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@supabase/auth-helpers-nextjs': patch
'@supabase/auth-helpers-react': patch
'@supabase/auth-helpers-shared': patch
---

add missing supabase-js peerDependency
5 changes: 5 additions & 0 deletions .changeset/quick-pugs-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@supabase/auth-helpers-sveltekit': patch
---

Switch to refreshSession
5 changes: 5 additions & 0 deletions .changeset/quiet-toys-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@supabase/auth-helpers-react': patch
---

remove auth-helpers-shared dependency in react package
8 changes: 8 additions & 0 deletions .changeset/tender-flowers-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@supabase/auth-helpers-nextjs': patch
'@supabase/auth-helpers-react': patch
'@supabase/auth-helpers-shared': patch
'@supabase/auth-helpers-sveltekit': patch
---

update supabase-js
6 changes: 3 additions & 3 deletions examples/sveltekit-email-password/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"clean:all": "rimraf .svelte-kit node_modules"
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "1.0.0-next.504",
"@sveltejs/adapter-auto": "1.0.0-next.84",
"@sveltejs/kit": "1.0.0-next.522",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"eslint": "^7.32.0",
Expand All @@ -34,6 +34,6 @@
"type": "module",
"dependencies": {
"@supabase/auth-helpers-sveltekit": "workspace:*",
"@supabase/supabase-js": "2.0.0"
"@supabase/supabase-js": "2.0.4"
}
}
6 changes: 3 additions & 3 deletions examples/sveltekit-magic-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"clean:all": "rimraf .svelte-kit node_modules"
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "1.0.0-next.504",
"@sveltejs/adapter-auto": "1.0.0-next.84",
"@sveltejs/kit": "1.0.0-next.522",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"eslint": "^7.32.0",
Expand All @@ -34,6 +34,6 @@
"type": "module",
"dependencies": {
"@supabase/auth-helpers-sveltekit": "workspace:*",
"@supabase/supabase-js": "2.0.0"
"@supabase/supabase-js": "2.0.4"
}
}
6 changes: 3 additions & 3 deletions examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"clean:all": "rimraf .svelte-kit node_modules"
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "1.0.0-next.504",
"@sveltejs/adapter-auto": "1.0.0-next.84",
"@sveltejs/kit": "1.0.0-next.522",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"eslint": "^7.32.0",
Expand All @@ -34,6 +34,6 @@
"type": "module",
"dependencies": {
"@supabase/auth-helpers-sveltekit": "workspace:*",
"@supabase/supabase-js": "2.0.0"
"@supabase/supabase-js": "2.0.4"
}
}
5 changes: 4 additions & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/supabase/auth-helpers/tree/main/packages/nextjs#readme",
"devDependencies": {
"@supabase/supabase-js": "2.0.0",
"@supabase/supabase-js": "2.0.4",
"config": "workspace:*",
"next": "^12.2.5",
"react": "^18.0.0",
Expand All @@ -41,5 +41,8 @@
},
"dependencies": {
"@supabase/auth-helpers-shared": "workspace:*"
},
"peerDependencies": {
"@supabase/supabase-js": "^2.0.4"
}
}
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"author": "Supabase",
"license": "MIT",
"devDependencies": {
"@supabase/supabase-js": "2.0.0",
"@supabase/supabase-js": "2.0.4",
"@types/react": "^17.0.20",
"@types/react-dom": "^17.0.9",
"config": "workspace:*",
Expand All @@ -34,7 +34,7 @@
"tsup": "^5.12.5",
"typescript": "^4.5.3"
},
"dependencies": {
"@supabase/auth-helpers-shared": "workspace:*"
"peerDependencies": {
"@supabase/supabase-js": "^2.0.4"
}
}
5 changes: 4 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@
},
"homepage": "https://github.com/supabase/auth-helpers#readme",
"devDependencies": {
"@supabase/supabase-js": "2.0.0",
"@supabase/supabase-js": "2.0.4",
"@types/cookie": "^0.5.1",
"next": "^12.1.5",
"react": ">=17.0.2 <18.0.0 || >=18.0.0-0 <19.0.0",
"react-dom": "^17.0.2 || ^18.0.0-0",
"tsconfig": "workspace:*",
"tsup": "^5.12.5",
"cookie": "^0.5.0"
},
"peerDependencies": {
"@supabase/supabase-js": "^2.0.4"
}
}
6 changes: 3 additions & 3 deletions packages/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
},
"homepage": "https://github.com/supabase/auth-helpers/tree/main/packages/sveltekit#readme",
"devDependencies": {
"@supabase/supabase-js": "2.0.0",
"@sveltejs/kit": "1.0.0-next.504",
"@supabase/supabase-js": "2.0.4",
"@sveltejs/kit": "1.0.0-next.522",
"@sveltejs/package": "1.0.0-next.5",
"del-cli": "^5.0.0",
"fix-esm-import-path": "^1.3.1",
Expand All @@ -56,6 +56,6 @@
"@supabase/auth-helpers-shared": "workspace:*"
},
"peerDependencies": {
"@supabase/supabase-js": "2.0.0"
"@supabase/supabase-js": "^2.0.4"
}
}
2 changes: 1 addition & 1 deletion packages/sveltekit/src/utils/getServerSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function getServerSession(
session?.expires_at &&
session.expires_at + expiry_margin <= Date.now() / 1000
) {
const refreshed = await supabase.auth.setSession(session);
const refreshed = await supabase.auth.refreshSession(session);

session = refreshed.data.session;
}
Expand Down
Loading

0 comments on commit 2fda843

Please sign in to comment.