Skip to content

Commit

Permalink
fix: adds x-client-info header
Browse files Browse the repository at this point in the history
  • Loading branch information
awalias committed Aug 20, 2021
1 parent bbe9a55 commit 9355012
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"plugins": [
[
"semantic-release-plugin-update-version-in-files",
{
"files": [
"src/lib/version.ts",
"dist/main/lib/version.js",
"dist/main/lib/version.d.ts",
"dist/module/lib/version.js",
"dist/module/lib/version.d.ts"
],
"placeholder": "0.0.0"
}
],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"clean": "rimraf dist docs",
"format": "prettier --write \"{src,test}/**/*.ts\"",
"build": "run-s clean format build:*",
"build": "genversion src/lib/version.ts --es6 && run-s clean format build:*",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"build:umd": "webpack",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// constants.ts

export const DEFAULT_HEADERS = {}
const { version } = require('./version')
export const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js/${version}` }
2 changes: 2 additions & 0 deletions src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// generated by genversion
export const version = '1.0.0'

0 comments on commit 9355012

Please sign in to comment.