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
30 changes: 0 additions & 30 deletions .circleci/config.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: ["**"]
pull_request:

jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm run test:ci

- name: Publish test results
if: always()
uses: dorny/test-reporter@v1
with:
name: Test Results
path: junit.xml
reporter: jest-junit
fail-on-error: false
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @subshell/data-repositories

[![CircleCI](https://circleci.com/gh/subshell/data-repositories.svg?style=svg)](https://circleci.com/gh/subshell/data-repositories) [![npm version](https://badge.fury.io/js/%40subshell%2Fdata-repositories.svg)](https://badge.fury.io/js/%40subshell%2Fdata-repositories)
[![CI](https://github.com/subshell/data-repositories/actions/workflows/ci.yml/badge.svg)](https://github.com/subshell/data-repositories/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/%40subshell%2Fdata-repositories.svg)](https://badge.fury.io/js/%40subshell%2Fdata-repositories)

This is a wrapper around [Dexie](https://github.com/dfahlander/Dexie.js), which itself is already a wrapper around IndexedDB. This wrapper allows to create
This is a wrapper around [Dexie](https://github.com/dexie/Dexie.js), which itself is already a wrapper around IndexedDB. This wrapper allows to create
repository classes, similar as you might be used to from Java and Spring Data.

Short example of a repository:
Expand All @@ -28,7 +28,7 @@ class Person {

class PersonRepository extends AbstractRepository<Person, string> {
constructor() {
super(new DatabaseAccess(PersonRepository.name), Person);
super(DatabaseAccess.get(PersonRepository.name), Person);
}
}

Expand Down
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
const config = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
rootDir: 'test',
Expand All @@ -8,3 +8,5 @@ module.exports = {
"^dexie$": require.resolve("dexie"),
}
};

module.exports = config;
Loading