File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18- npm exec -- biome check --staged --no-errors-on-unmatched
18+ npx --no -- biome check --staged --no-errors-on-unmatched
1919node scripts/asf-license-headers.mjs check-staged
2020node scripts/protocol-epoch-check.mjs --staged
2121git diff --cached --check
Original file line number Diff line number Diff line change 2626 " apps/desktop"
2727 ],
2828 "scripts" : {
29- "prepare" : " husky" ,
29+ "prepare" : " node scripts/install- husky.mjs " ,
3030 "postinstall" : " node scripts/apply-dependency-patches.mjs && node scripts/install-electron-with-retry.mjs" ,
3131 "lint" : " biome lint ." ,
3232 "format" : " biome format --write ." ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ /*
3+ * Licensed to the Apache Software Foundation (ASF) under one
4+ * or more contributor license agreements. See the NOTICE file
5+ * distributed with this work for additional information
6+ * regarding copyright ownership. The ASF licenses this file
7+ * to you under the Apache License, Version 2.0 (the
8+ * "License"); you may not use this file except in compliance
9+ * with the License. You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing,
14+ * software distributed under the License is distributed on an
15+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+ * KIND, either express or implied. See the License for the
17+ * specific language governing permissions and limitations
18+ * under the License.
19+ */
20+
21+ try {
22+ const install = ( await import ( 'husky' ) ) . default ;
23+ process . stdout . write ( install ( ) ) ;
24+ } catch ( error ) {
25+ if (
26+ error instanceof Error &&
27+ 'code' in error &&
28+ error . code === 'ERR_MODULE_NOT_FOUND' &&
29+ error . message . includes ( "package 'husky'" )
30+ ) {
31+ console . warn ( 'husky is not installed; skipping Git hook setup.' ) ;
32+ } else {
33+ throw error ;
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments