Skip to content

Commit

Permalink
Merge pull request #257 from alcpereira/chore/husky
Browse files Browse the repository at this point in the history
chore: bump husky and clean up scripts
  • Loading branch information
penberg authored Nov 6, 2024
2 parents 1e309a1 + 9331a43 commit 494c03c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
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

0 comments on commit 494c03c

Please # to comment.