Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 23 08 03 #175

Merged
merged 25 commits into from
Aug 5, 2023
Merged

Merge 23 08 03 #175

merged 25 commits into from
Aug 5, 2023

Conversation

zsviczian
Copy link
Owner

No description provided.

ad1992 and others added 25 commits July 26, 2023 08:49
* init

* add: vite dev build working

* fix: href serving from public

* feat: add ejs plugin

* feat: migrated env files and ejs templating

* chore: add types related to envs

* chore: add vite-env types

* feat: support vite pwa

* chore: upgrade vite pwa

* chore: pin node version to 16.18.1

* chore: preserve use of nodejs 14

* refactor: preserve REACT_APP as env prefix

* chore: support esm environment variables

* fix ts config

* use VITE prefix and remove vite-plugin-env-compatible

* introduce import-meta-loader for building pacakge as webpack isn't compatible with import.meta syntax

* lint

* remove import.meta.env in main.js

* set debug flag to false

* migrate to vitest and use jest-canvas-mock 2.4.0 so its comp
atible with vite

* integrate vitest-ui

* fix most of teh test

* snaps

* Add script for testing with vite ui

* fix all tests related to mocking

* fix more test

* fix more

* fix flip.test.tsx

* fix contentxmenu snaps

* fix regression snaps

* fix excalidraw.test.tsx and this makes all tests finally pass :)

* use node 16

* specify node version

* use node 16 in lint as well

* fix mobile.test.tsx

* use node 16

* add style-loader

* upgrade to node 18

* fix lint package.json

* support eslint with vite

* fix lint

* fix lint

* fix ts

* remove pwa/sw stuff

* use env vars in EJS the vite way

* fix lint

* move remainig jest mock/spy to vite

* don't cache locales

* fix regex

* add fonts cache

* tweak

* add custom service worker

* upgrade vite and create font cache again

* cache fonts.css and locales

* tweak

* use manifestTransforms for filtering locales

* use assets js pattern for locales

* add font.css to globIgnore so its pushed to fonts cache

* create a separate chunk for locales with rollup

* remove manifestTransforms and fix glob pattern for locales to filter from workbox pre-cache

* push sourcemaps in production

* add comments in config

* lint

* use node 18

* disable pwa in dev

* fix

* fix

* increase limit of bundle

* upgrade vite-pwa to latest

* remove public/workbox so workbox assets are not precached

* fon't club en.json and percentages.json with manual locales chunk to fix first load+offline mode

* tweak regex

* remove happy-dom as its not used

* add comment

* use any instead of ts-ignore

* cleanup

* remove jest-canvas-mock resolution as vite-canvas-mock was patched locking deps at 2.4.0

* use same theme color present in entry point

---------

Co-authored-by: Weslley Braga <[email protected]>
Co-authored-by: dwelle <[email protected]>
Revert "build: Migrate to Vite 🚀 (excalidraw#6713)"

This reverts commit e93bbc5.
* init

* add: vite dev build working

* fix: href serving from public

* feat: add ejs plugin

* feat: migrated env files and ejs templating

* chore: add types related to envs

* chore: add vite-env types

* feat: support vite pwa

* chore: upgrade vite pwa

* chore: pin node version to 16.18.1

* chore: preserve use of nodejs 14

* refactor: preserve REACT_APP as env prefix

* chore: support esm environment variables

* fix ts config

* use VITE prefix and remove vite-plugin-env-compatible

* introduce import-meta-loader for building pacakge as webpack isn't compatible with import.meta syntax

* lint

* remove import.meta.env in main.js

* set debug flag to false

* migrate to vitest and use jest-canvas-mock 2.4.0 so its comp
atible with vite

* integrate vitest-ui

* fix most of teh test

* snaps

* Add script for testing with vite ui

* fix all tests related to mocking

* fix more test

* fix more

* fix flip.test.tsx

* fix contentxmenu snaps

* fix regression snaps

* fix excalidraw.test.tsx and this makes all tests finally pass :)

* use node 16

* specify node version

* use node 16 in lint as well

* fix mobile.test.tsx

* use node 16

* add style-loader

* upgrade to node 18

* fix lint package.json

* support eslint with vite

* fix lint

* fix lint

* fix ts

* remove pwa/sw stuff

* use env vars in EJS the vite way

* fix lint

* move remainig jest mock/spy to vite

* don't cache locales

* fix regex

* add fonts cache

* tweak

* add custom service worker

* upgrade vite and create font cache again

* cache fonts.css and locales

* tweak

* use manifestTransforms for filtering locales

* use assets js pattern for locales

* add font.css to globIgnore so its pushed to fonts cache

* create a separate chunk for locales with rollup

* remove manifestTransforms and fix glob pattern for locales to filter from workbox pre-cache

* push sourcemaps in production

* add comments in config

* lint

* use node 18

* disable pwa in dev

* fix

* fix

* increase limit of bundle

* upgrade vite-pwa to latest

* remove public/workbox so workbox assets are not precached

* fon't club en.json and percentages.json with manual locales chunk to fix first load+offline mode

* tweak regex

* remove happy-dom as its not used

* add comment

* use any instead of ts-ignore

* cleanup

* remove jest-canvas-mock resolution as vite-canvas-mock was patched locking deps at 2.4.0

* use same theme color present in entry point

* remove vite-plugin-eslint as it improves DX significantly

* integrate vite-plugin-checker for ts errors

* add nabla/vite-plugin-eslint

* use eslint from checker only

* add env variable VITE_APP_COLLAPSE_OVERLAY for collapsing the checker overlay

* tweak vite checker overlay badge position

* Enable eslint behind flag as its not working well with windows with non WSL

* make port configurable

* open the browser when server ready

* enable eslint by default

---------

Co-authored-by: Weslley Braga <[email protected]>
Co-authored-by: dwelle <[email protected]>
* fix: refresh sw when browser refreshed

* dummy test

* enable immediate reload

* test

* fix

* autoupdate

* don't immediate

* test

* testing testing

* test

* test

* its same

* revert logs

* fix types

---------
…RA to Vite (excalidraw#6833)

* fix: add self destroying service-worker.js to migrate everyone from CRA to VITE

* add comment

* don't add service-worker.js to app pre-cache
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* test: add coverage report for PR

* gh token

* fix

* fix

* add reporter

* fix

* enable v8 for coverage

* no watch

* test

* add threshold

* fix

* change name so the action isn't required

* change job name

* rename job so it doesn't collid with test required check

* remove log
…#6757)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix arrow labels resizing

- min arrow labels width based on font size
- labels width and padding in % of container's width
- resize labels simply multiplying by scale

* remove no longer needed getContainerDims

* fix arrow labels font size not updated on change font size action

* fix bound arrows not updated right after resize

* fix test

* fix 3+ point arrow label resizing with shift

* fix bound text not scaling when resizing with shift & n or s handle

* fix arrow labels width not updating when moving a 2-point arrow point with shift

---------

Co-authored-by: Aakansha Doshi <[email protected]>
@zsviczian zsviczian merged commit ead2c60 into master Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 22.93% / 70% 8866 / 38659
🔴 Statements 22.93% / 70% 8866 / 38659
🔴 Functions 4.44% / 68% 37 / 833
🟢 Branches 74.31% / 70% 81 / 109
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/analytics.ts 3.12% 100% 0% 3.12% 2-32
src/charts.ts 16.9% 100% 0% 16.9% 39-44, 47, 53-108, 111-120, 123-162, 183-187, 190-214, 217-246, 249-307, 311-357, 360-393, 396-485, 488-497
src/constants.ts 99.35% 20% 0% 99.35% 11-12, 18
src/i18n.ts 76.74% 70.58% 60% 76.74% 91-104, 119-120, 125-132, 138-148, 151-155
src/utils.ts 24.01% 100% 1.66% 24.01% 27-28, 31-43, 46, 49-51, 54-65, 68-72, 75-85, 88-98, 102-109, 112-138, 142-192, 201-202, 205-206, 235-331, 335-348, 351-358, 361-365, 370-400, 403-406, 409-412, 417-454, 457-475, 478, 481, 486-496, 499-518, 521-539, 542, 558-562, 566-571, 574-589, 592-607, 624-633, 639-645, 652-660, 664-680, 683-687, 691-704, 707-727, 730-738, 741-744, 747-750, 759-765, 768-773, 778-784, 787-813, 816-818, 821-826, 831-840, 843-853, 856-884, 889-903, 906-916
src/components/App.tsx 5.57% 100% 0% 5.57% 395-396, 408, 410, 412, 414, 416, 451-8449, 8474-8475, 8477-8478
src/data/restore.ts 20.57% 100% 0% 20.57% 79-85, 88-92, 95-172, 175-301, 311-350, 359-386, 394-404, 407-458, 461-470, 479-488, 492-564, 567-583, 586-591, 594-627
src/element/collision.ts 14.98% 100% 0% 14.98% 55-72, 75-116, 119-151, 154-172, 175-177, 180-217, 220-233, 236-245, 256-307, 310-325, 328-329, 332-333, 336-337, 340-341, 344-358, 361-366, 369-375, 378-383, 386-428, 431-501, 504-547, 562-578, 581-596, 600-610, 613-623, 626-632, 640-675, 678-710, 715-737, 740-781, 784-815, 821-832, 835-844, 847-874, 877-902, 907-941, 944-972, 975-1005, 1008-1042, 1045-1101
src/element/embeddable.ts 23.07% 100% 0% 23.07% 64-65, 68-195, 198-210, 213-242, 248-267, 271-298, 301-316, 319-351
src/element/linearElementEditor.ts 3.58% 100% 25% 3.58% 52-1469, 1472-1479
src/element/newElement.ts 22.67% 100% 0% 22.67% 73-127, 130-134, 137-146, 149-161, 165-183, 186-236, 239-310, 313-329, 332-354, 357-370, 373-389, 392-408, 420-470, 482-485, 492-508, 525-550, 563-666
src/element/textElement.ts 16.26% 100% 0% 16.26% 40-47, 50-51, 54-113, 116-155, 158-248, 251-284, 289-304, 307-355, 362-366, 373-377, 381-385, 390-404, 407-413, 416-422, 425-440, 443-571, 574-595, 602-613, 616-623, 626-632, 635-656, 659-663, 666-678, 681-694, 697-729, 732-751, 754-759, 762-773, 776-785, 788-801, 804-818, 821-857, 867, 870-889, 892-919, 922-948, 951-959, 986-990
src/element/textWysiwyg.tsx 8.88% 100% 0% 8.88% 48-66, 77-84, 87-92, 95-98, 101-709
src/packages/excalidraw/publicPath.js 25% 0% 100% 25% 3-8
src/renderer/renderElement.ts 9.83% 100% 0% 9.83% 75-79, 82-91, 98, 113-164, 167-227, 242-265, 267-385, 405, 410-414, 417, 420-487, 490-507, 515-773, 776-806, 809-956, 959-1199, 1202-1215, 1218-1232, 1235-1694, 1699-1703, 1706-1707, 1710-1757, 1759-1761, 1768-1789
src/renderer/renderScene.ts 9.04% 100% 0% 9.04% 87-114, 117-135, 138-148, 151-163, 166-217, 220-243, 246-320, 323-336, 338-363, 366-391, 394-1004, 1008-1018, 1024-1044, 1047-1086, 1089-1150, 1153-1166, 1169-1224, 1227-1253, 1256-1301, 1304-1327, 1331-1385, 1388-1421, 1425-1492
src/scene/export.ts 9.31% 100% 0% 9.31% 19-29, 32-98, 101-239, 243-278, 281-290
src/tests/test-utils.ts 33.33% 100% 0% 33.33% 35-64, 87-88, 92-104, 107-108, 114-147, 150-164, 167-169, 172-188, 191-209, 212-214, 217-230, 234-245
Generated in workflow #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants