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

Fx Rewrite #24

Merged
merged 58 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
0cf5174
WIP: begin working on a final encoding of Fx again
TylorS Dec 7, 2023
1f4e77e
feat: simplify Fx
TylorS Dec 12, 2023
82de7ff
WIP: start of RefSubject
TylorS Dec 12, 2023
a7f5538
WIP: more work on v3 Fx implementation
TylorS Dec 13, 2023
9105a05
WIP: more v3 refactorings
TylorS Dec 13, 2023
be32323
refactor: utilize matchers everywhere
TylorS Dec 13, 2023
2f97cce
WIP: Effect-based operators
TylorS Dec 13, 2023
6251c0c
WIP: Pipeable, Scope for Subjects, filter-map-loop fusion tests
TylorS Dec 14, 2023
fe5c42f
WIP: higher-order operators
TylorS Dec 14, 2023
45e376d
WIP: more v3 work
TylorS Dec 15, 2023
630eef5
perf: optimize forking
TylorS Dec 16, 2023
d6275fb
WIP: allow providing attr/property objects to templates
TylorS Dec 17, 2023
ad62d02
WIP: much more v3 progress
TylorS Dec 18, 2023
451bc26
feat: dual Fx.periodic
TylorS Dec 18, 2023
ed03cd4
feat: RefSubject.tuple
TylorS Dec 18, 2023
3e6374f
WIP: keyed implementation
TylorS Dec 20, 2023
3da506e
fix: ensure switchMap cleans up localized resources during interrupt
TylorS Dec 21, 2023
e4bbc1a
feat: add missing operators to v3 port
TylorS Dec 22, 2023
943ee07
fix: use scope to interrupt subject
TylorS Dec 22, 2023
6ee53da
feat: add tagged variants of Sink
TylorS Dec 22, 2023
b01189e
feat: add dual APIs to push
TylorS Dec 22, 2023
b6e4b4b
feat: dualize Push/Sink operators
TylorS Dec 22, 2023
b411780
feat: RefSubject + AsyncData improvements
TylorS Dec 22, 2023
22834a7
feat: more AsyncData operators
TylorS Dec 22, 2023
c0a5390
feat: skip noData event
TylorS Dec 22, 2023
57e37a5
fix: fix symbols in packages
TylorS Dec 22, 2023
7ecbf79
fix: fix esm builds
TylorS Dec 22, 2023
c785591
feat: v3 Fx rewrite with better scope management
TylorS Dec 23, 2023
14f3864
chore: fix pr branch
TylorS Dec 23, 2023
606f5ec
feat: update navigation to fx v3
TylorS Dec 23, 2023
8696d16
feat: update router to fx v3
TylorS Dec 23, 2023
4e85f10
chore: update everything to fx v3
TylorS Dec 26, 2023
53e6b8d
feat: add liftPredicate
TylorS Dec 26, 2023
adb8b9a
fix: default to replace
TylorS Dec 26, 2023
894e84c
feat: make ValueMatcher an Fx
TylorS Dec 26, 2023
44722da
chore: get rid of extra logs
TylorS Dec 26, 2023
92e7c92
WIP: more Fx + router improvements
TylorS Dec 28, 2023
8d42dc4
fix: ensure sending an event is unblocked
TylorS Dec 28, 2023
ead2d8d
chore: remove useless log
TylorS Dec 28, 2023
8596eb7
chore: stop browser testing for the moment
TylorS Dec 28, 2023
5ef3501
chore: refactor Effect import and continue improving SSR
TylorS Dec 29, 2023
429a084
fix: remove excess space
TylorS Dec 30, 2023
648ae09
feat: add some support for doc type elements in templates
TylorS Dec 30, 2023
46ab15b
test: add test for doctypes
TylorS Dec 30, 2023
9e17621
feat: use RAF to schedule DOM updates
TylorS Dec 30, 2023
fe33060
feat: delete Tokenizer + Old Parser, start Compiler
TylorS Dec 30, 2023
68e71dc
chore: update deps
TylorS Jan 4, 2024
6402dbb
WIP: factory functions for creating TS AST
TylorS Jan 5, 2024
adfcf3f
chore: remove old tests
TylorS Jan 5, 2024
58d0de9
WIP: eliminate Effect where possible from Template rendering
TylorS Jan 9, 2024
4579b6c
chore: add some code comments, delete unused code
TylorS Jan 9, 2024
348aa0c
fix: ensure sync RefSubject still works
TylorS Jan 10, 2024
2c80cfc
docs: get the docs building again
TylorS Jan 10, 2024
18b1826
chore: update deps
TylorS Jan 10, 2024
3ca0eb4
fix: update to latest deps
TylorS Jan 10, 2024
34bc322
chore: upgrade navigation to latest Schema
TylorS Jan 10, 2024
4e50094
chore: update examples
TylorS Jan 10, 2024
8661fc2
fix: update Anchor to updated types
TylorS Jan 10, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR Flow
on:
pull_request:
branches:
- 'main'
- 'development'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"typescript"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.quickSuggestions": {
"other": true,
Expand All @@ -42,7 +42,7 @@
"editor.tabCompletion": "off",
"editor.suggest.localityBonus": true,
"editor.suggestSelection": "recentlyUsed",
"editor.wordBasedSuggestions": true,
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.parameterHints.enabled": true,
"files.watcherExclude": {
"**/target": true
Expand Down
62 changes: 62 additions & 0 deletions docs/async-data/AsyncData.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@ Added in v1.0.0
- [RefreshingSuccess (interface)](#refreshingsuccess-interface)
- [Success (interface)](#success-interface)
- [SuccessOptions (type alias)](#successoptions-type-alias)
- [dataEqual](#dataequal)
- [done](#done)
- [fail](#fail)
- [failCause](#failcause)
- [flatMap](#flatmap)
- [fromEither](#fromeither)
- [fromExit](#fromexit)
- [getEquivalence](#getequivalence)
- [getFailure](#getfailure)
- [getSuccess](#getsuccess)
- [isAsyncData](#isasyncdata)
- [isExpired](#isexpired)
- [isFailure](#isfailure)
- [isLoading](#isloading)
- [isLoadingOrRefreshing](#isloadingorrefreshing)
Expand Down Expand Up @@ -145,6 +149,11 @@ export interface Failure<E> extends Effect.Effect<never, E, never> {
*/
readonly cause: Cause.Cause<E>

/**
* @since 1.20.0
*/
readonly timestamp: number // Date.now()

/**
* @since 1.18.0
*/
Expand Down Expand Up @@ -175,6 +184,7 @@ Added in v1.0.0

```ts
export type FailureOptions = {
readonly timestamp: number // Date.now()
readonly refreshing: Option.Option<Loading>
}
```
Expand Down Expand Up @@ -227,6 +237,7 @@ Added in v1.0.0

```ts
export type LoadingOptions = {
readonly timestamp: number // Date.now()
readonly progress: Option.Option<Progress.Progress>
}
```
Expand Down Expand Up @@ -327,6 +338,10 @@ Added in v1.0.0
export interface Success<A> extends Effect.Effect<never, never, A> {
readonly _tag: typeof SUCCESS_TAG
readonly value: A
/**
* @since 1.20.0
*/
readonly timestamp: number // Date.now()
readonly refreshing: Option.Option<Loading>

readonly [Unify.typeSymbol]: unknown
Expand All @@ -343,12 +358,26 @@ Added in v1.0.0

```ts
export type SuccessOptions = {
readonly timestamp: number // Date.now()
readonly refreshing: Option.Option<Loading>
}
```

Added in v1.0.0

## dataEqual

Checks if two AsyncData are equal, disregarding the timestamps associated with them. Useful for testing
without needing to manage timestamps.

**Signature**

```ts
export declare function dataEqual<E, A>(first: AsyncData<E, A>, second: AsyncData<E, A>): boolean
```

Added in v1.0.0

## done

**Signature**
Expand Down Expand Up @@ -398,6 +427,26 @@ export declare const flatMap: {

Added in v1.0.0

## fromEither

**Signature**

```ts
export declare function fromEither<E, A>(either: Either.Either<E, A>): AsyncData<E, A>
```

Added in v1.0.0

## fromExit

**Signature**

```ts
export declare function fromExit<E, A>(exit: Exit.Exit<E, A>): AsyncData<E, A>
```

Added in v1.0.0

## getEquivalence

**Signature**
Expand Down Expand Up @@ -440,6 +489,19 @@ export declare const isAsyncData: <E, A>(u: unknown) => u is AsyncData<E, A>

Added in v1.0.0

## isExpired

**Signature**

```ts
export declare const isExpired: {
(ttl: Duration.DurationInput, now?: number): <E, A>(data: AsyncData<E, A>) => boolean
<E, A>(data: AsyncData<E, A>, ttl: Duration.DurationInput, now?: number): boolean
}
```

Added in v1.0.0

## isFailure

**Signature**
Expand Down
36 changes: 36 additions & 0 deletions docs/compiler/Compiler.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Compiler.ts
nav_order: 1
parent: "@typed/compiler"
---

## Compiler overview

Compiler is an all-in-one package for compile-time optimization and derivations
of Typed libraries and applications.

Added in v1.0.0

---

<h2 class="text-delta">Table of contents</h2>

- [utils](#utils)
- [Compiler (interface)](#compiler-interface)

---

# utils

## Compiler (interface)

Compiler is an all-in-one cass for compile-time optimization and derivations
of Typed libraries and applications.

**Signature**

```ts
export interface Compiler {}
```

Added in v1.0.0
13 changes: 13 additions & 0 deletions docs/compiler/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "@typed/compiler"
has_children: true
permalink: /docs/compiler
nav_order: 3
---

# @typed/compiler

> WIP

Docs: https://tylors.github.io/typed/docs/compiler

49 changes: 49 additions & 0 deletions docs/compiler/index.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: index.ts
nav_order: 2
parent: "@typed/compiler"
---

## index overview

Compiler is an all-in-one package for compile-time optimization and derivations
of Typed libraries and applications.

Added in v1.0.0

---

<h2 class="text-delta">Table of contents</h2>

- [exports](#exports)
- [From "./Compiler"](#from-compiler)
- [From "./typescript/factories"](#from-typescriptfactories)

---

# exports

## From "./Compiler"

Compiler is an all-in-one package for compile-time optimization and derivations
of Typed libraries and applications.

**Signature**

```ts
export * from "./Compiler"
```

Added in v1.0.0

## From "./typescript/factories"

Compiler docs: https://tylors.github.io/typed/docs/compiler/typescript/factories.ts.html

**Signature**

```ts
export * as factories from "./typescript/factories"
```

Added in v1.0.0
Loading
Loading