Skip to content

Commit 32ca87e

Browse files
authored
Merge pull request #47 from clerkinc/publishing_chores
chore(repo): Add postpublish purge-cache script, eslint env addition,…
2 parents e6733a6 + fef472f commit 32ca87e

File tree

11 files changed

+227
-14
lines changed

11 files changed

+227
-14
lines changed

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
4+
env: {
5+
node: true,
6+
browser: true,
7+
},
48
parserOptions: {
59
tsconfigRootDir: __dirname,
610
project: ['./tsconfig.json', './packages/*/tsconfig.json'],

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ Thumbs.db
4747
!.yarn/sdks
4848
!.yarn/versions
4949

50-
.turbo
50+
.turbo
51+
52+
lerna-debug.log

package-lock.json

Lines changed: 168 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"version": "0.0.0",
99
"license": "MIT",
1010
"private": true,
11-
"packageManager": "npm@8.4.1",
11+
"packageManager": "npm@8.5.0",
1212
"engines": {
1313
"node": ">=16.8.0",
14-
"npm": ">=8"
14+
"npm": ">=8.5.0"
1515
},
1616
"devDependencies": {
1717
"@commitlint/cli": "^16.0.2",
@@ -39,7 +39,7 @@
3939
"bump:staging": "lerna version prepatch --preid staging",
4040
"graduate": "lerna version --conventional-graduate",
4141
"release:staging": "lerna publish from-package --dist-tag staging",
42-
"release": "lerna publish from-git",
42+
"release": "lerna publish from-package",
4343
"prerelease": "turbo run build test --concurrency=${TURBO_CONCURRENCY:-2}",
4444
"release:next": "lerna publish from-package --dist-tag next",
4545
"prerelease:next": "turbo run build --concurrency=${TURBO_CONCURRENCY:-2}",

packages/backend-core/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Clerk Backend Core SDK
99

10-
_Core Clerk API resources and authentication utilities for JavaScript environments._
10+
_Clerk Backend API core resources and authentication utilities for JavaScript environments._
1111

1212
```diff
1313
! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.
@@ -62,7 +62,7 @@ const verifySignature = async (
6262
algorithm: Algorithm,
6363
key: CryptoKey,
6464
signature: Uint8Array,
65-
data: Uint8Array
65+
data: Uint8Array,
6666
) => {
6767
// ...
6868
};
@@ -87,12 +87,13 @@ examplePlatformBase.getAuthState(...);
8787
The `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.
8888

8989
### Validate the Authorized Party of a session token
90+
9091
Clerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:
9192

9293
```ts
93-
const authorizedParties = ['http://localhost:3000', 'https://example.com']
94+
const authorizedParties = ['http://localhost:3000', 'https://example.com'];
9495

95-
examplePlatformBase.verifySessionToken(token> { authorizedParties });
96+
examplePlatformBase.verifySessionToken(token > { authorizedParties });
9697
```
9798

9899
### Clerk API Resources

packages/backend-core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@clerk/backend-core",
33
"version": "0.4.3",
44
"license": "MIT",
5+
"description": "Clerk Backend API core resources and authentication utilities for JavaScript environments.",
56
"scripts": {
67
"build": "tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix",
78
"test": "jest"
@@ -38,4 +39,4 @@
3839
"url": "https://github.com/clerkinc/javascript/issues"
3940
},
4041
"homepage": "https://clerk.dev/"
41-
}
42+
}

packages/clerk-js/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"check-types": "tsc",
3333
"dev": "webpack-dev-server --config webpack.dev.js",
3434
"prepublishOnly": "npm run test && npm run build",
35+
"postpublish": "node ./scripts/purge-cache.mjs",
3536
"start": "echo \"Noop\"",
3637
"test": "jest",
3738
"test:coverage": "jest --collectCoverage"
@@ -86,13 +87,15 @@
8687
"identity-obj-proxy": "^3.0.0",
8788
"jest": "^27.4.7",
8889
"jsonwebtoken": "^8.5.1",
90+
"node-fetch": "^3.2.0",
8991
"postcss": "^8.1.4",
9092
"postcss-loader": "^4.0.4",
9193
"postcss-prefixer": "^2.1.2",
9294
"querystring-es3": "^0.2.1",
9395
"react-refresh": "^0.10.0",
9496
"sass": "^1.28.0",
9597
"sass-loader": "^10.0.5",
98+
"semver": "^7.3.5",
9699
"style-loader": "^2.0.0",
97100
"ts-jest": "^27.1.3",
98101
"type-fest": "^0.20.2",
@@ -123,4 +126,4 @@
123126
"url": "https://github.com/clerkinc/javascript/issues"
124127
},
125128
"homepage": "https://clerk.dev/"
126-
}
129+
}

0 commit comments

Comments
 (0)