Socket
Socket
Sign inDemoInstall

airtap-match-browsers

Package Overview
Dependencies
66
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtap-match-browsers

Match browser manifests to a desired set of browsers


Version published
Maintainers
1
Weekly downloads
705
decreased by-37.22%
Install size
2.22 MB

Weekly downloads

Readme

Source

airtap-match-browsers

Match browser manifests to a desired set of browsers.
Replaces sauce-browsers in conjunction with airtap-sauce-browsers.

npm status node Travis JavaScript Style Guide

Usage

const sauce = require('airtap-sauce-browsers').promise
const match = require('airtap-match-browsers')

// Browsers available on Sauce Labs, as manifests
const available = await sauce()

// Browsers that we want, by manifest properties
const wanted = [
  { name: 'firefox', platform: 'linux' },
  { name: 'chrome', version: '78..latest' },
  { name: 'ios safari', version: '13' }
]

// Find matches
const manifests = match(available, wanted)

Properties to match on

name

Required, must be a string. Matched loosely using browser-names.

version

Defaults to "latest". Supported forms (compatible with Zuul & Airtap):

  • An exact or partial version ("6" matches "6.0").
  • A keyword, one of "oldest" (first version) or "latest" (last stable version).
  • A range in the form of <start>..<end>, where start and end are either a version or a keyword. This will result in one or more matches.
  • A negative range in the form of -<n>..latest, for example -1..latest which means the last 2 stable versions.
  • A prerelease version like "dev", "beta", "80.0a1". Such versions sort after stable versions, so that oldest..latest excludes "dev" and latest..dev includes e.g. latest, "beta" and "dev".
  • An array of versions.

If a manifest doesn't have a version, it behaves like a prerelease.

platform and any other (nested) property

Yet to document. A quick example:

const manifests = match(available, [{
  name: 'chrome for android',
  version: '10',
  capabilities: {
    appium: {
      // Select a specific emulator (case-insensitive)
      deviceName: 'google pixel 3a googleapi emulator'
    }
  }
}])

Specifying options

Yet to document.

Deduplication logic

Yet to document.

Install

With npm do:

npm install airtap-match-browsers

License

MIT © 2020-present Vincent Weevers

Keywords

FAQs

Last updated on 24 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc