Skip to content

Commit 5f8caf0

Browse files
authored
chore: remove react-components and workspaces, use Vite (#492)
* Remove react-components - initial * fixed resolution for Monaco loader * unify hooks in single directory * reorganize search-related files * submodule * add jest-util for unit tests * remove PnP , fix eslint config, add typecheck and lint scripts * use single package, arrange workflows and test suites * submodule * use correct path when packaging * change unit test capture patterns * move scripts and cypress assets * remove unused deps * switch to vite, fix sass syntax, update radix packages, remove unused packages, remove serve-dist * use vitest, configure eslint and tsconfig properly * submodule * fix proxy and linting, remove strict eslint pllugins * submodule * remove webpack resolution, broaden files in editorconfig * update readme * ent test fixes * chore: fix lint errors, add lint check pre-commit hook (#494) * init * fix all lint issues * add precommit hook for linting * submodule * use correct field name * add e2e tests to linting, fix prettier errors * error color * submodule * submodule
1 parent fb68532 commit 5f8caf0

File tree

2,702 files changed

+31175
-84638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,702 files changed

+31175
-84638
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ root = true
44
end_of_line = lf
55
insert_final_newline = true
66

7-
[*.{js,json,yml,tsx}]
7+
[*.{js,jsx,ts,tsx,mts,json,yml,yaml,css,scss,html}]
88
charset = utf-8
99
indent_style = space
1010
indent_size = 2
File renamed without changes.

.eslintrc.json

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

.github/workflows/ci.yml

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
cache: maven
2121

2222
- name: Build QuestDB
23-
run: mvn clean package -f packages/browser-tests/questdb/pom.xml -DskipTests -P build-binaries
23+
run: mvn clean package -f e2e/questdb/pom.xml -DskipTests -P build-binaries
2424

2525
- name: Extract QuestDB
26-
run: tar -xzf packages/browser-tests/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
26+
run: tar -xzf e2e/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
2727

2828
- name: Create DB Root
2929
run: mkdir tmp/dbroot
@@ -40,22 +40,19 @@ jobs:
4040
cache: "yarn"
4141

4242
- name: Install dependencies
43-
run: yarn install --immutable --immutable-cache
43+
run: yarn install --immutable
4444

45-
- name: Build @questdb/react-components
46-
run: yarn workspace @questdb/react-components run build
45+
- name: Build
46+
run: yarn build
4747

48-
- name: Build @questdb/web-console
49-
run: yarn workspace @questdb/web-console run build
48+
- name: Run bundle watcher
49+
run: yarn bundlewatch
5050

51-
- name: Run bundle watcher on @questdb/web-console
52-
run: yarn workspace @questdb/web-console bundlewatch
51+
- name: Run unit tests
52+
run: yarn test:unit
5353

54-
- name: Run @questdb/web-console unit tests
55-
run: yarn workspace @questdb/web-console run test:prod
56-
57-
- name: Run browser-tests test - auth
58-
run: node packages/web-console/serve-dist.js & yarn workspace browser-tests test:auth
54+
- name: Run e2e tests - auth
55+
run: yarn preview & yarn test:e2e:auth
5956

6057
- name: Stop QuestDB
6158
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
@@ -68,8 +65,8 @@ jobs:
6865
QDB_HTTP_PASSWORD: "quest"
6966
QDB_TELEMETRY_ENABLED: "false"
7067

71-
- name: Run browser-tests test
72-
run: yarn workspace browser-tests test
68+
- name: Run e2e tests
69+
run: yarn test:e2e
7370

7471
- name: Print Log Files
7572
if: success() || failure()
@@ -87,27 +84,18 @@ jobs:
8784
uses: actions/upload-artifact@v4
8885
with:
8986
name: cypress-screenshots
90-
path: packages/browser-tests/cypress/screenshots
87+
path: e2e/screenshots
9188
if-no-files-found: ignore
9289

9390
- name: Stop QuestDB
9491
if: success() || failure()
9592
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
9693

97-
- name: Publish @questdb/react-components to npm
98-
if: success() && github.ref == 'refs/heads/main'
99-
uses: JS-DevTools/npm-publish@v3
100-
with:
101-
token: ${{ secrets.NPM_TOKEN }}
102-
access: public
103-
strategy: upgrade
104-
package: ./packages/react-components/package.json
105-
106-
- name: Publish @questdb/web-console to npm
94+
- name: Publish to npm
10795
if: success() && github.ref == 'refs/heads/main'
10896
uses: JS-DevTools/npm-publish@v3
10997
with:
11098
token: ${{ secrets.NPM_TOKEN }}
11199
access: public
112100
strategy: upgrade
113-
package: ./packages/web-console/package.json
101+
package: ./package.json
Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Publish Packages to NPM
1+
name: Publish to NPM
22

33
on:
44
workflow_dispatch:
55

66
jobs:
77
publish:
8-
name: Publish Packages to NPM
8+
name: Publish to NPM
99
runs-on: ubuntu-latest
1010

1111
steps:
@@ -19,26 +19,15 @@ jobs:
1919
cache: "yarn"
2020

2121
- name: Install dependencies
22-
run: yarn install --immutable --immutable-cache
22+
run: yarn install --immutable
2323

24-
- name: Build @questdb/react-components
25-
run: yarn workspace @questdb/react-components run build
24+
- name: Build
25+
run: yarn build
2626

27-
- name: Build @questdb/web-console
28-
run: yarn workspace @questdb/web-console run build
29-
30-
- name: Publish @questdb/react-components to npm
31-
uses: JS-DevTools/npm-publish@v1
32-
with:
33-
token: ${{ secrets.NPM_TOKEN }}
34-
access: public
35-
check-version: true
36-
package: ./packages/react-components/package.json
37-
38-
- name: Publish @questdb/web-console to npm
27+
- name: Publish to npm
3928
uses: JS-DevTools/npm-publish@v1
4029
with:
4130
token: ${{ secrets.NPM_TOKEN }}
4231
access: public
4332
check-version: true
44-
package: ./packages/web-console/package.json
33+
package: ./package.json

.github/workflows/tests_with_context_path.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
cache: maven
2424

2525
- name: Build QuestDB
26-
run: mvn clean package -f packages/browser-tests/questdb/pom.xml -DskipTests -P build-binaries
26+
run: mvn clean package -f e2e/questdb/pom.xml -DskipTests -P build-binaries
2727

2828
- name: Extract QuestDB
29-
run: tar -xzf packages/browser-tests/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
29+
run: tar -xzf e2e/questdb/core/target/questdb-*-rt-linux-x86-64.tar.gz -C tmp/
3030

3131
- name: Create DB Root
3232
run: mkdir tmp/dbroot
@@ -43,22 +43,19 @@ jobs:
4343
cache: "yarn"
4444

4545
- name: Install dependencies
46-
run: yarn install --immutable --immutable-cache
46+
run: yarn install --immutable
4747

48-
- name: Build @questdb/react-components
49-
run: yarn workspace @questdb/react-components run build
48+
- name: Build
49+
run: yarn build
5050

51-
- name: Build @questdb/web-console
52-
run: yarn workspace @questdb/web-console run build
51+
- name: Run bundle watcher
52+
run: yarn bundlewatch
5353

54-
- name: Run bundle watcher on @questdb/web-console
55-
run: yarn workspace @questdb/web-console bundlewatch
54+
- name: Run unit tests
55+
run: yarn test:unit
5656

57-
- name: Run @questdb/web-console unit tests
58-
run: yarn workspace @questdb/web-console run test:prod
59-
60-
- name: Run browser-tests test - auth
61-
run: node packages/web-console/serve-dist.js & yarn workspace browser-tests test:auth
57+
- name: Run e2e tests - auth
58+
run: yarn preview & yarn test:e2e:auth
6259

6360
- name: Stop QuestDB
6461
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
@@ -71,8 +68,8 @@ jobs:
7168
QDB_HTTP_PASSWORD: "quest"
7269
QDB_TELEMETRY_ENABLED: "false"
7370

74-
- name: Run browser-tests test
75-
run: yarn workspace browser-tests test
71+
- name: Run e2e tests
72+
run: yarn test:e2e
7673

7774
- name: Print Log Files
7875
if: success() || failure()
@@ -90,7 +87,7 @@ jobs:
9087
uses: actions/upload-artifact@v4
9188
with:
9289
name: cypress-screenshots
93-
path: packages/browser-tests/cypress/screenshots
90+
path: e2e/screenshots
9491
if-no-files-found: ignore
9592

9693
- name: Stop QuestDB

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
node_modules
22
.yarn/*
3-
!.yarn/cache
43
!.yarn/patches
54
!.yarn/plugins
65
!.yarn/releases
7-
!.yarn/sdks
86
!.yarn/versions
97
.idea
108
.DS_Store
119
*.iml
10+
dist
11+
.tmp
12+
.sass-cache
13+
.env

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "questdb"]
2-
path = packages/browser-tests/questdb
2+
path = e2e/questdb
33
url = https://github.com/questdb/questdb.git

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn lint-staged

0 commit comments

Comments
 (0)