Skip to content

Commit dfe4e4e

Browse files
committed
Merge branch 'danditomaso-refactor/use-deno'
2 parents 7e66dc7 + fc713f5 commit dfe4e4e

File tree

147 files changed

+8002
-1293
lines changed

Some content is hidden

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

147 files changed

+8002
-1293
lines changed

.github/workflows/ci.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
1818

19-
- name: Setup bun
20-
uses: oven-sh/setup-bun@v2
19+
- name: Setup Deno
20+
uses: denoland/setup-deno@v2
21+
with:
22+
deno-version: v2.x
2123

2224
- name: Install Dependencies
23-
run: bun install
25+
run: deno install
2426

2527
- name: Run tests
26-
run: bun run test:run
28+
run: deno task test
2729

2830
- name: Build Package
29-
run: bun run build
31+
run: deno task build

.github/workflows/nightly.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18-
- name: Setup bun
19-
uses: oven-sh/setup-bun@v2
18+
- name: Setup Deno
19+
uses: denoland/setup-deno@v2
20+
with:
21+
deno-version: v2.x
2022

2123
- name: Install Dependencies
22-
run: bun install
24+
run: deno install
2325

2426
- name: Run tests
25-
run: bun run test:run
27+
run: deno task test
2628

2729
- name: Build Package
28-
run: bun run build
30+
run: deno task build
2931

3032
- name: Package Output
31-
run: bun run package
33+
run: deno task package
3234

3335
- name: Archive compressed build
3436
uses: actions/upload-artifact@v4

.github/workflows/pr.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ jobs:
99
- name: Checkout code
1010
uses: actions/checkout@v4
1111

12-
- name: Setup bun
13-
uses: oven-sh/setup-bun@v2
12+
- name: Setup Deno
13+
uses: denoland/setup-deno@v2
14+
with:
15+
deno-version: v2.x
1416

1517
- name: Install Dependencies
16-
run: bun install
18+
run: deno install
1719

1820
- name: Run tests
19-
run: bun run test:run
21+
run: deno task test
2022

2123
- name: Build Package
22-
run: bun run build
24+
run: deno task build
2325

2426
- name: Compress build
25-
run: bun run package
27+
run: deno task package
2628

2729
- name: Archive compressed build
2830
uses: actions/upload-artifact@v4

.github/workflows/release.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18-
- name: Setup bun
19-
uses: oven-sh/setup-bun@v2
18+
- name: Setup Deno
19+
uses: denoland/setup-deno@v2
20+
with:
21+
deno-version: v2.x
2022

2123
- name: Install Dependencies
22-
run: bun install
24+
run: deno install
2325

2426
- name: Run tests
25-
run: bun run test:run
27+
run: deno task test
2628

2729
- name: Build Package
28-
run: bun run build
30+
run: deno task build
2931

3032
- name: Package Output
31-
run: bun run package
33+
run: deno task package
3234

3335
- name: Archive compressed build
3436
uses: actions/upload-artifact@v4

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ dist
22
node_modules
33
stats.html
44
.vercel
5-
dev-dist
5+
.vite/deps
6+
dev-dist

.vscode/settings.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"editor.defaultFormatter": "biomejs.biome",
3-
"editor.codeActionsOnSave": {
4-
"quickfix.biome": "explicit"
5-
},
6-
"editor.formatOnSave": true
2+
"deno.enable": true,
3+
"deno.suggest.imports.autoDiscover": true,
4+
"editor.formatOnSave": true,
5+
"editor.defaultFormatter": "denoland.vscode-deno"
76
}

README.md

+91-47
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
## Overview
1111

12-
Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted or served from a node
12+
Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted
13+
or served from a node
1314

1415
**[Hosted version](https://client.meshtastic.org)**
1516

@@ -19,7 +20,8 @@ Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted
1920

2021
## Progress Web App Support (PWA)
2122

22-
Meshtastic Web Client now includes Progressive Web App (PWA) functionality, allowing users to:
23+
Meshtastic Web Client now includes Progressive Web App (PWA) functionality,
24+
allowing users to:
2325

2426
- Install the app on desktop and mobile devices
2527
- Access the interface offline
@@ -35,8 +37,10 @@ PWA functionality works with both the hosted version and self-hosted instances.
3537

3638
## Self-host
3739

38-
The client can be self hosted using the precompiled container images with an OCI compatible runtime such as [Docker](https://www.docker.com/) or [Podman](https://podman.io/).
39-
The base image used is [Nginx 1.27](https://hub.docker.com/_/nginx)
40+
The client can be self hosted using the precompiled container images with an OCI
41+
compatible runtime such as [Docker](https://www.docker.com/) or
42+
[Podman](https://podman.io/). The base image used is
43+
[Nginx 1.27](https://hub.docker.com/_/nginx)
4044

4145
```bash
4246
# With Docker
@@ -46,9 +50,11 @@ docker run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshta
4650
podman run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshtastic/web
4751
```
4852

49-
## Nightly releases
53+
## Nightly releases
5054

51-
Our nightly releases provide the latest development builds with cutting-edge features and fixes. These builds are automatically generated from the latest main branch every night and are available for testing and early adoption.
55+
Our nightly releases provide the latest development builds with cutting-edge
56+
features and fixes. These builds are automatically generated from the latest
57+
main branch every night and are available for testing and early adoption.
5258

5359
```bash
5460
# With Docker
@@ -57,49 +63,114 @@ docker run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshta
5763
podman run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshtastic/web:nightly
5864
```
5965

60-
> [!WARNING]
61-
> - Nightly builds represent the latest development state and may contain breaking changes
62-
> - These builds undergo automated testing but may be less stable than tagged release versions
63-
> - Not recommended for production environments unless you are actively testing new features
66+
> [!WARNING]
67+
>
68+
> - Nightly builds represent the latest development state and may contain
69+
> breaking changes
70+
> - These builds undergo automated testing but may be less stable than tagged
71+
> release versions
72+
> - Not recommended for production environments unless you are actively testing
73+
> new features
6474
> - No guarantee of backward compatibility between nightly builds
6575
6676
### Version Information
77+
6778
Each nightly build is tagged with:
6879

6980
- The nightly tag for the latest build
7081
- A specific SHA for build reproducibility
7182

7283
### Feedback
73-
If you encounter any issues with nightly builds, please report them in our [issues tracker](https://github.com/meshtastic/web/issues). Your feedback helps improve the stability of future releases
84+
85+
If you encounter any issues with nightly builds, please report them in our
86+
[issues tracker](https://github.com/meshtastic/web/issues). Your feedback helps
87+
improve the stability of future releases
7488

7589
## Development & Building
76-
You'll need to download the package manager used with this repo. You can install it by visiting [Bun.sh](https://bun.sh/) and following the installation instructions.
7790

78-
### Debugging
91+
You'll need to download the package manager used with this repo. You can install
92+
it by visiting [deno.com](https://deno.com/) and following the installation
93+
instructions listed on the home page.
94+
95+
### Development
96+
97+
Install the dependencies.
98+
99+
```bash
100+
deno i
101+
```
102+
103+
Start the development server:
104+
105+
```bash
106+
deno task dev
107+
```
108+
109+
### Building and Packaging
110+
111+
Build the project:
112+
113+
```bash
114+
deno task build
115+
```
116+
117+
GZip the output:
118+
119+
```bash
120+
deno task package
121+
```
122+
123+
### Why Deno?
124+
125+
Meshtastic Web uses Deno as its development platform for several compelling
126+
reasons:
127+
128+
- **Built-in Security**: Deno's security-first approach requires explicit
129+
permissions for file, network, and environment access, reducing vulnerability
130+
risks.
131+
- **TypeScript Support**: Native TypeScript support without additional
132+
configuration, enhancing code quality and developer experience.
133+
- **Modern JavaScript**: First-class support for ESM imports, top-level await,
134+
and other modern JavaScript features.
135+
- **Simplified Tooling**: Built-in formatter, linter, test runner, and bundler
136+
eliminate the need for multiple third-party tools.
137+
- **Reproducible Builds**: Lockfile ensures consistent builds across all
138+
environments.
139+
- **Web Standard APIs**: Uses browser-compatible APIs, making code more portable
140+
between server and client environments.
141+
142+
### Debugging
79143

80144
#### Debugging with React Scan
81-
Meshtastic Web Client has included the library [React Scan](https://github.com/aidenybai/react-scan) to help you identify and resolve render performance issues during development.
82145

83-
React's comparison-by-reference approach to props makes it easy to inadvertently cause unnecessary re-renders, especially with:
146+
Meshtastic Web Client has included the library
147+
[React Scan](https://github.com/aidenybai/react-scan) to help you identify and
148+
resolve render performance issues during development.
149+
150+
React's comparison-by-reference approach to props makes it easy to inadvertently
151+
cause unnecessary re-renders, especially with:
84152

85153
- Inline function callbacks (`onClick={() => handleClick()}`)
86154
- Object literals (`style={{ color: "purple" }}`)
87155
- Array literals (`items={[1, 2, 3]}`)
88156

89-
These are recreated on every render, causing child components to re-render even when nothing has actually changed.
157+
These are recreated on every render, causing child components to re-render even
158+
when nothing has actually changed.
90159

91-
Unlike React DevTools, React Scan specifically focuses on performance optimization by:
160+
Unlike React DevTools, React Scan specifically focuses on performance
161+
optimization by:
92162

93163
- Clearly distinguishing between necessary and unnecessary renders
94164
- Providing render counts for components
95165
- Highlighting slow-rendering components
96166
- Offering a dedicated performance debugging experience
97167

98168
#### Usage
169+
99170
When experiencing slow renders, run:
100171

101172
```bash
102-
bun run dev:scan
173+
deno task dev:scan
103174
```
104175

105176
This will allow you to discover the following about your components and pages:
@@ -109,32 +180,5 @@ This will allow you to discover the following about your components and pages:
109180
- Expensive hook operations
110181
- Props that change reference on every render
111182

112-
Use these insights to apply targeted optimizations like `React.memo()`, `useCallback()`, or `useMemo()` where they'll have the most impact.
113-
114-
### Building and Packaging
115-
116-
Build the project:
117-
118-
```bash
119-
bun run build
120-
```
121-
122-
GZip the output:
123-
124-
```bash
125-
bun run package
126-
```
127-
128-
### Development
129-
130-
Install the dependencies.
131-
132-
```bash
133-
bun i
134-
```
135-
136-
Start the development server:
137-
138-
```bash
139-
bun run dev
140-
```
183+
Use these insights to apply targeted optimizations like `React.memo()`,
184+
`useCallback()`, or `useMemo()` where they'll have the most impact.

biome.json

-27
This file was deleted.

0 commit comments

Comments
 (0)