Skip to content

Commit

Permalink
Merge branch 'umijs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
fengsx authored Nov 17, 2024
2 parents e739a2e + 7e0ebfd commit d5a4c6e
Show file tree
Hide file tree
Showing 458 changed files with 110,285 additions and 136,354 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,24 @@ jobs:

- name: Install pnpm
if: ${{ matrix.node-version != '14.x' }}
uses: pnpm/[email protected]
uses: pnpm/action-setup@v4

- name: Get pnpm version (node 14)
if: ${{ matrix.node-version == '14.x' }}
uses: actions/github-script@v7
id: pnpm-version
with:
result-encoding: string
script: |
const packageJson = require('./package.json')
const pnpmVersion = packageJson.packageManager.split('@')[1]
console.log(`Use pnpm ${pnpmVersion}`)
return pnpmVersion
- name: Install pnpm (node 14)
if: ${{ matrix.node-version == '14.x' }}
run: npm install -g @pnpm/[email protected]
run: |
npm install -g @pnpm/exe@${{ steps.pnpm-version.outputs.result }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use latest LTS Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -71,9 +71,9 @@ jobs:
run: pnpm i

- name: Build targets
run: pnpm umi-scripts turbo build
--filter ./examples/max...
--filter ./examples/test-test/...
run: pnpm umi-scripts turbo build
--filter ./examples/max...
--filter ./examples/test-test/...
--filter ./packages/umi/...

- name: e2e:example:max
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/e2e-boilerplate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -70,10 +70,10 @@ jobs:
run: pnpm i

- name: Build targets
run: pnpm umi-scripts turbo build
--filter ./examples/create-umi-simple...
--filter ./examples/create-umi-pro/...
--filter ./examples/antd-pro-create/...
run: pnpm umi-scripts turbo build
--filter ./examples/create-umi-simple...
--filter ./examples/create-umi-pro/...
--filter ./examples/antd-pro-create/...
--filter ./packages/umi/...
--filter ./packages/max/...
--filter ./packages/preset-vue/...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-mfsu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-qiankun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: pnpm i

- name: Build targets
run: pnpm umi-scripts turbo build
run: pnpm umi-scripts turbo build
--filter ./examples/max...

- name: e2e:example:qiankun:dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-vite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
3 changes: 2 additions & 1 deletion contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
"qiguoq",
"AmJunh",
"MaxCDon",
"mysteryven"
"mysteryven",
"Jinbao1001"
]
3 changes: 1 addition & 2 deletions did-you-know/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"devDependencies": {
"terminal-link": "^3.0.0"
},
"packageManager": "[email protected]",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -151,7 +150,7 @@
"majorVersion": 4
},
{
"text": "请求加载态、数据管理、避免竟态问题,用 react-query 帮你全部解决",
"text": "请求加载态、数据管理、避免竞态问题,用 react-query 帮你全部解决",
"url": "https://umijs.org/docs/max/react-query",
"majorVersion": 4
},
Expand Down
2 changes: 1 addition & 1 deletion did-you-know/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default (api: any) => {

const cacheDir = path.join(api.paths.absNodeModulesPath, '.cache');
if (!fs.existsSync(cacheDir)) {
fs.mkdirSync(cacheDir);
fs.mkdirSync(cacheDir, { recursive: true });
}
fs.writeFileSync(recordJSONPath, JSON.stringify(records), 'utf-8');
});
Expand Down
17 changes: 17 additions & 0 deletions docs/.dumi/components/Contributing/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.contributing {
max-width: 1200px;
margin: 0 auto 60px;

:global {
p {
font-size: 18px;
color: #4a5e71;
margin-bottom: 16px;
}

p a {
color: #0273dc;
text-decoration: none;
}
}
}
22 changes: 3 additions & 19 deletions docs/.dumi/components/Contributing/index.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
import React from 'react';
import styled from 'styled-components';
import { Link } from 'umi';
import { SectionHeader } from '../SectionHeader';

const ContributingWrapper = styled.div`
max-width: 1200px;
margin: 0 auto 60px;
p {
font-size: 18px;
color: #4a5e71;
margin-bottom: 16px;
}
p a {
color: #0273dc;
text-decoration: none;
}
`;
import styles from './index.less';

export const Contributing = () => {
return (
<ContributingWrapper>
<div className={styles.contributing}>
<SectionHeader title="参与建设" />
<div>
<p className="contributing-text">
Expand All @@ -37,6 +21,6 @@ export const Contributing = () => {
</a>
</div>
</div>
</ContributingWrapper>
</div>
);
};
41 changes: 41 additions & 0 deletions docs/.dumi/components/Features/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.features {
max-width: 1200px;
margin: 0 auto;

:global {
ul {
display: flex;
flex-wrap: wrap;
gap: 26px;
padding-top: 40px;
padding-bottom: 40px;
padding-left: 0;
justify-content: center;
}

.feature {
width: 280px;
margin-bottom: 60px;
list-style: none;
}

.feature div {
width: 100px;
height: 100px;
background-size: 100px 100px;
background-repeat: no-repeat;
margin: 0 auto 10px;
}

.feature h3 {
font-size: 20px;
color: #2a445d;
margin-bottom: 12px;
text-align: center;
}
.feature p {
font-size: 18px;
color: #4a5e71;
}
}
}
62 changes: 17 additions & 45 deletions docs/.dumi/components/Features/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import styled from 'styled-components';
import { SectionHeader } from '../SectionHeader';
import {
BOX_IMAGE,
Expand All @@ -11,53 +10,26 @@ import {
PRACTICE_IMAGE,
ROUTER_IMAGE,
} from './image';
import styles from './index.less';

const FeaturesWrapper = styled.div`
max-width: 1200px;
margin: 0 auto;
ul {
display: flex;
flex-wrap: wrap;
gap: 26px;
padding-top: 40px;
padding-bottom: 40px;
padding-left: 0;
justify-content: center;
}
.feature {
width: 280px;
margin-bottom: 60px;
list-style: none;
}
.feature div {
width: 100px;
height: 100px;
background-size: 100px 100px;
background-repeat: no-repeat;
margin: 0 auto 10px;
}
.feature h3 {
font-size: 20px;
color: #2a445d;
margin-bottom: 12px;
text-align: center;
}
.feature p {
font-size: 18px;
color: #4a5e71;
}
`;

const FeatureItemPicture = styled.div<{ imageUrl: string }>`
background-image: url(${(props) => props.imageUrl});
`;
const FeatureItemPicture = ({
imageUrl,
children,
}: React.PropsWithChildren<{ imageUrl: string }>) => {
return (
<div
style={{
backgroundImage: imageUrl ? `url(${imageUrl})` : undefined,
}}
>
{children}
</div>
);
};

export const Features = () => {
return (
<FeaturesWrapper>
<div className={styles.features}>
<SectionHeader title="主要特性" />
<ul>
<li className="feature">
Expand Down Expand Up @@ -125,6 +97,6 @@ export const Features = () => {
</p>
</li>
</ul>
</FeaturesWrapper>
</div>
);
};
Loading

0 comments on commit d5a4c6e

Please sign in to comment.