Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
51 changes: 43 additions & 8 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ on:
- '**'

permissions:
contents: write
contents: read

jobs:
build-and-release:
runs-on: ubuntu-latest
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest

runs-on: ${{ matrix.os }}

steps:
- name: Check out repository
Expand All @@ -19,23 +27,51 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
cache: npm

- name: Install dependencies
run: npm install
run: npm ci

- name: Build package
run: npm run build

- name: Install Playwright Chromium
- name: Install Playwright Chromium dependencies
if: runner.os == 'Linux'
run: npx playwright install --with-deps chromium

- name: Install Playwright Chromium
if: runner.os != 'Linux'
run: npx playwright install chromium

- name: Run integration test
run: npm run test:integration

create-release:
if: github.ref == 'refs/heads/release'
needs: build-and-test
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Create npm package
id: package
if: github.ref == 'refs/heads/release'
shell: bash
run: |
VERSION="$(node -p "require('./package.json').version")"
Expand All @@ -49,7 +85,6 @@ jobs:
echo "package_tgz=${PACKAGE_TGZ}" >> "$GITHUB_OUTPUT"

- name: Create GitHub release
if: github.ref == 'refs/heads/release'
env:
GH_TOKEN: ${{ github.token }}
shell: bash
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ To install via npm:
```bash
npm install --save qr-scanner
```
To install via yarn:
```bash
yarn add qr-scanner
```
Or simply copy `qr-scanner.min.js` and `qr-scanner-worker.min.js` to your project.

## Setup
Expand Down Expand Up @@ -254,12 +250,12 @@ the /src folder. NodeJs is required for building.

Install required build packages:
```batch
yarn
npm install
```

Building:
```batch
yarn build
npm run build
```

## Integration test
Expand Down
Loading
Loading