Skip to content

Commit 183060d

Browse files
committed
Upgrade dependencies; remove Sizzle dependency.
1 parent 11a19ec commit 183060d

13 files changed

Lines changed: 50 additions & 1483 deletions

File tree

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "d3",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"main": "./d3.js"
55
}

d3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
};
1313
}
1414
d3 = {
15-
version: "3.0.4"
15+
version: "3.0.5"
1616
};
1717
var π = Math.PI, ε = 1e-6, d3_radians = π / 180, d3_degrees = 180 / π;
1818
function d3_target(d) {

d3.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

globals.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var document = global.document = require("jsdom").jsdom("<html><head></head><body></body></html>"),
2+
window = global.window = document.createWindow(),
3+
navigator = global.navigator = window.navigator,
4+
getComputedStyle = global.getComputedStyle = window.getComputedStyle,
5+
CSSStyleDeclaration = global.CSSStyleDeclaration = window.CSSStyleDeclaration;
6+
7+
// https://github.com/chad3814/CSSStyleDeclaration/issues/3
8+
var CSSStyleDeclaration_setProperty = CSSStyleDeclaration.prototype.setProperty;
9+
CSSStyleDeclaration.prototype.setProperty = function(name, value, priority) {
10+
return CSSStyleDeclaration_setProperty.call(this, name + "", value == null ? null : value + "", priority == null ? null : priority + "");
11+
};

index.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
var self = this,
2-
globals = ["document", "window", "navigator", "CSSStyleDeclaration", "d3", "Sizzle"],
1+
var globals = ["document", "window", "navigator", "CSSStyleDeclaration", "getComputedStyle", "d3"],
32
globalValues = {};
43

5-
globals.forEach(function(global) {
6-
if (global in self) globalValues[global] = self[global];
4+
globals.forEach(function(g) {
5+
if (g in global) globalValues[g] = global[g];
76
});
87

9-
document = require("jsdom").jsdom("<html><head></head><body></body></html>");
10-
window = document.createWindow();
11-
navigator = window.navigator;
12-
CSSStyleDeclaration = window.CSSStyleDeclaration;
13-
14-
Sizzle = require("sizzle");
15-
8+
require("./globals");
169
require("./d3");
1710

1811
module.exports = d3;
1912

20-
globals.forEach(function(global) {
21-
if (global in globalValues) self[global] = globalValues[global];
22-
else delete self[global];
13+
globals.forEach(function(g) {
14+
if (g in globalValues) global[g] = globalValues[g];
15+
else delete global[g];
2316
});

lib/sizzle/LICENSE

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)