Skip to content

Commit

Permalink
Merge branch 'master' into svg-export-path
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Jan 11, 2025
2 parents da22aea + 577a807 commit 3ba98e1
Show file tree
Hide file tree
Showing 45 changed files with 738 additions and 814 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Uglified build
uses: actions/checkout@v4
Expand All @@ -17,7 +17,7 @@ jobs:
- run: npm run build
stats:
name: Build stats
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
minified: dist/index.min.js
bundled: dist/index.mjs
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
b: JSON.parse('${{ steps.b.outputs.result }}'),
});
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Linting
uses: actions/checkout@v4
Expand All @@ -78,7 +78,7 @@ jobs:
node-version: 20.x
- run: npm run lint
prettier:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Prettier check
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
changelog:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
file: CHANGELOG.md
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
exit 1
fi
update:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: changelog
if: (inputs.create && failure()) || (inputs.update && success())
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npmpublish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
publish-npm:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -23,7 +23,7 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
PRE_RELEASE: ${{github.event.release.prerelease}}
update-bug-report:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
# wait for publishing to complete
needs: publish-npm
if: always()
Expand Down
52 changes: 29 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
prime-build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
Expand All @@ -21,7 +21,7 @@ jobs:
uses: ./.github/actions/build-fabric-cached
node-coverage:
needs: [prime-build]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Node 20.x ${{ matrix.suite }} tests
strategy:
fail-fast: false
Expand All @@ -44,19 +44,22 @@ jobs:
- name: Run ${{ matrix.suite }} tests with coverage
if: matrix.suite == 'visual'
run: npm run test:visual:coverage
- name: Upload test coverage
- name: Verify coverage files
run: ls -l ./.nyc_output/*.json
- name: Upload test coverage ${{ matrix.suite }}
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.suite }}
path: .nyc_output/*.json
path: ./.nyc_output/*.json
include-hidden-files: true

browser:
needs: [prime-build]
name: ${{ matrix.target }} ${{ matrix.suite }} tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
node-version: [20.x]
node-version: [20]
target: [chrome, firefox]
suite: [unit, visual]
fail-fast: false
Expand All @@ -72,29 +75,29 @@ jobs:
run: xvfb-run npm run test -- -c ${{ matrix.target }} -s ${{ matrix.suite }}
node:
needs: [prime-build]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Node ${{ matrix.node-version }} ${{ matrix.suite }} tests
strategy:
fail-fast: false
matrix:
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# supported Node.js release schedule: https://nodejs.org/en/about/releases/
node-version: ['18.x']
node-version: [18, 22]
suite: [unit, visual]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: ${{ matrix.node-version }}
install-system-deps: 'false'
install-system-deps: ${{ matrix.node-version >= 22 }}
- name: Build fabric.js
uses: ./.github/actions/build-fabric-cached
- name: Run ${{ matrix.suite }} tests
run: npm run test -- -c node -s ${{ matrix.suite }}
jest:
name: Jest tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
Expand All @@ -107,12 +110,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage-jest
path: .nyc_output/*.json
path: ./.nyc_output/*.json
include-hidden-files: true

e2e:
needs: [prime-build]
name: Playwright tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
Expand All @@ -131,38 +135,40 @@ jobs:
with:
name: e2e-report
path: ./e2e/test-report/
include-hidden-files: true
- name: Upload Test Coverage
uses: actions/upload-artifact@v4
with:
name: coverage-e2e
path: ./e2e/test-results/**/coverage.json
include-hidden-files: true
coverage:
needs: [node-coverage, e2e]
name: Coverage reporting
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: 20.x
node-version: 18.x
install-system-deps: false
- uses: actions/download-artifact@v4
with:
name: coverage-unit
path: .nyc_output
name: coverage-e2e
path: ./.nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-visual
path: .nyc_output
name: coverage-jest
path: ./.nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-e2e
path: .nyc_output
name: coverage-unit
path: ./.nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-jest
path: .nyc_output
- run: ls -l .nyc_output
name: coverage-visual
path: ./.nyc_output
- run: ls -l ./.nyc_output
- run: npm run coverage:report
- uses: romeovs/lcov-reporter-action@v0.4.0
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
## [next]

- fix(Fabtictext) Svg export for text on a path [#10284](https://github.com/fabricjs/fabric.js/pull/10284)

## [6.5.4]

- docs() perf(): Reorder caching conditions for most common scenario and docs fixes. [#10366](https://github.com/fabricjs/fabric.js/pull/10366)

## [6.5.3]

- fix(ColorMatrix): Restore correct alpha for JS colorMatrix filter [#10313](https://github.com/fabricjs/fabric.js/pull/10313)

## [6.5.2]

- chore(): Reduce some verbose code [#10311](https://github.com/fabricjs/fabric.js/pull/10311)
- ci(): Test node 22 again [#10310](https://github.com/fabricjs/fabric.js/pull/10310)
- chore(TS): Try to remove all TS-ERROR directives [#10309](https://github.com/fabricjs/fabric.js/pull/10309)
- chore(): Make TS config more strict [#10308](https://github.com/fabricjs/fabric.js/pull/10308)
- fix(Color): Support uppercase keywords [#10300](https://github.com/fabricjs/fabric.js/pull/10300)
- fix(): The \_setLineDash method has additional side effects, altering the value of strokeDashArray [#10292](https://github.com/fabricjs/fabric.js/issues/10292)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Don't forget to unlink the package once you're done.
[website]: http://fabricjs.com/
[docs]: http://fabricjs.com/docs
[demos]: http://fabricjs.com/demos/
[gotchas]: http://fabricjs.com/fabric-gotchas
[gotchas]: https://fabricjs.com/docs/old-docs/gotchas/
[demo_file]: https://github.com/fabricjs/fabricjs.com/blob/gh-pages/posts/demos/_posts/2020-2-15-custom-control-render.md
[jsfiddles]: https://jsfiddle.net/user/fabricjs/fiddles/
[codepens]: https://codepen.io/tag/fabricjs
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
A **simple and powerful Javascript HTML5 canvas library**.

- [**Website**][website]
- [**Old V5 documentation**](https://fabric5.fabricjs.com)
- [**GOTCHAS**][gotchas]
- [**Contributing, Developing and More**](CONTRIBUTING.md)

Expand Down Expand Up @@ -42,8 +43,8 @@ A **simple and powerful Javascript HTML5 canvas library**.
- Out of the box interactions such as scale, move, rotate, skew, group...
- Built in shapes, controls, animations, image filters, gradients, patterns, brushes...
- `JPG`, `PNG`, `JSON` and `SVG` i/o
- [Typed and modular](#migrating-to-v6)
- [Unit tested](CONTRIBUTING.md#%F0%9F%A7%AA%20testing)
- Typed and modular
- [Unit tested](CONTRIBUTING.md#-testing)

#### Supported Browsers/Environments

Expand All @@ -58,14 +59,16 @@ A **simple and powerful Javascript HTML5 canvas library**.
| IE11 ||
| Node.js | ✔️ | [Node.js installation](#nodejs) |

Fabric.js Does not use transpilation by default, the browser version we support is determined by the level of canvas api we want to use and some js syntax. While JS can be easily transpiled, canvas API can't.
Fabric.js does not use polyfills by default, or tries to keep it at minimum. the browser version we support is determined by the level of canvas api we want to use and some js syntax. While JS can be easily transpiled, canvas API can't.

## Installation

```bash
$ npm install fabric --save
// or
# or use yarn
$ yarn add fabric
# or use pnpm
$ pnpm install fabric
```

#### Browser
Expand Down Expand Up @@ -114,7 +117,7 @@ import { fabric } from 'fabric';

</details>

<details><summary><b>ReactJS</b></summary>
<details><summary><b>React.js</b></summary>

```tsx
import React, { useEffect, useRef } from 'react';
Expand Down Expand Up @@ -224,7 +227,7 @@ See our ready to use [templates](./.codesandbox/templates/).
[codepens]: https://codepen.io/tag/fabricjs
[contributors]: https://github.com/fabricjs/fabric.js/graphs/contributors
[demos]: http://fabricjs.com/demos/
[gotchas]: http://fabricjs.com/fabric-gotchas
[gotchas]: https://fabricjs.com/docs/old-docs/gotchas/
[html-to-image]: https://github.com/bubkoo/html-to-image
[jsdelivr]: https://www.jsdelivr.com/package/npm/fabric
[jsdom]: https://github.com/jsdom/jsdom
Expand Down
2 changes: 1 addition & 1 deletion dist/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.mjs.map

Large diffs are not rendered by default.

Loading

0 comments on commit 3ba98e1

Please sign in to comment.