Skip to content

Commit e577b48

Browse files
feat: update deps
1 parent 9467cb8 commit e577b48

11 files changed

Lines changed: 3573 additions & 4390 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ci
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
build-and-test-job:
7+
runs-on: ubuntu-latest
8+
if: "!contains(github.event.head_commit.message, 'skip ci')"
9+
env:
10+
NODE_OPTIONS: '--max-old-space-size=3200'
11+
steps:
12+
- { uses: actions/checkout@v4, with: { persist-credentials: false } }
13+
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
14+
- run: yarn --frozen-lockfile
15+
- run: yarn build
16+
- run: yarn test

.github/workflows/default.yml

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

.github/workflows/lighthouse.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@ jobs:
1212
if: "!contains(github.event.head_commit.message, 'skip ci')"
1313
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
1414
steps:
15-
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
16-
- { uses: actions/setup-node@v1, with: { node-version: 14 } }
17-
- uses: actions/cache@v2
18-
with:
19-
path: ./node_modules
20-
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
21-
22-
- name: yarn
23-
run: yarn --frozen-lockfile
15+
- { uses: actions/checkout@v4, with: { persist-credentials: true } }
16+
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
17+
- run: yarn --frozen-lockfile
2418

2519
- name: lhci
2620
env:

.github/workflows/release.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,16 @@ jobs:
1010
if: "!contains(github.event.head_commit.message, 'skip ci')"
1111
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
1212
steps:
13-
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
14-
- { uses: actions/setup-node@v2, with: { node-version: 14 } }
13+
- { uses: actions/checkout@v4, with: { persist-credentials: true } }
14+
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
15+
- run: yarn --frozen-lockfile
1516

1617
# Cache for npm/npx in ~/.npm
1718
- uses: actions/cache@v2
1819
with:
1920
path: ~/.npm
2021
key: npm-v1-${{ runner.os }}
2122

22-
# Normal cache for yarn in ./node_modules
23-
- uses: actions/cache@v2
24-
with:
25-
path: ./node_modules
26-
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
27-
28-
- name: yarn
29-
run: yarn --frozen-lockfile
30-
3123
- name: build
3224
run: yarn build-prod
3325

CHANGELOG.md

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1 @@
1-
## [1.2.6](https://github.com/NaturalCycles/github-db/compare/v1.2.5...v1.2.6) (2021-10-20)
2-
3-
4-
### Bug Fixes
5-
6-
* deps ([41a04b4](https://github.com/NaturalCycles/github-db/commit/41a04b465955be563c4f95cc29f909b528334114))
7-
* deps ([09d58a4](https://github.com/NaturalCycles/github-db/commit/09d58a437eda0202d5da29f4ab8685a8c3900670))
8-
9-
## [1.2.5](https://github.com/NaturalCycles/github-db/compare/v1.2.4...v1.2.5) (2020-10-25)
10-
11-
12-
### Bug Fixes
13-
14-
* deps ([e03b3f2](https://github.com/NaturalCycles/github-db/commit/e03b3f2de7e6c1b47c1591930b4227df06f8d6e1))
15-
16-
## [1.2.4](https://github.com/NaturalCycles/github-db/compare/v1.2.3...v1.2.4) (2020-08-11)
17-
18-
19-
### Bug Fixes
20-
21-
* deps ([e90f92f](https://github.com/NaturalCycles/github-db/commit/e90f92fd2c6332ffa7811b2a124c19a2329444dc))
22-
23-
## [1.2.3](https://github.com/NaturalCycles/github-db/compare/v1.2.2...v1.2.3) (2020-05-31)
24-
25-
26-
### Bug Fixes
27-
28-
* allow read-only access to public repo without token! ([21442ca](https://github.com/NaturalCycles/github-db/commit/21442ca4396889fa4267dd2a6d9580e51f5d93e3))
29-
30-
## [1.2.2](https://github.com/NaturalCycles/github-db/compare/v1.2.1...v1.2.2) (2020-05-31)
31-
32-
33-
### Bug Fixes
34-
35-
* adapt to db-lib@7 ([b5b0a4d](https://github.com/NaturalCycles/github-db/commit/b5b0a4dded722a42d6d558bd760fad667585c6d8))
36-
37-
## [1.2.1](https://github.com/NaturalCycles/github-db/compare/v1.2.0...v1.2.1) (2020-05-25)
38-
39-
40-
### Bug Fixes
41-
42-
* publish ([06a863b](https://github.com/NaturalCycles/github-db/commit/06a863ba22c9aba09c9c83c6ffab92fb994e363e))
43-
44-
# [1.2.0](https://github.com/NaturalCycles/github-db/compare/v1.1.0...v1.2.0) (2020-05-24)
45-
46-
47-
### Features
48-
49-
* use p-queue to control github api access concurrency ([f19374c](https://github.com/NaturalCycles/github-db/commit/f19374ca24b3a6d76ec4c34d60f18973a1362574))
50-
51-
# [1.1.0](https://github.com/NaturalCycles/github-db/compare/v1.0.0...v1.1.0) (2020-05-24)
52-
53-
54-
### Features
55-
56-
* saveFiles saves multiple files in 1 commit ([fb40ace](https://github.com/NaturalCycles/github-db/commit/fb40ace25a30d5f26401b0e4f8ae0b2bf2ca3ff1))
57-
58-
# 1.0.0 (2020-05-11)
59-
60-
61-
### Features
62-
63-
* first working version ([245e3b6](https://github.com/NaturalCycles/github-db/commit/245e3b6c0225f418d69ac0ec2bb2b8bd4be77980))
1+
See [Github Releases](https://github.com/NaturalCycles/github-db/releases)

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
"dependencies": {
88
"@naturalcycles/db-lib": "^8.3.0",
99
"@naturalcycles/js-lib": "^14.6.0",
10-
"@naturalcycles/nodejs-lib": "^12.4.0",
10+
"@naturalcycles/nodejs-lib": "^13.3.0",
1111
"p-queue": "^6.6.2"
1212
},
1313
"devDependencies": {
14-
"@lhci/cli": "^0.8.2",
15-
"@naturalcycles/dev-lib": "^12.8.1",
14+
"@lhci/cli": "^0.13.0",
15+
"@naturalcycles/dev-lib": "^13.44.10",
1616
"@naturalcycles/time-lib": "^3.0.4",
17-
"@types/node": "^16.11.1",
18-
"fs-extra": "^10.0.0",
19-
"jest": "^27.3.0"
17+
"@types/node": "^20.10.6",
18+
"jest": "^29.7.0"
2019
},
2120
"files": [
2221
"dist",
@@ -36,10 +35,10 @@
3635
"url": "https://github.com/NaturalCycles/github-db"
3736
},
3837
"engines": {
39-
"node": ">=12.13.1"
38+
"node": ">=18.12.0"
4039
},
4140
"version": "1.2.6",
42-
"description": "",
41+
"description": "GitHub branch as a Database",
4342
"author": "Natural Cycles Team",
4443
"license": "MIT"
4544
}

scripts/persistLHReport.script.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { FileDB } from '@naturalcycles/db-lib/dist/adapter/file'
88
import { CommonTimeSeriesDao } from '@naturalcycles/db-lib/dist/timeseries/commonTimeSeriesDao'
99
import { TimeSeriesSaveBatchOp } from '@naturalcycles/db-lib/dist/timeseries/timeSeries.model'
1010
import { _filterNullishValues } from '@naturalcycles/js-lib'
11-
import { requireEnvKeys } from '@naturalcycles/nodejs-lib'
12-
import { runScript } from '@naturalcycles/nodejs-lib/dist/script'
13-
import * as fs from 'fs-extra'
11+
import { fs2, requireEnvKeys, runScript } from '@naturalcycles/nodejs-lib'
1412
import { GithubPersistencePlugin } from '../src'
1513
import { lhciDir, tmpDir } from '../src/test/paths.cnst'
1614

@@ -46,7 +44,7 @@ const tsDao = new CommonTimeSeriesDao({
4644
})
4745

4846
runScript(async () => {
49-
const fname = fs.readdirSync(`${lhciDir}`).find(f => f.endsWith('.json'))
47+
const fname = fs2.readdirSync(`${lhciDir}`).find(f => f.endsWith('.json'))
5048
if (!fname) {
5149
console.log(`No *.json files found in ${lhciDir}`)
5250
return
@@ -58,10 +56,10 @@ runScript(async () => {
5856
throw new Error(`Cannot parse unixMillis from filename: ${fname}`)
5957
}
6058

61-
const r = fs.readJsonSync(`${lhciDir}/${fname}`)
59+
const r: any = fs2.readJsonSync(`${lhciDir}/${fname}`)
6260
// console.log(r)
6361

64-
const r2 = {}
62+
const r2: any = {}
6563

6664
props.forEach(prop => {
6765
// console.log(prop)
@@ -72,8 +70,8 @@ runScript(async () => {
7270
_filterNullishValues(r2, true)
7371

7472
// File is just for debugging
75-
await fs.ensureDir(tmpDir)
76-
fs.writeJsonSync(`${tmpDir}/report.json`, r2, { spaces: 2 })
73+
fs2.ensureDirSync(tmpDir)
74+
fs2.writeJsonSync(`${tmpDir}/report.json`, r2, { spaces: 2 })
7775

7876
/// /
7977

0 commit comments

Comments
 (0)