Skip to content

Commit

Permalink
Release (#1848)
Browse files Browse the repository at this point in the history
* fix: fixed the issue where RenderCache could not cache RenderPipeline (#1839)

* chore: add changeset

* fix: fix incorrect bounds calculate when pass stroke and lineWidth to group (#1847)

* fix: fix incorrect bounds calculate when pass stroke and lineWidth to group

* chore: commit changeset

* test: fix test case

* update test (#1846)

* chore: fix test

* chore: update vite version

* chore: update test snapshots

* chore: remove pnpm-lock.yaml

* chore: update workflows

---------

Co-authored-by: Aaron <[email protected]>

* chore: update workflows (#1849)

* chore(release): bump version (#1845)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: RE <[email protected]>
Co-authored-by: wang1212 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Nov 25, 2024
1 parent 4dd0b8c commit 6f347e4
Show file tree
Hide file tree
Showing 114 changed files with 575 additions and 14,717 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,27 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
with:
version: 9

- name: Use Node.js 20
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Build
run: pnpm build

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test

Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/lint.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
with:
version: 9

- name: Use Node.js 20
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

# 发布开始通知
- name: Release start ding talk dev group notify
Expand All @@ -45,9 +47,6 @@ jobs:
}
}
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ jobs:
with:
python-version: '3.10'

- uses: pnpm/action-setup@v2
with:
version: 9

- name: Use Node.js 20
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile

- name: Create Release Pull Request
uses: changesets/action@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pids
*.seed
*.pid.lock
yarn.lock
pnpm-lock.yaml
.dumi

# Directory for instrumented libs generated by jscoverage/JSCover
Expand Down
53 changes: 53 additions & 0 deletions __tests__/demos/bugfix/group-with-stroke.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Group, Path, Rect, runtime } from '@antv/g';

export async function group_with_stroke(context) {
const { canvas } = context;

runtime.enableMassiveParsedStyleAssignOptimization = true;

await canvas.ready;

const group = new Group({
style: {
stroke: 'red',
lineWidth: 6,
},
});

group.appendChild(
new Path({
style: {
d: [
['M', 100, 100],
['L', 200, 100],
['L', 200, 200],
],
stroke: 'pink',
lineWidth: 2,
},
}),
);

canvas.appendChild(group);

const bounds = group.getRenderBounds();

const {
min: [minX, minY],
max: [maxX, maxY],
} = bounds;
const width = maxX - minX;
const height = maxY - minY;
const rect = new Rect({
style: {
x: minX,
y: minY,
width,
height,
fill: 'green',
fillOpacity: 0.1,
},
});

canvas.appendChild(rect);
}
1 change: 1 addition & 0 deletions __tests__/demos/bugfix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export { zoom } from './1667';
export { test_pick } from './1747';
export { issue_1760 } from './1760';
export { textWordWrap } from './textWordWrap';
export { group_with_stroke } from './group-with-stroke';
7 changes: 5 additions & 2 deletions __tests__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>G: Preview</title>
<style>
/* html {
html {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 8px;
} */
}

.lil-gui.root {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/integration/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function generateCanvasTestCase(

// Chart already rendered, capture into buffer.
const buffer = await page
.locator(renderer === 'svg' ? 'svg' : 'canvas')
.locator(`#container ${renderer === 'svg' ? 'svg' : 'canvas'}`)
.screenshot();

const dir = `${__dirname}/snapshots/${namespace}/${renderer}`;
Expand Down
Binary file modified __tests__/integration/snapshots/2d/canvas/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/integration/snapshots/2d/svg/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/integration/snapshots/2d/webgl/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions __tests__/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ plot();
async function plot() {
if (currentContainer) {
currentContainer.remove();
if (canvas) canvas.destroy(false, true);
if (canvas) canvas.destroy();
if (prevAfter) prevAfter();
}
currentContainer = document.createElement('div');
currentContainer.id = 'container';
app.append(currentContainer);
const render = tests[selectChart.value];
render?.(currentContainer);
Expand Down Expand Up @@ -233,7 +234,7 @@ function createSpecRender(object) {
$stats.style.position = 'fixed';
$stats.style.left = '2px';
$stats.style.top = '2px';
// document.body.appendChild($stats);
document.body.appendChild($stats);

// GUI
const gui = new lil.GUI({ autoPlace: false });
Expand Down
2 changes: 2 additions & 0 deletions __tests__/unit/abstract-renderer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ describe('Abstract renderer', () => {
enableAutoRendering: false,
enableDirtyCheck: true,
enableCulling: false,
enableRenderingOptimization: false,
enableDirtyRectangleRendering: true,
enableDirtyRectangleRenderingDebug: false,
enableRenderingOptimization: false,
enableSizeAttenuation: true,
});

Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/display-objects/display-object.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('DisplayObject Node API', () => {
group1.find(() => {
return true;
}),
).toBe(group4);
).toBe(group2);

expect(
group1.findAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"tinybench": "^3.0.3",
"ts-jest": "^29.1.1",
"typescript": "^5.6.2",
"vite": "^3.2.7",
"vite": "^4.5.5",
"webfontloader": "^1.6.28"
},
"limit-size": [
Expand Down
7 changes: 7 additions & 0 deletions packages/g-camera-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-camera-api

## 2.0.24

### Patch Changes

- Updated dependencies [a2b137e]
- @antv/g-lite@2.2.5

## 2.0.23

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-camera-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-camera-api",
"version": "2.0.23",
"version": "2.0.24",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
13 changes: 13 additions & 0 deletions packages/g-canvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @antv/g-canvas

## 2.0.28

### Patch Changes

- Updated dependencies [a2b137e]
- @antv/g-lite@2.2.5
- @antv/g-plugin-canvas-path-generator@2.1.5
- @antv/g-plugin-canvas-picker@2.1.7
- @antv/g-plugin-canvas-renderer@2.2.7
- @antv/g-plugin-dom-interaction@2.1.10
- @antv/g-plugin-html-renderer@2.1.10
- @antv/g-plugin-image-loader@2.1.7

## 2.0.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvas",
"version": "2.0.27",
"version": "2.0.28",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down
13 changes: 13 additions & 0 deletions packages/g-canvaskit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @antv/g-canvaskit

## 1.0.27

### Patch Changes

- Updated dependencies [a2b137e]
- @antv/g-lite@2.2.5
- @antv/g-plugin-canvas-path-generator@2.1.5
- @antv/g-plugin-canvas-picker@2.1.7
- @antv/g-plugin-canvaskit-renderer@2.1.7
- @antv/g-plugin-dom-interaction@2.1.10
- @antv/g-plugin-html-renderer@2.1.10
- @antv/g-plugin-image-loader@2.1.7

## 1.0.26

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvaskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvaskit",
"version": "1.0.26",
"version": "1.0.27",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-components

## 2.0.21

### Patch Changes

- Updated dependencies [a2b137e]
- @antv/g-lite@2.2.5

## 2.0.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-components",
"version": "2.0.20",
"version": "2.0.21",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
7 changes: 7 additions & 0 deletions packages/g-dom-mutation-observer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @antv/g-dom-mutation-observer-api

## 2.0.21

### Patch Changes

- Updated dependencies [a2b137e]
- @antv/g-lite@2.2.5

## 2.0.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-dom-mutation-observer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-dom-mutation-observer-api",
"version": "2.0.20",
"version": "2.0.21",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
Loading

0 comments on commit 6f347e4

Please sign in to comment.