Skip to content

Commit 039a6c8

Browse files
authored
Merge pull request #454 from MicroPad/next-dev
v4.4.0
2 parents 1836c55 + cbfc353 commit 039a6c8

18 files changed

Lines changed: 95 additions & 14050 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,21 @@ jobs:
1616
- uses: actions/setup-node@v3
1717
with:
1818
node-version: '18'
19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
working-directory: app
22-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
23-
- name: Cache Yarn Packages
24-
id: yarn-cache
25-
uses: actions/cache@v3
26-
with:
27-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
28-
key: yarn-cache-folder-${{ hashFiles('app/yarn.lock', 'app/.yarnrc.yml') }}
29-
restore-keys: |
30-
yarn-cache-folder-
19+
- uses: oven-sh/setup-bun@v1
3120
- name: Install node dependencies
3221
working-directory: app
33-
run: |
34-
yarn
22+
run: bun install
3523
- name: Lint
3624
working-directory: app
3725
run: |
38-
yarn typecheck
39-
yarn lint
26+
bun run typecheck
27+
bun run lint
4028
- name: Build
4129
working-directory: app
4230
env:
4331
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
4432
run: |
45-
yarn build
33+
bun run build
4634
tar cfJ micropad.tar.xz build/*
4735
- name: Upload artifact
4836
uses: actions/upload-artifact@v3
@@ -59,25 +47,15 @@ jobs:
5947
- uses: actions/setup-node@v3
6048
with:
6149
node-version: '18'
62-
- name: Get yarn cache directory path
63-
id: yarn-cache-dir-path
64-
working-directory: app
65-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
66-
- name: Cache Yarn Packages
67-
id: yarn-cache
68-
uses: actions/cache@v3
69-
with:
70-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
71-
key: yarn-cache-folder-${{ hashFiles('app/yarn.lock', 'app/.yarnrc.yml') }}
72-
restore-keys: |
73-
yarn-cache-folder-
50+
- uses: oven-sh/setup-bun@v1
7451
- uses: actions/download-artifact@v3
7552
with:
7653
name: micropad
7754
- name: Install node dependencies
7855
working-directory: app
7956
run: |
80-
yarn
57+
bun install
58+
bun run playwright install
8159
- name: Run Micropad in background for testing
8260
run: |
8361
mkdir micropad
@@ -86,8 +64,7 @@ jobs:
8664
python3 -m http.server 3000 &
8765
- name: Test
8866
working-directory: app
89-
run: |
90-
yarn test
67+
run: bun run test
9168
deploy:
9269
name: Deploy
9370
runs-on: ubuntu-latest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ There are a couple [GitHub Project boards](https://github.com/orgs/MicroPad/proj
88

99
## Building MicroPad
1010
You will need the following:
11-
- [Yarn](https://classic.yarnpkg.com/lang/en/) classic
11+
- [Bun](https://bun.sh/)
1212
- [Node.js](https://nodejs.org/en/)
1313
- [Python 3](https://www.python.org/)
1414

1515
### Installing dependencies
1616
```bash
1717
git clone https://github.com/MicroPad/MicroPad-Core.git micropad-core
1818
cd micropad-core/app
19-
yarn
19+
bun install
2020
```
2121

2222
### Running a dev server
2323
```bash
24-
yarn start
24+
bun run start
2525
```
2626
### Building for production
2727
```bash
28-
yarn build
28+
bun run build
2929
```

app/.run/build.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="build" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<method v="2" />
11+
</configuration>
12+
</component>

app/.run/lint.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="lint" type="js.build_tools.npm" nameIsGenerated="true">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="lint" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<method v="2" />
11+
</configuration>
12+
</component>

app/.run/start.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="start" type="js.build_tools.npm" nameIsGenerated="true">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="start" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<method v="2" />
11+
</configuration>
12+
</component>

app/.run/typecheck_watch.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="typecheck:watch" type="js.build_tools.npm" nameIsGenerated="true">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="typecheck:watch" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<method v="2" />
11+
</configuration>
12+
</component>

app/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

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

app/.yarn/releases/yarn-3.5.0.cjs

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

app/.yarnrc.yml

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

app/_build/build.mts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,23 @@ const esBuildTargets = browserslist().filter(browser => !browser.endsWith('TP'))
2626
(async () => {
2727
process.env.PUBLIC_URL ??= '';
2828

29+
await copyDir('node_modules/timers-browserify', 'node_modules/timers');
30+
2931
await rm(OUT_DIR, { recursive: true, force: true });
3032
await copyDir('public', OUT_DIR);
3133

32-
const sentryPlugin = () => sentryEsbuildPlugin({
33-
org: "nick-webster",
34-
project: "micropad",
35-
release: {
36-
name: packageJson.version,
37-
finalize: false
38-
},
39-
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
40-
// and need `project:releases` and `org:read` scopes
41-
authToken: process.env.SENTRY_AUTH_TOKEN,
42-
});
34+
// TODO: re-enable when I update esbuild
35+
// const sentryPlugin = () => sentryEsbuildPlugin({
36+
// org: "nick-webster",
37+
// project: "micropad",
38+
// release: {
39+
// name: packageJson.version,
40+
// finalize: false
41+
// },
42+
// // Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
43+
// // and need `project:releases` and `org:read` scopes
44+
// authToken: process.env.SENTRY_AUTH_TOKEN,
45+
// });
4346

4447
const { metafile: browserCheckMetafile } = await build({
4548
entryPoints: ['src/unsupported-page/index.ts'],
@@ -60,7 +63,7 @@ const esBuildTargets = browserslist().filter(browser => !browser.endsWith('TP'))
6063
'process.env.PUBLIC_URL': `"${process.env.PUBLIC_URL}"`
6164
},
6265
assetNames: 'assets/[name].[hash]',
63-
plugins: [sentryPlugin()]
66+
plugins: []
6467
}).catch(() => process.exit(1));
6568

6669
if (!browserCheckMetafile) throw new Error('Missing metafile');
@@ -101,7 +104,6 @@ const esBuildTargets = browserslist().filter(browser => !browser.endsWith('TP'))
101104
},
102105
plugins: [
103106
esbuildPluginBrowserslist(esBuildTargets),
104-
sentryPlugin()
105107
],
106108
}).catch(() => process.exit(1));
107109

@@ -187,7 +189,6 @@ const esBuildTargets = browserslist().filter(browser => !browser.endsWith('TP'))
187189
},
188190
plugins: [
189191
esbuildPluginBrowserslist(esBuildTargets),
190-
sentryPlugin()
191192
],
192193
}).catch(() => process.exit(1));
193194

@@ -237,7 +238,6 @@ const esBuildTargets = browserslist().filter(browser => !browser.endsWith('TP'))
237238
},
238239
plugins: [
239240
esbuildPluginBrowserslist(esBuildTargets),
240-
sentryPlugin()
241241
],
242242
}).catch(() => process.exit(1));
243243

0 commit comments

Comments
 (0)