gherkin-precompiler
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,5 +0,3 @@ | ||
#! /user/bin/env node | ||
#!/usr/bin/env node | ||
const cli = require('../lib/cli'); | ||
cli.run(); |
# Changelog | ||
## 1.2.0 - 2018-01-31 | ||
### Added | ||
- Added predefined precompiler: removeDuplicates ([#10](https://github.com/judit-nahaj/gherkin-precompiler/issues/10)) | ||
- Added predefined precompiler: scenarioNumbering ([#6](https://github.com/judit-nahaj/gherkin-precompiler/issues/6)) | ||
- Added predefined precompiler: stepGroups ([#7](https://github.com/judit-nahaj/gherkin-precompiler/issues/7)) | ||
- Added method to create macro step ([#18](https://github.com/judit-nahaj/gherkin-precompiler/issues/18)) | ||
### Fixed | ||
- CLI commands are not working ([#19](http://github.com/judit-nahaj/gherkin-precompiler/issues/19)) | ||
## 1.1.0 - 2017-12-04 | ||
@@ -4,0 +17,0 @@ |
@@ -5,2 +5,3 @@ 'use strict'; | ||
const MACROSTEP = /^macro (.*) ?is executed$/; | ||
const {Step} = require('gherkin-assembler').AST; | ||
@@ -69,4 +70,14 @@ /** | ||
} | ||
/** | ||
* Creates macro step | ||
* @static | ||
* @param {String} macro | ||
* @returns {Step} | ||
*/ | ||
static createStep(macro) { | ||
return new Step('When', `macro ${macro} is executed`); | ||
} | ||
} | ||
module.exports = Macro; |
@@ -17,2 +17,11 @@ # Macro for Gherkin precompiler | ||
See examples for the input files and an output in the test/data folder. | ||
See examples for the input files and an output in the test/data folder. | ||
## API | ||
### `Macro.createStep(name)` | ||
**Params**: | ||
- `{String} name` - The name of the macro | ||
**Returns**: `{Step}` - A macro step for the given macro. |
@@ -26,3 +26,4 @@ 'use strict'; | ||
* The ScenarioOutlineNumbering precompiler is responsible | ||
* to make all scenarios name, which generated from scenario outlines. | ||
* to make all scenarios name unique, | ||
* which generated from scenario outlines. | ||
* @class | ||
@@ -29,0 +30,0 @@ * @extends DefaultConfig |
@@ -148,3 +148,3 @@ 'use strict'; | ||
API.save(source.output, outputAST, this.config.formatOptions); | ||
this.config.verbose && console.log(`Processed file written our ${source.output}`); | ||
this.config.verbose && console.log(`Processed file written out ${source.output}`); | ||
}); | ||
@@ -151,0 +151,0 @@ return this; |
@@ -64,7 +64,10 @@ 'use strict'; | ||
API.builtIn = {}; | ||
API.builtIn.ForLoop = require('./builtIn/ForLoop'); | ||
API.builtIn.Macro = require('./builtIn/Macro'); | ||
API.builtIn.RemoveDuplicates = require('./builtIn/RemoveDuplicates'); | ||
API.builtIn.Replacer = require('./builtIn/Replacer'); | ||
API.builtIn.ScenarioNumbering = require('./builtIn/ScenarioNumbering'); | ||
API.builtIn.ScenarioOutlineNumbering = require('./builtIn/ScenarioOutlineNumbering'); | ||
API.builtIn.Macro = require('./builtIn/Macro'); | ||
API.builtIn.ForLoop = require('./builtIn/ForLoop'); | ||
API.builtIn.StepGroups = require('./builtIn/StepGroups'); | ||
module.exports = API; |
{ | ||
"name": "gherkin-precompiler", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Simple pre-compiler for Gherkin feature files", | ||
@@ -43,3 +43,3 @@ "main": "lib/index.js", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^4.0.1", | ||
"mocha": "^5.0.0", | ||
"proxyquire": "^1.8.0", | ||
@@ -50,3 +50,3 @@ "sinon": "^4.1.2", | ||
"dependencies": { | ||
"fs-extra": "^4.0.2", | ||
"fs-extra": "^5.0.0", | ||
"gherkin": "^5.0.1", | ||
@@ -56,5 +56,6 @@ "gherkin-assembler": "^1.0.0", | ||
"gulp-util": "^3.0.8", | ||
"object-set-type": "^1.0.1", | ||
"through2": "^2.0.3", | ||
"yargs": "^10.0.1" | ||
"yargs": "^11.0.0" | ||
} | ||
} |
@@ -29,6 +29,9 @@ # gherkin-precompiler | ||
* [ForLoop](lib/builtIn/ForLoop.md) - Enables the user to loop scenarios and scenario outlines in order to repeat them. | ||
* [Macro](lib/builtIn/Macro.md) - Enables the user to create and execute macros. | ||
* [RemoveDuplicates](lib/builtIn/RemoveDuplicates.md) - Removes duplicated tags or example data table rows. | ||
* [Replacer](lib/builtIn/Replacer.md) - Replaces keywords in the feature files. | ||
* [ScenarioNumbering](lib/builtIn/ScenarioNumbering.md) - Adds an index to all scenario and scenario outline's name. | ||
* [ScenarioOutlineNumbering](lib/builtIn/ScenarioOutlineNumbering.md) - Makes all scenario, generated from scenario outlines unique. | ||
* [Macro](lib/builtIn/Macro.md) - Enables the user to create and execute macros. | ||
* [ForLoop](lib/builtIn/ForLoop.md) - Enables the user to loop scenarios and scenario outlines in order to repeat them. | ||
* [SteoGroups](lib/builtIn/StepGroups.md) - Corrects the gherkin keywords of steps to make the tests more readable. | ||
@@ -35,0 +38,0 @@ ## CLI |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
70235
27
1246
208
0
8
+ Addedobject-set-type@^1.0.1
+ Addedcross-spawn@6.0.6(transitive)
+ Addeddeep-eql@3.0.1(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexeca@1.0.0(transitive)
+ Addedfs-extra@5.0.0(transitive)
+ Addedget-stream@4.1.0(transitive)
+ Addedinvert-kv@2.0.0(transitive)
+ Addedlcid@2.0.0(transitive)
+ Addedmap-age-cleaner@0.1.3(transitive)
+ Addedmem@4.3.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addedobject-set-type@1.0.1(transitive)
+ Addedos-locale@3.1.0(transitive)
+ Addedp-defer@1.0.0(transitive)
+ Addedp-is-promise@2.1.0(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedtype-detect@4.1.0(transitive)
+ Addedyargs@11.1.1(transitive)
+ Addedyargs-parser@9.0.2(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removedexeca@0.7.0(transitive)
- Removedfs-extra@4.0.3(transitive)
- Removedget-stream@3.0.0(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedlcid@1.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedmem@1.1.0(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedos-locale@2.1.0(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedyallist@2.1.2(transitive)
- Removedyargs@10.1.2(transitive)
- Removedyargs-parser@8.1.0(transitive)
Updatedfs-extra@^5.0.0
Updatedyargs@^11.0.0