Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system: Migrate to pnpm+turborepo, re-organize workspace #740

Merged
merged 35 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
14a42d2
chore: change imports to support qgh typescript
tokebe Oct 10, 2023
baf769a
chore: console.log => debug, disable unused logs
tokebe Oct 10, 2023
c68eff4
chore: rm unused checkIfZombified()
tokebe Oct 10, 2023
76d9e2d
build: migrate to pnpm&turborepo
tokebe Oct 18, 2023
a17ebb5
build: fix removing @biothings-explorer subdirectory
tokebe Oct 18, 2023
dd3baf8
build: fix clone script
tokebe Oct 18, 2023
3e6bf34
build: move server to own package
tokebe Oct 20, 2023
a043255
build: move packages.txt
tokebe Oct 20, 2023
9c2d2b6
build: move tsconfigs to related packages
tokebe Oct 20, 2023
5377b61
build: fix scripts
tokebe Oct 20, 2023
685cbde
build: fix eslint config
tokebe Oct 20, 2023
01df3e4
build: update node-version
tokebe Oct 20, 2023
ddfd22b
build: update tsconfig
tokebe Oct 20, 2023
ccc9e03
build: update turbo config
tokebe Oct 20, 2023
2924efa
chore: update lockfile
tokebe Oct 20, 2023
ec20ba8
fix: main file
tokebe Oct 20, 2023
873b32d
chore: re-add web-app
tokebe Oct 20, 2023
0532ce1
chore: update lockfile
tokebe Oct 20, 2023
d106916
build: update packages
tokebe Oct 20, 2023
7e1c025
docs: npm -> pnpm
tokebe Oct 20, 2023
9ec267a
ci: update github actions workflows
tokebe Oct 20, 2023
298f954
fix: use pnpm for server start
tokebe Oct 20, 2023
01aaaf8
fix: add workspace to batch execution scripts
tokebe Oct 20, 2023
301c408
test: add test-cov to turbo
tokebe Oct 20, 2023
8fcf4e7
ci: workflow: ensure root is on correct branch
tokebe Oct 20, 2023
147a2c0
ci: workflow: checkout branch using checkout action
tokebe Oct 20, 2023
50347d7
chore: update dependencies, rm unused lockfiles
tokebe Oct 20, 2023
742586c
test: jest and ts-jest must match versions
tokebe Oct 20, 2023
8b7d414
build: better start script behavior
tokebe Oct 20, 2023
a2bbe15
chore: update lock
tokebe Oct 20, 2023
4e457f6
build: add type dependencies
tokebe Oct 20, 2023
768aff4
build: add type dependencies
tokebe Oct 20, 2023
ea604ed
build: simplify package scripts
tokebe Oct 23, 2023
6af59f3
chore: fix server path
tokebe Oct 23, 2023
2b87909
chore: fix server path (but correctly)
tokebe Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading