Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
555 commits
Select commit Hold shift + click to select a range
1936282
2.3.1
LinusU Jan 14, 2019
73c29a9
Explicitly list files to be included in package
LinusU Jan 14, 2019
9d25114
Pass metadata to PDF stream function
zbjornson Jan 14, 2019
c68d042
Merge pull request #1354 from zbjornson/zb/pdfstream-meta
LinusU Jan 15, 2019
b968c8a
Merge pull request #1353 from LinusU/npm-files
LinusU Jan 15, 2019
2cf57e0
Fix "inspect" function deprecation notice
zbjornson Jan 21, 2019
2c24269
fix resolution option for PNG export
zbjornson Feb 27, 2019
fabfac9
Add typescript definitions
zbjornson Dec 15, 2018
aa04eb7
Merge pull request #1330 from zbjornson/zb/1303
LinusU Mar 11, 2019
92cffb2
history: 2.4.0
LinusU Mar 14, 2019
bbf8b75
2.4.0
LinusU Mar 14, 2019
cb958e8
Fix missing encoding options (quality) parameter in `canvas.toDataURL…
kayahr Mar 15, 2019
3d81e0a
Fix Electron 5 and NodeJS 12 compatibility (#1383)
Rosga Mar 15, 2019
a1c31df
Guard JPEG width/height against maximum supported
LinusU Mar 16, 2019
22925d3
Merge pull request #1385 from LinusU/guard-jpeg-side
LinusU Mar 19, 2019
e25a285
history: 2.4.1
LinusU Mar 19, 2019
fea4c0d
2.4.1
LinusU Mar 19, 2019
fefcda7
fix lib path for Aarch64/Tegra (jetson/agx xavier)
Mar 26, 2019
39aa8ab
Initial work to fix detail loss with additional canvas needed on draw…
asturur Mar 28, 2019
2cc758f
Use simple-get for fetching images
LinusU Apr 1, 2019
2689a1e
Merge pull request #1398 from LinusU/simple-get
LinusU Apr 2, 2019
49cebf4
lazy-load simple-get
zbjornson Apr 5, 2019
ddd8207
Remove sudo setting from .travis.yml
abetomo Apr 23, 2019
290afdb
fix typo in PDF canvas exception
chearon Apr 19, 2019
d407151
adds option arg (for crossOrigin attribute) to loadImage (#1402)
thisconnect Apr 24, 2019
3982196
Support Node.js v12 (#1409)
zbjornson Apr 24, 2019
57d17fc
Fix ES6 syntax for IE
mhuggins Mar 22, 2019
df32bac
Merge pull request #1401 from zbjornson/zb/lazy-get
LinusU May 1, 2019
a9bf89c
Merge pull request #1393 from mhuggins/browser-ie11-syntax
LinusU May 1, 2019
9094745
history: 2.5.0
LinusU May 1, 2019
7b36efa
2.5.0
LinusU May 1, 2019
81cf69b
Fix raspi build (#1418)
t3r May 9, 2019
4d485aa
Fix crash when resurfacing while fill/strokeStyle set to pattern or g…
zbjornson May 11, 2019
9d71cfd
Fix crash when resurfacing SVG canvases
zbjornson May 11, 2019
c1cc378
Fix assertion error with large canvases and toBuffer('raw')
zbjornson May 11, 2019
126760a
Clarify toBuffer('raw') byte ordering
zbjornson May 11, 2019
dd0c7c2
Update package.json typings field (#1432)
Jun 4, 2019
876f93d
Add support for various BMP headers and color depths (#1435)
Hakerh400 Jun 10, 2019
e03bb84
Properly check return value from Set and Call
LinusU May 1, 2019
8dcd0da
Merge pull request #1415 from Automattic/nan-fixes
LinusU Jun 10, 2019
ccecad2
history: 2.6.0
LinusU Jun 11, 2019
f5b9814
2.6.0
LinusU Jun 11, 2019
a0ef7dd
Ignore maxWidth in fillText and strokeText if it is undefined (#1455)
Hakerh400 Jul 12, 2019
7baaecf
fix assertion failure in Node 12
zbjornson Jul 13, 2019
4b362b4
Fix crash in Node.js v12 with RGB16_565
zbjornson Oct 5, 2019
e441496
Merge pull request #1479 from zbjornson/zb/rgb16_565
LinusU Oct 6, 2019
6755e8c
history: 2.6.1
LinusU Oct 6, 2019
bb297d6
2.6.1
LinusU Oct 6, 2019
2820e04
Fix rendering error when applying shadow width line style (lineCap li…
suti Nov 9, 2019
1e1e336
Fix BMP issues (#1497)
Hakerh400 Dec 9, 2019
da0bc07
update Readme.md (fix "Upgrading from 2.x")
JTBrinkmann Jan 7, 2020
37d556c
Merge pull request #1508 from JTBrinkmann/patch-1
LinusU Jan 7, 2020
98a5141
Add Node.js v13 to CI
csvn Jan 9, 2020
c025143
Updating Types (#1509)
jpinkster Jan 9, 2020
2e9ea73
Fix assertion failure when using VSCode debugger to inspect Image pro…
zbjornson Apr 6, 2020
6ff5eea
Add rsvgVersion to exports
zbjornson Apr 26, 2020
4c7f7ee
Switch CI to GitHub actions
zbjornson Apr 26, 2020
89f7607
Add -Wno-cast-function-type to suppress GCC8 warnings
zbjornson Apr 26, 2020
abfc713
Fix signed/unsigned comparison warning
zbjornson Apr 26, 2020
dc1db18
use libjpeg-dev in Linux CI
zbjornson May 17, 2020
9cd9aa3
Merge pull request #1583 from zbjornson/zb/ci-libjpeg
LinusU May 18, 2020
4af2efd
Fix to compile without JPEG library.
Sakari369 May 26, 2020
57d919a
Move getSafeBufSize() under #ifdef HAVE_JPEG, removes compiler warnin…
Sakari369 May 26, 2020
6e024b5
Remove linebreaks after #ifdefs
Sakari369 May 26, 2020
565693a
Update Changelog
Sakari369 May 26, 2020
97b169e
fix include path for cairo
May 28, 2020
f13efc7
added fixes to CHANGELOG
May 28, 2020
3e80556
Fix .complete for errored images
strager May 8, 2020
fe186e5
Bump node-pre-gyp to v0.15.0
zbjornson Jun 7, 2020
0d9ca88
Move prebuilds to GitHub Actions
zbjornson Apr 28, 2020
4ce04af
Speed up `fillStyle=` and `strokeStyle=`
zbjornson Jul 7, 2020
bf5126b
bug: remove non-standard behavior
zbjornson Jul 7, 2020
379a650
patternQuality should apply even without a global alpha
samizdatco Jul 19, 2020
7e53d34
removed repetition
samizdatco Jul 19, 2020
e24b4d1
pass DOMMatrix reference to CanvasPattern class
samizdatco Jul 19, 2020
4e963c2
add support for CanvasPattern.setTransform
samizdatco Jul 19, 2020
5fa9438
note addition of CanvasPattern.setTransform
samizdatco Jul 19, 2020
7a81e60
fixed test typos
samizdatco Jul 19, 2020
ec87eca
missing semicolon
samizdatco Jul 19, 2020
238c879
export proper version of CanvasPattern class
samizdatco Jul 19, 2020
82e3d03
added visual tests for pattern transforms
samizdatco Jul 19, 2020
f346e4f
applying patternQuality setting for stroke as well as fill
samizdatco Jul 19, 2020
aa75e52
whitespace
samizdatco Jul 19, 2020
e8ad788
Switch prebuild trigger to manual
zbjornson Aug 1, 2020
58bc728
v2.7.0
zbjornson Aug 1, 2020
5054b7b
translate "sans-serif" to "sans" for Pango
chearon Aug 12, 2020
595d559
Add invertSelf to the DOMMatrix object (#1649)
Pomax Aug 19, 2020
41d1c99
Fix PNG stream method name in benchmark (fixes #1672)
gregzanch Oct 4, 2020
e476656
Added stride to the Typescript typings
willemmulder Oct 14, 2020
beaee39
add Dockerfile for linux prebuild image
chearon Jan 3, 2021
547b050
Fix dangling reference in BackendOperationNotAvailable exception.
michaelsafyan Jan 26, 2021
f8305fb
Fix dtslint failing in CI
zbjornson Feb 27, 2021
b549ab6
Fix Windows CI build, add Node.js v15
zbjornson Feb 27, 2021
646b605
Update changelog
zbjornson Feb 27, 2021
7a84fc5
Fix always-false comparison warning in Canvas.cc in Node 15+
zbjornson Feb 27, 2021
6fae569
Use node pre gyp v1
domoritz Feb 25, 2021
8cd191c
Update changelog
zbjornson Feb 28, 2021
12e671d
Fix crash if exception thrown from onload/onerror
strager May 8, 2020
e4f901c
Loosen text measurement expectation.
zbjornson Apr 20, 2021
234e659
Fix text actualBoundingBoxLeft and actualBoundingBoxRight measures by…
Mar 30, 2021
d107c04
Update changelog to reflect previous commit
zbjornson Apr 20, 2021
2f84eee
Add ctx2d.getTransform() function
Tirondzo Mar 21, 2021
c166443
Add ctx2d.setTransform(mat) overload
Tirondzo Mar 21, 2021
0b49442
Update changelog to reflect previous commit
zbjornson Apr 20, 2021
2bf76b5
export type NodeCanvasRenderingContext2D
HeCorr Apr 15, 2021
5b5140e
Add Node.js 16 to CI, remove 15
zbjornson May 5, 2021
8707f3d
v2.8.0
zbjornson May 16, 2021
5d2aba1
lib: check for parameter nullability
VoltrexKeyva Jun 1, 2021
6bbc8cb
changelog: update changelog
VoltrexKeyva Jun 1, 2021
1e54481
Add `deregisterAllFonts` method. (#1811)
jhuckaby Jun 9, 2021
8de64bd
tests(): add failing test for direction rtl and textAlign START/END (…
asturur Jun 14, 2021
e278660
lib: use strings for non-special cases (#1820)
VoltrexKeyva Jun 14, 2021
f27e10a
src: remove semicolons from DOMMatrix.js
Cinnamonsroll Jun 2, 2021
d7ebfce
Merge pull request #1623 from samizdatco/pattern-transform
LinusU Jul 15, 2021
e48cc30
Update has_lib.js to support Apple M1 with homebrew (#1872)
rwtombaugh Jul 30, 2021
4a891ef
Revert "export type NodeCanvasRenderingContext2D"
zbjornson Aug 1, 2021
a4b571b
Point to troubleshooting guide in issue template
zbjornson Aug 13, 2021
1980805
Fix building on M1 macOS
LinusU Oct 17, 2021
324134b
use classes/const/let etc
jimmywarting Jul 7, 2021
604db27
Run standard --fix
jimmywarting Aug 2, 2021
a721d51
Clean up isnan/isinf, use isfinite
zbjornson Dec 8, 2021
aed721d
Update nan
zbjornson Dec 8, 2021
d603479
v2.9.0
zbjornson Dec 31, 2021
5fc80e7
bug: stringify CanvasPattern, ImageData, CanvasGradient like browsers
zbjornson Dec 31, 2021
83a8df1
Add missing cctype include for toupper
zbjornson Dec 31, 2021
0bccc05
bug: fix process crash in getImageData for PDF/SVG canvases
zbjornson Dec 31, 2021
6fd0fa5
make types compatible with typescript 4.6 (#1986)
chearon Feb 24, 2022
009d594
replace some remaining glib calls
chearon Feb 9, 2022
ddce10f
select fonts via postscript name on Linux
chearon Aug 7, 2021
d7c4673
Add support for multi-byte font path on Windows
tignear Aug 8, 2021
4273771
Fix CI
zbjornson Mar 19, 2022
9d8da5b
v2.9.1
zbjornson Mar 19, 2022
3f3af3a
fix: resolved inconsistent exports in ESM (#2047)
kyranet Jun 16, 2022
1f2b156
Replace binary for rebuild cases (#1982)
Apollon77 Jun 20, 2022
d4dc2a8
v2.9.2
zbjornson Jun 23, 2022
6fa9f38
improve multi-family output in font desc resolver
chearon Jun 24, 2022
7a8a606
v2.9.3
zbjornson Jun 24, 2022
64fdf18
export pangoVersion to help debugging
chearon Jun 27, 2022
b0d4f44
Update instructions for OSX local build
MDOR Jul 7, 2022
5255195
Parse rgba(r,g,b) correctly
zbjornson Jul 7, 2022
f8d4949
Fix FITLER/FILTER typo in index.d.ts
zbjornson Jul 7, 2022
c6a1546
fix repeat-x/y support in createPattern()
calvinsomething Jun 28, 2022
bdc497a
Use node-gyp 8.x for Win CI
zbjornson Aug 5, 2022
288f4bf
add WPT tests
zbjornson Jul 24, 2022
a484cf2
fix crashes and hangs in arc()
zbjornson Jul 27, 2022
73d7893
fix arc geometry calculations
zbjornson Jul 27, 2022
10b208e
un-skip 2d.path.arc.nonfinite; now fixed
zbjornson Aug 5, 2022
eba1e4a
Adds deregisterAllFonts to the typescript declaration file (#2096)
srubin Aug 19, 2022
dce0fd1
Add roundRect() support
zbjornson Aug 5, 2022
3fb4ed9
fix: add user agent to remote images request
Aug 29, 2022
561d933
v2.10.0
zbjornson Sep 4, 2022
6862532
Fix actualBoundingBoxLeft/Right with center/right alignment (#2109)
zbjornson Sep 6, 2022
9374943
Parse rgba(r,g,b,0) correctly
H3r3zy Sep 7, 2022
bc75c6a
add line in CHANGELOG
H3r3zy Sep 7, 2022
b3e7df3
v2.10.1
zbjornson Sep 7, 2022
0e6504a
remove save() limit, improve save/restore perf, fix some props
zbjornson Sep 10, 2022
2876b6e
Bugfix/Node.js 18 -> Assertion failed: (object->InternalFieldCount() …
TheDadi Oct 30, 2022
ad18c6c
src: shorten copy assignment operator decl for Point
zbjornson Oct 30, 2022
cc32159
src: shorten receiver checks
zbjornson Oct 30, 2022
672104c
v2.10.2
zbjornson Oct 30, 2022
40b4382
use tailored types instead of extending DOM
chearon Dec 14, 2022
fc160f5
v2.11.0
zbjornson Dec 22, 2022
9f313df
Add canvas property to CanvasRenderingContext2D type
Suyooo Dec 24, 2022
55d39cb
fix macos CI
chearon Jan 2, 2023
4c276e0
fix incorrect text width with newer (1.43?) Pango
chearon Jan 2, 2023
fdf709a
move ctx.font string to the state struct
chearon Jan 7, 2023
9ecfb70
v2.11.1
chearon Mar 21, 2023
9910243
fix not compiling on certain windows versions
chearon Mar 25, 2023
38e0a32
v2.11.2
chearon Mar 28, 2023
f3184ba
src: refactor and apply fixes
VoltrexKeyva Apr 13, 2023
5902219
add string tags for browser polyglot classes (#2214)
brettz9 Apr 17, 2023
5bd5b24
Upgrade GitHub Actions to use checkout@v3 (#2213)
cclauss Apr 18, 2023
adf73ee
Add node 20 to CI
hargasinski Apr 27, 2023
ce29f69
port to node-addon-api (remove NAN, v8, libuv)
chearon Apr 15, 2023
c9969aa
optimize checkArgs
chearon Apr 17, 2023
16c28ab
optimize fillStyle to be 10% faster
chearon Apr 22, 2023
9b9be4f
fix broken font matching due to a use-after-free
chearon Sep 25, 2023
a5b379b
v3.0.0
zbjornson Oct 4, 2023
7132087
Replace dtslint with tsd
LinusU Nov 28, 2023
ad793da
Drop support for older versions of Node.js (#2310)
LinusU Nov 29, 2023
2c4d2a7
fix the wrong type of setTransform (#2322)
huankong233 Dec 7, 2023
569e8fb
Update actions in GitHub Actions CI
striezel Dec 28, 2023
41428ee
added deregisterAllFonts to readme (#2328)
stepancar Dec 28, 2023
ff0f2ab
Move a changelog entry
zbjornson Dec 28, 2023
25fbac5
switch to prebuild-install
zbjornson Dec 29, 2023
4018095
change OS X to macOS in Readme
himalayanelixir Apr 14, 2024
f934f22
remove use of designated initializers
zbjornson Apr 14, 2024
3f3b2e6
rm prebuild files from master branch
zbjornson Jun 19, 2024
8894635
update installation info in readme
zbjornson Jun 19, 2024
130785f
publish v3.0.0-rc2
zbjornson Jun 19, 2024
3b04bde
add note about v3.0.0-rd2
zbjornson Jun 20, 2024
2de0f8b
Add python-setuptools to MacOS compilation info
zbjornson Jun 20, 2024
20c9882
update prebuild status in readme
zbjornson Jun 23, 2024
7726ea5
run CI on macos-12
zbjornson Jun 23, 2024
e6d55d8
Add fix for alpha '%' parsing
pranav1344 May 18, 2024
b3ecff1
Add support for '/' in rgba
pranav1344 May 18, 2024
3e0b75c
Fix parsing of alpha in RGBA
pranav1344 May 18, 2024
f138b3a
update changelog for 3.0.0
pranav1344 May 18, 2024
83a5126
Fixes related to parsing of colors in RGB functions (#2398)
pranav1344 Jul 15, 2024
ae1aacb
Allow quotes within font-family names
virtulis May 24, 2024
7dfeb04
add TextMetrics properties
musou1500 Jul 9, 2024
ba89686
remove unnecessary call to cairo_get_matrix
chearon Aug 11, 2024
2db6f49
add exif browser tests
chearon Sep 22, 2024
efcde93
Fix class properties should have defaults as standard js classes woul…
mcfedr Sep 27, 2024
a2e10e6
Throw surface errors in toBuffer
mcfedr Jul 18, 2024
77f0b99
Handle Exif orientations for JPEG images (fixes #1670) (#2296)
prewett-toptal Nov 14, 2024
8983c4a
fix windows build (#2458)
chearon Dec 5, 2024
d1ea3f8
fix windows ci config (url went dead)
chearon Dec 6, 2024
22820e1
fix macos ci config (macos-12 was deleted)
chearon Dec 6, 2024
19a3328
v3.0.0-rc3
chearon Dec 7, 2024
d027883
update README wrt macOS/aarch64
chearon Dec 11, 2024
b6b2dc7
modernize node version matrix
chearon Dec 6, 2024
f5894db
fix(DOMMatrix/DOMPoint): spec compatibility
ShaMan123 Aug 31, 2024
a8c035f
Revert "select fonts via postscript name on Linux"
chearon Dec 23, 2024
8346512
v3.0.0
chearon Dec 23, 2024
1817109
add missing DOMMatrixInit and DOMPointInit types
chearon Dec 31, 2024
80e94ea
v3.0.1
chearon Dec 31, 2024
1d956b7
use fetch api
Nov 27, 2023
7ed0a96
add font setter benchmarks
chearon Sep 15, 2024
728e76c
add C++ parser for the font shorthand
chearon Dec 26, 2024
da33bbe
Add link tags for pdfs
mcfedr Jul 18, 2024
a0c8031
getImageData fixes when rectangle is outside of canvas
Oct 26, 2022
0b2edc1
remove reference to old JS parseFont
chearon Jan 12, 2025
52330b8
support ctx.direction and textAlign start/end
chearon Jan 14, 2025
88e9657
allow registerFont after a canvas has been created (#2483)
chearon Jan 18, 2025
61e474e
3.1.0
chearon Jan 22, 2025
2f9de7c
remove unused and un-freed GError
chearon Feb 23, 2025
d24a127
double-free via g_object_unref that could crash
chearon Feb 23, 2025
9d5f104
nicer error reporting when svg width/height missing
chearon Feb 23, 2025
367af8c
fix(deps): update `prebuild-install` to work on Node 22.14+
agilgur5 Mar 29, 2025
494035d
leak in sync toBuffer
chearon Apr 4, 2025
b50b392
added a check to make sure maxWidth > 0
truman126 Mar 17, 2025
c936361
add visual test for #2498
chearon Apr 11, 2025
1234a86
Render at natural dimensions to fix scaling issues
mgilfillan Apr 3, 2025
772c464
fix(TextMetrics): rtl direction + start/end textAlign (#2510)
ShaMan123 Jun 16, 2025
05a53d8
add node 24 to ci
chearon Jun 16, 2025
f5f103a
report correct freed size when resurfacing
chearon Jun 16, 2025
3dca82a
fix build / refactor backends
chearon Jun 18, 2025
627c601
update changelog
chearon Jun 18, 2025
48ecd5a
further backend cleanup, add asserts
chearon Jun 18, 2025
7a942d4
3.1.1
chearon Jun 19, 2025
2738a70
fix resurface crash with png, svg canvases
chearon Jun 26, 2025
a862af8
3.1.2
chearon Jun 26, 2025
6353deb
ci: windows-2025 image (2019 was retired)
chearon Aug 16, 2025
d548caa
use memcpy to avoid misaligned pointer UB
chearon Aug 12, 2025
6ce963d
Set pango language through ctx.lang (#2526)
mapmeld Aug 17, 2025
9bcf363
3.2.0
chearon Aug 17, 2025
418f555
bug: incorrect roundRect() with large radii
zbjornson Sep 7, 2025
616859b
fix: reject loadImage when src is null or invalid (#2518)
Ian-I-Chien Sep 7, 2025
7f34c9b
Fix error message HTTP response status code in image src setter (#2532)
martinwcf Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
<!----------------------------------- STOP! ----------------------------------->
<!---
Having trouble installing node-canvas? Please make sure you have read
the installation instructions located here before asking for help:
https://github.com/Automattic/node-canvas#installation
Still having problems, found a bug or want a feature? Fill out the form below.
-->

<!--- Provide a general summary of the issue in the Title above -->

## Issue or Feature
- [ ] If this is an issue with installation, I have read the [troubleshooting guide](https://github.com/Automattic/node-canvas/issues/1511).

<!--- Provide info about the bug or feature. -->

## Steps to Reproduce
<!--- For bugs, provide a short, complete code example to reproduce the issue. -->
```js
var Canvas = require('canvas');
var canvas = new Canvas(200, 200);
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d');
// etc.
```

## Your Environment
* Version of node-canvas (e.g. 1.4.0):
* Environment (e.g. node 4.2.0 on Mac OS X 10.8):
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`):
* Environment (e.g. node 20.9.0 on macOS 14.1.1):
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Thanks for contributing!

- [ ] Have you updated CHANGELOG.md?
89 changes: 89 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Test
on:
push:
paths-ignore:
- ".github/workflows/prebuild.yaml"
pull_request:
paths-ignore:
- ".github/workflows/prebuild.yaml"

jobs:
Linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
node: [18.20.5, 20.18.1, 22.12.0, 23.3.0, 24.2.0]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

Windows:
name: Test on Windows
runs-on: windows-2025
strategy:
matrix:
node: [18.20.5, 20.18.1, 22.12.0, 23.3.0, 24.2.0]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
Invoke-WebRequest "https://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
.\libjpeg.exe /S
winget install --accept-source-agreements --id=Microsoft.VCRedist.2010.x64 -e
npm install -g node-gyp@8
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

macOS:
name: Test on macOS
runs-on: macos-15
strategy:
matrix:
node: [18.20.5, 20.18.1, 22.12.0, 23.3.0, 24.2.0]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew update
brew install python-setuptools pkg-config cairo pango libpng jpeg giflib librsvg
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.9.0
- uses: actions/checkout@v4
- name: Install
run: npm install --ignore-scripts
- name: Lint
run: npm run lint
- name: Lint Types
run: npm run tsd
13 changes: 13 additions & 0 deletions .github/workflows/prebuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is a dummy file so that this workflow shows up in the Actions tab.
# Prebuilds are actually run using the prebuilds branch.

name: Make Prebuilds
on: workflow_dispatch

jobs:
Linux:
name: Nothing
runs-on: ubuntu-latest
steps:
- name: Nothing
run: echo "Nothing to do here"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ build
test/images/*.png
examples/*.png
examples/*.jpg
examples/*.pdf
testing
out.png
out.pdf
out.svg
.pomo
node_modules
package-lock.json

# Vim cruft
*.swp
*.un~
npm-debug.log

.idea
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

Loading