Skip to content
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

chore: bump husky and clean up scripts #257

Merged
merged 5 commits into from
Nov 6, 2024
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
1 change: 1 addition & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// See https://typicode.github.io/husky/how-to.html#ci-server-and-docker
// Skip Husky install in production and CI
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
process.exit(0);
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run lint-staged
lint-staged
14 changes: 8 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"packages/libsql-client",
"packages/libsql-client-wasm"
],
"dependencies": {
"husky": "^9.0.11",
"lint-staged": "^15.2.2"
},
"dependencies": {},
"scripts": {
"prepare": "node .husky/install.mjs",
"build": "npm run build --workspaces",
"typecheck": "npm run typecheck --workspaces",
"format:check": "npm run format:check --workspaces",
"prepare": "node .husky/install.mjs",
"lint-staged": "lint-staged"
},
"devDependencies": {
"lint-staged": "^15.2.2",
"husky": "^9.1.5"
}
}
2 changes: 0 additions & 2 deletions packages/libsql-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"test": "jest --runInBand",
"typecheck": "tsc --noEmit",
"typedoc": "rm -rf ./docs && typedoc",
"prepare": "husky install",
"lint-staged": "lint-staged"
},
"dependencies": {
Expand All @@ -113,7 +112,6 @@
"devDependencies": {
"@types/jest": "^29.2.5",
"@types/node": "^18.15.5",
"husky": "^9.0.11",
"jest": "^29.3.1",
"lint-staged": "^15.2.2",
"msw": "^2.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/libsql-client/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ export class HttpClient implements Client {
): Promise<Array<ResultSet>> {
return this.limit<Array<ResultSet>>(async () => {
try {
const normalizedStmts = stmts.map(stmt => {
const normalizedStmts = stmts.map((stmt) => {
if (Array.isArray(stmt)) {
return {
sql: stmt[0],
args: stmt[1] || []
args: stmt[1] || [],
};
}
return stmt;
Expand Down
4 changes: 2 additions & 2 deletions packages/libsql-client/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ export class WsClient implements Client {
return this.limit<Array<ResultSet>>(async () => {
const streamState = await this.#openStream();
try {
const normalizedStmts = stmts.map(stmt => {
const normalizedStmts = stmts.map((stmt) => {
if (Array.isArray(stmt)) {
return {
sql: stmt[0],
args: stmt[1] || []
args: stmt[1] || [],
};
}
return stmt;
Expand Down
Loading