Skip to content

Commit

Permalink
moving from yarn to bun for package management (and package managemen…
Browse files Browse the repository at this point in the history
…t only)
  • Loading branch information
NickGeek committed Oct 21, 2023
1 parent babd2fe commit e7004e1
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 1,477 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,21 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
working-directory: app
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Cache Yarn Packages
id: yarn-cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('app/yarn.lock', 'app/.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- uses: oven-sh/setup-bun@v1
- name: Install node dependencies
working-directory: app
run: |
yarn
run: bun install
- name: Lint
working-directory: app
run: |
yarn typecheck
yarn lint
bun run typecheck
bun run lint
- name: Build
working-directory: app
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
yarn build
bun run build
tar cfJ micropad.tar.xz build/*
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand All @@ -59,25 +47,13 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
working-directory: app
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Cache Yarn Packages
id: yarn-cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('app/yarn.lock', 'app/.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- uses: oven-sh/setup-bun@v1
- uses: actions/download-artifact@v3
with:
name: micropad
- name: Install node dependencies
working-directory: app
run: |
yarn
run: bun install
- name: Run Micropad in background for testing
run: |
mkdir micropad
Expand All @@ -86,8 +62,7 @@ jobs:
python3 -m http.server 3000 &
- name: Test
working-directory: app
run: |
yarn test
run: bun run test
deploy:
name: Deploy
runs-on: ubuntu-latest
Expand Down
541 changes: 0 additions & 541 deletions app/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions app/.yarn/releases/yarn-3.5.0.cjs

This file was deleted.

23 changes: 0 additions & 23 deletions app/.yarnrc.yml

This file was deleted.

Binary file added app/bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@
"babel-eslint": "^10.1.0",
"browserslist": "^4.21.10",
"esbuild": "~0.16.17",
"esbuild-plugin-browserslist": "~0.7.2",
"esbuild-plugin-browserslist": "~0.6.0",
"esbuild-plugin-manifest": "~0.5.0",
"eslint": "^8.47.0",
"@eslint/eslintrc": "^2.1.2",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.28.0",
Expand Down
1 change: 0 additions & 1 deletion app/src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { DrawMode } from './reducers/EditorReducer';
import { AppInfoMessage } from './reducers/AppInfoReducer';
import { ModalId } from './types/ModalIds';
import { EncryptionStatus } from './reducers/AppReducer';
import { hashtagSearchOrJump$ } from './epics/SearchEpics';

export type MicroPadAction = ActionTypes[keyof ActionTypes];
export type ActionNames = keyof ActionFactories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { IStoreState } from '../../../../types';
import { actions } from '../../../../actions';
import { IProgressValues } from './TodoListComponent';
import { ModalId } from '../../../../types/ModalIds';
import { store } from '../../../../root';
import { search } from '../../../../services/SearchService';
import { SearchResults } from '../../../../reducers/SearchReducer';

export const MD_START_ATTR = 'data-md-start';
export const MD_END_ATTR = 'data-md-end';
Expand Down
4 changes: 2 additions & 2 deletions app/src/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import './theme-styles/Purple.css';
/* JS Imports */
import React from 'react';
import 'materialize-css/dist/js/materialize.js';
import { IStoreState, MICROPAD_URL } from './types';
import { applyMiddleware, Store } from 'redux';
import { MICROPAD_URL } from './types';
import { applyMiddleware } from 'redux';
import { BaseReducer } from './reducers/BaseReducer';
import { epicMiddleware } from './epics';
import localforage from 'localforage';
Expand Down

0 comments on commit e7004e1

Please sign in to comment.