Socket
Socket
Sign inDemoInstall

min-wd

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

min-wd - npm Package Compare versions

Comparing version 2.11.2 to 2.12.0

2

bin/cmd.js

@@ -7,3 +7,3 @@ #!/usr/bin/env node

driver(process.stdin, options(), function (err) {
driver(process.stdin, options.retrieve(), function (err) {
if (err) {

@@ -10,0 +10,0 @@ process.nextTick(function () {

# Changes
## 2.12.0
A change from Thomas Junghans now [allows to have sharable configs][pull-24].
It works similar to sharable configs in eslint. Check out the readme for
instructions.
- [`1d5b9a2`](https://github.com/mantoni/min-webdriver/commit/1d5b9a23bb7b2effef1938b8b98a5538f87b2971)
feature: add shareable config support (Thomas Junghans)
- [`a3ce836`](https://github.com/mantoni/min-webdriver/commit/a3ce836fd9550b0171f75a5ca2297de280d6649c)
Add contributor
- [`df66b9d`](https://github.com/mantoni/min-webdriver/commit/df66b9d85e314c50abd91721833dfc8cfc82a2ca)
Update Studio Changes for `--footer` support
_Released by [Maximilian Antoni](https://github.com/mantoni) on 2018-09-05._
[pull-24]: https://github.com/mantoni/min-webdriver/pull/24
## 2.11.2

@@ -4,0 +21,0 @@

@@ -340,3 +340,2 @@ /*

var out = through(function (chunk, enc, next) {
/*jslint unparam: true*/
this.push(chunk);

@@ -343,0 +342,0 @@ next();

@@ -8,3 +8,2 @@ /*

*/
/*jslint stupid: true*/
'use strict';

@@ -14,2 +13,3 @@

var path = require('path');
var resolve = require('resolve');

@@ -40,2 +40,15 @@ function override(options, overrides) {

}
if (overrides.extends) {
var shareableConfigPath = path.dirname(resolve
.sync('min-wd-config-' + overrides.extends, {
basedir: process.cwd()
}));
if (!loadOptions(path.resolve(shareableConfigPath, '.min-wd'), null,
options)) {
overrides = loadOptions(path.resolve(shareableConfigPath,
'package.json'), 'webdriver', options);
}
}
override(options, overrides);

@@ -47,3 +60,3 @@ return true;

module.exports = function (opts) {
exports.retrieve = function retrieve(opts) {
var options = {

@@ -80,1 +93,4 @@ hostname : 'localhost',

};
// export for testing
module.exports._loadOptions = loadOptions;

@@ -31,3 +31,2 @@ /*

wrap.push(through(function (chunk, enc, next) {
/*jslint unparam: true*/
stream.push(chunk);

@@ -39,3 +38,3 @@ next();

}));
wrap.push(driver(stream, options(opts || {}), function (err) {
wrap.push(driver(stream, options.retrieve(opts || {}), function (err) {
if (err) {

@@ -42,0 +41,0 @@ b.emit('error', err);

{
"name": "min-wd",
"version": "2.11.2",
"version": "2.12.0",
"description": "Minimal WebDriver that pipes stdin to browsers",

@@ -18,3 +18,4 @@ "keywords": [

"Moshe Kolodny <kolodny.github@gmail.com>",
"Davide Callegari <davide@brokenseal.it>"
"Davide Callegari <davide@brokenseal.it>",
"Thomas Junghans <thomas.junghans@gmail.com>"
],

@@ -28,5 +29,7 @@ "homepage": "https://github.com/mantoni/min-webdriver",

"scripts": {
"test": "eslint .",
"lint": "eslint .",
"test": "mocha",
"watch": "mocha --watch",
"preversion": "npm test",
"version": "changes --commits",
"version": "changes --commits --footer",
"postversion": "git push --follow-tags && npm publish"

@@ -41,2 +44,3 @@ },

"listen": "^1.0.0",
"resolve": "^1.8.1",
"saucelabs": "^1.5.0",

@@ -47,4 +51,6 @@ "source-mapper": "^2.0.0",

"devDependencies": {
"@studio/changes": "^1.6.1",
"eslint": "^5.0.1"
"@studio/changes": "^1.7.0",
"eslint": "^5.0.1",
"mocha": "^5.2.0",
"sinon": "^6.1.5"
},

@@ -51,0 +57,0 @@ "files": [

@@ -94,2 +94,61 @@ # Minimal WebDriver

## Shareable configuration package
Inspired by [ESLint's shareable configuration package][Eslint Shareable Config],
there is the possibility of storing selenium and browser-specific capabilities
in a separate npm package. This way one config can be shared amongst many npm
packages instead of them each having their own `.min-wd` file.
### Usage
Create a npm package and name it using the prefix `min-wd-config-`
(eg. min-wd-config-myapp).
The shareable config must contain a js file that exports
an object with the configuration or a `.min-wd` file.
Example: index.js
```
module.exports = {
"hostname": "localhost",
"port": 4444,
"browsers": [{
"name": "chrome"
}]
}
```
In the shareable config's package.json you will need to reference the file
containing the config:
```
{
"name": "min-wd-config-myapp",
"version": "^1.0.0",
"webdriver": {
"extends": "./index.js"
}
}
```
In the shareable config's dependent, that is the package that consumes the
shareable config, the config name without the `min-wd-config-` prefix needs to
be specified:
```
{
"name": "myapp",
"webdriver": {
"extends": "myapp"
},
"devDependencies": {
"min-wd-config-myapp": "^1.0.0"
}
}
```
When using a shareable config and a `.min-wd` file, the latter will take
precedence.
## SauceLabs

@@ -173,3 +232,3 @@

By default, min-webdriver will folk a new browser and inject the given script
By default, min-webdriver will fork a new browser and inject the given script
straight away without loading any web page. If you want to run your test cases

@@ -344,1 +403,2 @@ in the context of a web page, you can configure the start page in the `.min-wd`

[Appium]: http://appium.io
[Eslint Shareable Config]: https://eslint.org/docs/user-guide/configuring#using-a-shareable-configuration-package
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc