Skip to content

Commit a5b86d6

Browse files
committed
stuff
1 parent 792dd02 commit a5b86d6

25 files changed

+165
-183
lines changed

.github/workflows/autorelease-fork.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2424
- name: Auto release
2525
run: |
26-
yarn add @actions/core -W
27-
yarn release --tag=next --non-interactive
26+
yarn add -W @actions/core
27+
yarn autorelease-fork
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Auto release excalidraw preview
2+
on:
3+
issue_comment:
4+
types: [created, edited]
5+
6+
jobs:
7+
Auto-release-excalidraw-preview:
8+
name: Auto release preview
9+
if: github.event.comment.body == '@excalibot trigger release' && github.event.issue.pull_request
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: React to release comment
13+
uses: peter-evans/create-or-update-comment@v1
14+
with:
15+
token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
16+
comment-id: ${{ github.event.comment.id }}
17+
reactions: "+1"
18+
- name: Get PR SHA
19+
id: sha
20+
uses: actions/github-script@v4
21+
with:
22+
result-encoding: string
23+
script: |
24+
const { owner, repo, number } = context.issue;
25+
const pr = await github.pulls.get({
26+
owner,
27+
repo,
28+
pull_number: number,
29+
});
30+
return pr.data.head.sha
31+
- uses: actions/checkout@v2
32+
with:
33+
ref: ${{ steps.sha.outputs.result }}
34+
fetch-depth: 2
35+
- name: Setup Node.js 20.x
36+
uses: actions/setup-node@v2
37+
with:
38+
node-version: 20.x
39+
- name: Set up publish access
40+
run: |
41+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
42+
env:
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
- name: Auto release preview
45+
id: "autorelease"
46+
run: |
47+
yarn add @actions/core -W
48+
yarn autorelease preview ${{ github.event.issue.number }}
49+
- name: Post comment post release
50+
if: always()
51+
uses: peter-evans/create-or-update-comment@v1
52+
with:
53+
token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
54+
issue-number: ${{ github.event.issue.number }}
55+
body: "@${{ github.event.comment.user.login }} ${{ steps.autorelease.outputs.result }}"

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111

12-
- name: Setup Node.js 18.x
12+
- name: Setup Node.js 20.x
1313
uses: actions/setup-node@v2
1414
with:
15-
node-version: 18.x
15+
node-version: 20.x
1616

1717
- name: Install and lint
1818
run: |

.github/workflows/locales-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
with:
1515
token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
1616

17-
- name: Setup Node.js 18.x
17+
- name: Setup Node.js 20.x
1818
uses: actions/setup-node@v2
1919
with:
20-
node-version: 18.x
20+
node-version: 20.x
2121

2222
- name: Create report file
2323
run: |

.github/workflows/sentry-production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Setup Node.js 18.x
13+
- name: Setup Node.js 20.x
1414
uses: actions/setup-node@v2
1515
with:
16-
node-version: 18.x
16+
node-version: 20.x
1717
- name: Install and build
1818
run: |
1919
yarn --frozen-lockfile

.github/workflows/size-limit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v3
14-
- name: Setup Node.js 18.x
14+
- name: Setup Node.js 20.x
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: 18.x
17+
node-version: 20.x
1818
- name: Install in packages/excalidraw
1919
run: yarn
2020
working-directory: packages/excalidraw

.github/workflows/test-coverage-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: "Install Node"
1515
uses: actions/setup-node@v2
1616
with:
17-
node-version: "18.x"
17+
node-version: "20.x"
1818
- name: "Install Deps"
1919
run: yarn install
2020
- name: "Test Coverage"

.github/workflows/test.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

excalidraw-app/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ const ExcalidrawWrapper = () => {
740740
type: string;
741741
locked?: boolean;
742742
prevLockState?: boolean;
743-
}>({ type: "selection", locked: false, prevLockState: false });
743+
}>({ type: "selection" });
744744

745745
const toggleCommentTool = useCallback(() => {
746746
const nextType =

excalidraw-app/components/AI.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ export const AIComponents = ({
2222
const appState = excalidrawAPI.getAppState();
2323

2424
const blob = await exportToBlob({
25-
elements: children,
26-
appState: {
27-
...appState,
28-
exportBackground: true,
29-
viewBackgroundColor: appState.viewBackgroundColor,
25+
data: {
26+
elements: children,
27+
appState: {
28+
...appState,
29+
exportBackground: true,
30+
viewBackgroundColor: appState.viewBackgroundColor,
31+
},
32+
files: excalidrawAPI.getFiles(),
33+
},
34+
config: {
35+
exportingFrame: frame,
36+
mimeType: MIME_TYPES.jpg,
3037
},
31-
exportingFrame: frame,
32-
files: excalidrawAPI.getFiles(),
33-
mimeType: MIME_TYPES.jpg,
3438
});
3539

3640
const dataURL = await getDataURL(blob);

0 commit comments

Comments
 (0)