Skip to content

Commit ac16c9a

Browse files
authored
Update to canvas@3.1.0 and support node22
1 parent 501d1e5 commit ac16c9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+72
-30
lines changed

build-layer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
# yum install gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel librsvg2-devel pango-devel bzip2-devel jq python3 -y
77
#
88
# Setting Up Node.js, refer https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html for details
9-
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
9+
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
1010
# . ~/.nvm/nvm.sh
1111
# nvm install --lts
1212
#
1313
set -e
1414

1515
LAYER_NAME=canvas-nodejs
1616
LAYER_DESCRIPTION="Cairo backed Mozilla Web Canvas API implementation layer for AWS Lambda"
17-
LAYER_VERSION=2.11.4
17+
LAYER_VERSION=3.1.0
1818
LAYER_AUTHOR="Charoite Lee"
1919

2020
DOT_CHAR="."
2121
NODE_VERSION=$(node -v)
2222
NODE_VERSION=${NODE_VERSION:1}
23-
SEMVER_VERSION=7.6.3
23+
SEMVER_VERSION=7.7.1
2424

2525
# Remove packaged layer if exists
2626
if [ -n "$(find . -name 'canvas-nodejs_v*.zip')" ]; then

lib/libEGL.so.1

-82 KB
Binary file not shown.

lib/libGL.so.1

-569 KB
Binary file not shown.

lib/libGLX.so.0

-73.1 KB
Binary file not shown.

lib/libGLdispatch.so.0

-626 KB
Binary file not shown.

lib/libICE.so.6

-102 KB
Binary file not shown.

lib/libSM.so.6

-31.5 KB
Binary file not shown.

lib/libX11.so.6

85 KB
Binary file not shown.

lib/libXau.so.6

4.7 KB
Binary file not shown.

lib/libXext.so.6

12.5 KB
Binary file not shown.

lib/libXrender.so.1

8.61 KB
Binary file not shown.

lib/libblkid.so.1

-62.5 KB
Binary file not shown.

lib/libbrotlicommon.so.1

140 KB
Binary file not shown.

lib/libbrotlidec.so.1

51.9 KB
Binary file not shown.

lib/libbz2.so.1

12.6 KB
Binary file not shown.

lib/libc.so.6

-14 MB
Binary file not shown.

lib/libcairo-gobject.so.2

43.4 KB
Binary file not shown.

lib/libcairo.so.2

60 KB
Binary file not shown.

lib/libcroco-0.6.so.3

-230 KB
Binary file not shown.

lib/libdatrie.so.1

32.3 KB
Binary file not shown.

lib/libdl.so.2

-232 KB
Binary file not shown.

lib/libexpat.so.1

-193 KB
Binary file not shown.

lib/libffi.so.6

-31.5 KB
Binary file not shown.

lib/libffi.so.8

48.4 KB
Binary file not shown.

lib/libfontconfig.so.1

51.5 KB
Binary file not shown.

lib/libfreetype.so.6

126 KB
Binary file not shown.

lib/libfribidi.so.0

16.8 KB
Binary file not shown.

lib/libgcc_s.so.1

99.7 KB
Binary file not shown.

lib/libgdk_pixbuf-2.0.so.0

32 KB
Binary file not shown.

lib/libgif.so.4

-41 KB
Binary file not shown.

lib/libgif.so.7

44.3 KB
Binary file not shown.

lib/libgio-2.0.so.0

302 KB
Binary file not shown.

lib/libglib-2.0.so.0

274 KB
Binary file not shown.

lib/libgmodule-2.0.so.0

8.07 KB
Binary file not shown.

lib/libgobject-2.0.so.0

76.5 KB
Binary file not shown.

lib/libgraphite2.so.3

-45.7 KB
Binary file not shown.

lib/libharfbuzz.so.0

380 KB
Binary file not shown.

lib/libjpeg.so.62

8.88 KB
Binary file not shown.

lib/liblzma.so.5

25 KB
Binary file not shown.

lib/libm.so.6

-4.4 MB
Binary file not shown.

lib/libmount.so.1

-46.7 KB
Binary file not shown.

lib/libpango-1.0.so.0

156 KB
Binary file not shown.

lib/libpangocairo-1.0.so.0

12.9 KB
Binary file not shown.

lib/libpangoft2-1.0.so.0

17.1 KB
Binary file not shown.

lib/libpcre.so.1

-393 KB
Binary file not shown.

lib/libpcre2-8.so.0

631 KB
Binary file not shown.

lib/libpixman-1.so.0

78.7 KB
Binary file not shown.

lib/libpng15.so.15

-167 KB
Binary file not shown.

lib/libpng16.so.16

244 KB
Binary file not shown.

lib/libpthread.so.0

-2.49 MB
Binary file not shown.

lib/libresolv.so.2

-444 KB
Binary file not shown.

lib/librsvg-2.so.2

4.86 MB
Binary file not shown.

lib/librt.so.1

-356 KB
Binary file not shown.

lib/libselinux.so.1

20.7 KB
Binary file not shown.

lib/libstdc++.so.6

967 KB
Binary file not shown.

lib/libthai.so.0

-8.06 KB
Binary file not shown.

lib/libuuid.so.1

-19.6 KB
Binary file not shown.

lib/libxcb-render.so.0

4.63 KB
Binary file not shown.

lib/libxcb-shm.so.0

4.81 KB
Binary file not shown.

lib/libxcb.so.1

12.4 KB
Binary file not shown.

lib/libxml2.so.2

125 KB
Binary file not shown.

lib/libz.so.1

20.9 KB
Binary file not shown.

nodejs/test/canvas-font.js

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/test/canvas-svg.js

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/test/chart-line.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
let { registerFont, createCanvas } = require('canvas');
2+
let { CategoryScale, Chart, LinearScale, LineController, LineElement, PointElement } = require('chart.js');
3+
var assert = require('assert');
4+
5+
describe('Chart', function () {
6+
describe('#drawLineGraph', function () {
7+
it('should draw a line graph', function () {
8+
Chart.register([
9+
CategoryScale,
10+
LineController,
11+
LineElement,
12+
LinearScale,
13+
PointElement
14+
]);
15+
16+
const canvas = createCanvas(400, 300);
17+
const chart = new Chart(
18+
canvas, // TypeScript needs "as any" here
19+
{
20+
type: 'line',
21+
data: {
22+
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
23+
datasets: [{
24+
label: '# of Votes',
25+
data: [12, 19, 3, 5, 2, 3],
26+
borderColor: 'red'
27+
}]
28+
}
29+
}
30+
);
31+
const dataURL = canvas.toDataURL();
32+
// console.log(dataURL);
33+
chart.destroy();
34+
});
35+
})
36+
});

nodejs/test/fabric-rectangle.js

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)