Skip to content

Commit e2ccd7a

Browse files
authored
Merge pull request #4741 from easyops-cn/next
Next
2 parents e452085 + 5201307 commit e2ccd7a

File tree

86 files changed

+3590
-3180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3590
-3180
lines changed

cypress/e2e/size-check.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ for (const port of Cypress.env("ports")) {
3535
});
3636
const total = js + css + others;
3737

38-
expect(total, "total resource").to.be.lessThan(3.2e5);
39-
expect(js, "js resource").to.be.lessThan(3e5);
38+
expect(total, "total resource").to.be.lessThan(3.3e5);
39+
expect(js, "js resource").to.be.lessThan(3.1e5);
4040
expect(css, "css resource").to.be.lessThan(2e4);
4141
expect(others, "other resource").to.be.lessThan(1e4);
4242
});

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3.8"
22
services:
33
e2e:
4-
image: cypress/included:14.1.0
4+
image: cypress/included:14.4.1
55
working_dir: /app
66
volumes:
77
- '.:/app'

package.json

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"test:e2e:ci": "npx start-server-and-test serve:e2e http-get://localhost:8081/ cypress:run",
2424
"test:e2e:no-record": "npx wait-on -r http-get://localhost:8081/ && npx start-server-and-test serve:e2e http-get://localhost:8081/ cypress:run:no-record",
2525
"test:e2e:docker": "docker-compose run --user $(id -u):$(id -g) e2e",
26-
"lint-staged": "lint-staged"
26+
"lint-staged": "lint-staged",
27+
"postinstall": "patch-package"
2728
},
2829
"browserslist": {
2930
"development": [
@@ -37,46 +38,48 @@
3738
"trailingComma": "es5"
3839
},
3940
"devDependencies": {
40-
"@babel/core": "^7.26.10",
41-
"@babel/types": "^7.26.10",
41+
"@babel/core": "^7.27.4",
42+
"@babel/types": "^7.27.6",
4243
"@cypress/browserify-preprocessor": "^3.0.2",
43-
"@next-shared/common-bricks": "^0.53.1",
44+
"@next-shared/common-bricks": "^0.54.0",
4445
"@types/doctrine": "^0.0.9",
4546
"@types/fs-extra": "^9.0.13",
4647
"@types/history": "^4.7.11",
4748
"@types/inquirer": "^7.3.3",
48-
"@types/jest": "^29.5.12",
49+
"@types/jest": "^29.5.14",
4950
"@types/js-yaml": "^3.12.10",
5051
"@types/klaw-sync": "^6.0.5",
51-
"@types/lodash": "^4.17.7",
52+
"@types/lodash": "^4.17.17",
5253
"@types/meow": "^5.0.0",
53-
"@types/node": "^20.16.2",
54-
"@types/react": "^18.3.4",
55-
"@types/react-dom": "^18.3.0",
56-
"babel-jest": "^29.7.0",
54+
"@types/node": "^20.19.0",
55+
"@types/react": "^18.3.23",
56+
"@types/react-dom": "^18.3.7",
57+
"babel-jest": "^30.0.2",
5758
"concurrently": "^9.1.2",
5859
"cross-env": "^7.0.3",
59-
"cypress": "^14.1.0",
60-
"eslint": "^9.22.0",
60+
"cypress": "^14.4.1",
61+
"eslint": "^9.29.0",
6162
"husky": "^9.1.7",
62-
"jest": "^29.7.0",
63-
"jest-environment-jsdom": "^29.7.0",
63+
"jest": "^30.0.2",
64+
"jest-environment-jsdom": "^30.0.2",
6465
"jest-websocket-mock": "^2.5.0",
6566
"lerna": "^8.1.8",
66-
"lint-staged": "^15.4.3",
67-
"prettier": "^3.5.3",
67+
"lint-staged": "^15.5.2",
68+
"patch-package": "^8.0.0",
69+
"postinstall-postinstall": "^2.1.0",
70+
"prettier": "^3.6.0",
6871
"rimraf": "^6.0.1",
6972
"ts-jest-resolver": "^2.0.1",
70-
"typescript": "^5.8.2"
73+
"typescript": "^5.8.3"
7174
},
7275
"workspaces": [
7376
"bricks/*",
7477
"packages/*"
7578
],
7679
"resolutions": {
77-
"@babel/parser": "^7.26.10",
78-
"@babel/runtime": "^7.26.10",
79-
"@types/react": "^18.3.4",
80+
"@babel/parser": "^7.27.5",
81+
"@babel/runtime": "^7.27.6",
82+
"@types/react": "^18.3.23",
8083
"lodash": "^4.17.21",
8184
"moment": "^2.30.1"
8285
},

packages/babel-preset-next/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
},
1212
"sideEffects": false,
1313
"dependencies": {
14-
"@babel/plugin-proposal-decorators": "^7.25.9",
15-
"@babel/plugin-transform-runtime": "^7.26.10",
16-
"@babel/preset-env": "^7.26.9",
17-
"@babel/preset-react": "^7.26.3",
18-
"@babel/preset-typescript": "^7.26.0",
19-
"@babel/runtime": "^7.26.10"
14+
"@babel/plugin-proposal-decorators": "^7.27.1",
15+
"@babel/plugin-transform-runtime": "^7.27.4",
16+
"@babel/preset-env": "^7.27.2",
17+
"@babel/preset-react": "^7.27.1",
18+
"@babel/preset-typescript": "^7.27.1",
19+
"@babel/runtime": "^7.27.6"
2020
}
2121
}

packages/brick-container/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"dependencies": {
3838
"@next-core/serve-helpers": "^1.2.5",
39-
"body-parser": "^1.20.3",
39+
"body-parser": "^2.2.0",
4040
"chalk": "^4.1.2",
4141
"chokidar": "^4.0.3",
4242
"compression": "^1.8.0",
@@ -47,7 +47,7 @@
4747
"lodash": "^4.17.21",
4848
"meow": "^11.0.0",
4949
"mockdate": "^3.0.5",
50-
"ws": "^8.18.1"
50+
"ws": "^8.18.2"
5151
},
5252
"devDependencies": {
5353
"@next-api-sdk/api-gateway-sdk": "^1.2.2",
@@ -65,10 +65,10 @@
6565
"@next-core/utils": "^1.7.35",
6666
"broadcast-channel": "^7.0.0",
6767
"copy-webpack-plugin": "^13.0.0",
68-
"core-js": "^3.41.0",
68+
"core-js": "^3.43.0",
6969
"html-webpack-plugin": "^5.6.3",
7070
"regenerator-runtime": "^0.14.1",
71-
"webpack-dev-server": "^5.2.0"
71+
"webpack-dev-server": "^5.2.2"
7272
},
7373
"peerDependencies": {
7474
"@next-core/http": "*",

packages/brick-container/src/loadBootstrapData.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ describe("loadBootstrapData", () => {
313313
window.BOOTSTRAP_FILE = "bootstrap.app-a.json";
314314
window.APP_ROOT = "sa-static/app-a/versions/1.88.0/webroot/";
315315
const promise = loadBootstrapData();
316-
expect(RuntimeApi_runtimeMicroAppStandalone).toBeCalledWith("app-a", {
316+
expect(RuntimeApi_runtimeMicroAppStandalone).toHaveBeenCalledWith("app-a", {
317317
version: "1.88.0",
318318
});
319319
const data = await promise;
@@ -358,8 +358,8 @@ describe("loadBootstrapData", () => {
358358
});
359359

360360
await fulfilStoryboard(data.storyboards[0]);
361-
expect(RuntimeApi_runtimeMicroAppStandalone).toBeCalledTimes(1);
362-
expect(registerMocks).toBeCalledTimes(1);
361+
expect(RuntimeApi_runtimeMicroAppStandalone).toHaveBeenCalledTimes(1);
362+
expect(registerMocks).toHaveBeenCalledTimes(1);
363363

364364
expect(data.storyboards[0]).toEqual({
365365
app: {
@@ -428,7 +428,7 @@ describe("loadBootstrapData", () => {
428428
window.BOOTSTRAP_FILE = "bootstrap.mini.g.json";
429429

430430
const promise = loadBootstrapData();
431-
expect(RuntimeApi_runtimeMicroAppStandalone).not.toBeCalled();
431+
expect(RuntimeApi_runtimeMicroAppStandalone).not.toHaveBeenCalled();
432432

433433
const data = await promise;
434434
expect(data).toEqual({
@@ -705,7 +705,7 @@ describe("loadBootstrapData", () => {
705705
},
706706
},
707707
});
708-
expect(consoleWarn).toBeCalledTimes(1);
708+
expect(consoleWarn).toHaveBeenCalledTimes(1);
709709
});
710710

711711
test("standalone with invalid conf.yaml", async () => {
@@ -719,8 +719,8 @@ describe("loadBootstrapData", () => {
719719
await expect(promise).rejects.toThrowErrorMatchingInlineSnapshot(
720720
`"Invalid conf.yaml"`
721721
);
722-
expect(consoleWarn).toBeCalledTimes(1);
723-
expect(consoleError).toBeCalledTimes(1);
722+
expect(consoleWarn).toHaveBeenCalledTimes(1);
723+
expect(consoleError).toHaveBeenCalledTimes(1);
724724
});
725725

726726
test("standalone with conf.yaml of user_config_by_apps", async () => {
@@ -745,7 +745,7 @@ describe("loadBootstrapData", () => {
745745
},
746746
],
747747
});
748-
expect(consoleWarn).toBeCalledTimes(1);
748+
expect(consoleWarn).toHaveBeenCalledTimes(1);
749749
});
750750

751751
test("standalone with conf.yaml of missing in user_config_by_apps", async () => {
@@ -768,9 +768,9 @@ describe("loadBootstrapData", () => {
768768
},
769769
],
770770
});
771-
expect(consoleWarn).toBeCalledTimes(1);
771+
expect(consoleWarn).toHaveBeenCalledTimes(1);
772772
await fulfilStoryboard(data.storyboards[0]);
773-
expect(consoleWarn).toBeCalledTimes(2);
773+
expect(consoleWarn).toHaveBeenCalledTimes(2);
774774
consoleWarn.mockReset();
775775
});
776776

@@ -794,7 +794,7 @@ describe("loadBootstrapData", () => {
794794
},
795795
],
796796
});
797-
expect(consoleWarn).toBeCalledTimes(1);
797+
expect(consoleWarn).toHaveBeenCalledTimes(1);
798798
});
799799

800800
test("non-standalone", async () => {
@@ -832,7 +832,7 @@ describe("loadBootstrapData", () => {
832832
});
833833

834834
await fulfilStoryboard(data.storyboards[0]);
835-
expect(mockGetAppStoryboardV2).toBeCalledTimes(1);
835+
expect(mockGetAppStoryboardV2).toHaveBeenCalledTimes(1);
836836

837837
expect(data.storyboards[0]).toEqual({
838838
app: {

packages/brick-container/src/loadCheckLogin.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ describe("loadCheckLogin", () => {
1414
test("should work for when not logged in", async () => {
1515
mockCheckLogin.mockResolvedValueOnce({ loggedIn: false });
1616
await loadCheckLogin();
17-
expect(auth.authenticate).not.toBeCalled();
17+
expect(auth.authenticate).not.toHaveBeenCalled();
1818
});
1919

2020
test("should work for when logged in", async () => {
2121
mockCheckLogin.mockResolvedValueOnce({ loggedIn: true });
2222
await loadCheckLogin();
23-
expect(auth.authenticate).toBeCalledWith({
23+
expect(auth.authenticate).toHaveBeenCalledWith({
2424
loggedIn: true,
2525
});
2626
});
2727

2828
test("should work for no auth guard", async () => {
2929
window.NO_AUTH_GUARD = true;
3030
await loadCheckLogin();
31-
expect(mockCheckLogin).not.toBeCalled();
32-
expect(auth.authenticate).not.toBeCalled();
31+
expect(mockCheckLogin).not.toHaveBeenCalled();
32+
expect(auth.authenticate).not.toHaveBeenCalled();
3333
window.NO_AUTH_GUARD = false;
3434
});
3535
});

packages/brick-container/src/preview/initialize.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ describe("initialize", () => {
7575
"https://dev.easyops.local"
7676
);
7777
expect(ok).toBe(false);
78-
expect(consoleError).toBeCalledWith(expect.stringContaining("disallowed"));
78+
expect(consoleError).toHaveBeenCalledWith(
79+
expect.stringContaining("disallowed")
80+
);
7981

8082
(window as any).location = location;
8183
});

packages/brick-container/src/preview/listen.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ describe("listen", () => {
4747

4848
await (global as any).flushPromises();
4949

50-
expect(loadBricksImperatively).toBeCalledWith(
50+
expect(loadBricksImperatively).toHaveBeenCalledWith(
5151
["visual-builder.inject-preview-agent"],
5252
[
5353
{
5454
id: "bricks/visual-builder",
5555
},
5656
]
5757
);
58-
expect(injectPreview).toBeCalledWith(location.origin, {
58+
expect(injectPreview).toHaveBeenCalledWith(location.origin, {
5959
foo: "bar",
6060
});
6161
});
@@ -87,15 +87,15 @@ describe("listen", () => {
8787

8888
await (global as any).flushPromises();
8989

90-
expect(loadBricksImperatively).toBeCalledWith(
90+
expect(loadBricksImperatively).toHaveBeenCalledWith(
9191
["ui-test.inject-preview-agent"],
9292
[
9393
{
9494
id: "bricks/ui-test",
9595
},
9696
]
9797
);
98-
expect(injectUITest).toBeCalledWith(location.origin, {
98+
expect(injectUITest).toHaveBeenCalledWith(location.origin, {
9999
foo: "bar",
100100
});
101101
});
@@ -111,7 +111,7 @@ describe("listen", () => {
111111

112112
await (global as any).flushPromises();
113113

114-
expect(loadBricksImperatively).not.toBeCalled();
114+
expect(loadBricksImperatively).not.toHaveBeenCalled();
115115
});
116116

117117
test("initialize failed", async () => {
@@ -141,6 +141,6 @@ describe("listen", () => {
141141

142142
await (global as any).flushPromises();
143143

144-
expect(loadBricksImperatively).not.toBeCalled();
144+
expect(loadBricksImperatively).not.toHaveBeenCalled();
145145
});
146146
});

packages/brick-playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"html-webpack-plugin": "^5.6.3",
4141
"monaco-editor": "^0.50.0",
4242
"monaco-editor-webpack-plugin": "^7.1.0",
43-
"webpack-dev-server": "^5.2.0"
43+
"webpack-dev-server": "^5.2.2"
4444
}
4545
}

0 commit comments

Comments
 (0)