@next-core/dev-dependencies 1.17.135 → 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="1706515097845" 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,28 @@
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
+
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)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * handle errors when running yarn info ([e98cfa1](https://github.com/easyops-cn/next-core/commit/e98cfa195ff58c35ced36088da4e0830586fa965))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.17.135](https://github.com/easyops-cn/next-core/compare/@next-core/dev-dependencies@1.17.134...@next-core/dev-dependencies@1.17.135) (2024-01-29)
7
29
 
8
30
  **Note:** Version bump only for package @next-core/dev-dependencies
package/index.js CHANGED
@@ -29,14 +29,23 @@ function updateSelf() {
29
29
  const currentRange = rootPackageJson.devDependencies[selfPackageName];
30
30
  if (currentRange) {
31
31
  // https://classic.yarnpkg.com/en/docs/cli/info
32
- const versions = JSON.parse(
33
- execa.sync("yarn", ["info", selfPackageName, "versions", "--json"])
34
- .stdout
35
- ).data;
36
- tag = `@^${semver.maxSatisfying(
37
- versions,
38
- currentRange.startsWith("^0.") ? "< 1" : currentRange
39
- )}`;
32
+ const result = execa.sync("yarn", [
33
+ "info",
34
+ selfPackageName,
35
+ "versions",
36
+ "--json",
37
+ ]);
38
+ const content = result.stdout;
39
+ if (content) {
40
+ const versions = JSON.parse(content).data;
41
+ tag = `@^${semver.maxSatisfying(
42
+ versions,
43
+ currentRange.startsWith("^0.") ? "< 1" : currentRange
44
+ )}`;
45
+ } else {
46
+ console.error("yarn info failed:", result.stderr);
47
+ tag = currentRange.startsWith("^0.") ? "@0.x" : "@latest";
48
+ }
40
49
  }
41
50
  }
42
51
  console.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/dev-dependencies",
3
- "version": "1.17.135",
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",
@@ -21,8 +21,8 @@
21
21
  "@babel/core": "^7.20.5",
22
22
  "@next-core/babel-preset-next": "^0.9.16",
23
23
  "@next-core/babel-preset-prismjs": "^1.0.20",
24
- "@next-core/brick-container": "^2.92.22",
25
- "@next-core/brick-dll": "^2.46.4",
24
+ "@next-core/brick-container": "^2.92.23",
25
+ "@next-core/brick-dll": "^2.46.5",
26
26
  "@next-core/brick-scripts": "^3.0.8",
27
27
  "@next-core/browserslist-config-next": "^0.1.4",
28
28
  "@next-core/build-config-factory": "^2.25.40",
@@ -32,11 +32,11 @@
32
32
  "@next-core/jest-config-factory": "^0.4.14",
33
33
  "@next-core/rollup-config-factory": "^2.7.0",
34
34
  "@next-core/webpack-config-factory": "^2.23.0",
35
- "@next-dll/ace": "^2.0.727",
35
+ "@next-dll/ace": "^2.0.728",
36
36
  "@next-dll/d3": "^2.0.80",
37
37
  "@next-dll/echarts": "^2.0.81",
38
- "@next-dll/editor-bricks-helper": "^0.38.72",
39
- "@next-dll/react-dnd": "^0.1.665",
38
+ "@next-dll/editor-bricks-helper": "^0.38.73",
39
+ "@next-dll/react-dnd": "^0.1.666",
40
40
  "@testing-library/jest-dom": "^5.16.5",
41
41
  "@testing-library/react": "^12.1.5",
42
42
  "@typescript-eslint/eslint-plugin": "^5.46.0",
@@ -85,5 +85,5 @@
85
85
  "enzyme": "^3.11.0",
86
86
  "lolex": "^5.1.2"
87
87
  },
88
- "gitHead": "c395c83985e936ef8f7062047d84c8f06159b828"
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
+ });