Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvas-prebuilt

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-prebuilt - npm Package Compare versions

Comparing version 1.6.5-prerelease.1 to 1.6.11

canvas/.vscode/c_cpp_properties.json

6

canvas/History.md

@@ -0,1 +1,7 @@

1.6.6 / 2017-07-31
==================
* Use .node extension for requiring native module (#939)
* Make textBaseline consider current scale (#951)
1.6.5 / 2017-03-18

@@ -2,0 +8,0 @@ ==================

2

canvas/lib/bindings.js
'use strict';
module.exports = require('../build/Release/canvas');
module.exports = require('../build/Release/canvas.node');

@@ -19,6 +19,2 @@ 'use strict';

var parseCssFont = require('parse-css-font');
var unitsCss = require('units-css');
/**

@@ -30,2 +26,4 @@ * Export `Context2d` as the module.

var parseFont = exports.parseFont = require('./parse-font.js');
/**

@@ -44,58 +42,2 @@ * Cache color string RGBA values.

/**
* Parse font `str`.
*
* @param {String} str
* @return {Object}
* @api private
*/
var parseFont = exports.parseFont = function(str) {
var parsedFont;
// Try to parse the font string using parse-css-font.
// It will throw an exception if it fails.
try {
parsedFont = parseCssFont(str);
}
catch (e) {
// Invalid
return;
}
// Cached
if (cache[str]) return cache[str];
// Parse size into value and unit using units-css
var size = unitsCss.parse(parsedFont.size);
// TODO: dpi
// TODO: remaining unit conversion
switch (size.unit) {
case 'pt':
size.value /= .75;
break;
case 'in':
size.value *= 96;
break;
case 'mm':
size.value *= 96.0 / 25.4;
break;
case 'cm':
size.value *= 96.0 / 2.54;
break;
}
// Populate font object
var font = {
weight: parsedFont.weight,
style: parsedFont.style,
size: size.value,
unit: size.unit,
family: parsedFont.family[0]
};
return cache[str] = font;
};
/**
* Enable or disable image smoothing.

@@ -131,4 +73,3 @@ *

Context2d.prototype.createPattern = function(image, repetition){
// TODO Use repetition (currently always 'repeat')
return new CanvasPattern(image);
return new CanvasPattern(image, repetition || 'repeat');
};

@@ -194,2 +135,3 @@

} else if ('string' == typeof val) {
this.lastFillStyle = undefined;
this._setFillColor(val);

@@ -196,0 +138,0 @@ }

{
"_args": [
[
{
"raw": "canvas@1.6.5",
"scope": null,
"escapedName": "canvas",
"name": "canvas",
"rawSpec": "1.6.5",
"spec": "1.6.5",
"type": "version"
},
"/Users/caleb/Code/node-canvas-prebuilt"
]
],
"_from": "canvas@1.6.5",
"_id": "canvas@1.6.5",
"_inCache": true,
"_from": "canvas@1.6.11",
"_id": "canvas@1.6.11",
"_inBundle": false,
"_integrity": "sha512-ElVw5Uk8PReGpzXfDg6PDa+wntnZLGWWfdSHI0Pc8GyXiFbW13drSTzWU6C4E5QylHe+FnLqI7ngMRlp3eGZIQ==",
"_location": "/canvas",
"_nodeVersion": "7.6.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/canvas-1.6.5.tgz_1489832623269_0.8676735064946115"
},
"_npmUser": {
"name": "linusu",
"email": "linus@folkdatorn.se"
},
"_npmVersion": "4.1.2",
"_phantomChildren": {
"css-font-size-keywords": "1.0.0",
"css-font-stretch-keywords": "1.0.1",
"css-font-style-keywords": "1.0.1",
"css-font-weight-keywords": "1.0.0",
"css-global-keywords": "1.0.1",
"css-list-helpers": "1.0.1",
"css-system-font-keywords": "1.0.0",
"isnumeric": "0.2.0",
"tcomb": "2.7.0",
"unquote": "1.1.0",
"viewport-dimensions": "0.2.0"
},
"_phantomChildren": {},
"_requested": {
"raw": "canvas@1.6.5",
"scope": null,
"type": "version",
"registry": true,
"raw": "canvas@1.6.11",
"name": "canvas",
"escapedName": "canvas",
"name": "canvas",
"rawSpec": "1.6.5",
"spec": "1.6.5",
"type": "version"
"rawSpec": "1.6.11",
"saveSpec": null,
"fetchSpec": "1.6.11"
},
"_requiredBy": [
"#USER"
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/canvas/-/canvas-1.6.5.tgz",
"_shasum": "557f9988f5d2c95fdc247c61a5ee43de52f6717c",
"_shrinkwrap": null,
"_spec": "canvas@1.6.5",
"_resolved": "https://registry.npmjs.org/canvas/-/canvas-1.6.11.tgz",
"_shasum": "c2d8bcf283281f19ded14fa163a111804522330d",
"_spec": "canvas@1.6.11",
"_where": "/Users/caleb/Code/node-canvas-prebuilt",

@@ -67,2 +33,3 @@ "author": {

},
"bundleDependencies": false,
"contributors": [

@@ -83,6 +50,5 @@ {

"dependencies": {
"nan": "^2.4.0",
"parse-css-font": "^2.0.2",
"units-css": "^0.4.0"
"nan": "^2.10.0"
},
"deprecated": false,
"description": "Canvas graphics API backed by Cairo",

@@ -92,15 +58,9 @@ "devDependencies": {

"express": "^4.13.2",
"mocha": "*",
"mocha": "^2.5.3",
"pug": "^2.0.0-beta3",
"standard": "^7.1.1"
"standard": "^10.0.3"
},
"directories": {},
"dist": {
"shasum": "557f9988f5d2c95fdc247c61a5ee43de52f6717c",
"tarball": "https://registry.npmjs.org/canvas/-/canvas-1.6.5.tgz"
},
"engines": {
"node": ">=0.8.0"
},
"gitHead": "451e6da9ba30888c08e33f16a7aedbc9425c753a",
"gypfile": true,

@@ -120,31 +80,3 @@ "homepage": "https://github.com/Automattic/node-canvas",

"main": "./lib/canvas.js",
"maintainers": [
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
{
"name": "kangax",
"email": "kangax@gmail.com"
},
{
"name": "tootallnate",
"email": "nathan@tootallnate.net"
},
{
"name": "rauchg",
"email": "rauchg@gmail.com"
},
{
"name": "domenic",
"email": "d@domenic.me"
},
{
"name": "linusu",
"email": "linus@folkdatorn.se"
}
],
"name": "canvas",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {

@@ -163,3 +95,3 @@ "type": "git",

},
"version": "1.6.5"
"version": "1.6.11"
}

@@ -29,3 +29,3 @@ node-canvas

OS X | `brew install pkg-config cairo libpng jpeg giflib`
Ubuntu | `sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++`
Ubuntu | `sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++`
Fedora | `sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel`

@@ -32,0 +32,0 @@ Solaris | `pkgin install cairo pkg-config xproto renderproto kbproto xextproto`

{
"name": "canvas-prebuilt",
"description": "Prebuilt versions of node-canvas as a drop-in replacement",
"version": "1.6.5-prerelease.1",
"version": "1.6.11",
"author": "Caleb Hearon <crh0872@gmail.com>",

@@ -31,6 +31,4 @@ "keywords": [

"dependencies": {
"node-pre-gyp": "^0.6.29",
"parse-css-font": "^2.0.2",
"units-css": "^0.4.0"
"node-pre-gyp": "^0.10.0"
}
}

@@ -33,4 +33,2 @@ [![NPM version](https://badge.fury.io/js/canvas-prebuilt.svg)](http://badge.fury.io/js/canvas-prebuilt)

I screwed up and had to unpublish a couple of versions so they aren't 1:1 with canvas. If you have the minor or major version fixed it should not matter.
| canvas | canvas-prebuilt |

@@ -41,7 +39,2 @@ | ------ | --------------- |

| 1.6.0 | 1.6.0 |
| 1.6.1 | 1.6.3 |
| 1.6.2 | 1.6.4         |
| 1.6.3 | 1.6.5 |
| 1.6.4 | 1.6.6 |
| 1.6.5 | 1.6.7 |

@@ -48,0 +41,0 @@ # Bundling

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc