Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://npm.pkg.github.com/
- name: Cache node modules
id: cache-yarn
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/npm-publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: yarn test

publish-gpr:
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://npm.pkg.github.com/

- name: Cache node modules
Expand All @@ -37,7 +37,9 @@ jobs:
env:
cache-name: cache-node-module
with:
path: ~/.cache/yarn
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,22 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Cache node modules
id: cache-yarn
uses: actions/cache@v3
uses: actions/cache@v2
env:
cache-name: cache-node-module
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: yarn list
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Yarn Build
run: yarn build
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/trunk-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
env:
cache-name: cache-node-module
with:
path: ~/.npm
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/trunk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
env:
cache-name: cache-node-module
with:
path: ~/.npm
path: |
~/.cache/yarn
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand Down
14 changes: 0 additions & 14 deletions docs/docs/api-reference/PlexusActionHelpers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The action helpers for a defined plexus action
- [.onCatch(handler, useGlobal)](#PlexusActionHelpers+onCatch)
- [.runErrorHandlers()](#PlexusActionHelpers+runErrorHandlers)
- [.ignoreInit()](#PlexusActionHelpers+ignoreInit)
- [.batch(fn)](#PlexusActionHelpers+batch)

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

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

<p>Ignore the default halt for preActions</p>

<a name='PlexusActionHelpers+batch'></a>

### .batch(fn)

<p>
Run a function. During that function's execution, any state changes will be
batched and only applied once the function has finished.
</p>

| Param | Description |
| ----- | ------------------------------------- |
| fn | <p>The function to run in a batch</p> |
26 changes: 0 additions & 26 deletions docs/docs/api-reference/Scope.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Create a new PlexusJS plugin
- [.computed(item)](#Scope+computed) ⇒
- [.event()](#Scope+event) ⇒
- [.collection(config)](#Scope+collection) ⇒
- [.action(fn)](#Scope+action) ⇒
- [.batchAction(fn)](#Scope+batchAction) ⇒
- [.batch(fn)](#Scope+batch)
- [.preaction(fn)](#Scope+preaction) ⇒

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

<a name='Scope+action'></a>

### .action(fn) ⇒

<p>Generate a Plexus Action</p>

**Returns**: <p>The intended return value of fn, or null if an error is caught</p>

| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |

<a name='Scope+batchAction'></a>

### .batchAction(fn) ⇒

<p>Generate a Plexus Action</p>

**Returns**: <p>The intended return value of fn, or null if an error is caught</p>

| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |

<a name='Scope+batch'></a>

### .batch(fn)
Expand Down
12 changes: 0 additions & 12 deletions docs/docs/api-reference/action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,3 @@ Generate a Plexus Action
| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |

<a name='Scope+action'></a>

## .action(fn) ⇒

<p>Generate a Plexus Action</p>

**Returns**: <p>The intended return value of fn, or null if an error is caught</p>

| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |
9 changes: 7 additions & 2 deletions docs/docs/api-reference/batch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Run a function. During that function's execution, any state changes will be batc
| ----- | ------------------------------------- |
| fn | <p>The function to run in a batch</p> |

<a name='PlexusActionHelpers+batch'></a>
<a name='batch'></a>

## .batch(fn)
## batch(fn)

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

## .batch(fn)

<p>
The batch function allows you to run a series of reactive actions in a single
transaction
</p>

<p>
The batch function allows you to run a series of actions in a single
transaction
Expand Down
12 changes: 0 additions & 12 deletions docs/docs/api-reference/batchAction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,3 @@ Generate a Plexus Action
| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |

<a name='Scope+batchAction'></a>

## .batchAction(fn) ⇒

<p>Generate a Plexus Action</p>

**Returns**: <p>The intended return value of fn, or null if an error is caught</p>

| Param | Description |
| ----- | ---------------------------------------- |
| fn | <p>The Plexus action function to run</p> |
34 changes: 34 additions & 0 deletions docs/docs/api-reference/onCatch.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: onCatch
---

[![view on npm](http://img.shields.io/npm/v/@plexusjs/core.svg)](https://www.npmjs.org/package/@plexusjs/core)

Add a new error handler for this action. This will catch any errors that occur during the execution of this action and prevent a crash.

<a name='onCatch'></a>

## onCatch(handler?)

<p>
Add a new error handler for this action. This will catch any errors that occur
during the execution of this action and prevent a crash.
</p>

| Param | Description |
| -------- | ---------------------------------------------------------------------------------- |
| handler? | <p>A function that will be called when an error occurs; omit to fail silently.</p> |

<a name='PlexusActionHelpers+onCatch'></a>

## .onCatch(handler, useGlobal)

<p>
Add a new error handler for this action. This will catch any errors that occur
during the execution of this action and prevent a crash.
</p>

| Param | Default | Description |
| --------- | ----------------- | ---------------------------------------------------------------------------------- |
| handler | | <p>A function that will be called when an error occurs; omit to fail silently.</p> |
| useGlobal | <code>true</code> | <p>Should the global error handler be used? (default: true)</p> |
13 changes: 0 additions & 13 deletions jest.config.ts

This file was deleted.

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bootstrap": "lerna bootstrap --use-workspaces",
"build": "lerna run build",
"postbuild": "yarn docs:generate:ref",
"dev": "lerna run build && lerna watch -- lerna run build --since",
"dev": "lerna run build && lerna watch -- lerna run build --scope=$LERNA_PACKAGE_NAME",
"prereleaseOnly": "pinst --disable && echo '🚀 Publishing...'",
"release-canary": "lerna run build && lerna publish --preid canary --no-private --yes --force-publish --canary",
"release-stable": "lerna run build && lerna publish --preid canary --no-private --yes --force-publish",
Expand All @@ -41,7 +41,6 @@
"@testing-library/react": "^14.0.0",
"@trunkio/launcher": "^1.2.3",
"@types/fs-readdir-recursive": "^1.1.0",
"@types/jest": "^27.4.0",
"@types/jsdoc-to-markdown": "^7.0.3",
"@types/node": "^18.11.11",
"@types/react": "^18.0.17",
Expand All @@ -50,11 +49,9 @@
"@types/recursive-readdir": "^2.2.1",
"@vitejs/plugin-react": "^4.0.4",
"@vitest/ui": "^0.34.2",
"babel-jest": "^27.4.6",
"chalk": "4",
"fs-readdir-recursive": "^1.1.0",
"happy-dom": "^10.10.4",
"jest": "^27.4.7",
"jsdoc-babel": "^0.5.0",
"jsdoc-to-markdown": "^8.0.0",
"jsdom": "^20.0.1",
Expand All @@ -68,9 +65,8 @@
"react-dom": "^18",
"react-test-renderer": "^18.2.0",
"recursive-readdir": "^2.2.3",
"ts-jest": "^27.1.2",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.2",
"yargs": "^17.4.1"
Expand Down
Loading