Skip to content

Commit 089f5f9

Browse files
authored
Merge pull request #24 from craftzdog/v4
[v4] Use op-sqlite
2 parents 95eaab0 + 3303a02 commit 089f5f9

File tree

118 files changed

+25724
-1955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+25724
-1955
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
12+
end_of_line = lf
13+
charset = utf-8
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true

.eslintrc.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
es6: true,
5+
},
6+
7+
parser: '@typescript-eslint/parser',
8+
extends: ['prettier'],
9+
plugins: ['@typescript-eslint/eslint-plugin'],
10+
11+
settings: {
12+
react: {
13+
version: 'detect',
14+
},
15+
},
16+
17+
overrides: [
18+
{
19+
files: ['*.js'],
20+
parser: '@babel/eslint-parser',
21+
},
22+
{
23+
files: ['*.jsx'],
24+
parser: '@babel/eslint-parser',
25+
},
26+
{
27+
files: ['*.ts', '*.tsx'],
28+
parser: '@typescript-eslint/parser',
29+
plugins: ['@typescript-eslint/eslint-plugin'],
30+
rules: {
31+
'@typescript-eslint/no-unused-vars': 'off',
32+
'no-unused-vars': 'off',
33+
'no-shadow': 'off',
34+
'@typescript-eslint/no-shadow': 'off',
35+
'no-undef': 'off',
36+
'func-call-spacing': 'off',
37+
'@typescript-eslint/func-call-spacing': 1,
38+
},
39+
},
40+
],
41+
42+
// Map from global var to bool specifying if it can be redefined
43+
globals: {
44+
__DEV__: true,
45+
__dirname: false,
46+
__fbBatchedBridgeConfig: false,
47+
AbortController: false,
48+
Blob: true,
49+
alert: false,
50+
cancelAnimationFrame: false,
51+
cancelIdleCallback: false,
52+
clearImmediate: true,
53+
clearInterval: false,
54+
clearTimeout: false,
55+
console: false,
56+
document: false,
57+
ErrorUtils: false,
58+
escape: false,
59+
Event: false,
60+
EventTarget: false,
61+
exports: false,
62+
fetch: false,
63+
File: true,
64+
FileReader: false,
65+
FormData: false,
66+
global: false,
67+
Headers: false,
68+
Intl: false,
69+
Map: true,
70+
module: false,
71+
navigator: false,
72+
process: false,
73+
Promise: true,
74+
requestAnimationFrame: true,
75+
requestIdleCallback: true,
76+
require: false,
77+
Set: true,
78+
setImmediate: true,
79+
setInterval: false,
80+
setTimeout: false,
81+
queueMicrotask: true,
82+
URL: false,
83+
URLSearchParams: false,
84+
WebSocket: true,
85+
window: false,
86+
XMLHttpRequest: false,
87+
},
88+
89+
rules: {
90+
'@typescript-eslint/no-unused-vars': 'off',
91+
'no-unused-vars': 'off',
92+
'no-shadow': 'off',
93+
'@typescript-eslint/no-shadow': 1,
94+
'no-undef': 'off',
95+
},
96+
}

.github/actions/setup/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v3
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache dependencies
13+
id: yarn-cache
14+
uses: actions/cache@v3
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
- name: Lint files
21+
run: yarn lint
22+
23+
- name: Typecheck files
24+
run: yarn typecheck
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Setup
33+
uses: ./.github/actions/setup
34+
35+
- name: Run unit tests
36+
run: yarn test --maxWorkers=2 --coverage
37+
38+
build-library:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
44+
- name: Setup
45+
uses: ./.github/actions/setup
46+
47+
- name: Build package
48+
run: yarn prepare

.gitignore

100755100644
Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,80 @@
1-
dist
2-
node_modules
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
# Android/IJ
33+
#
34+
.classpath
35+
.cxx
36+
.gradle
37+
.idea
38+
.project
39+
.settings
40+
local.properties
41+
android.iml
42+
43+
# Cocoapods
44+
#
45+
example/ios/Pods
46+
47+
# Ruby
48+
example/vendor/
49+
50+
# node.js
51+
#
52+
node_modules/
53+
npm-debug.log
54+
yarn-debug.log
55+
yarn-error.log
56+
57+
# BUCK
58+
buck-out/
59+
\.buckd/
60+
android/app/libs
61+
android/keystores/debug.keystore
62+
63+
# Yarn
64+
.yarn/*
65+
!.yarn/patches
66+
!.yarn/plugins
67+
!.yarn/releases
68+
!.yarn/sdks
69+
!.yarn/versions
70+
71+
# Expo
72+
.expo/
73+
74+
# Turborepo
75+
.turbo/
76+
77+
# generated by bob
78+
lib/
79+
80+
.env*.local

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)