chore: bump cssinjs (#43691)

* chore: bump cssinjs

* chore: bump cssinjs

* chore: default light & motion

* test: snapshot ignore motion

* chore: clean up

* chore: bump cssinjs version

* chore: adjust log

* chore: adjust log
This commit is contained in:
二货爱吃白萝卜 2023-07-21 14:53:35 +08:00 committed by GitHub
parent c8b74859ca
commit e78b8f6f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 8 deletions

View File

@ -45,7 +45,7 @@ const GlobalLayout: React.FC = () => {
const [{ theme = [], direction, isMobile }, setSiteState] = useLayoutState<SiteState>({
isMobile: false,
direction: 'ltr',
theme: ['light', 'motion-off'],
theme: [],
});
const updateSiteConfig = useCallback(

View File

@ -45,10 +45,8 @@ export default function InfoNewVersion() {
const { content } = getComputedStyle(p);
setSupportWhere(String(content).includes('CHECK'));
return () => {
document.body.removeChild(p);
removeCSS(whereCls);
};
document.body.removeChild(p);
removeCSS(whereCls);
}, []);
return supportWhere ? null : (

View File

@ -109,7 +109,7 @@
],
"dependencies": {
"@ant-design/colors": "^7.0.0",
"@ant-design/cssinjs": "^1.10.1",
"@ant-design/cssinjs": "^1.13.2",
"@ant-design/icons": "^5.1.0",
"@ant-design/react-slick": "~1.0.0",
"@babel/runtime": "^7.18.3",

View File

@ -19,7 +19,7 @@ function execFile(command: string, args: string[]) {
const screenshotsBase = 'imageSnapshots';
const screenshotsChunks = `imageSnapshots-chunks`;
const BATCH_SIZE = 200;
const BATCH_SIZE = 128;
async function cpToTemp(screenshot: string, target: string) {
await execFile('mkdir', ['-p', target]);
@ -40,6 +40,9 @@ async function run() {
),
);
// eslint-disable-next-line no-console -- pipe stdout
console.log('Chunk Size:', chunks.length, '/', 'Total Snapshots:', screenshots.length);
for (let i = 0; i < chunks.length; i += 1) {
// eslint-disable-next-line no-await-in-loop
const result = await argos.upload({
@ -51,7 +54,7 @@ async function run() {
},
});
// eslint-disable-next-line no-console -- pipe stdout
console.log(result);
console.log(i, '>', result);
}
}

View File

@ -39,6 +39,7 @@ export default function imageTest(component: React.ReactElement) {
page.on('request', onRequestHandle);
await page.goto(`file://${process.cwd()}/tests/index.html`);
await page.addStyleTag({ path: `${process.cwd()}/dist/reset.css` });
await page.addStyleTag({content: '*{animation: none!important;}'})
const cache = createCache();