@dev-blinq/cucumber_client 1.0.1259-dev → 1.0.1261-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -352,17 +352,38 @@ export async function updateFeatureFile({ featureName, scenario, override, proje
352
352
  if (updatedFeatureFileContent === "error") {
353
353
  throw new Error(`Error while parsing feature file: Invalid gherkin`);
354
354
  }
355
- updatedFeatureFileContent = await prettier.format(updatedFeatureFileContent, prettierConfig);
355
+ try {
356
+ updatedFeatureFileContent = await prettier.format(updatedFeatureFileContent, {
357
+ ...prettierConfig,
358
+ parser: "gherkin",
359
+ });
360
+ } catch (error) {
361
+ console.error("Error formatting feature file content with Prettier:", error);
362
+ }
356
363
  writeFileSync(featureFilePath, updatedFeatureFileContent);
357
364
  return;
358
365
  }
359
366
  }
360
367
  let updatedFeatureFileContent = featureFileContent + "\n" + scenarioContent;
361
- updatedFeatureFileContent = await prettier.format(updatedFeatureFileContent, prettierConfig);
368
+ try {
369
+ updatedFeatureFileContent = await prettier.format(updatedFeatureFileContent, {
370
+ ...prettierConfig,
371
+ parser: "gherkin",
372
+ });
373
+ } catch (error) {
374
+ console.error("Error formatting feature file content with Prettier:", error);
375
+ }
362
376
  writeFileSync(featureFilePath, updatedFeatureFileContent);
363
377
  } else {
364
378
  let featureFileContent = `Feature: ${featureName}\n${scenarioContent}`;
365
- featureFileContent = await prettier.format(featureFileContent, prettierConfig);
379
+ try {
380
+ featureFileContent = await prettier.format(featureFileContent, {
381
+ ...prettierConfig,
382
+ parser: "gherkin",
383
+ });
384
+ } catch (error) {
385
+ console.error("Error formatting feature file content with Prettier:", error);
386
+ }
366
387
  writeFileSync(featureFilePath, featureFileContent);
367
388
  }
368
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1259-dev",
3
+ "version": "1.0.1261-dev",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "lint": "eslint ./src/**/*.js",
14
14
  "clean": "rm -rf ./build",
15
15
  "build": "npm run clean && npm run pack",
16
- "build:watch": "npx nodemon --watch src --exec 'npm run build'",
16
+ "build:watch": "npx nodemon --watch src/client --exec 'npm run build'",
17
17
  "update_logic": "rm -rf ../logic/node_modules/@dev-blinq && mkdir ../logic/node_modules/@dev-blinq && mkdir ../logic/node_modules/@dev-blinq/cucumber_client && mkdir ../logic/node_modules/@dev-blinq/cucumber_client/bin && mkdir ../logic/node_modules/@dev-blinq/cucumber_client/node_modules && cp -R ./build/* ../logic/node_modules/@dev-blinq/cucumber_client/bin && cp -R ./node_modules/* ../logic/node_modules/@dev-blinq/cucumber_client/node_modules && cp ./package.json ../logic/node_modules/@dev-blinq/cucumber_client/",
18
18
  "version-bump": "npm version prepatch --preid=dev",
19
19
  "scripts_regression": "cross-env HEADLESS=true npx mocha --bail --parallel --jobs=12 ./scripts_regression/ --timeout 120000",