Skip to content

Commit c07ff40

Browse files
committed
Initial commit
0 parents  commit c07ff40

21 files changed

+2555
-0
lines changed

.github/workflows/cd.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish to NPM
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: pnpm/action-setup@v3
11+
with:
12+
version: 8
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: "20.x"
16+
registry-url: "https://registry.npmjs.org"
17+
- run: pnpm install --frozen-lockfile
18+
- run: pnpm build
19+
- run: pnpm publish --no-git-checks
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [22]
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: pnpm/action-setup@v3
20+
with:
21+
version: 9
22+
23+
- name: Use Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "pnpm"
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Biome format check
33+
run: pnpm check:format
34+
35+
- name: Biome lint
36+
run: pnpm check:lint
37+
38+
- name: Run tests
39+
run: pnpm test
40+
41+
- name: Build
42+
run: pnpm build

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Zebulon Piasecki
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<h1 align="center">diffable-objects</h1>
2+
3+
<p align="center">
4+
A package for dynamic state tracking for Cloudflare's <a href="https://developers.cloudflare.com/durable-objects/">Durable Objects</a> using SQLite.
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://www.npmjs.com/package/diffable-objects">
9+
<img src="https://img.shields.io/npm/v/diffable-objects?style=for-the-badge" alt="downloads" height="24">
10+
</a>
11+
<a href="https://www.npmjs.com/package/diffable-objects">
12+
<img src="https://img.shields.io/github/actions/workflow/status/zebp/diffable-objects/ci.yaml?branch=main&style=for-the-badge" alt="npm version" height="24">
13+
</a>
14+
<a href="https://github.com/zebp/diffable-objects">
15+
<img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="MIT license" height="24">
16+
</a>
17+
</p>
18+
19+
## License
20+
21+
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.

biome.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2
16+
},
17+
"organizeImports": {
18+
"enabled": true
19+
},
20+
"linter": {
21+
"enabled": true,
22+
"rules": {
23+
"recommended": true
24+
}
25+
},
26+
"javascript": {
27+
"formatter": {
28+
"quoteStyle": "double"
29+
}
30+
}
31+
}

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "diffable-objects",
3+
"version": "0.0.0",
4+
"description": "A package for dynamic state tracking for Cloudflare's Durable Objects using SQLite",
5+
"author": "Zeb Piasecki <[email protected]>",
6+
"repository": "https://github.com/zebp/diffable-objects",
7+
"license": "MIT",
8+
"keywords": ["cloudflare", "workers", "durable-objects", "sqlite"],
9+
"type": "module",
10+
"exports": {
11+
".": {
12+
"import": "./dist/index.js",
13+
"types": "./dist/index.d.ts"
14+
}
15+
},
16+
"scripts": {
17+
"build": "tsc -p tsconfig.build.json",
18+
"format": "biome format ./src ./test --write",
19+
"check:lint": "biome lint ./src ./test",
20+
"check:format": "biome format ./src ./test",
21+
"test": "vitest run"
22+
},
23+
"devDependencies": {
24+
"@biomejs/biome": "1.9.4",
25+
"@cloudflare/vitest-pool-workers": "^0.5.40",
26+
"@cloudflare/workers-types": "^4.20241224.0",
27+
"typescript": "^5.7.2",
28+
"vitest": "2.1.8"
29+
},
30+
"dependencies": {
31+
"json-diff-ts": "^4.1.0"
32+
},
33+
"pnpm": {
34+
"overrides": {
35+
"lodash": "npm:@technically/lodash"
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)