canvas-prebuilt
Advanced tools
Comparing version 1.6.5-prerelease.1 to 1.6.11
@@ -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 @@ ================== |
'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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
674937
1
107
1399
1
50
6
+ Addedchownr@1.1.4(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedfs-minipass@1.2.7(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedignore-walk@3.0.4(transitive)
+ Addedminipass@2.9.0(transitive)
+ Addedminizlib@1.3.3(transitive)
+ Addedms@2.1.3(transitive)
+ Addedneedle@2.9.1(transitive)
+ Addednode-pre-gyp@0.10.3(transitive)
+ Addednpm-bundled@1.1.2(transitive)
+ Addednpm-normalize-package-bin@1.0.1(transitive)
+ Addednpm-packlist@1.4.8(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedtar@4.4.19(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedparse-css-font@^2.0.2
- Removedunits-css@^0.4.0
- Removedajv@4.11.8(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@0.2.01.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedblock-stream@0.0.9(transitive)
- Removedboom@2.10.1(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedco@4.6.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removedcss-font-size-keywords@1.0.0(transitive)
- Removedcss-font-stretch-keywords@1.0.1(transitive)
- Removedcss-font-style-keywords@1.0.1(transitive)
- Removedcss-font-weight-keywords@1.0.0(transitive)
- Removedcss-global-keywords@1.0.1(transitive)
- Removedcss-list-helpers@1.0.1(transitive)
- Removedcss-system-font-keywords@1.0.0(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.1.4(transitive)
- Removedfstream@1.0.12(transitive)
- Removedfstream-ignore@1.0.5(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedgopd@1.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhar-schema@1.0.5(transitive)
- Removedhar-validator@4.2.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisarray@2.0.5(transitive)
- Removedisnumeric@0.2.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-stable-stringify@1.1.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsonify@0.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedms@2.0.0(transitive)
- Removednode-pre-gyp@0.6.39(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedparse-css-font@2.0.2(transitive)
- Removedperformance-now@0.2.0(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedqs@6.4.1(transitive)
- Removedrequest@2.81.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsntp@1.0.9(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedtar@2.2.2(transitive)
- Removedtar-pack@3.4.1(transitive)
- Removedtcomb@2.7.0(transitive)
- Removedtough-cookie@2.3.4(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduid-number@0.0.6(transitive)
- Removedunits-css@0.4.0(transitive)
- Removedunquote@1.1.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedviewport-dimensions@0.2.0(transitive)
Updatednode-pre-gyp@^0.10.0