Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 368cfa9

Browse files
authored
Merge pull request #190 from agile-ts/develop
New Release 🎉
2 parents 9a0074e + aae6455 commit 368cfa9

File tree

206 files changed

+9181
-6539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+9181
-6539
lines changed

.changeset/calm-pets-attend.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@agile-ts/api': patch
3+
'@agile-ts/core': patch
4+
'cra-template-agile': patch
5+
'cra-template-agile-typescript': patch
6+
'@agile-ts/event': patch
7+
'@agile-ts/logger': patch
8+
'@agile-ts/multieditor': patch
9+
'@agile-ts/proxytree': patch
10+
'@agile-ts/react': patch
11+
'@agile-ts/utils': patch
12+
'@agile-ts/vue': patch
13+
---
14+
15+
#### :rocket: New Feature
16+
* `core`, `event`, `logger`, `multieditor`, `react`, `utils`
17+
* [#188](https://github.com/agile-ts/agile/pull/188) Tree shakeable support ([@bennodev19](https://github.com/bennodev19))
18+
19+
#### :nail_care: Polish
20+
* `core`
21+
* [#189](https://github.com/agile-ts/agile/pull/189) Optimize collection rebuilds ([@bennodev19](https://github.com/bennodev19))
22+
* `api`, `core`, `cra-template-agile-typescript`, `cra-template-agile`, `event`, `logger`, `multieditor`, `proxytree`, `react`, `utils`, `vue`
23+
* [#187](https://github.com/agile-ts/agile/pull/187) Tree shakeable support ([@bennodev19](https://github.com/bennodev19))
24+
25+
#### Committers: 1
26+
- BennoDev ([@bennodev19](https://github.com/bennodev19))
27+

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ AgileTs is a global State and Logic Library implemented in Typescript.
7979
It offers a reimagined API that focuses on **developer experience**
8080
and allows you to **easily** and **flexible** manage your application States.
8181
Besides [States](https://agile-ts.org/docs/core/state),
82-
AgileTs offers some other powerful APIs that make your life easier,
82+
AgileTs offers some other powerful and tree shakable APIs that make your life easier,
8383
such as [Collections](https://agile-ts.org/docs/core/collection)
8484
and [Computed States](https://agile-ts.org/docs/core/computed).
8585
The philosophy behind AgileTs is simple:
@@ -88,19 +88,19 @@ The philosophy behind AgileTs is simple:
8888

8989
Write minimalistic, boilerplate-free code that captures your intent.
9090
```ts
91-
// Create State with inital value 'frank'
91+
// Create State with the inital value 'frank'
9292
const MY_STATE = createState('frank');
9393

94-
// Update State value from 'frank' to 'jeff'
94+
// Update the State value from 'frank' to 'jeff'
9595
MY_STATE.set('jeff');
9696

97-
// Undo latest State value change
97+
// Undo the latest State value change
9898
MY_STATE.undo();
9999

100-
// Reset State value to its initial value
100+
// Reset the State value to its initial value
101101
MY_STATE.reset();
102102

103-
// Permanently store State value in an external Storage
103+
// Permanently store the State value in an external Storage
104104
MY_STATE.persist("storage-key");
105105
```
106106

@@ -206,6 +206,14 @@ To find out more about contributing, check out the [CONTRIBUTING.md](https://git
206206
<img src="https://codeclimate.com/github/agile-ts/agile/badges/gpa.svg" alt="Maintainability"/>
207207
</a>
208208

209+
### ♥️ Contributors
210+
211+
<a href="https://github.com/agile-ts/agile/graphs/contributors">
212+
<img src="https://contrib.rocks/image?repo=agile-ts/agile" />
213+
</a>
214+
215+
[Become a contributor](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md)
216+
209217

210218
<br />
211219

benchmark/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MANUAL_BENCHMARK=false
1+
DEV=false

benchmark/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,18 @@ Execute the benchmark located in `./benchmarks/react/counter`.
121121
```ts
122122
yarn run test:counter
123123
```
124+
If you want to test it manually, enable the `dev mode`.
125+
```ts
126+
yarn run test:counter --dev
127+
```
128+
The difference to the 'normal' mode is that:
129+
- the executed bundle isn't `minified`
130+
- the test has to be started manually by opening `localhost:3003`
131+
- the test results are printed in the `browser console`
124132

125133
## ⭐️ Contribute
126134

127-
Get a part of AgileTs and start contributing. We welcome any meaningful contribution. 😀
135+
Feel free to add more tests and State Managers to be tested. We welcome any meaningful contribution. 😀
128136
To find out more about contributing, check out the [CONTRIBUTING.md](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md).
129137

130138
<a href="https://codeclimate.com/github/agile-ts/agile/coverage.svg">

benchmark/benchmarks/react/1000fields/bench/agilets/collection.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
22
import ReactDom from 'react-dom';
3-
import { createCollection, LogCodeManager } from '@agile-ts/core';
4-
import { useAgile, useValue } from '@agile-ts/react';
3+
import { createCollection, LogCodeManager, shared } from '@agile-ts/core';
4+
import reactIntegration, { useAgile, useValue } from '@agile-ts/react';
55

6-
LogCodeManager.getLogger().isActive = false;
6+
LogCodeManager.setAllowLogging(false);
7+
shared.integrate(reactIntegration);
78

89
export default function (target: HTMLElement, fieldsCount: number) {
910
const FIELDS = createCollection({

benchmark/benchmarks/react/1000fields/bench/agilets/nestedState.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import * as React from 'react';
22
import * as ReactDom from 'react-dom';
3-
import { createState, LogCodeManager, State } from '@agile-ts/core';
4-
import { useAgile } from '@agile-ts/react';
3+
import { createState, LogCodeManager, shared, State } from '@agile-ts/core';
4+
import reactIntegration, { useAgile } from '@agile-ts/react';
55

6-
LogCodeManager.getLogger().isActive = false;
6+
LogCodeManager.setAllowLogging(false);
7+
shared.integrate(reactIntegration);
78

89
export default function (target: HTMLElement, fieldsCount: number) {
910
const FIELDS = createState(

benchmark/benchmarks/react/1000fields/bench/agilets/state.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
22
import ReactDom from 'react-dom';
3-
import { createState, LogCodeManager } from '@agile-ts/core';
4-
import { useAgile } from '@agile-ts/react';
3+
import { createState, LogCodeManager, shared } from '@agile-ts/core';
4+
import reactIntegration, { useAgile } from '@agile-ts/react';
55

6-
LogCodeManager.getLogger().isActive = false;
6+
LogCodeManager.setAllowLogging(false);
7+
shared.integrate(reactIntegration);
78

89
export default function (target: HTMLElement, fieldsCount: number) {
910
const FIELDS = createState(

benchmark/benchmarks/react/1000fields/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
endBenchmarkLog,
77
getCycleResult,
88
startBenchmarkLog,
9-
} from '../../../benchmarkManager';
9+
} from '../../benchmarkManager';
1010

1111
// Files to run the Benchmark on
1212
import agileCollection from './bench/agilets/collection';
@@ -81,8 +81,8 @@ suite
8181
.add('Agile State', configTest(agileState))
8282
.add('Agile nested State', configTest(agileNestedState))
8383
.add('Pulse Collection', configTest(pulseCollection))
84-
// .add('Pulse State', configTest(pulseState))
85-
// .add('Pulse nested State', configTest(pulseNestedState))
84+
.add('Pulse State', configTest(pulseState))
85+
.add('Pulse nested State', configTest(pulseNestedState))
8686
.add('Hookstate', configTest(hookstate))
8787
.add('Jotai', configTest(jotai))
8888
.add('Mobx', configTest(mobx))

benchmark/benchmarks/react/computed/bench/agilets/autoTracking.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import React from 'react';
22
import ReactDom from 'react-dom';
3-
import { createComputed, createState, LogCodeManager } from '@agile-ts/core';
4-
import { useAgile } from '@agile-ts/react';
3+
import {
4+
createComputed,
5+
createState,
6+
LogCodeManager,
7+
shared,
8+
} from '@agile-ts/core';
9+
import reactIntegration, { useAgile } from '@agile-ts/react';
10+
11+
LogCodeManager.setAllowLogging(false);
12+
shared.integrate(reactIntegration);
513

6-
LogCodeManager.getLogger().isActive = false;
714
const COUNT = createState(0);
815
const COMPUTED_COUNT = createComputed(() => {
916
return COUNT.value * 5;

0 commit comments

Comments
 (0)