Skip to content

Commit 5827866

Browse files
authored
workflow: update cypress and website compatible node 18 (#529)
1 parent 6d8e2ee commit 5827866

File tree

14 files changed

+12354
-12851
lines changed

14 files changed

+12354
-12851
lines changed

Diff for: .github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ jobs:
7575
- name: update hard link
7676
run: pnpm install --filter=\!garfish-docs
7777
- name: Run cypress test
78-
uses: cypress-io/github-action@v2
78+
uses: cypress-io/github-action@v4
7979
with:
8080
install: false
8181
start: node scripts/devCypress.js
8282
wait-on: 'http://localhost:8090,http://localhost:8091,http://localhost:8092,http://localhost:8093,http://localhost:8094,http://localhost:8095,http://localhost:8096,http://localhost:8097'
8383
wait-on-timeout: 600
8484
parallel: true
8585
record: true
86-
spec: cypress/integration/**
8786
env:
8887
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
8988
# Recommended: pass the GitHub token lets this action correctly

Diff for: .npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
registry=https://registry.npmjs.org
2+
strict-peer-dependencies=false

Diff for: cypress.config.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
projectId: 'yren6i',
5+
e2e: {
6+
// We've imported your old cypress plugins here.
7+
// You may want to clean this up later by importing these.
8+
setupNodeEvents(on, config) {
9+
return require('./cypress/plugins/index.js')(on, config)
10+
},
11+
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
12+
},
13+
})

Diff for: cypress.json

-3
This file was deleted.

Diff for: cypress/integration/1-the-whole-process/visit-sub-app.spec.js renamed to cypress/e2e/1-the-whole-process/visit-sub-app.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe('whole process app render', () => {
140140

141141
cy.window().then((win) => {
142142
win.Garfish.router.push({ path: '/vite' });
143-
cy.wait(1000);
143+
cy.wait(4000);
144144
cy.contains('[data-test=title]', HomeTitle)
145145
.then(() => {
146146
cy.get('[data-test=vite-count-btn]').dblclick();
File renamed without changes.
File renamed without changes.

Diff for: package.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"private": true,
33
"description": "A powerful micro front-end framework",
44
"scripts": {
5+
"bootstrap": "pnpm install --prefer-offline",
6+
"build": "pnpm run build --parallel --filter @garfish/* --filter garfish",
7+
"rebuild": "npm run clean-dist && npm run build",
8+
"clean-dist": "pnpm -r exec -- rm -rf dist && rm -rf dist",
9+
"prune": "pnpm -r exec -- rm -rf node_modules && rm -rf node_modules",
510
"dev": "pnpm run start --parallel --filter @garfish-dev/*",
611
"dev:docs": "pnpm run start --filter garfish-docs",
7-
"build": "pnpm run build --parallel --filter @garfish/* --filter garfish",
812
"build:docs": "pnpm run build --filter garfish-docs",
913
"build:watch": "cross-env WATCH=true pnpm build",
1014
"test:e2e": "zx scripts/e2e.js",
@@ -13,7 +17,7 @@
1317
"test": "jest",
1418
"test:watch": "jest --watch",
1519
"test:coverage": "jest --collect-coverage",
16-
"cy:open": "cypress open",
20+
"cy:open": "cypress open --config-file=cypress.config.ts",
1721
"cy:run": "cypress run",
1822
"type:check": "tsc -noEmit",
1923
"changeset": "npx changeset",
@@ -59,7 +63,7 @@
5963
"chalk": "4.1.2",
6064
"codecov": "^3.8.3",
6165
"cross-env": "7.0.3",
62-
"cypress": "^9.7.0",
66+
"cypress": "^10.3.0",
6367
"dayjs": "^1.11.2",
6468
"esbuild-plugin-replace": "1.0.7",
6569
"eslint": "7.32.0",
@@ -90,6 +94,7 @@
9094
"zx": "4.2.0"
9195
},
9296
"version": "1.9.0-beta.1",
97+
"packageManager": "[email protected]",
9398
"engines": {
9499
"node": ">=16.14.0"
95100
}

0 commit comments

Comments
 (0)