@next-core/dev-dependencies 1.17.136 → 1.18.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.
@@ -1,11 +1,11 @@
1
1
  <?xml version="1.0" ?>
2
2
  <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
3
- <coverage lines-valid="396" lines-covered="388" line-rate="0.9797" branches-valid="145" branches-covered="136" branch-rate="0.9379000000000001" timestamp="1706699124620" complexity="0" version="0.1">
3
+ <coverage lines-valid="404" lines-covered="396" line-rate="0.9801000000000001" branches-valid="149" branches-covered="140" branch-rate="0.9395" timestamp="1707029901595" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/home/runner/work/next-core/next-core/packages/dev-dependencies</source>
6
6
  </sources>
7
7
  <packages>
8
- <package name="main" line-rate="0.9797" branch-rate="0.9379000000000001">
8
+ <package name="main" line-rate="0.9801000000000001" branch-rate="0.9395">
9
9
  <classes>
10
10
  <class name="addMocksForBrickIcons.js" filename="patches/addMocksForBrickIcons.js" line-rate="1" branch-rate="1">
11
11
  <methods>
@@ -827,8 +827,27 @@
827
827
  <line number="6" hits="2" branch="false"/>
828
828
  <line number="7" hits="2" branch="false"/>
829
829
  <line number="9" hits="2" branch="false"/>
830
- <line number="51" hits="2" branch="false"/>
831
- <line number="54" hits="1" branch="false"/>
830
+ <line number="52" hits="2" branch="false"/>
831
+ <line number="55" hits="1" branch="false"/>
832
+ </lines>
833
+ </class>
834
+ <class name="updateRenovatePostExecutionMode.js" filename="patches/updateRenovatePostExecutionMode.js" line-rate="1" branch-rate="1">
835
+ <methods>
836
+ <method name="updateRenovatePostExecutionMode" hits="2" signature="()V">
837
+ <lines>
838
+ <line number="4" hits="2"/>
839
+ </lines>
840
+ </method>
841
+ </methods>
842
+ <lines>
843
+ <line number="1" hits="1" branch="false"/>
844
+ <line number="2" hits="1" branch="false"/>
845
+ <line number="5" hits="2" branch="false"/>
846
+ <line number="6" hits="2" branch="false"/>
847
+ <line number="8" hits="2" branch="true" condition-coverage="100% (2/2)"/>
848
+ <line number="12" hits="1" branch="false"/>
849
+ <line number="13" hits="1" branch="false"/>
850
+ <line number="17" hits="1" branch="false"/>
832
851
  </lines>
833
852
  </class>
834
853
  <class name="updateResolutions.js" filename="patches/updateResolutions.js" line-rate="1" branch-rate="1">
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.18.0](https://github.com/easyops-cn/next-core/compare/@next-core/dev-dependencies@1.17.136...@next-core/dev-dependencies@1.18.0) (2024-02-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * patch renovate post execution mode ([8eef82c](https://github.com/easyops-cn/next-core/commit/8eef82ce69326521f87dc1ac36ba9d490c64ed33))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.17.136](https://github.com/easyops-cn/next-core/compare/@next-core/dev-dependencies@1.17.135...@next-core/dev-dependencies@1.17.136) (2024-01-31)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/dev-dependencies",
3
- "version": "1.17.136",
3
+ "version": "1.18.0",
4
4
  "description": "Dev dependencies for brick-next related packages",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/dev-dependencies",
6
6
  "license": "GPL-3.0",
@@ -85,5 +85,5 @@
85
85
  "enzyme": "^3.11.0",
86
86
  "lolex": "^5.1.2"
87
87
  },
88
- "gitHead": "5ebc9d8697ecd3ca2e061e7bfc3d135f50c2eff6"
88
+ "gitHead": "20692d56791c30d947f72f04fc51084659f9daa4"
89
89
  }
package/patch.js CHANGED
@@ -29,6 +29,7 @@ const {
29
29
  onlyAutoMergePatchVersions,
30
30
  enableLernaWithNx,
31
31
  updateRenovateForV2,
32
+ updateRenovatePostExecutionMode,
32
33
  } = require("./patches");
33
34
 
34
35
  function initAndGetDevDependenciesVersion() {
@@ -204,6 +205,10 @@ module.exports = async function patch() {
204
205
  updateRenovateForV2();
205
206
  }
206
207
 
208
+ if (semver.lt(currentRenewVersion, "1.18.0")) {
209
+ updateRenovatePostExecutionMode();
210
+ }
211
+
207
212
  updateDevDependenciesVersion();
208
213
  };
209
214
 
package/patches/index.js CHANGED
@@ -22,3 +22,4 @@ exports.migrateLazyBricksWithJest = require("./migrateLazyBricksWithJest");
22
22
  exports.onlyAutoMergePatchVersions = require("./onlyAutoMergePatchVersions");
23
23
  exports.enableLernaWithNx = require("./enableLernaWithNx");
24
24
  exports.updateRenovateForV2 = require("./updateRenovateForV2");
25
+ exports.updateRenovatePostExecutionMode = require("./updateRenovatePostExecutionMode");
@@ -31,6 +31,7 @@ function updateRenovateForV2() {
31
31
  "yarn-deduplicate yarn.lock",
32
32
  "yarn",
33
33
  ],
34
+ executionMode: "branch",
34
35
  fileFilters: [
35
36
  "**/*",
36
37
  ".gitignore",
@@ -80,6 +80,7 @@ describe("updateRenovateForV2", () => {
80
80
  "yarn-deduplicate yarn.lock",
81
81
  "yarn",
82
82
  ],
83
+ executionMode: "branch",
83
84
  fileFilters: [
84
85
  "**/*",
85
86
  ".gitignore",
@@ -0,0 +1,17 @@
1
+ const path = require("path");
2
+ const { readJson, writeJsonFile } = require("../utils");
3
+
4
+ function updateRenovatePostExecutionMode() {
5
+ const renovateJsonPath = path.resolve("renovate.json");
6
+ const renovateJson = readJson(renovateJsonPath);
7
+
8
+ if (
9
+ renovateJson.postUpgradeTasks &&
10
+ renovateJson.postUpgradeTasks.executionMode !== "branch"
11
+ ) {
12
+ renovateJson.postUpgradeTasks.executionMode = "branch";
13
+ writeJsonFile(renovateJsonPath, renovateJson);
14
+ }
15
+ }
16
+
17
+ module.exports = updateRenovatePostExecutionMode;
@@ -0,0 +1,40 @@
1
+ const updateRenovatePostExecutionMode = require("./updateRenovatePostExecutionMode");
2
+ const { writeJsonFile, readJson } = require("../utils");
3
+
4
+ jest.mock("../utils");
5
+
6
+ describe("updateRenovatePostExecutionMode", () => {
7
+ afterEach(() => {
8
+ jest.clearAllMocks();
9
+ });
10
+
11
+ it("should ignore if no postUpgradeTasks", () => {
12
+ readJson.mockReturnValueOnce({
13
+ packageRules: [
14
+ {
15
+ groupName: "next-core packages",
16
+ },
17
+ ],
18
+ });
19
+ updateRenovatePostExecutionMode();
20
+ expect(writeJsonFile).not.toBeCalled();
21
+ });
22
+
23
+ it("should update fileFilters", () => {
24
+ readJson.mockReturnValueOnce({
25
+ postUpgradeTasks: {
26
+ commands: ["yarn renew"],
27
+ },
28
+ });
29
+ updateRenovatePostExecutionMode();
30
+ expect(writeJsonFile).toBeCalledWith(
31
+ expect.stringContaining("renovate.json"),
32
+ {
33
+ postUpgradeTasks: {
34
+ commands: ["yarn renew"],
35
+ executionMode: "branch",
36
+ },
37
+ }
38
+ );
39
+ });
40
+ });