Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 9, 2017
1 parent f61973d commit ff3f84c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2010-2016 Mike Bostock
Copyright 2010-2017 Mike Bostock
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
"url": "https://github.com/d3/d3-time-format.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-time:d3 -n d3 -o build/d3-time-format.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\"",
"test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-time-format.js -c -m -o build/d3-time-format.min.js",
"prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-time-format.js -c -m -o build/d3-time-format.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-time-format/build/d3-time-format.js d3-time-format.v2.js && cp ../d3-time-format/build/d3-time-format.min.js d3-time-format.v2.min.js && git add d3-time-format.v2.js d3-time-format.v2.min.js && git commit -m \"d3-time-format ${npm_package_version}\" && git push && cd - && zip -j build/d3-time-format.zip -- LICENSE README.md build/d3-time-format.js build/d3-time-format.min.js"
},
"dependencies": {
"d3-time": "1"
},
"devDependencies": {
"d3-queue": "3",
"eslint": "3",
"package-preamble": "0.0",
"rollup": "0.41",
"eslint": "4",
"package-preamble": "0.1",
"rollup": "0.50",
"tape": "4",
"uglify-js": "^2.8.11"
"uglify-js": "3"
}
}
14 changes: 14 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const definition = require("./package.json");
const dependencies = Object.keys(definition.dependencies);

export default {
input: "index",
external: dependencies,
output: {
extend: true,
file: `build/${definition.name}.js`,
format: "umd",
globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}),
name: "d3"
}
};
4 changes: 2 additions & 2 deletions src/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export default function formatLocale(locale) {
var pads = {"-": "", "_": " ", "0": "0"},
numberRe = /^\s*\d+/, // note: ignores next directive
percentRe = /^%/,
requoteRe = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
requoteRe = /[\\^$*+?|[\]().{}]/g;

function pad(value, fill, width) {
var sign = value < 0 ? "-" : "",
Expand Down Expand Up @@ -423,7 +423,7 @@ function parseYear(d, string, i) {
}

function parseZone(d, string, i) {
var n = /^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(string.slice(i, i + 6));
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}

Expand Down

0 comments on commit ff3f84c

Please sign in to comment.