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

Version 2.0.0 #326

Merged
merged 134 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
8cadccc
feat: move data accessor def
Jujulego Aug 22, 2023
c4a31da
test: aegis
Jujulego Aug 22, 2023
4c8e543
feat: simplify aegis
Jujulego Aug 22, 2023
2df83fb
test: query manager
Jujulego Aug 22, 2023
13a9107
chore: reorder files
Jujulego Aug 22, 2023
436a797
chore: do not export utils
Jujulego Aug 22, 2023
aa56fd3
chore(deps): update yarn to v3.6.3
renovate[bot] Aug 24, 2023
ce9331f
Merge pull request #310 from Jujulego/renovate/next-yarn-monorepo
Jujulego Aug 24, 2023
a9cbe5d
feat: document
Jujulego Aug 25, 2023
c6c9d8f
feat: add new ref concept
Jujulego Aug 25, 2023
bea6847
feat: handle mutation in ref$
julien-capellari Aug 28, 2023
0b8cae3
feat: allow different type for mutate arg
julien-capellari Aug 28, 2023
a8d1936
feat: simplify ref
julien-capellari Aug 28, 2023
19a2428
feat: add mutable to create mutable refs
julien-capellari Aug 28, 2023
e60e35e
feat: add var to create self stored mutable refs
julien-capellari Aug 28, 2023
b7d7982
feat: add query$ to follow state
julien-capellari Aug 28, 2023
8e06b3d
Merge pull request #323 from Jujulego/feat/rework-ref-concept
julien-capellari Aug 29, 2023
ba73098
chore(deps): update dependency @swc/core to v1.3.80 (#317)
renovate[bot] Aug 29, 2023
e66984f
feat: add readable & mutable interfaces
julien-capellari Aug 29, 2023
39a47c2
feat: use new readable & mutable to give more control on mutable$ syn…
julien-capellari Aug 29, 2023
d3fd5dc
Merge pull request #324 from Jujulego/feat/divide-ref-concept
julien-capellari Aug 29, 2023
e2ea90e
fix(deps): update dependency @jujulego/event-tree to v4.0.2
renovate[bot] Aug 29, 2023
df476d0
Merge pull request #320 from Jujulego/renovate/next-jujulego-event-tr…
julien-capellari Aug 29, 2023
b2b0a5f
chore(deps): update dependency @types/node to v16.18.46 (#305)
renovate[bot] Aug 29, 2023
25f84be
chore(deps): update vitest monorepo to v0.34.3 (#319)
renovate[bot] Aug 29, 2023
f9d6194
chore(deps): update dependency eslint to v8.48.0 (#322)
renovate[bot] Aug 29, 2023
cad86d5
chore(deps): update dependency rollup-plugin-swc3 to v0.10.1 (#328)
renovate[bot] Aug 29, 2023
33a4a41
chore(deps): update typescript-eslint monorepo to v6.5.0 (#329)
renovate[bot] Aug 29, 2023
171042b
feat: add indexable interface
julien-capellari Aug 29, 2023
80cbed7
feat: first store version
julien-capellari Aug 30, 2023
f573c07
chore(deps): update dependency @swc/core to v1.3.81 (#331)
renovate[bot] Aug 30, 2023
9fa25e8
feat: simplify store
julien-capellari Aug 31, 2023
58dd9a6
feat: implement storage & memory stores + cleanup
julien-capellari Aug 31, 2023
6ef113a
feat: test store
julien-capellari Aug 31, 2023
e1cedea
feat: test map
julien-capellari Aug 31, 2023
504d5b0
feat: move "lazy mutation" to trigger method
julien-capellari Aug 31, 2023
3d386e6
feat: test storage
julien-capellari Aug 31, 2023
2910cf3
feat: rework manager
julien-capellari Sep 1, 2023
10aa0b9
feat: test manager
julien-capellari Sep 1, 2023
3b8906a
Merge pull request #332 from Jujulego/feat/rework-store-concept
julien-capellari Sep 1, 2023
9386ce1
chore(deps): update dependency @swc/core to v1.3.82 (#334)
renovate[bot] Sep 1, 2023
70d0570
chore: bump version number
Jujulego Sep 1, 2023
3f092b0
feat: add registry as base of store & manager
julien-capellari Sep 1, 2023
033754d
Merge pull request #335 from Jujulego/feat/registry
julien-capellari Sep 1, 2023
67f6fa6
feat: add watch operator
julien-capellari Sep 1, 2023
924dba6
feat: test watch
Jujulego Sep 1, 2023
71a1f43
Merge pull request #336 from Jujulego/feat/watch
Jujulego Sep 1, 2023
4b33fb3
chore(deps): update dependency @types/node to v16.18.47 (#338)
renovate[bot] Sep 1, 2023
295a170
chore(deps): update dependency typescript to v5.2.2 (next) (#312)
renovate[bot] Sep 1, 2023
ea0c28e
chore(deps): update dependency eslint-plugin-vitest to v0.3.0 (#340)
renovate[bot] Sep 2, 2023
dbf6037
chore(deps): update dependency eslint-plugin-vitest to v0.3.1 (#342)
renovate[bot] Sep 2, 2023
c90eadd
chore(deps): update dependency @types/node to v16.18.48 (#344)
renovate[bot] Sep 2, 2023
564874a
chore(deps): update actions/checkout action to v4
renovate[bot] Sep 4, 2023
baafc8b
feat: add pipe operator
julien-capellari Sep 4, 2023
625694a
feat: pipe impl supports multiple operators
julien-capellari Sep 4, 2023
f03f587
chore(deps): update typescript-eslint monorepo to v6.6.0 (#348)
renovate[bot] Sep 4, 2023
296809e
feat: test awaitedCall
julien-capellari Sep 5, 2023
b94d491
feat: use references between operators in pipe
julien-capellari Sep 5, 2023
06a6016
feat: move pipe$
julien-capellari Sep 5, 2023
0660e7f
feat: add each operator
julien-capellari Sep 5, 2023
d9d1f67
feat: add const ref
julien-capellari Sep 5, 2023
93503c9
Merge pull request #346 from Jujulego/renovate/next-actions-checkout-4.x
julien-capellari Sep 5, 2023
25fc464
Merge branch 'next' into feat/pipe
julien-capellari Sep 5, 2023
ef23a6d
Merge pull request #349 from Jujulego/feat/pipe
julien-capellari Sep 5, 2023
70242e0
chore: bump version number
Jujulego Sep 5, 2023
441cc7c
feat: export registry
Jujulego Sep 5, 2023
f5b21ae
chore(deps): update dependency @swc/core to v1.3.83 (#351)
renovate[bot] Sep 7, 2023
1f34f44
feat: map mutable types
julien-capellari Sep 8, 2023
c2caa2d
feat: add transform operator
julien-capellari Sep 8, 2023
6107e59
chore(deps): update vitest monorepo to v0.34.4 (#353)
renovate[bot] Sep 8, 2023
1131721
feat: test transform
julien-capellari Sep 8, 2023
437de35
Merge pull request #354 from Jujulego/feat/transform-operator
Jujulego Sep 8, 2023
d9ea3ce
chore(deps): update dependency @types/node to v16.18.50 (#358)
renovate[bot] Sep 9, 2023
e1fed01
chore(deps): update dependency eslint to v8.49.0 (#359)
renovate[bot] Sep 9, 2023
4749626
feat: allow non object in storage$
julien-capellari Sep 11, 2023
ebcefe2
Merge pull request #360 from Jujulego/feat/allow-non-obejcts-in-storage
julien-capellari Sep 11, 2023
555e24b
feat: simplify mutate$
julien-capellari Sep 11, 2023
ea731b0
feat: group types
julien-capellari Sep 11, 2023
bca521b
feat: fuse mutable into ref
julien-capellari Sep 11, 2023
130cfb8
Merge pull request #361 from Jujulego/feat/fuse-ref-and-mutate
julien-capellari Sep 11, 2023
8e9639c
chore(deps): update dependency @swc/core to v1.3.84 (#363)
renovate[bot] Sep 11, 2023
c943884
chore(deps): update typescript-eslint monorepo to v6.7.0 (#365)
renovate[bot] Sep 11, 2023
4ff2abe
feat: fuse transform into each
julien-capellari Sep 13, 2023
9ada298
feat: remove transform
julien-capellari Sep 13, 2023
a4bc9fa
fix: build error
julien-capellari Sep 13, 2023
8d1f62b
Merge pull request #366 from Jujulego/feat/fuse-each-and-transform
julien-capellari Sep 13, 2023
39e0709
feat: test ref types
julien-capellari Sep 13, 2023
021f81b
feat: test each types
julien-capellari Sep 13, 2023
26764b8
chore: bump version number
julien-capellari Sep 13, 2023
7b7d170
chore: fix tests
julien-capellari Sep 13, 2023
c740560
Merge pull request #367 from Jujulego/feat/type-tests
julien-capellari Sep 13, 2023
c310892
chore(deps): update dependency @swc/core to v1.3.85 (#370)
renovate[bot] Sep 15, 2023
ab100b0
chore(deps): update dependency @types/node to v16.18.51 (#371)
renovate[bot] Sep 15, 2023
6a4ee2b
chore(deps): update dependency @types/node to v16.18.52 (#373)
renovate[bot] Sep 16, 2023
5a81cbd
feat: move ref definitions
Jujulego Sep 18, 2023
bd11ab7
chore: upgrade event-tree
Jujulego Sep 18, 2023
23face8
feat: allow apply pipe$ on a source
Jujulego Sep 18, 2023
248fff5
feat: adapt each for source input
Jujulego Sep 18, 2023
eb3abb9
feat: upgrade event-tree
Jujulego Sep 18, 2023
673c68f
Merge pull request #376 from Jujulego/feat/use-event-tree-source-type…
Jujulego Sep 18, 2023
9574720
feat: simplify each operator
Jujulego Sep 19, 2023
3693434
feat: simplify each source type expression
Jujulego Sep 19, 2023
1f89233
Merge pull request #379 from Jujulego/feat/simplify-each-operator
Jujulego Sep 19, 2023
b8f09f3
chore(deps): update typescript-eslint monorepo to v6.7.2 (#378)
renovate[bot] Sep 19, 2023
b27bfdc
chore(deps): update dependency @jujulego/jill to v2.3.2 (#383)
renovate[bot] Sep 19, 2023
34d3ad5
chore(deps): update dependency @swc/core to v1.3.86 (#384)
renovate[bot] Sep 19, 2023
da55f77
feat: pipe inputs observables
Jujulego Sep 19, 2023
7a6b662
Add filter operator (#385)
Jujulego Sep 19, 2023
4eb8e1a
chore(deps): update dependency @types/node to v16.18.53 (#387)
renovate[bot] Sep 20, 2023
db36593
chore(deps): update vitest monorepo to v0.34.5 (#389)
renovate[bot] Sep 21, 2023
dea6185
chore(deps): update dependency @swc/core to v1.3.87 (#391)
renovate[bot] Sep 22, 2023
5d615fe
chore(deps): update dependency eslint to v8.50.0 (#393)
renovate[bot] Sep 23, 2023
0818dad
feat: move pipe type definitions
Jujulego Sep 25, 2023
2e6cee4
feat: add flow util
Jujulego Sep 25, 2023
e5abf52
feat: rework pipe tests
Jujulego Sep 25, 2023
ed83a79
fix: operator tests
Jujulego Sep 25, 2023
9102d0e
Merge pull request #401 from Jujulego/feat/flow
Jujulego Sep 25, 2023
371c943
chore: bump version number
Jujulego Sep 25, 2023
40a474d
chore: setup stage 3 decorators
Jujulego Oct 14, 2023
f5a7d63
feat: add bind decorator
Jujulego Oct 14, 2023
6bc7276
feat: rename bind decorator & handle readonly ref
Jujulego Oct 15, 2023
3a80470
chore: bump version number
Jujulego Oct 15, 2023
fb8108d
Merge pull request #418 from Jujulego/feat/bind-decorator
Jujulego Oct 15, 2023
4bf3aec
feat: add weak reference
Jujulego Oct 21, 2023
72e69e7
Merge pull request #423 from Jujulego/feat/weak-ref
Jujulego Oct 21, 2023
23da86d
feat: remove query & manager
Jujulego Oct 22, 2023
9d3c7f9
chore: setup sonarlint
Jujulego Oct 22, 2023
f415901
chore: rename map into memory
Jujulego Oct 22, 2023
b99e447
Merge pull request #428 from Jujulego/feat/remove-query-and-manager
Jujulego Oct 22, 2023
3e58e52
chore: use node 18
Jujulego Oct 22, 2023
85c16b2
Merge pull request #429 from Jujulego/chore/run-on-node-18
Jujulego Oct 22, 2023
d46c705
Merge 'latest' into 'next'
Jujulego Oct 22, 2023
e577c91
chore: fix type tests
Jujulego Oct 22, 2023
60ee854
chore: fix tests
Jujulego Oct 22, 2023
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
16 changes: 8 additions & 8 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn

- name: Install
Expand All @@ -45,10 +45,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn

- name: Install
Expand All @@ -70,10 +70,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: yarn

- name: Install
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
registry-url: https://registry.npmjs.org
cache: yarn

Expand Down
4 changes: 4 additions & 0 deletions .idea/aegis.iml

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

12 changes: 12 additions & 0 deletions .idea/runConfigurations/build.xml

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

8 changes: 8 additions & 0 deletions .idea/sonarlint.xml

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

6 changes: 5 additions & 1 deletion .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"jsc": {
"target": "esnext",
"parser": {
"syntax": "typescript"
"syntax": "typescript",
"decorators": true
},
"transform": {
"decoratorVersion": "2022-03"
}
},
"module": {
Expand Down
Empty file modified .yarn/releases/yarn-3.6.4.cjs
100755 → 100644
Empty file.
6 changes: 0 additions & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@ changesetBaseRefs:
- next
- origin/next

packageExtensions:
rollup-plugin-swc3@*:
peerDependenciesMeta:
rollup:
optional: true

yarnPath: .yarn/releases/yarn-3.6.4.cjs
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jujulego/aegis",
"version": "2.0.0-alpha.6",
"version": "2.0.0-beta.6",
"license": "MIT",
"author": "Julien Capellari <julien.capellari@google.com>",
"repository": {
Expand Down Expand Up @@ -32,24 +32,32 @@
"test:types": "vitest typecheck"
},
"dependencies": {
"@jujulego/event-tree": "^4.0.1",
"@jujulego/event-tree": "^4.1.1",
"@jujulego/utils": "^2.0.0"
},
"devDependencies": {
"@jujulego/jill": "2.3.1",
"@jujulego/jill": "2.3.2",
"@jujulego/vite-plugin-swc": "1.1.0",
"@microsoft/eslint-formatter-sarif": "3.0.0",
"@swc/cli": "0.1.62",
"@swc/core": "1.3.94",
"@types/node": "16.18.59",
"@types/node": "18.18.6",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"@vitest/coverage-v8": "0.34.6",
"eslint": "8.52.0",
"eslint-plugin-vitest": "0.3.6",
"rollup-plugin-swc3": "0.10.3",
"jsdom": "22.1.0",
"shx": "0.3.4",
"typescript": "5.1.6",
"vitest": "0.34.6"
"typescript": "5.2.2",
"vite": "5.0.0-beta.11",
"vite-tsconfig-paths": "4.2.1",
"vitest": "0.34.5"
},
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@3.6.4",
"dependenciesMeta": {
"vitest@0.34.5": {
"unplugged": true
}
}
}
68 changes: 0 additions & 68 deletions src/aegis.ts

This file was deleted.

23 changes: 23 additions & 0 deletions src/bind.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { SyncMutableRef, SyncRef } from './defs/index.js';

// Types
export type BindDecorator<V> = <T>(target: ClassAccessorDecoratorTarget<T, V>, ctx: ClassAccessorDecoratorContext<T, V>) => ClassAccessorDecoratorResult<T, V>;

// Decorator
export function BindRef<V, D extends V>(ref: SyncRef<D> | SyncMutableRef<D>): BindDecorator<V> {
return (_, ctx) => {
const result: ClassAccessorDecoratorResult<unknown, D> = {
get: ref.read,
};

if ('mutate' in ref) {
result.set = ref.mutate;
} else {
result.set = () => {
throw new Error(`Cannot set ${String(ctx.name)}, it is bound to a readonly reference.`);
};
}

return result;
};
}
49 changes: 0 additions & 49 deletions src/data/d-ref.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/data/d-var.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/data/index.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/data/types.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/defs/blade.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/defs/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './blade.js';
export * from './readonly-ref.js';
export * from './mutable.js';
export * from './mutable-ref.js';
export * from './pipe.js';
export * from './readable.js';
export * from './ref.js';
23 changes: 23 additions & 0 deletions src/defs/mutable-ref.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { AsyncMutable, MapMutateArg, Mutable, SyncMutable } from './mutable.js';
import { AsyncReadable, MapReadValue, Readable, SyncReadable } from './readable.js';
import { Ref } from './ref.js';

/**
* Mutable reference
*/
export type MutableRef<D = unknown, A = D, R extends Readable<D> = Readable<D>, M extends Mutable<D, A> = Mutable<D, A>> = Ref<D, R> & M;

/**
* Mutable synchronous reference
*/
export type SyncMutableRef<D = unknown, A = D> = MutableRef<D, A, SyncReadable<D>, SyncMutable<D, A>>;

/**
* Mutable asynchronous reference
*/
export type AsyncMutableRef<D = unknown, A = D> = MutableRef<D, A, AsyncReadable<D>, AsyncMutable<D, A>>;

/**
* Build a Mutable type with the same synchronicity and the given value types
*/
export type MapMutableValue<R extends MutableRef, D, A> = MutableRef<D, A, MapReadValue<R, D>, MapMutateArg<R, D, A>>;
Loading
Loading