Skip to content

Version Packages (alpha-v5) #2308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"@clerk/types": "3.57.0"
},
"changesets": [
"afraid-nails-play",
"angry-clocks-attend",
"blue-garlics-remain",
"blue-ghosts-float",
"blue-grapes-marry",
Expand All @@ -27,7 +29,10 @@
"bright-knives-jump",
"bright-plants-swim",
"bright-trainers-sort",
"bright-ways-provide",
"brown-clouds-divide",
"brown-ducks-reply",
"chatty-beans-fix",
"chatty-berries-jump",
"chatty-boats-tease",
"chilly-donuts-work",
Expand All @@ -45,7 +50,9 @@
"curvy-mails-rhyme",
"curvy-timers-play",
"cyan-dodos-provide",
"cyan-rockets-fail",
"cyan-stingrays-own",
"dirty-icons-rescue",
"dirty-panthers-begin",
"dry-feet-join",
"dry-sheep-poke",
Expand All @@ -55,11 +62,13 @@
"early-forks-argue",
"early-timers-wave",
"early-tomatoes-hide",
"eight-badgers-speak",
"eleven-bananas-joke",
"empty-jars-press",
"fair-cameras-boil",
"famous-carrots-notice",
"famous-forks-buy",
"famous-spies-clean",
"fast-ads-mix",
"fast-games-hide",
"fast-swans-smile",
Expand All @@ -71,11 +80,14 @@
"flat-pots-hear",
"fluffy-chicken-explain",
"friendly-months-film",
"friendly-parrots-nail",
"friendly-tables-chew",
"friendly-vans-develop",
"funny-gifts-cough",
"funny-lamps-work",
"fuzzy-horses-fix",
"fuzzy-years-taste",
"gentle-donkeys-talk",
"gentle-pants-matter",
"gold-fireants-sort",
"gold-islands-cover",
Expand All @@ -84,10 +96,12 @@
"grumpy-suns-boil",
"heavy-falcons-help",
"heavy-horses-nail",
"hip-eagles-clap",
"honest-onions-work",
"hungry-bears-allow",
"hungry-bikes-clean",
"hungry-news-bathe",
"itchy-chairs-argue",
"khaki-buttons-march",
"khaki-spoons-teach",
"khaki-timers-work",
Expand All @@ -102,51 +116,65 @@
"little-dolphins-scream",
"little-numbers-jam",
"long-beds-mate",
"long-dancers-whisper",
"long-icons-share",
"loud-countries-hang",
"loud-lions-compete",
"loud-panthers-poke",
"lovely-jobs-arrive",
"lovely-mirrors-remember",
"lovely-plums-sin",
"lovely-spies-kiss",
"lucky-ligers-brush",
"many-dragons-carry",
"many-flowers-heal",
"many-weeks-march",
"mean-houses-juggle",
"mean-poets-bow",
"metal-baboons-vanish",
"metal-cougars-fail",
"metal-ears-cheat",
"metal-olives-press",
"mighty-bulldogs-try",
"mighty-melons-greet",
"mighty-pugs-knock",
"moody-radios-begin",
"moody-trainers-bow",
"moody-zoos-deliver",
"nasty-books-tap",
"neat-lies-thank",
"neat-numbers-decide",
"new-cougars-taste",
"new-eels-mix",
"new-points-train",
"new-points-turn",
"nice-dingos-argue",
"nice-doors-fail",
"nice-starfishes-itch",
"nine-beans-travel",
"odd-lemons-reply",
"odd-toes-develop",
"old-actors-beg",
"old-ads-push",
"old-timers-obey",
"olive-steaks-end",
"orange-pumpkins-poke",
"pink-days-drum",
"polite-kiwis-arrive",
"poor-horses-press",
"poor-kings-marry",
"popular-parents-hope",
"popular-singers-sort",
"pretty-mice-share",
"pretty-months-greet",
"pretty-scissors-thank",
"pretty-singers-change",
"proud-hairs-check",
"purple-pumas-study",
"purple-rules-prove",
"quick-countries-scream",
"quick-trains-rush",
"quiet-cougars-watch",
"rare-bottles-sell",
"rare-students-sell",
"real-cougars-design",
Expand All @@ -156,57 +184,80 @@
"red-shrimps-hunt",
"red-worms-fetch",
"rich-actors-cross",
"rich-readers-obey",
"rotten-ways-do",
"rude-jobs-yawn",
"rude-lamps-yawn",
"selfish-eggs-sort",
"selfish-trains-breathe",
"shaggy-points-cheer",
"shaggy-pumpkins-tap",
"sharp-trains-ring",
"shiny-glasses-switch",
"shiny-pumas-share",
"short-eagles-search",
"short-kings-mate",
"shy-bikes-draw",
"silent-comics-roll",
"silly-emus-boil",
"silly-icons-kick",
"silly-poems-tease",
"silver-cats-appear",
"six-kangaroos-serve",
"sixty-frogs-pump",
"slimy-brooms-smoke",
"slimy-singers-glow",
"slimy-windows-grab",
"slimy-wolves-burn",
"slow-bugs-exist",
"slow-eels-fly",
"slow-wombats-battle",
"small-cats-check",
"smart-suns-train",
"smooth-baboons-shake",
"smooth-pets-rhyme",
"soft-birds-thank",
"soft-fireants-jog",
"soft-swans-swim",
"sour-avocados-sin",
"sour-comics-stare",
"spicy-feet-buy",
"spotty-apples-march",
"spotty-boxes-do",
"spotty-roses-push",
"strong-cows-sit",
"stupid-suits-accept",
"stupid-toys-remain",
"sweet-pumas-press",
"swift-rocks-nail",
"tall-roses-invent",
"tame-olives-check",
"tasty-countries-walk",
"tasty-phones-lie",
"ten-mugs-film",
"ten-nails-whisper",
"thin-phones-drop",
"thirty-chicken-divide",
"thirty-doors-peel",
"thirty-insects-exist",
"tiny-forks-sit",
"tough-pots-grow",
"tough-roses-hunt",
"tricky-swans-develop",
"twenty-elephants-try",
"two-pumas-doubt",
"two-terms-speak",
"violet-birds-scream",
"weak-elephants-grin",
"wicked-spoons-confess",
"wild-phones-smoke",
"wise-houses-shop",
"wise-lions-type",
"witty-forks-cheer",
"yellow-elephants-begin",
"yellow-tigers-know",
"young-experts-attack",
"young-frogs-enjoy"
"young-frogs-enjoy",
"young-items-explode"
]
}
48 changes: 48 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Change Log

## 1.0.0-alpha-v5.8

### Major Changes

- Remove the named `Clerk` import from `@clerk/backend` and import `createClerkClient` instead. The latter is a factory method that will create a Clerk client instance for you. This aligns usage across our SDKs and will enable us to better ship DX improvements in the future. ([#2317](https://github.com/clerk/javascript/pull/2317)) by [@tmilewski](https://github.com/tmilewski)

Inside your code, search for occurrences like these:

```js
import { Clerk } from '@clerk/backend';
const clerk = Clerk({ secretKey: '...' });
```

You need to rename the import from `Clerk` to `createClerkClient` and change its usage:

```js
import { createClerkClient } from '@clerk/backend';
const clerk = createClerkClient({ secretKey: '...' });
```

- - Refactor the `authenticateRequest()` flow to use the new client handshake endpoint. This replaces the previous "interstitial"-based flow. This should improve performance and overall reliability of Clerk's server-side request authentication functionality. ([#2300](https://github.com/clerk/javascript/pull/2300)) by [@BRKalow](https://github.com/BRKalow)

- `authenticateRequest()` now accepts two arguments, a `Request` object to authenticate and options:
```ts
authenticateRequest(new Request(...), { secretKey: '...' })
```

### Minor Changes

- Introduce Protect for authorization. ([#2170](https://github.com/clerk/javascript/pull/2170)) by [@panteliselef](https://github.com/panteliselef)

Changes in public APIs:

- Rename Gate to Protect
- Support for permission checks. (Previously only roles could be used)
- Remove the `experimental` tags and prefixes
- Drop `some` from the `has` utility and Protect. Protect now accepts a `condition` prop where a function is expected with the `has` being exposed as the param.
- Protect can now be used without required props. In this case behaves as `<SignedIn>`, if no authorization props are passed.
- `has` will throw an error if neither `permission` or `role` is passed.
- `auth().protect()` for Nextjs App Router. Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.
- inside a page or layout file it will render the nearest `not-found` component set by the developer
- inside a route handler it will return empty response body with a 404 status code

### Patch Changes

- Updated dependencies [[`896cb6104`](https://github.com/clerk/javascript/commit/896cb610409f84c0ff7a4f502f0b4ccee1afc157), [`75ea300bc`](https://github.com/clerk/javascript/commit/75ea300bce16a0ce401a225263bb267ad2a217b8)]:
- @clerk/[email protected]

## 1.0.0-alpha-v5.7

### Major Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/backend",
"version": "1.0.0-alpha-v5.7",
"version": "1.0.0-alpha-v5.8",
"description": "Clerk Backend SDK - REST Client for Backend API & JWT verification utilities",
"homepage": "https://clerk.com/",
"bugs": {
Expand Down Expand Up @@ -48,13 +48,13 @@
"test:cloudflare-workerd": "tests/cloudflare-workerd/run.sh"
},
"dependencies": {
"@clerk/shared": "2.0.0-alpha-v5.5",
"@clerk/shared": "2.0.0-alpha-v5.6",
"cookie": "0.5.0",
"snakecase-keys": "5.4.4",
"tslib": "2.4.1"
},
"devDependencies": {
"@clerk/types": "4.0.0-alpha-v5.9",
"@clerk/types": "4.0.0-alpha-v5.10",
"@cloudflare/workers-types": "^3.18.0",
"@types/chai": "^4.3.3",
"@types/cookie": "^0.5.1",
Expand Down
Loading