Skip to content

Commit

Permalink
jest -> vitest & README update
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbrugger committed Nov 25, 2024
1 parent 33b7a96 commit 2e43c07
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

26 changes: 22 additions & 4 deletions plugins/stored-constraints/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
# @flatfile/plugin-constraints
<!-- START_INFOCARD -->

This plugin enabled running stored constraints.
# @flatfile/plugin-stored-constraints

The `@flatfile/plugin-stored-constraints` plugin enables running stored constraints.

**Event Type:**
`listener.on('commit:created')`

<!-- END_INFOCARD -->

## Installation

```bash install
npm i @flatfile/plugin-stored-constraints
```

## Usage

```ts
```ts listener.ts
import type { FlatfileListener } from "@flatfile/listener";
import { storedConstraint } from '@flatfile/plugin-stored-constraints'

export default function (listener: FlatfileListener) {
listener.use(storedConstraint())
```
}
```
16 changes: 0 additions & 16 deletions plugins/stored-constraints/jest.config.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/stored-constraints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"validator": "^13.12.0"
},
"peerDependencies": {
"@flatfile/api": "^1.9.19",
"@flatfile/api": "^1.11.0",
"@flatfile/listener": "^1.1.0",
"@flatfile/plugin-record-hook": "^1.10.0"
},
Expand Down
4 changes: 4 additions & 0 deletions plugins/stored-constraints/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import config from '@flatfile/config-vitest'
import { defineConfig } from 'vitest/config'

export default defineConfig(config)

0 comments on commit 2e43c07

Please sign in to comment.