Skip to content

Commit b8a5f9e

Browse files
committed
style(*): format all
1 parent d2bcb6c commit b8a5f9e

25 files changed

+107
-90
lines changed

.prettierignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Specifies intentionally untracked files to ignore when using Git
2+
# http://git-scm.com/docs/gitignore
3+
4+
# OSX
5+
.DS_STORE
6+
.DS_Store
7+
._*
8+
9+
# Windows
10+
Thumbs.db
11+
Desktop.ini
12+
13+
# Logs
14+
*.log*
15+
16+
# package managers
17+
.yarn/*
18+
#!.yarn/cache
19+
.pnp.*
20+
node_modules
21+
package-lock.json
22+
23+
# Build
24+
dist
25+
build
26+
.tsbuildinfo
27+
*.map
28+
*.d.ts
29+
*.js
30+
!*.config.js
31+
!**/res/*.js
32+
33+
# Output of 'npm pack'
34+
*.tgz
35+
36+
# dotenv environment variables file
37+
.env

.vscode/settings.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,13 @@
2020
"*.njk": "html",
2121
"ssh-config": "ssh_config"
2222
},
23-
"markdownlint.ignore": [
24-
"**/CHANGELOG.md"
25-
],
23+
"markdownlint.ignore": ["**/CHANGELOG.md"],
2624
"cSpell.language": "en,fa,fa-IR",
27-
"cSpell.words": [
28-
"Alwatr",
29-
"Gecut"
30-
],
25+
"cSpell.words": ["Alwatr", "Gecut"],
3126
"typescript.tsdk": ".yarn/sdks/typescript/lib",
3227
"git.autoStash": true,
33-
"git.branchProtection": [
34-
"main",
35-
"next"
36-
],
37-
"githubPullRequests.ignoredPullRequestBranches": [
38-
"main",
39-
"next"
40-
],
28+
"git.branchProtection": ["main", "next"],
29+
"githubPullRequests.ignoredPullRequestBranches": ["main", "next"],
4130
"search.exclude": {
4231
"**/.yarn": true,
4332
"**/.pnp.*": true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"build:r": "lerna run build",
4545
"format": "run-s format:prettier format:eslint",
4646
"format:eslint": "yarn run lint:ts --fix",
47-
"format:prettier": "prettier . --ignore-path .gitignore --write",
47+
"format:prettier": "prettier . --ignore-path .prettierignore --write",
4848
"clean": "git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn",
4949
"serve": "wds",
5050
"watch": "run-p 'watch:*' serve",

packages/logger/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1515

1616
### Bug Fixes
1717

18-
* **logger:** dev mode ([2be55ca](https://github.com/gecut/hybrid-core/commit/2be55ca11d35009eb7a1c7e4cd11bc64428639a2)) by @MM25Zamanian
18+
- **logger:** dev mode ([2be55ca](https://github.com/gecut/hybrid-core/commit/2be55ca11d35009eb7a1c7e4cd11bc64428639a2)) by @MM25Zamanian
1919

2020
## [1.3.1-alpha.0](https://github.com/gecut/hybrid-core/compare/@gecut/[email protected]...@gecut/[email protected]) (2024-03-06)
2121

@@ -25,4 +25,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2525

2626
### Features
2727

28-
* **logger:** new package ([04010de](https://github.com/gecut/hybrid-core/commit/04010de36f5e144d10d3f08b7c43a385c283087d)) by @MM25Zamanian
28+
- **logger:** new package ([04010de](https://github.com/gecut/hybrid-core/commit/04010de36f5e144d10d3f08b7c43a385c283087d)) by @MM25Zamanian

packages/logger/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ npm install @gecut/logger
2424
Getting started with Gecut Logger is straightforward:
2525

2626
```ts
27-
import { GecutLogger } from '@gecut/logger';
27+
import {GecutLogger} from '@gecut/logger';
2828

2929
const logger = new GecutLogger('MyApp');
3030

3131
// Log an error with a method and description
3232
logger.error('init', 'INIT_FAIL', 'Initialization failed due to an unknown error');
3333

3434
// Warn with additional arguments
35-
logger.warning('loadData', 'INVALID_RESPONSE', 'Data response is invalid', { userId: 1 });
35+
logger.warning('loadData', 'INVALID_RESPONSE', 'Data response is invalid', {userId: 1});
3636

3737
// Begin a timed operation (development mode only)
3838
logger.time?.('fetchData');
@@ -47,7 +47,7 @@ logger.timeEnd?.('fetchData');
4747
const logger = new GecutLogger('UIComponent');
4848

4949
// Trace a method call and its arguments
50-
logger.methodArgs?.('render', { items: 5 });
50+
logger.methodArgs?.('render', {items: 5});
5151

5252
// Log a property change
5353
logger.property?.('isVisible', true);

packages/signal/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1919

2020
### Bug Fixes
2121

22-
* **signal:** exports path ([55dc9c0](https://github.com/gecut/hybrid-core/commit/55dc9c081cd266958c5e60aed84278c8024064ed)) by @MM25Zamanian
22+
- **signal:** exports path ([55dc9c0](https://github.com/gecut/hybrid-core/commit/55dc9c081cd266958c5e60aed84278c8024064ed)) by @MM25Zamanian
2323

2424
# 2.0.0 (2024-03-04)
2525

2626
### Features
2727

28-
* **signal:** new package ([e985df1](https://github.com/gecut/hybrid-core/commit/e985df19c9736b7a9f404ba63c88ba941df7c01b)) by @MM25Zamanian
28+
- **signal:** new package ([e985df1](https://github.com/gecut/hybrid-core/commit/e985df19c9736b7a9f404ba63c88ba941df7c01b)) by @MM25Zamanian

packages/signal/src/libraries/context.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Signal } from './_signal.js';
1+
import {Signal} from './_signal.js';
22

33
export class ContextSignal<T> extends Signal<T> {
44
constructor(name: string) {
@@ -16,14 +16,22 @@ export class ContextSignal<T> extends Signal<T> {
1616
return this.value;
1717
}
1818

19+
async requireValue(): Promise<T> {
20+
const value = this.value ?? (await this.__$untilNewNotify());
21+
22+
this.log.methodFull?.('requireValue', {}, value);
23+
24+
return value;
25+
}
26+
1927
/**
2028
* The function sets a value and notifies any subscribers.
2129
* @param {T} value - The parameter "value" is of type T, which means it can be any type.
2230
*/
2331
setValue(value: T): void {
24-
this.log.methodArgs?.('setValue', { value });
32+
this.log.methodArgs?.('setValue', {value});
2533

26-
super.__$notify(value);
34+
this.__$notify(value);
2735
}
2836

2937
/**
@@ -43,7 +51,7 @@ export class ContextSignal<T> extends Signal<T> {
4351
untilChange(): Promise<T> {
4452
this.log.method?.('untilChange');
4553

46-
return super.__$untilNewNotify();
54+
return this.__$untilNewNotify();
4755
}
4856

4957
renotify() {

packages/signal/src/libraries/simple-signal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Signal } from './_signal.js';
1+
import {Signal} from './_signal.js';
22

33
export class SimpleSignal<T> extends Signal<T> {
44
constructor(name: string) {
@@ -10,7 +10,7 @@ export class SimpleSignal<T> extends Signal<T> {
1010
* @param {T} newValue - The new value to notify the subscribers with.
1111
*/
1212
notify(newValue: T): void {
13-
this.log.methodArgs?.('notify', { newValue });
13+
this.log.methodArgs?.('notify', {newValue});
1414

1515
this.__$notify(newValue);
1616
}

packages/types/CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1111

1212
### Bug Fixes
1313

14-
* **types:** exports path ([4c10dc8](https://github.com/gecut/hybrid-core/commit/4c10dc82b8336b2663c604e55ca90b497ebef6be)) by @MM25Zamanian
14+
- **types:** exports path ([4c10dc8](https://github.com/gecut/hybrid-core/commit/4c10dc82b8336b2663c604e55ca90b497ebef6be)) by @MM25Zamanian
1515

1616
# [2.1.0](https://github.com/gecut/hybrid-core/compare/@gecut/[email protected]...@gecut/[email protected]) (2024-03-03)
1717

1818
### Bug Fixes
1919

20-
* **types:** exports path ([b39395c](https://github.com/gecut/hybrid-core/commit/b39395c135988054d4a3559081605ea391a283d1)) by @MM25Zamanian
20+
- **types:** exports path ([b39395c](https://github.com/gecut/hybrid-core/commit/b39395c135988054d4a3559081605ea391a283d1)) by @MM25Zamanian
2121

2222
# [2.0.0](https://github.com/gecut/hybrid-core/compare/@gecut/[email protected]...@gecut/[email protected]) (2024-03-03)
2323

2424
### Features
2525

26-
* **types/lit:** `RenderResult` ([4351151](https://github.com/gecut/hybrid-core/commit/435115162b3b3f2707a1e4d4bb66a1bfd3f3042c)) by @MM25Zamanian
26+
- **types/lit:** `RenderResult` ([4351151](https://github.com/gecut/hybrid-core/commit/435115162b3b3f2707a1e4d4bb66a1bfd3f3042c)) by @MM25Zamanian
2727

2828
# 1.1.0 (2024-03-03)
2929

3030
### Bug Fixes
3131

32-
* **types:** eslint issues ([94b5425](https://github.com/gecut/hybrid-core/commit/94b5425854a19570b18205689305accb947bdd1d)) by @MM25Zamanian
32+
- **types:** eslint issues ([94b5425](https://github.com/gecut/hybrid-core/commit/94b5425854a19570b18205689305accb947bdd1d)) by @MM25Zamanian
3333

3434
### Features
3535

36-
* **types:** create new package ([2a410f0](https://github.com/gecut/hybrid-core/commit/2a410f00280e75c4a4eb530d0424d3278f9d024b)) by @MM25Zamanian
36+
- **types:** create new package ([2a410f0](https://github.com/gecut/hybrid-core/commit/2a410f00280e75c4a4eb530d0424d3278f9d024b)) by @MM25Zamanian

packages/types/src/lit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SingleOrArray } from './type-helper.js';
2-
import type { TemplateResult, noChange, nothing } from 'lit';
1+
import type {SingleOrArray} from './type-helper.js';
2+
import type {TemplateResult, noChange, nothing} from 'lit';
33

44
export type RenderResult = SingleOrArray<TemplateResult> | typeof nothing | typeof noChange | unknown;

0 commit comments

Comments
 (0)