-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
578 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { execSync } from 'child_process' | ||
import fs from 'fs' | ||
import * as process from 'process' | ||
;(() => { | ||
const [tag] = process.argv.slice(2) | ||
if (!tag) { | ||
console.error(`Expected a tag as an argument`) | ||
process.exit(1) | ||
} | ||
|
||
let packageName = '' | ||
if (tag.endsWith('-browser')) { | ||
packageName = 'client-browser' | ||
} else if (tag.endsWith('-node')) { | ||
packageName = 'client-node' | ||
} else if (tag.endsWith('-common')) { | ||
packageName = 'client-common' | ||
} else { | ||
console.error(`Provided tag ${tag} does not match any packages`) | ||
process.exit(1) | ||
} | ||
|
||
fs.copyFileSync(`./packages/${packageName}/package.json`, './package.json') | ||
|
||
const packageJson = require('../package.json') | ||
const version = require(`../packages/${packageName}/src/version.ts`).default | ||
console.log(`Current ${packageName} package version is: ${version}`) | ||
packageJson.version = version | ||
|
||
if (packageJson['dependencies']['@clickhouse/client-common']) { | ||
const commonVersion = | ||
require(`../packages/client-common/src/version.ts`).default | ||
console.log(`Updating client-common dependency to ${commonVersion}`) | ||
packageJson['dependencies']['@clickhouse/client-common'] = commonVersion | ||
} | ||
|
||
console.log('Updated package json:') | ||
console.log(packageJson) | ||
|
||
try { | ||
execSync(`./.scripts/build.sh ${packageName}`, { cwd: process.cwd() }) | ||
} catch (err) { | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
|
||
try { | ||
fs.writeFileSync( | ||
'./package.json', | ||
JSON.stringify(packageJson, null, 2) + '\n', | ||
'utf-8' | ||
) | ||
} catch (err) { | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
process.exit(0) | ||
})() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ benchmarks/leaks/input | |
*.tgz | ||
.npmrc | ||
webpack | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
rm -rf out dist | ||
tsc | ||
mkdir -p dist | ||
mv out/$1/src/* dist/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
{ | ||
"name": "@clickhouse/client-browser", | ||
"description": "Official JS client for ClickHouse DB - browser implementation", | ||
"homepage": "https://clickhouse.com", | ||
"version": "0.0.0", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
"clickhouse", | ||
"sql", | ||
"client" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ClickHouse/clickhouse-js.git" | ||
}, | ||
"private": false, | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"@clickhouse/client-common": "*", | ||
"uuid": "^9.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/uuid": "^9.0.2" | ||
"@clickhouse/client-common": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.