An open API service indexing awesome lists of open source software.

https://github.com/benallfree/pocketbase-jsvm


https://github.com/benallfree/pocketbase-jsvm

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# TypeScript Typings for PocketBase JSVM

This package provides TypeScript typings for the PocketBase JavaScript Virtual Machine (JSVM).

- PocketBase `jsvm.d.ts`
- [Goja](https://github.com/dop251/goja) / [EcmaScript 2021](https://262.ecma-international.org/12.0/index.html)
- [Goja-Node](https://github.com/dop251/goja-nodejs)
- Custom `jsvm.d.ts` fixes that haven't been merged upstream (see [PATCHES.md](./PATCHES.md))

## Usage

**Install the package**

```bash
npm install pocketbase-jsvm
```

**Update your `tsconfig.json`**

In your `tsconfig.json`:

```json
{
"compilerOptions": {
"types": ["pocketbase-jsvm"],
"moduleResolution": "node"
}
}
```

That's it! enjoy JSVM goodness throughout your project.

## Versioning Strategy

`pocketbase-jsvm` uses [Upstream Anchoring](https://gist.github.com/benallfree/6baa35e925df06b35b2df755f5776cc7).

- **Our Version** = `Upstream MAJOR.MINOR.(Upstream PATCH × 10000 + Our Revision Number)`

Example:

- **Upstream Version**: `0.25.1`
- **Our First Revision**: `0.25.10001`

This keeps our fork aligned with upstream releases and allows us to manage our own revisions effectively.

## Contributing

Help the community by keeping the `jsvm.d.ts` up to date with upstream changes.

**Update your fork**

```bash
git fetch --all
git checkout main
```

**Apply the latest upstream changes**

Copy the latest `jsvm.d.ts` and update the version number in `package.json`.

**Check the diff and reapply patches**

Review the diff and `PATCHES.md`. Reapply patches that haven't been fixed upstream.

### Older Versions of PocketBase

In-package legacy support has been dropped. Please use older versions of this package, or use the `jsvm.d.ts` generated by the desired PocketBase version and apply `PATCHES.md` as needed.