@bahmutov/cypress-extends
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -9,4 +9,8 @@ const debug = require('debug')('@bahmutov/cypress-extends') | ||
if (configJson.extends) { | ||
const baseConfigFilename = path.join( | ||
path.dirname(filename), configJson.extends) | ||
let baseConfigFilename; | ||
if (configJson.extends.startsWith('.')) { | ||
baseConfigFilename = path.join(path.dirname(filename), configJson.extends) | ||
} else { | ||
baseConfigFilename = require.resolve(configJson.extends) | ||
} | ||
debug('config file extends %s', baseConfigFilename) | ||
@@ -13,0 +17,0 @@ const baseConfig = loadConfig(baseConfigFilename) |
{ | ||
"name": "@bahmutov/cypress-extends", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Cypress plugin that adds \"extends\" support to the configuration file", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"cypress": "4.7.0", | ||
"cypress": "5.5.0", | ||
"semantic-release": "^17.0.8" | ||
@@ -31,0 +31,0 @@ }, |
@@ -1,3 +0,3 @@ | ||
# @bahmutov/cypress-extends [![ci status][ci image]][ci url] | ||
> Cypress plugin that adds "extends" support to the configuration file | ||
# @bahmutov/cypress-extends [![renovate-app badge][renovate-badge]][renovate-app] [![ci status][ci image]][ci url] [![badges status][badges image]][badges url]  | ||
> Cypress plugin that adds "extends" support to the configuration file. This allows the config files to remain DRY and avoid duplicating data, but still have multiple files for different scenarios. See details in [Extending the Cypress Config File](https://www.cypress.io/blog/2020/06/18/extending-the-cypress-config-file/) blog post. | ||
@@ -55,3 +55,45 @@ ## Use | ||
### Small print | ||
Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2020 | ||
* [@bahmutov](https://twitter.com/bahmutov) | ||
* [glebbahmutov.com](https://glebbahmutov.com) | ||
* [blog](https://glebbahmutov.com/blog) | ||
License: MIT - do anything with the code, but don't blame me if it does not work. | ||
Support: if you find any problems with this module, email / tweet / | ||
[open issue](https://github.com/bahmutov/cypress-extends/issues) on Github | ||
## MIT License | ||
Copyright (c) 2020 Gleb Bahmutov <gleb.bahmutov@gmail.com> | ||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
[ci image]: https://github.com/bahmutov/cypress-extends/workflows/ci/badge.svg?branch=master | ||
[ci url]: https://github.com/bahmutov/cypress-extends/actions | ||
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg | ||
[renovate-app]: https://renovateapp.com/ | ||
[badges image]: https://github.com/bahmutov/cypress-extends/workflows/badges/badge.svg?branch=master | ||
[badges url]: https://github.com/bahmutov/cypress-extends/actions |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5453
23
99
2