Skip to content

Commit

Permalink
replace Yarn with Bun
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed Aug 11, 2024
1 parent 30b3f08 commit fc03a81
Show file tree
Hide file tree
Showing 18 changed files with 147 additions and 9,056 deletions.
31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

17 changes: 9 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
interval: 'weekly'
versioning-strategy: 'increase'
groups:
production-dependencies:
dependency-type: "production"
dependency-type: 'production'
development-dependencies:
dependency-type: "development"
dependency-type: 'development'

- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
interval: 'weekly'
13 changes: 5 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ jobs:
Check:
runs-on: ubuntu-latest
steps:
- name: Yarn PnP Setup
uses: Araxeus/setup-yarn-pnp-action@v1

- name: Run Checks
run: yarn check

- name: Run build
run: yarn build
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun check
- run: bun b
26 changes: 26 additions & 0 deletions .github/workflows/dependabot_patch_bun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# https://github.com/dependabot/dependabot-core/issues/6528#issuecomment-2013695799
name: 'Dependabot: Update bun.lockb'
on:
pull_request:
paths:
- 'package.json'
permissions:
contents: write
jobs:
update-bun-lockb:
name: 'Update bun.lockb'
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: oven-sh/setup-bun@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- run: |
bun install
git add bun.lockb
git config --global user.name 'dependabot[bot]'
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
git commit --amend --no-edit
git push --force
7 changes: 4 additions & 3 deletions .github/workflows/dependency-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ jobs:
update-vendors:
runs-on: ubuntu-latest
steps:
- name: Yarn PnP Setup
uses: Araxeus/setup-yarn-pnp-action@v1
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install

- name: Run vendor update
uses: Araxeus/vendorfiles-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-manager: yarn
package-manager: bun
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Yarn PnP Setup
uses: Araxeus/setup-yarn-pnp-action@v1

- name: Build
run: yarn build
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun b

- name: Publish to Chrome/Edge/Firefox stores
uses: PlasmoHQ/bpp@v3
uses: PlasmoHQ/bpp@main
with:
keys: ${{ secrets.BPP_KEYS }}
edge-notes: "Submitted using https://github.com/Araxeus/Youtube-Volume-Scroll/blob/main/.github/workflows/publish.yml"
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ external_assets/uncompressed/
node_modules
keys.json
*.crx
python_modules
__pycache__
*.pyc
**/.peru/*
.pnp.*
.yarn/*

# Ignore the .vscode recommended extensions file
!.vscode/extensions.json
!.yarn/releases
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"biomejs.biome"
]
"recommendations": ["biomejs.biome"]
}
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.2.2.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions .yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ git clone https://github.com/Araxeus/Youtube-Volume-Scroll.git
cd Youtube-Volume-Scroll

# Install build dependencies
yarn
bun install

# Build the extension
yarn build
bun b
```

The resulting unsigned xpi/zip file will be in the `web-ext-artifacts` folder.
Expand Down
93 changes: 61 additions & 32 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,68 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"files": {
"ignore": ["**/popup/vendors/*", "./.pnp.*", "*.json"]
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"**/popup/vendors/*",
"./node_modules/**",
"./dist/**",
"./unpacked/popup/popup.css"
]
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4
},
"json": {
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true
}
},
"css": {
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 200
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"complexity": {
"noThisInStatic": "off",
"noForEach": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
},
"style": {
"useNumberNamespace": "off"
},
"nursery": {
"recommended": true
}
}
"enabled": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"complexity": {
"noThisInStatic": "off",
"noForEach": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
},
"style": {
"useNumberNamespace": "off"
},
"nursery": {
"recommended": true
}
}
}
}
Binary file added bun.lockb
Binary file not shown.
25 changes: 0 additions & 25 deletions eslint.config.js

This file was deleted.

Loading

0 comments on commit fc03a81

Please sign in to comment.