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

refactor: node #1648

Closed
wants to merge 289 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
289 commits
Select commit Hold shift + click to select a range
bc380b8
chore: update types
ErKeLost Aug 1, 2024
758f12f
chore: add handlePing middleware
ErKeLost Aug 1, 2024
9a27062
Merge branch 'refactor/server' of https://github.com/farm-fe/farm int…
ErKeLost Aug 1, 2024
e2de6f9
fix: lazy compilation in mode error
ErKeLost Aug 2, 2024
a42bc42
fix: initial methods params modify
ErKeLost Aug 6, 2024
1e0a8c3
Merge remote-tracking branch 'upstream/refactor/node' into refactor/s…
ErKeLost Aug 6, 2024
aa6e126
chore: update ws error
ErKeLost Aug 6, 2024
6973fc9
fix: optimize the judgment conditions for warning
Aug 6, 2024
f9c1a63
chore: perf server code (#1697)
ErKeLost Aug 7, 2024
ba15ef9
fix: vite hmr reload page (#1701)
ErKeLost Aug 8, 2024
a294eba
Merge branch 'main' into refactor/node
ErKeLost Aug 8, 2024
04b8c5f
chore: perf core code
ErKeLost Aug 8, 2024
352df7c
Merge branch 'main' into refactor/node
ErKeLost Aug 9, 2024
902c5c8
feat: cacheDir check for the FILLEXTREME (#1708)
zhangmo8 Aug 9, 2024
fe05078
Merge branch 'refactor/node' into refactor/server
ErKeLost Aug 9, 2024
5217d40
chore: update format timer config and show cache text logic
ErKeLost Aug 9, 2024
c31bc2a
chore: adaptor vite vue plugin middleware
ErKeLost Aug 9, 2024
9fe5d78
chore: update methods
ErKeLost Aug 9, 2024
9858541
chore: update methods
ErKeLost Aug 9, 2024
c24ac3c
fix: vite hmr error
ErKeLost Aug 9, 2024
d1ccbee
chore: add code spell and remove biome lips
ErKeLost Aug 9, 2024
78be76d
chore: update code
ErKeLost Aug 12, 2024
3dcf65d
chore: add proxy and cors middlewares
ErKeLost Aug 12, 2024
4b55853
chore: add test
ErKeLost Aug 12, 2024
9cb32c4
chore: finish lazy compilation middleware
ErKeLost Aug 12, 2024
4189526
chore: public middleware
ErKeLost Aug 12, 2024
4d97490
chore: pref export ways
ErKeLost Aug 12, 2024
005fb76
chore: add publicPath redirect middleware
ErKeLost Aug 12, 2024
bcd6b71
feat: add publicResource middleware and resource middleware
ErKeLost Aug 13, 2024
1c30d7c
chore: remove unless code
ErKeLost Aug 13, 2024
e8ce078
chore: remove unless code
ErKeLost Aug 13, 2024
2fe709c
fix: sirv middleware load public dir assets
ErKeLost Aug 13, 2024
c37fbad
fix: publicPath resolve hmr error ws connect error
ErKeLost Aug 13, 2024
b53d2cd
fix: public path cause redirect path error
ErKeLost Aug 13, 2024
b9b2986
chore: finish base middleware
ErKeLost Aug 14, 2024
e60c3e9
chore: remove unless code
ErKeLost Aug 14, 2024
55f15b8
chore: perf resolve server options (#1712)
ErKeLost Aug 14, 2024
d328c66
Merge branch 'refactor/node' into refactor/server
ErKeLost Aug 14, 2024
2141f8a
chore: update 404 middleware, publicPath middleware
ErKeLost Aug 14, 2024
9acd2e3
chore: test svelte publicPath
ErKeLost Aug 15, 2024
12c1651
fix: if exist publicDir and public middleware logic
ErKeLost Aug 15, 2024
da04dd3
refactor: delay the creation of the entire compiler to resolve port c…
ErKeLost Aug 15, 2024
b6ba9f6
feat: add base httpServer class
ErKeLost Aug 15, 2024
61c9bce
chore: resolveUrl finished
ErKeLost Aug 15, 2024
2a1bf92
chore: remove unless deps
ErKeLost Aug 15, 2024
af14aa7
Merge branch 'refactor/node' into refactor/server
ErKeLost Aug 16, 2024
7333b37
fix: bootstrap error
ErKeLost Aug 16, 2024
c8f1a93
fix: bootstrap error
ErKeLost Aug 16, 2024
6d248b2
chore: add open browser
ErKeLost Aug 16, 2024
d334062
chore: update newServer logic
ErKeLost Aug 19, 2024
897846d
chore: update ws logic
ErKeLost Aug 19, 2024
4b6525c
chore: add todo
ErKeLost Aug 19, 2024
f7c16e5
Merge branch 'refactor/node' into refactor/server
ErKeLost Aug 20, 2024
a248658
Merge remote-tracking branch 'upstream' into refactor/node
ErKeLost Aug 20, 2024
80f08d3
chore: update lock
ErKeLost Aug 20, 2024
a7bf1db
Merge branch 'main' into refactor/node
ErKeLost Aug 20, 2024
76cd653
Merge branch 'main' into refactor/node
ErKeLost Aug 20, 2024
b229238
chore: add vitest workspace
ErKeLost Aug 21, 2024
fb16f89
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Aug 21, 2024
3cdd106
chore: temporarily replace-dirname remove
ErKeLost Aug 22, 2024
590e5ff
chore: temporarily replace-dirname add
ErKeLost Aug 22, 2024
7d4e86b
Merge branch 'main' into refactor/node
ErKeLost Aug 23, 2024
c5c1d62
chore: bump dep version
ErKeLost Aug 23, 2024
e7f1b8c
chore: optimize ws server
ErKeLost Aug 23, 2024
c0aa945
chore: update deps
ErKeLost Aug 23, 2024
096b789
Merge branch 'main' into refactor/node
ErKeLost Aug 26, 2024
ecee4d6
chore: update deps and merge main branch
ErKeLost Aug 26, 2024
14f4073
chore: update types
ErKeLost Aug 26, 2024
2e639d8
fix: vite hmr
ErKeLost Aug 27, 2024
5cdd788
fix: solid resource find error
ErKeLost Aug 27, 2024
5f59594
Merge branch 'main' into refactor/node
ErKeLost Aug 28, 2024
1c883df
Merge branch 'main' into refactor/node
ErKeLost Aug 28, 2024
af404a9
chore: update old-watcher
ErKeLost Aug 29, 2024
834aae2
refactor(core): node watcher (#1735)
fu050409 Aug 29, 2024
37379d0
chore: update demo
ErKeLost Aug 29, 2024
5d70cf2
Merge branch 'main' into refactor/node
ErKeLost Aug 30, 2024
38a613b
feat: add debug
ErKeLost Aug 30, 2024
b74e69c
chore: update all logic
ErKeLost Sep 2, 2024
f08a256
feat: add createInlineCompiler
ErKeLost Sep 3, 2024
1296ea7
Merge branch 'main' into refactor/node
ErKeLost Sep 3, 2024
d222b64
chore: update types
ErKeLost Sep 3, 2024
010b564
chore: add visualizer example refactor configureServer
ErKeLost Sep 3, 2024
60459ab
Merge branch 'main' into refactor/node
ErKeLost Sep 3, 2024
8a2b13c
fix: configureServer execution order
ErKeLost Sep 3, 2024
f161c06
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 3, 2024
a9e57ed
chore: remove unless file prepare refactor stage: 1
ErKeLost Sep 4, 2024
a705d4b
chore: remove unless file prepare refactor stage: 1
ErKeLost Sep 4, 2024
4c8f08d
chore: prepare refactor vite adapter
ErKeLost Sep 4, 2024
6603646
chore: prepare write restartServer logic
ErKeLost Sep 4, 2024
76632e2
chore: pre restartServer full create new Server and full reload page
ErKeLost Sep 5, 2024
db0463a
chore: optimize server code
ErKeLost Sep 5, 2024
3d8ef39
chore: optimize server code
ErKeLost Sep 5, 2024
a951b7f
chore: optimize server code
ErKeLost Sep 5, 2024
082130e
chore: add commit release
ErKeLost Sep 6, 2024
1e3ae13
Merge branch 'main' into refactor/node
ErKeLost Sep 6, 2024
751a69d
chore: remove unless ci
ErKeLost Sep 6, 2024
3de967e
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 6, 2024
404842f
chore: remove unless ci
ErKeLost Sep 6, 2024
792a332
chore: remove unless ci
ErKeLost Sep 6, 2024
d85f9e0
chore: update preview-commit ci
ErKeLost Sep 6, 2024
27bd09b
chore: update preview-commit ci
ErKeLost Sep 6, 2024
0727a95
chore: update preview-commit ci
ErKeLost Sep 6, 2024
61f1dfb
chore: update preview-commit ci
ErKeLost Sep 6, 2024
c872a44
Merge branch 'main' into refactor/node
ErKeLost Sep 10, 2024
a783c3e
Merge branch 'main' into refactor/node
ErKeLost Sep 11, 2024
9d61308
chore: do not exit when first compilation failed (#1764)
wre232114 Sep 11, 2024
8e8ae7a
chore: test compile() not exit
ErKeLost Sep 11, 2024
72c57c8
refactor: clearScreen logic
ErKeLost Sep 11, 2024
becfb3d
chore: add customLogger
ErKeLost Sep 11, 2024
018e6cc
chore: add clearScreen
ErKeLost Sep 11, 2024
b017156
chore: add clearScreen
ErKeLost Sep 11, 2024
36cab61
refactor: logger
ErKeLost Sep 11, 2024
2fb37d0
refactor: logger
ErKeLost Sep 11, 2024
2eb8dd7
chore: update server config refactor
ErKeLost Sep 12, 2024
2073477
chore: test server restart
ErKeLost Sep 12, 2024
3c11441
chore: prepare server resolve error
ErKeLost Sep 12, 2024
1d62649
chore: test config
ErKeLost Sep 12, 2024
2f3e0b9
Merge branch 'main' into refactor/node
ErKeLost Sep 13, 2024
e3bd699
Merge branch 'main' into refactor/node
ErKeLost Sep 13, 2024
c94b757
chore: pending restart server finish
ErKeLost Sep 15, 2024
d65aaa8
Merge branch 'main' into refactor/node
ErKeLost Sep 15, 2024
3ba6908
chore: pending restart server finish
ErKeLost Sep 15, 2024
93e0de6
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 15, 2024
89df495
chore: pending restart server finish
ErKeLost Sep 15, 2024
0d2d57c
Merge branch 'main' into refactor/node
ErKeLost Sep 16, 2024
fff853f
chore: support vite env config
ErKeLost Sep 16, 2024
98cf06e
chore: support vite env config
ErKeLost Sep 16, 2024
e27b3ab
chore: preview overlay page
ErKeLost Sep 16, 2024
eda4401
chore: preview overlay page
ErKeLost Sep 16, 2024
277b4dc
Merge branch 'main' into refactor/node
ErKeLost Sep 16, 2024
294cccb
chore: rewrite overlay page
ErKeLost Sep 17, 2024
a0c7ddd
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 17, 2024
0d2d49f
chore: rewrite overlay page
ErKeLost Sep 17, 2024
8ca3fd3
chore: update overlay
ErKeLost Sep 18, 2024
740d61d
chore: update overlay page
ErKeLost Sep 18, 2024
29bdc07
chore: resolve all error type
ErKeLost Sep 18, 2024
91bc853
chore: update error logic
ErKeLost Sep 18, 2024
36fb5c6
chore: update watcher unlink
ErKeLost Sep 18, 2024
ad3d3df
fix: resource generate compile pending error
ErKeLost Sep 19, 2024
7a3c7ff
Merge branch 'main' into refactor/node
ErKeLost Sep 19, 2024
6d852e1
fix: support env ant type
ErKeLost Sep 20, 2024
629514b
feat: add configureCompiler hooks
ErKeLost Sep 20, 2024
8aa315f
feat: add configureCompiler hooks finish remove sort only filter plugins
ErKeLost Sep 20, 2024
d7ae9d5
chore: remove unless code
ErKeLost Sep 20, 2024
817a5b9
chore: test preview versions
ErKeLost Sep 20, 2024
ca3f890
feat: update docs
ErKeLost Sep 21, 2024
8d554c2
feat: update docs workspace
ErKeLost Sep 21, 2024
b9f1957
chore: remove koa
ErKeLost Sep 21, 2024
42ce309
chore: remove unless 0.x and 1.0.0 version docs
ErKeLost Sep 21, 2024
3118d2e
chore(docs): custom code block
ErKeLost Sep 22, 2024
14ceef6
chore(docs): custom code block
ErKeLost Sep 22, 2024
92b849b
chore(docs): custom code block
ErKeLost Sep 22, 2024
14cd962
chore: update code
ErKeLost Sep 22, 2024
dd8f1ab
chore: update code
ErKeLost Sep 22, 2024
878c9b7
chore: Manually merge codes
ErKeLost Sep 24, 2024
6af8a8d
chore: merge main branch
ErKeLost Sep 24, 2024
5a232d6
chore: test post configureServer hook error
ErKeLost Sep 24, 2024
a379051
fix: post configure server hook return undefined
ErKeLost Sep 25, 2024
0436688
Merge branch 'main' into refactor/node
ErKeLost Sep 25, 2024
5735fcd
fix: configureCompiler hook execute error
ErKeLost Sep 25, 2024
08c0cdd
chore: remove createCompiler in createServer
ErKeLost Sep 25, 2024
2102954
chore: remove watch command
ErKeLost Sep 26, 2024
4de5979
fix: cspell word
ErKeLost Sep 26, 2024
683d0ac
fix: cspell word
ErKeLost Sep 26, 2024
8984c3e
chore: remove TODO log
ErKeLost Sep 26, 2024
389ae5c
chore: remove unless code
ErKeLost Sep 27, 2024
f91e6c6
chore: update code block style
ErKeLost Sep 27, 2024
df5dfa8
chore: update doc style
ErKeLost Sep 27, 2024
3ba2c92
feat(cli): support the configuration of `timeUnit` (#1798)
RSS1102 Sep 29, 2024
f9db758
chore: update docs
ErKeLost Sep 29, 2024
cd2e298
chore: update ci
ErKeLost Sep 29, 2024
216255e
Merge branch 'main' into refactor/node
ErKeLost Sep 29, 2024
543f367
chore: disabled benchmark ci
ErKeLost Sep 29, 2024
6e15d00
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Sep 29, 2024
7d8db56
feat: lazy compilation middleware compilation
ErKeLost Sep 29, 2024
a61a8c7
chore: update middleware types
ErKeLost Sep 29, 2024
d6cc0f0
chore: update cli options timeUnit
ErKeLost Sep 29, 2024
9eb4190
fix: word cspell
ErKeLost Sep 29, 2024
60f825f
chore: add node build lib config file tips
ErKeLost Sep 29, 2024
13358b1
Merge branch 'main' into refactor/node
ErKeLost Oct 3, 2024
b270870
chore: test watch mode remove unless code
ErKeLost Oct 3, 2024
6a5a092
chore: optimize code
ErKeLost Oct 3, 2024
dd43f56
chore: lint error
ErKeLost Oct 3, 2024
881b76b
chore: update homepage
ErKeLost Oct 3, 2024
45bf260
chore: update homepage
ErKeLost Oct 3, 2024
b6c08dc
chore: update docs deps
ErKeLost Oct 3, 2024
aa44096
fix: config file load process.env.NODE_ENV
ErKeLost Oct 4, 2024
3811a40
chore: update browser list version
ErKeLost Oct 4, 2024
16cf2d3
chore: update browser list version
ErKeLost Oct 5, 2024
2558e33
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 5, 2024
f87e4c7
chore: update new vite-server-adapter
ErKeLost Oct 5, 2024
fcec298
chore: finish proxy vite server adapter
ErKeLost Oct 5, 2024
9e9592f
chore: update example
ErKeLost Oct 6, 2024
ac82e05
chore: update browser list version
ErKeLost Oct 6, 2024
449fc4b
feat: array to alias config
ErKeLost Oct 7, 2024
288b238
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 7, 2024
3d7013d
chore: update error/mod lint error
ErKeLost Oct 7, 2024
2648325
chore: update error/mod lint error
ErKeLost Oct 7, 2024
f31203a
chore: update server logic
ErKeLost Oct 8, 2024
e8a06f3
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 8, 2024
202aed4
chore: update resolve compiler config
ErKeLost Oct 8, 2024
f510fbf
chore: optimize compiler define
ErKeLost Oct 8, 2024
46cd419
Merge branch 'main' into refactor/node
ErKeLost Oct 8, 2024
af5a9f6
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 11, 2024
6525932
chore: finish clean methods
ErKeLost Oct 11, 2024
590fd82
chore: finish index.ts with core functions `start`, `build`, `clean`
ErKeLost Oct 11, 2024
4d37ee9
chore: optimize compiler code set
ErKeLost Oct 11, 2024
3853f59
refactor: change moduleResolution and module type remove all js type
ErKeLost Oct 11, 2024
4273ff3
chore: remove unless code
ErKeLost Oct 11, 2024
08e14b7
chore: remove js suffix name
ErKeLost Oct 12, 2024
9dc4f7a
Merge branch 'main' into refactor/node
ErKeLost Oct 12, 2024
7eee344
Merge remote-tracking branch 'upstream/main' into refactor/node
ErKeLost Oct 12, 2024
1c8e772
Merge branch 'refactor/node' of github.com:farm-fe/farm into refactor…
ErKeLost Oct 12, 2024
9b6d209
Merge branch 'main' into refactor/node
ErKeLost Oct 13, 2024
66c6e96
chore: add workflow
ErKeLost Oct 13, 2024
936a259
chore: Withdraw tsc logic code
ErKeLost Oct 13, 2024
df511c3
chore: update lock json
ErKeLost Oct 14, 2024
d7ae33a
Merge branch 'main' of github.com:farm-fe/farm into refactor/node
ErKeLost Oct 14, 2024
2eb7bc3
chore: update lock json
ErKeLost Oct 14, 2024
3ff6758
chore: skip some tasks
ErKeLost Oct 14, 2024
5e02941
chore: update rust test error
ErKeLost Oct 14, 2024
18cfb5b
chore: update rust test error
ErKeLost Oct 14, 2024
16ae372
chore: update rust test error
ErKeLost Oct 14, 2024
8a4ff25
chore: update rust test error
ErKeLost Oct 14, 2024
6e757f5
chore: update rust test error
ErKeLost Oct 14, 2024
4bd2bcb
chore: update rust test error
ErKeLost Oct 14, 2024
02d0284
chore: update biome lint rules
ErKeLost Oct 14, 2024
5525dab
Merge branch 'main' of github.com:farm-fe/farm into refactor/node
ErKeLost Oct 14, 2024
66ebe80
fix: cargo test
ErKeLost Oct 14, 2024
a476e49
chore: update ts lint
ErKeLost Oct 14, 2024
f107a4e
chore: update ts lint
ErKeLost Oct 14, 2024
2a0ad60
Merge branch 'main' into refactor/node
ErKeLost Oct 18, 2024
8a69321
chore: update ts lint and ci
ErKeLost Oct 18, 2024
9508572
chore: update ci
ErKeLost Oct 18, 2024
7aa7c68
chore: update ci
ErKeLost Oct 18, 2024
ec58244
chore: update ci
ErKeLost Oct 18, 2024
93170e0
chore: update ci
ErKeLost Oct 18, 2024
fcee171
chore: update ci
ErKeLost Oct 18, 2024
707c639
chore: update ci
ErKeLost Oct 18, 2024
96f9844
chore: update ci
ErKeLost Oct 18, 2024
ca1c5c4
chore: update ci
ErKeLost Oct 18, 2024
d428b3c
chore: update ci
ErKeLost Oct 18, 2024
5bd02c0
chore: update ci
ErKeLost Oct 18, 2024
212ac10
chore: update ci
ErKeLost Oct 19, 2024
061af9d
chore: update ci
ErKeLost Oct 19, 2024
4b293fc
chore: update private ci
ErKeLost Oct 19, 2024
b547391
chore: update private ci
ErKeLost Oct 19, 2024
4ffcb9d
chore: update private ci
ErKeLost Oct 19, 2024
274ae2d
chore: update private ci
ErKeLost Oct 19, 2024
77b3995
chore: update private ci
ErKeLost Oct 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
230 changes: 68 additions & 162 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,146 +1,15 @@
name: E2E Tests
on:
pull_request:
branches:
- main
name: Nightly Release CI
# on:
# pull_request:
# branches:
# - refactor/node

on: [pull_request]

jobs:
call-rust-build:
uses: ./.github/workflows/rust-build.yaml

examples-test:
name: Examples Test
runs-on: ${{ matrix.settings.os }}
needs: [call-rust-build]
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
- os: macos-latest
abi: darwin-arm64
- os: macos-13
abi: darwin-x64
- os: windows-latest
abi: win32-x64-msvc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile

- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding

- uses: actions/download-artifact@v4
id: download-plugin-sass
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-sass
path: ./rust-plugins/sass/npm/${{ matrix.settings.abi }}

- uses: actions/download-artifact@v4
id: download-plugin-react
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react
path: ./rust-plugins/react/npm/${{ matrix.settings.abi }}

- uses: actions/download-artifact@v4
id: download-create-farm-rust
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/create-farm

- name: Build Examples - ${{ matrix.settings.abi }}
run: node scripts/test-examples.mjs

- name: E2E Test Examples - ${{ matrix.settings.abi }}
run: npm run test-e2e

# test create farm
- name: Build Create Farm
run: cd packages/create-farm && npm run build
- name: Test Create Farm React - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-react --template react && cd my-test-app-react && pnpm i && pnpm build
- name: Test Create Farm Vue - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue --template vue3 && cd my-test-app-vue && pnpm i && pnpm build
- name: Test Create Farm Solid - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-solid --template solid && cd my-test-app-solid && pnpm i && pnpm build
- name: Test Create Farm Svelte - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-svelte --template svelte && cd my-test-app-svelte && pnpm i && pnpm build
- name: Test Create Farm Lit - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-lit --template lit && cd my-test-app-lit && pnpm i && pnpm build
- name: Test Create Farm Vanilla - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vanilla --template vanilla && cd my-test-app-vanilla && pnpm i && pnpm build
- name: Test Create Farm Preact - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-preact --template preact && cd my-test-app-preact && pnpm i && pnpm build
- name: Test Create Farm Vue2 - ${{ matrix.settings.abi }}
run: cd .. && node farm/packages/create-farm/create-farm.js my-test-app-vue2 --template vue2 && cd my-test-app-vue2 && pnpm i && pnpm build

type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
- name: Type Check With Tsc
run: pnpm run --filter "@farmfe/*" type-check
- name: Changesets Check
run: npx changeset status --since=origin/main

ts-test:
name: Typescript Test
runs-on: ${{ matrix.settings.os }}
needs: call-rust-build
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
- os: ubuntu-20.04
abi: linux-x64-gnu
- os: macos-13
abi: darwin-x64
- os: macos-latest
abi: darwin-arm64
- os: windows-latest
abi: win32-x64-msvc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding
- name: Build Core CJS
run: cd packages/core && pnpm run build:cjs
- name: Test - ${{ matrix.settings.abi }}
run: npm run test
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

check-core-artifacts:
name: Check Core Artifacts
runs-on: ubuntu-latest
Expand Down Expand Up @@ -193,33 +62,70 @@ jobs:
test -f /tmp/artifacts/${{ github.sha }}-${abi}-${{ matrix.settings.name }}/index.farm
done

benchmarks:
nightly-release:
name: Nightly Release
needs: [call-rust-build]
runs-on: ${{ matrix.settings.os }}
strategy:
fail-fast: false
matrix:
settings:
- os: ubuntu-latest
abi: linux-x64-gnu
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- uses: actions/setup-node@v3
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build CLI and Core
run: pnpm --filter @farmfe/cli run build
node-version: 18.x

# batch download artifacts
- uses: actions/download-artifact@v4
id: download
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}
path: ./packages/core/binding
- name: Build Core CJS
run: cd packages/core && pnpm run build:cjs
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
path: /tmp/artifacts
- name: Copy Farm Core Binary
run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding
- name: Move Artifacts
run: |
for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc
do
mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi}
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi}

test -f ./packages/core/npm/${abi}/farm.${abi}.node
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node
test -f ./rust-plugins/react/npm/${abi}/index.farm
test -f ./rust-plugins/sass/npm/${abi}/index.farm
done
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64
do
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi}
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node
done

- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Build Plugin Tools
run: pnpm --filter @farmfe/plugin-tools run build

- name: Set Nightly Version for CLI and Core
run: |
NIGHTLY_VERSION="2.0.0-nightly.$(date +'%Y%m%d%H%M%S')"
pnpm --filter "./packages/cli" version $NIGHTLY_VERSION --no-git-tag-version
pnpm --filter "./packages/core" version $NIGHTLY_VERSION --no-git-tag-version

# - name: Publish Nightly to npm
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
# pnpm publish --tag nightly --no-git-checks

- name: Create Nightly Release Pull Request or Publish Nightly Version to npm
id: changesets
uses: changesets/action@v1
with:
run: npm exec vitest bench
token: ${{ secrets.CODSPEED_TOKEN }}
version: pnpm run bump:nightly
publish: npm run release:nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 0 additions & 12 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,3 @@ jobs:
run: cargo fmt
- name: Run cargo clippy
run: cargo clippy
lint:
name: TS Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install -g [email protected] && pnpm i --frozen-lockfile
- name: Run lint
run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 18.x

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ build
!crates/**/build
.swc
.DS_Store


# docs
.docusaurus
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ registry = "https://registry.npmjs.org/"
auto-install-peers = false
electron-mirror="https://npmmirror.com/mirrors/electron/"
link-workspace-packages=true
fetch-retries=0
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading
Loading