Skip to content

Commit

Permalink
Merge branch 'master' into feature/rss-14-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
odahcam committed Oct 23, 2020
2 parents 44ac17b + 0447642 commit 7971b07
Show file tree
Hide file tree
Showing 104 changed files with 2,835 additions and 3,543 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

open_collective: zxing-js
custom: ['https://picpay.me/odahcam']
custom: ['https://picpay.me/odahcam', 'https://apoia.se/zxing']
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/ask-a-question-------.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "Ask a Question ❓\U0001F64B‍♂️"
about: Ask anything you want.
title: ''
labels: question
assignees: ''

---

<!--
Please, consider asking technical stuff on StackOverflow,
so more people can help you and link the question in here.
Recommended tags: zxing-js, zxing and javascript
The zxing-js is a watched by us tag, so we get notified when someone uses it!
-->

<!--
Hey! Are you loving ZXing for JS?
We do the best we can to support this lib, but we can't dedicate full time to it due to financial reasons.
We'd love to be able to be more present on the project, not only on our spare time. If you'd like to help
please consider supporting us via any of the sponsor links or simply opencollective.com/zxing-js .
Or just say thanks, that's much appreciated as well! And will fill our hearts. 🖤
Thank you and good luck!
-->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ assignees: ''

---

<!--
Hey! Are you loving ZXing for JS?
We hope this project saved you thousands of hours of studying, coding and testing.
If so, please consider contributing to the project so we can dedicate even more to it
not only on our spare time! 👉 https://opencollective.com/zxing-js
Or just say thanks, that's much appreciated as well! And will fill our hearts. 🖤
Thank you and good luck!
-->

**Describe the bug**
A clear and concise description of what the bug is.

Expand Down
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request---.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ assignees: ''

---

<!--
Hey! Are you loving ZXing for JS?
We hope this project saved you thousands of hours of studying, coding and testing.
If so, please consider contributing to the project so we can dedicate even more to it
not only on our spare time! 👉 https://opencollective.com/zxing-js
Or just say thanks, that's much appreciated as well! And will fill our hearts. 🖤
Thank you and good luck!
-->

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [master, develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 22 * * 6'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
20 changes: 10 additions & 10 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build the application
run: yarn build

- name: Test the application
run: yarn test

- name: Build the application
run: yarn build

- name: Build the package
run: |
npm pack
npm pack dist/
mv zxing-library-*.tgz package.tgz
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -71,19 +71,19 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:

- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: pack-artifact

- name: Install JQ for JSON handling
run: sudo apt-get install jq

- name: Get repository name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
shell: bash

- name: Rename NPM package
run: |
ORG_NAME="zxing-js"
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ node_modules/
*.iml

coverage
esm
esm5
umd
typings
dist
output

## this is generated by `npm pack`
*.tgz
Expand Down
17 changes: 0 additions & 17 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ env:
global:
- CXX=g++-4.8
- CC_TEST_REPORTER_ID=e6be83551acde45d90f95ab35d4dbd4136645ec8a9b621f40ba2bed83010b718
- CODACY_PROJECT_TOKEN=b36d15c23793453eaee66463191749c2
- CODACY_PROJECT_TOKEN=482590c2b0f647649d07ba6ad9d40fb9

language: node_js

node_js:
- '12'
- '10'

before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
Expand All @@ -21,6 +20,7 @@ before_script:
- ./cc-test-reporter before-build

script:
- yarn build
- yarn cover

cache:
Expand Down
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@
"webpack.config.test.js"
]
},
{
"type": "node",
"request": "launch",
"name": "Unit Tests - ts-node",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"ts-node/register",
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"--recursive",
"./src/test/**/*.spec.ts"
],
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const reader = new MultiFormatReader();

reader.setHints(hints);

const luminanceSource = new RGBLuminanceSource(imgWidth, imgHeight, imgByteArray);
const luminanceSource = new RGBLuminanceSource(imgByteArray, imgWidth, imgHeight);
const binaryBitmap = new BinaryBitmap(new HybridBinarizer(luminanceSource));

reader.decode(binaryBitmap);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/multi-camera/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h1 class="title">Scan 1D/2D Code from Video Camera</h1>
let selectedDeviceId;
const codeReader = new ZXing.BrowserMultiFormatReader()
console.log('ZXing code reader initialized')
codeReader.getVideoInputDevices()
codeReader.listVideoInputDevices()
.then((videoInputDevices) => {
const sourceSelect = document.getElementById('sourceSelect')
selectedDeviceId = videoInputDevices[0].deviceId
Expand Down
Loading

0 comments on commit 7971b07

Please sign in to comment.