Merge branch 'bstable'

This commit is contained in:
ccd0 2015-11-01 02:08:40 -08:00
commit 62bfe0e5dd
5 changed files with 71 additions and 61 deletions

View File

@ -67,9 +67,15 @@ module.exports = (grunt) ->
return '' unless grunt.config('pkg').tests_enabled
"throw new Error 'Assertion failed: ' + #{json statement} unless #{statement}"
loadPkg = ->
pkg = grunt.file.readJSON 'package.json'
version = grunt.file.readJSON 'version.json'
pkg.meta[key] = val for key, val of version
pkg
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
pkg: loadPkg()
concat:
options: process: Object.create(null, data:
@ -258,6 +264,7 @@ module.exports = (grunt) ->
files: [
'Gruntfile.coffee'
'package.json'
'version.json'
'src/**/*'
]
tasks: 'build'
@ -297,23 +304,17 @@ module.exports = (grunt) ->
'-W084': true
'-W083': true
'-W093': true
globals:
Notification: true
webkitNotifications: true
HTMLDocument: true
MediaError: true
Set: true
GM_getValue: true
GM_setValue: true
GM_deleteValue: true
GM_listValues: true
GM_addValueChangeListener: true
GM_openInTab: true
GM_xmlhttpRequest: true
GM_info: true
cloneInto: true
unsafeWindow: true
chrome: true
globals: do ->
globals =
MediaError: true
Set: true
GM_info: true
cloneInto: true
unsafeWindow: true
chrome: true
pkg = grunt.file.readJSON 'package.json'
globals[v] = true for v in pkg.meta.grants
globals
script: 'tmp-<%= pkg.type %>/*.js'
require('load-grunt-tasks') grunt
@ -474,13 +475,13 @@ module.exports = (grunt) ->
grunt.task.run 'shell:captchas'
grunt.registerTask 'setversion', 'Set the version number', (version) ->
pkg = grunt.file.readJSON 'package.json'
oldversion = pkg.meta.version
pkg.meta.version = version
pkg.meta.date = new Date()
grunt.config 'pkg', pkg
grunt.file.write 'package.json', JSON.stringify(pkg, null, 2) + '\n'
data = grunt.file.readJSON 'version.json'
oldversion = data.version
data.version = version
data.date = new Date()
grunt.file.write 'version.json', JSON.stringify(data, null, 2) + '\n'
grunt.log.ok "Version updated from v#{oldversion} to v#{version}."
grunt.config 'pkg', loadPkg()
grunt.registerTask 'updcl', 'Update the changelog', ->
{meta, name} = grunt.config('pkg')

54
npm-shrinkwrap.json generated
View File

@ -1,7 +1,7 @@
{
"name": "4chan-X",
"npm-shrinkwrap-version": "5.4.1",
"node-version": "v4.1.1",
"node-version": "v4.2.1",
"dependencies": {
"crx": {
"version": "3.0.3",
@ -450,12 +450,12 @@
}
},
"grunt-concurrent": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/grunt-concurrent/-/grunt-concurrent-2.0.3.tgz",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/grunt-concurrent/-/grunt-concurrent-2.0.4.tgz",
"dependencies": {
"async": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.4.2.tgz"
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz"
},
"indent-string": {
"version": "2.1.0",
@ -480,12 +480,12 @@
}
},
"pad-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pad-stream/-/pad-stream-1.1.0.tgz",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pad-stream/-/pad-stream-1.2.0.tgz",
"dependencies": {
"meow": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.4.2.tgz",
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.5.0.tgz",
"dependencies": {
"camelcase-keys": {
"version": "1.0.0",
@ -536,12 +536,12 @@
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
"dependencies": {
"spdx-correct": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.1.tgz",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
"dependencies": {
"spdx-license-ids": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.0.2.tgz"
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.1.0.tgz"
}
}
},
@ -554,8 +554,8 @@
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.3.tgz"
},
"spdx-license-ids": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.0.2.tgz"
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.1.0.tgz"
}
}
}
@ -614,8 +614,8 @@
}
},
"pify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.2.0.tgz"
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
},
"pinkie-promise": {
"version": "1.0.0",
@ -648,8 +648,8 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz"
},
"pify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.2.0.tgz"
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz"
},
"pinkie-promise": {
"version": "1.0.0",
@ -714,8 +714,8 @@
}
},
"readable-stream": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz",
"dependencies": {
"core-util-is": {
"version": "1.0.1",
@ -746,8 +746,8 @@
}
},
"pump": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.0.tgz",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.1.tgz",
"dependencies": {
"end-of-stream": {
"version": "1.1.0",
@ -768,8 +768,8 @@
}
},
"repeating": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.0.tgz",
"dependencies": {
"is-finite": {
"version": "1.0.1",
@ -792,8 +792,8 @@
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.0.tgz",
"dependencies": {
"readable-stream": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.4.tgz",
"dependencies": {
"core-util-is": {
"version": "1.0.1",

View File

@ -4,8 +4,6 @@
"meta": {
"name": "4chan X",
"fork": "ccd0",
"version": "1.11.14.12",
"date": "2015-11-01T00:02:41.314Z",
"page": "https://www.4chan-x.net/",
"downloads": "https://www.4chan-x.net/builds/",
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",
@ -30,6 +28,15 @@
"https://www.google.com/recaptcha/api2/frame?*&k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*",
"*://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc*"
],
"grants": [
"GM_getValue",
"GM_setValue",
"GM_deleteValue",
"GM_listValues",
"GM_addValueChangeListener",
"GM_openInTab",
"GM_xmlhttpRequest"
],
"suffix": {
"stable": "",
"beta": "-beta",
@ -52,7 +59,7 @@
"crx": "^3.0.3",
"font-awesome": "^4.4.0",
"grunt": "^0.4.5",
"grunt-concurrent": "^2.0.3",
"grunt-concurrent": "^2.0.4",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-coffee": "^0.13.0",
"grunt-contrib-concat": "^0.5.1",

View File

@ -18,13 +18,11 @@
}
}).join('\n')
%>
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_addValueChangeListener
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
<%=
meta.grants.map(function(grant) {
return '// @grant ' + grant;
}).join('\n')
%>
// @run-at document-start
<% if (channel !== 'dev') { %>// @updateURL <%= (channel !== 'noupdate') ? (meta.downloads + name + meta.suffix[channel] + '.meta.js') : 'https://noupdate.invalid/' %>
// @downloadURL <%= (channel !== 'noupdate') ? (meta.downloads + name + meta.suffix[channel] + '.user.js') : 'https://noupdate.invalid/' %>

4
version.json Normal file
View File

@ -0,0 +1,4 @@
{
"version": "1.11.14.12",
"date": "2015-11-01T00:02:41.314Z"
}