Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
31 changes: 31 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
4 changes: 4 additions & 0 deletions browsers/brave-beta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
linux: ['brave-browser-beta'],
// TODO darwin and win paths
};
4 changes: 4 additions & 0 deletions browsers/brave-nightly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
linux: ['brave-browser-nightly'],
// TODO darwin and win paths
};
4 changes: 4 additions & 0 deletions browsers/chrome-beta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
linux: ['google-chrome-beta'],
// TODO darwin and win paths
};
4 changes: 4 additions & 0 deletions browsers/firefox-beta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
linux: ['firefox-beta'],
// TODO win and darwin
};
1 change: 1 addition & 0 deletions browsers/firefox-nightly.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
linux: ['firefox-nightly'],
darwin: ['/Applications/Firefox Nightly.app/Contents/MacOS/firefox-bin'],
win32: [
process.env.LOCALAPPDATA + '\\Firefox Nightly\\firefox.exe',
Expand Down
2 changes: 1 addition & 1 deletion browsers/firefox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
linux: ['firefox'],
linux: ['firefox', 'firefox-stable'],
darwin: ['/Applications/Firefox.app/Contents/MacOS/firefox-bin'],
win32: [
process.env.LOCALAPPDATA + '\\Mozilla Firefox\\firefox.exe',
Expand Down
6 changes: 5 additions & 1 deletion browsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ module.exports = {
'Opera': require('./opera'),
'Safari Technology Preview': require('./safari-tech-preview'),
'Safari': require('./safari'),
'Vivaldi': require('./vivaldi')
'Vivaldi': require('./vivaldi'),
'Brave Nightly': require('./brave-nightly'),
'Brave Beta': require('./brave-beta'),
'Chrome Beta': require('./chrome-beta'),
'Firefox Beta': require('./firefox-beta'),
};
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"repository": "https://github.com/Subash/detect-browsers",
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "jest"
},
"dependencies": {
"which": "^2.0.2"
},
Expand Down