Skip to content

Commit 9ed27f3

Browse files
committed
cleanup
1 parent 8252c80 commit 9ed27f3

File tree

7 files changed

+45
-31
lines changed

7 files changed

+45
-31
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
node-version:
12+
- lts/* # LTS version
13+
- "17" # latest version
14+
os: [ubuntu-latest, macOS-latest, windows-latest]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Node ${{ matrix.node-version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- run: npm run setup
24+
- run: npm test

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# pico-framework
22

3-
[![Build Status](https://travis-ci.org/Picolab/pico-framework.svg)](https://travis-ci.org/Picolab/pico-framework)
4-
[![codecov](https://codecov.io/gh/Picolab/pico-framework/branch/master/graph/badge.svg)](https://codecov.io/gh/Picolab/pico-framework)
5-
63
A framework for building actor-based, people-centric systems. (pico = PersIstent Compute Objects)
74

85
## Why Picos?

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"scripts": {
3535
"prepublish": "npm run build",
3636
"build": "rm -rf dist && tsc",
37-
"test": "nyc ava",
38-
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
37+
"test": "nyc ava"
3938
},
4039
"dependencies": {
4140
"charwise": "^3.0.1",
@@ -51,11 +50,10 @@
5150
"@types/abstract-leveldown": "^5.0.1",
5251
"@types/levelup": "^4.3.0",
5352
"@types/lodash": "^4.14.157",
54-
"ava": "^3.10.1",
55-
"codecov": "^3.7.1",
53+
"ava": "^4.0.0",
5654
"nyc": "^15.1.0",
57-
"ts-node": "^8.10.2",
58-
"typescript": "^3.9.7"
55+
"ts-node": "^10.4.0",
56+
"typescript": "^4.5.4"
5957
},
6058
"ava": {
6159
"extensions": [

src/Pico.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export class Pico {
423423
let data: any;
424424
try {
425425
data = await this.pf.db.get(["entvar", this.id, rid, name]);
426-
} catch (err) {
426+
} catch (err: any) {
427427
if (err.notFound) {
428428
return null;
429429
}

src/PicoFramework.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class PicoFramework {
160160
let rootId: string | null;
161161
try {
162162
rootId = await this.db.get(["root-pico"]);
163-
} catch (err) {
163+
} catch (err: any) {
164164
if (err.notFound) {
165165
rootId = null;
166166
} else {

test/cleanQuery.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from "ava";
22
import { cleanQuery } from "../src/PicoQuery";
33

4-
test("query = cleanQuery(query)", function(t) {
4+
test("query = cleanQuery(query)", function (t) {
55
try {
66
cleanQuery(null);
77
t.fail("should throw");
@@ -50,13 +50,13 @@ test("query = cleanQuery(query)", function(t) {
5050
cleanQuery({
5151
eci: "eci123",
5252
rid: "foo",
53-
name: "bar"
53+
name: "bar",
5454
}),
5555
{
5656
eci: "eci123",
5757
rid: "foo",
5858
name: "bar",
59-
args: {}
59+
args: {},
6060
}
6161
);
6262

@@ -66,13 +66,13 @@ test("query = cleanQuery(query)", function(t) {
6666
eci: "eci123",
6767
rid: "foo",
6868
name: "bar",
69-
args: args
69+
args: args,
7070
});
7171
t.deepEqual(query, {
7272
eci: "eci123",
7373
rid: "foo",
7474
name: "bar",
75-
args: args
75+
args: args,
7676
});
7777
t.deepEqual(query.args, args, "they should match before query.args mutates");
7878
query.args.what = "blah";
@@ -84,13 +84,13 @@ test("query = cleanQuery(query)", function(t) {
8484
eci: " eci123 ",
8585
rid: " foo\n ",
8686
name: " \t bar ",
87-
args: { " foo ": " don't trim these " }
87+
args: { " foo ": " don't trim these " },
8888
}),
8989
{
9090
eci: "eci123",
9191
rid: "foo",
9292
name: "bar",
93-
args: { " foo ": " don't trim these " }
93+
args: { " foo ": " don't trim these " },
9494
}
9595
);
9696

@@ -100,13 +100,13 @@ test("query = cleanQuery(query)", function(t) {
100100
eci: "eci123",
101101
rid: "foo",
102102
name: "bar",
103-
timestamp: new Date()
103+
timestamp: new Date(),
104104
}),
105105
{
106106
eci: "eci123",
107107
rid: "foo",
108108
name: "bar",
109-
args: {}
109+
args: {},
110110
}
111111
);
112112

@@ -116,13 +116,13 @@ test("query = cleanQuery(query)", function(t) {
116116
eci: "eci123",
117117
rid: "foo",
118118
name: "bar",
119-
for_rid: "rid"
119+
for_rid: "rid",
120120
}),
121121
{
122122
eci: "eci123",
123123
rid: "foo",
124124
name: "bar",
125-
args: {}
125+
args: {},
126126
}
127127
);
128128

@@ -131,7 +131,7 @@ test("query = cleanQuery(query)", function(t) {
131131
eci: "eci123",
132132
rid: "foo",
133133
name: "bar",
134-
args
134+
args,
135135
}).args;
136136
}
137137

@@ -146,14 +146,15 @@ test("query = cleanQuery(query)", function(t) {
146146
const a = { one: 2 };
147147
const b = cleanArgs(a);
148148
t.false(a === b, "must be a clone");
149+
// @ts-ignore
149150
t.deepEqual(a, b);
150151
b.extra = 3;
151152
t.notDeepEqual(a, b);
152153

153154
t.deepEqual(
154155
cleanArgs({
155156
one: 2,
156-
three: function() {}
157+
three: function () {},
157158
}),
158159
{ one: 2 },
159160
"remove non-jsonable things"
@@ -165,7 +166,7 @@ test("query = cleanQuery(query)", function(t) {
165166
"args normalize to JSON null's"
166167
);
167168

168-
(function(a, b) {
169+
(function (a, b) {
169170
t.deepEqual(
170171
cleanArgs(arguments),
171172
{ "0": "foo", "1": "bar" },

0 commit comments

Comments
 (0)