Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: threshold862543/peerbit-getting-started
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: dao-xyz/peerbit-getting-started
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing with 3,712 additions and 3,337 deletions.
  1. +25 −0 .eslintrc.cjs
  2. +3 −0 .prettierrc.json
  3. +29 −29 .vscode/launch.json
  4. +8 −8 .vscode/settings.json
  5. +9 −1 README.md
  6. +0 −175 getting-started.md
  7. +18 −19 jest.config.ts
  8. +43 −37 package.json
  9. +223 −161 src/index.test.ts
  10. +28 −30 src/index.ts
  11. +18 −25 tsconfig.json
  12. +3,308 −2,852 yarn.lock
25 changes: 25 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
"root": true,
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"ignorePatterns": ["**/dist/"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-as-const": "off"
},
}
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"tabWidth": 4
}
58 changes: 29 additions & 29 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "vscode-jest-tests",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"cwd": "${workspaceRoot}",
"args": [
"--colors",
"--verbose",
"--runInBand",
"-c",
"jest.config.ts"
],
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
},
"env": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"console": "integratedTerminal",
"smartStep": false
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "vscode-jest-tests",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"cwd": "${workspaceRoot}",
"args": [
"--colors",
"--verbose",
"--runInBand",
"-c",
"jest.config.ts"
],
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
},
"env": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"console": "integratedTerminal",
"smartStep": false
}
]
}
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"editor.formatOnSave": true,
"jest.nodeEnv": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.detectIndentation": false
}
"editor.formatOnSave": true,
"jest.nodeEnv": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.detectIndentation": false
}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ Clone it to get started right away!

In [index.ts](./src/index.ts) we are creating a Database for text documents, which we try out in the [tests](./src/index.test.ts)

## [Click here to see a getting started guide about this project](./getting-started.md)


## Install
```sh
@@ -22,6 +22,14 @@ yarn test
yarn build
```

# Getting started
To just play around with this project, clone in and open it in your favority editor.
Below the details of the project setup are explained.

# Documentation
Peerbit documentation can be found at [peerbit.org](https://peerbit.org)


## VS Code users
.vscode folder is included in this project

175 changes: 0 additions & 175 deletions getting-started.md

This file was deleted.

37 changes: 18 additions & 19 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import type { JestConfigWithTsJest } from "ts-jest";

const jestConfig: JestConfigWithTsJest = {
preset: "ts-jest",
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
extensionsToTreatAsEsm: [".ts"],
forceExit: true,
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transformIgnorePatterns: [],
testRegex: "/src/[A-Za-z0-9-/]+(\\.integration)?\\.(test|spec)\\.ts$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testTimeout: 600000
preset: "ts-jest",
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transformIgnorePatterns: [],
testRegex: "/src/[A-Za-z0-9-/]+(\\.integration)?\\.(test|spec)\\.ts$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testTimeout: 600000,
};
export default jestConfig;
Loading