Skip to content

Commit

Permalink
Merge pull request #740 from biothings/typescript
Browse files Browse the repository at this point in the history
Build system: Migrate to pnpm+turborepo, re-organize workspace
  • Loading branch information
tokebe authored Oct 24, 2023
2 parents 2e7f73d + 2b87909 commit 106cd86
Show file tree
Hide file tree
Showing 182 changed files with 16,814 additions and 119,395 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.eslintrc.js
10 changes: 9 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
module.exports = {
root: true,
env: {
browser: true,
jest: true,
node: true,
commonjs: true,
es2021: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json", "./packages/*/tsconfig.json"],
ecmaVersion: 12,
},
plugins: ["@typescript-eslint", "prettier"],
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/test.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
pnpm run clone
pnpm run git checkout ${{ steps.branch-name.outputs.current_branch }}
pnpm i
pnpm run test-cov
- name: Send coverage report to codecov for visualization
uses: codecov/codecov-action@v3
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/test_ws_cov.yml

This file was deleted.

11 changes: 10 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 @@ -121,7 +124,13 @@ built
/.idea
.idea/

packages
packages/*

# Explicit allow packages.txt
!packages/packages.txt

# Temporary: allow web-app until new web-app integrated
!packages/web-app

# .vscode generally
.vscode/*
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
30 changes: 15 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"smartapi_sync"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"DEBUG": "biomedical-id-resolver,bte*"
Expand All @@ -31,7 +31,7 @@
"smartapi_sync"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"DEBUG": "biomedical-id-resolver,bte*",
Expand All @@ -50,10 +50,10 @@
"preLaunchTask": "build",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"DEBUG": "biomedical-id-resolver,bte*",
Expand All @@ -72,10 +72,10 @@
"preLaunchTask": "build and start redis",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"REDIS_HOST": "localhost",
Expand All @@ -97,10 +97,10 @@
"preLaunchTask": "build and start redis",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"REDIS_HOST": "localhost",
Expand All @@ -123,10 +123,10 @@
"preLaunchTask": "build",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"REDIS_HOST": "localhost",
Expand All @@ -149,10 +149,10 @@
"preLaunchTask": "build and start redis cluster",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"REDIS_HOST": "localhost",
Expand All @@ -175,10 +175,10 @@
"preLaunchTask": "build",
"runtimeArgs": [
"run",
"debug",
"debug"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeExecutable": "pnpm",
"restart": false,
"env": {
"REDIS_HOST": "localhost",
Expand All @@ -194,6 +194,6 @@
],
"stopOnEntry": true,
"console": "integratedTerminal"
},
}
]
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"label": "build",
"type": "shell",
"command": "npm run compile",
"command": "pnpm run build",
"presentation": {
"echo": true,
"reveal": "never",
Expand Down
1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_input.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_input_2.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_input_3.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_query.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_query_2.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/big_sri_query_3.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_0.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_1000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_2000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_3000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_4000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_5000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/bindingdb_query_6000.json

This file was deleted.

1 change: 0 additions & 1 deletion __test__/data/api_results/biothings_disease_query.json

This file was deleted.

Loading

0 comments on commit 106cd86

Please sign in to comment.