Skip to content

Commit

Permalink
Merge pull request #170 from biothings/typescript
Browse files Browse the repository at this point in the history
Migrate package to Typescript and new build system
  • Loading branch information
tokebe authored Oct 24, 2023
2 parents f68184d + 5e0b436 commit b39d7bb
Show file tree
Hide file tree
Showing 73 changed files with 4,317 additions and 19,194 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/coverage.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/coverage_ws.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/test_ws.yml

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/test_ws_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ jobs:
- uses: actions/checkout@v3
with:
repository: biothings/biothings_explorer
ref: ${{ steps.branch-name.outputs.current_branch }}

- name: Use Node.js 16.x
uses: actions/setup-node@v1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: npm install, generate coverage report
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: pnpm install, generate coverage report
run: |
npm run clone
npm run git checkout ${{ steps.branch-name.outputs.current_branch }}
npm i || true && npm i
npm run test-cov --workspace=@biothings-explorer/query_graph_handler
pnpm run clone
pnpm run git checkout ${{ steps.branch-name.outputs.current_branch }}
pnpm i
pnpm --filter query_graph_handler test-cov
- name: Send coverage report to codecov for visualization
uses: codecov/codecov-action@v3
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ typings/
# TypeScript cache
*.tsbuildinfo

# Turbo cache
.turbo

# Optional npm cache directory
.npm

Expand Down Expand Up @@ -104,4 +107,4 @@ dist
.tern-port

# Javascript build folder
built/
built/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A on-the-fly query engine for BioThings Explorer based on TRAPI Query Graph.
## Install

```bash
npm i @biothings-explorer/query_graph_handler
pnpm i @biothings-explorer/query_graph_handler
```

## Usage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const BatchEdgeQueryHandler = require('../../src/batch_edge_query');
const meta_kg = require('@biothings-explorer/smartapi-kg');
import BatchEdgeQueryHandler from '../../src/batch_edge_query';
import MetaKG from '@biothings-explorer/smartapi-kg';

describe('Testing BatchEdgeQueryHandler Module', () => {
const kg = new meta_kg.default();
const kg = new MetaKG();
kg.constructMetaKGSync();

describe('Testing query function', () => {
Expand Down
166 changes: 0 additions & 166 deletions __test__/integration/KnowledgeGraph.test.js

This file was deleted.

Loading

0 comments on commit b39d7bb

Please sign in to comment.