Skip to content

Commit 468304b

Browse files
authored
Merge pull request #68 from PlexusJS/feat/internal-overhaul
Feat/internal overhaul
2 parents 3644093 + 7a73e0b commit 468304b

Some content is hidden

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

42 files changed

+705
-1675
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
path: |
2222
~/.cache/yarn
2323
node_modules
24-
2524
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
2625
restore-keys: |
2726
${{ runner.os }}-build-${{ env.cache-name }}-

.github/workflows/npm-publish-canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v3
2222
- uses: actions/setup-node@v3
2323
with:
24-
node-version: 16
24+
node-version: 18
2525
registry-url: https://npm.pkg.github.com/
2626
- name: Cache node modules
2727
id: cache-yarn

.github/workflows/npm-publish-stable.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: 16
18+
node-version: 18
1919
- run: yarn test
2020

2121
publish-gpr:
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 16
31+
node-version: 18
3232
registry-url: https://npm.pkg.github.com/
3333

3434
- name: Cache node modules
@@ -37,7 +37,9 @@ jobs:
3737
env:
3838
cache-name: cache-node-module
3939
with:
40-
path: ~/.cache/yarn
40+
path: |
41+
~/.cache/yarn
42+
node_modules
4143
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
4244
restore-keys: |
4345
${{ runner.os }}-build-${{ env.cache-name }}-

.github/workflows/tests.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,22 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 18
1717
- name: Cache node modules
1818
id: cache-yarn
19-
uses: actions/cache@v3
19+
uses: actions/cache@v2
2020
env:
2121
cache-name: cache-node-module
2222
with:
23-
path: ~/.cache/yarn
24-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
23+
path: |
24+
~/.cache/yarn
25+
node_modules
26+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
2527
restore-keys: |
26-
${{ runner.os }}-build-${{ env.cache-name }}-
27-
${{ runner.os }}-build-
28-
${{ runner.os }}-
29-
30-
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }}
31-
name: List the state of node modules
32-
continue-on-error: true
33-
run: yarn list
28+
${{ runner.os }}-yarn-
3429
3530
- name: Install Dependencies
36-
run: yarn install
31+
run: yarn install --frozen-lockfile
3732

3833
- name: Yarn Build
3934
run: yarn build

.github/workflows/trunk-nightly.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
env:
2424
cache-name: cache-node-module
2525
with:
26-
path: ~/.npm
26+
path: |
27+
~/.cache/yarn
28+
node_modules
2729
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
2830
restore-keys: |
2931
${{ runner.os }}-build-${{ env.cache-name }}-

.github/workflows/trunk-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
env:
1919
cache-name: cache-node-module
2020
with:
21-
path: ~/.npm
21+
path: |
22+
~/.cache/yarn
23+
node_modules
2224
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
2325
restore-keys: |
2426
${{ runner.os }}-build-${{ env.cache-name }}-

docs/docs/api-reference/PlexusActionHelpers.mdx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The action helpers for a defined plexus action
1212
- [.onCatch(handler, useGlobal)](#PlexusActionHelpers+onCatch)
1313
- [.runErrorHandlers()](#PlexusActionHelpers+runErrorHandlers)
1414
- [.ignoreInit()](#PlexusActionHelpers+ignoreInit)
15-
- [.batch(fn)](#PlexusActionHelpers+batch)
1615

1716
<a name='PlexusActionHelpers+catchError'></a>
1817

@@ -51,16 +50,3 @@ The action helpers for a defined plexus action
5150
### .ignoreInit()
5251

5352
<p>Ignore the default halt for preActions</p>
54-
55-
<a name='PlexusActionHelpers+batch'></a>
56-
57-
### .batch(fn)
58-
59-
<p>
60-
Run a function. During that function's execution, any state changes will be
61-
batched and only applied once the function has finished.
62-
</p>
63-
64-
| Param | Description |
65-
| ----- | ------------------------------------- |
66-
| fn | <p>The function to run in a batch</p> |

docs/docs/api-reference/Scope.mdx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Create a new PlexusJS plugin
1111
- [.computed(item)](#Scope+computed)
1212
- [.event()](#Scope+event)
1313
- [.collection(config)](#Scope+collection)
14-
- [.action(fn)](#Scope+action)
15-
- [.batchAction(fn)](#Scope+batchAction)
1614
- [.batch(fn)](#Scope+batch)
1715
- [.preaction(fn)](#Scope+preaction)
1816

@@ -60,30 +58,6 @@ Create a new PlexusJS plugin
6058
| ------ | ------------------------------------------- |
6159
| config | <p>The configuration for the collection</p> |
6260

63-
<a name='Scope+action'></a>
64-
65-
### .action(fn) ⇒
66-
67-
<p>Generate a Plexus Action</p>
68-
69-
**Returns**: <p>The intended return value of fn, or null if an error is caught</p>
70-
71-
| Param | Description |
72-
| ----- | ---------------------------------------- |
73-
| fn | <p>The Plexus action function to run</p> |
74-
75-
<a name='Scope+batchAction'></a>
76-
77-
### .batchAction(fn) ⇒
78-
79-
<p>Generate a Plexus Action</p>
80-
81-
**Returns**: <p>The intended return value of fn, or null if an error is caught</p>
82-
83-
| Param | Description |
84-
| ----- | ---------------------------------------- |
85-
| fn | <p>The Plexus action function to run</p> |
86-
8761
<a name='Scope+batch'></a>
8862

8963
### .batch(fn)

docs/docs/api-reference/action.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,3 @@ Generate a Plexus Action
1717
| Param | Description |
1818
| ----- | ---------------------------------------- |
1919
| fn | <p>The Plexus action function to run</p> |
20-
21-
<a name='Scope+action'></a>
22-
23-
## .action(fn) ⇒
24-
25-
<p>Generate a Plexus Action</p>
26-
27-
**Returns**: <p>The intended return value of fn, or null if an error is caught</p>
28-
29-
| Param | Description |
30-
| ----- | ---------------------------------------- |
31-
| fn | <p>The Plexus action function to run</p> |

docs/docs/api-reference/batch.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Run a function. During that function's execution, any state changes will be batc
1919
| ----- | ------------------------------------- |
2020
| fn | <p>The function to run in a batch</p> |
2121

22-
<a name='PlexusActionHelpers+batch'></a>
22+
<a name='batch'></a>
2323

24-
## .batch(fn)
24+
## batch(fn)
2525

2626
<p>
2727
Run a function. During that function's execution, any state changes will be
@@ -36,6 +36,11 @@ Run a function. During that function's execution, any state changes will be batc
3636

3737
## .batch(fn)
3838

39+
<p>
40+
The batch function allows you to run a series of reactive actions in a single
41+
transaction
42+
</p>
43+
3944
<p>
4045
The batch function allows you to run a series of actions in a single
4146
transaction

0 commit comments

Comments
 (0)