mega-linter-runner 9.5.0 → 9.6.0

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.
package/lib/upgrade.js CHANGED
@@ -8,7 +8,8 @@ import { asciiArt } from "./ascii.js";
8
8
  import { DEFAULT_RELEASE, GLOB_IGNORE_PATTERNS } from "./config.js";
9
9
 
10
10
  export class MegaLinterUpgrader {
11
- constructor() {
11
+ constructor({ noPrompt = false } = {}) {
12
+ this.noPrompt = noPrompt;
12
13
  this.replacements = [
13
14
  // Documentation base URL
14
15
  {
@@ -462,10 +463,10 @@ jobs:
462
463
  },
463
464
  // Create pull request action
464
465
  {
465
- regex: /peter-evans\/create-pull-request@v(3|4|5|6)/gm,
466
- replacement: `peter-evans/create-pull-request@v7`,
467
- test: "peter-evans/create-pull-request@v6",
468
- testRes: `peter-evans/create-pull-request@v7`,
466
+ regex: /peter-evans\/create-pull-request@v(3|4|5|6|7)/gm,
467
+ replacement: `peter-evans/create-pull-request@v8`,
468
+ test: "peter-evans/create-pull-request@v7",
469
+ testRes: `peter-evans/create-pull-request@v8`,
469
470
  },
470
471
  // Auto-commit action
471
472
  {
@@ -553,15 +554,19 @@ jobs:
553
554
 
554
555
  async run() {
555
556
  console.log(asciiArt());
556
- const promptsUpgradeRes = await prompts({
557
- name: "upgrade",
558
- message: c.blueBright(
559
- `This assistant will automatically upgrade your local files so you use MegaLinter ${DEFAULT_RELEASE}\nPlease confirm to proceed :)`
560
- ),
561
- type: "confirm",
562
- initial: true,
563
- });
564
- if (promptsUpgradeRes.upgrade === false) {
557
+ const confirmedUpgrade = this.noPrompt
558
+ ? true
559
+ : (
560
+ await prompts({
561
+ name: "upgrade",
562
+ message: c.blueBright(
563
+ `This assistant will automatically upgrade your local files so you use MegaLinter ${DEFAULT_RELEASE}\nPlease confirm to proceed :)`
564
+ ),
565
+ type: "confirm",
566
+ initial: true,
567
+ })
568
+ ).upgrade;
569
+ if (confirmedUpgrade === false) {
565
570
  console.log(
566
571
  `You should upgrade to ${DEFAULT_RELEASE} to benefit from latest versions of linters, and more features :)`
567
572
  );
@@ -580,6 +585,9 @@ jobs:
580
585
  )
581
586
  );
582
587
  console.log("");
588
+ if (this.noPrompt) {
589
+ return;
590
+ }
583
591
  // Propose to try ox service
584
592
  const promptsOXRes = await prompts({
585
593
  name: "ox",
@@ -662,4 +670,3 @@ jobs:
662
670
  }
663
671
  }
664
672
  }
665
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mega-linter-runner",
3
- "version": "9.5.0",
3
+ "version": "9.6.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/oxsecurity/megalinter.git"
@@ -93,7 +93,7 @@
93
93
  "prompts": "^2.4.2",
94
94
  "simple-git": "^3.28.0",
95
95
  "uuid": "^14.0.0",
96
- "which": "^6.0.0",
96
+ "which": "^7.0.0",
97
97
  "yeoman-environment": "^6.0.0",
98
98
  "yeoman-generator": "^8.0.0"
99
99
  },
@@ -106,7 +106,7 @@
106
106
  "diff": "^9.0.0",
107
107
  "ip-address": "^10.1.1",
108
108
  "serialize-javascript": "^7.0.5",
109
- "semver": "7.8.0",
110
- "tmp": "0.2.5"
109
+ "semver": "7.8.5",
110
+ "tmp": "0.2.7"
111
111
  }
112
112
  }