browserify-adventure
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -8,2 +8,3 @@ #!/usr/bin/env node | ||
require('../menu.json').forEach(function (name) { | ||
if (/^!/.test(name)) return; | ||
var d = name.toLowerCase().replace(/\W+/g, '_'); | ||
@@ -10,0 +11,0 @@ var dir = path.join(__dirname, '../problems', d); |
[ | ||
"BEEP BOOP", | ||
"LOCAL REQUIRE", | ||
"MODULE REQUIRE", | ||
"IMPORT EXPORT", | ||
"MODULARIZE", | ||
"BUILD A WIDGET", | ||
"DEBUGGING", | ||
"WATCH", | ||
"BUILTINS", | ||
"NPM SCAVENGER HUNT", | ||
"TESTING", | ||
"USING TRANSFORMS", | ||
"WRITING TRANSFORMS", | ||
"CODE COVERAGE", | ||
"BUILD YOUR OWN BROWSERIFY", | ||
"COMPILER PIPELINE", | ||
"BROWSER UNPACK", | ||
"FACTOR BUNDLE" | ||
"USING NPM PACKAGES", | ||
"SINGLE EXPORT", | ||
"MULTI EXPORT", | ||
"!BUILD A WIDGET", | ||
"!USING TRANSFORMS", | ||
"!WIDGET WITH BRFS", | ||
"!WRITING TRANSFORMS", | ||
"!DEBUGGING", | ||
"!WATCH", | ||
"!BUILTINS", | ||
"!NPM SCAVENGER HUNT", | ||
"!TESTING", | ||
"!CODE COVERAGE", | ||
"!BUILD YOUR OWN BROWSERIFY", | ||
"!COMPILER PIPELINE", | ||
"!BROWSER UNPACK", | ||
"!FACTOR BUNDLE" | ||
] |
{ | ||
"name": "browserify-adventure", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "learn browserify with this educational adventure", | ||
"main": "index.js", | ||
"bin": { | ||
"browserify-adventure": "bin/cmd.js" | ||
}, | ||
"dependencies": { | ||
"adventure": "^1.0.0" | ||
"adventure": "^2.5.0", | ||
"adventure-verify": "^2.1.1", | ||
"browser-unpack": "~0.2.3", | ||
"concat-stream": "^1.4.6", | ||
"falafel": "~0.3.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^4.2.0", | ||
"tape": "^2.13.3", | ||
"uniq": "^1.0.1" | ||
}, | ||
"scripts": { | ||
"test": "tape test/*.js" | ||
}, | ||
"repository": { | ||
@@ -10,0 +25,0 @@ "type": "git", |
var fs = require('fs'); | ||
var tape = require('tape'); | ||
var verify = require('adventure-verify'); | ||
var unpack = require('browser-unpack'); | ||
var concat = require('concat-stream'); | ||
exports.show = function () { | ||
return fs.createReadStream(__dirname + '/problem.txt'); | ||
}; | ||
exports.problem = fs.createReadStream(__dirname + '/problem.txt'); | ||
exports.solution = fs.createReadStream(__dirname + '/solution.txt'); | ||
exports.verify = require('../../lib/verify.js')(function (args, t) { | ||
t.plan(2); | ||
t.ok(true, 'beep boop...'); | ||
t.equal(1+1, 2); | ||
exports.verify = verify({ modeReset: true }, function (args, t) { | ||
t.plan(4); | ||
process.stdin.pipe(concat(function (body) { | ||
try { var rows = unpack(body) } | ||
catch (err) { return t.fail('The input had a syntax error!') } | ||
if (!rows) return t.fail('The input is not a browserify bundle!'); | ||
t.equal(rows.length, 1, 'a single file in this bundle'); | ||
t.equal(rows[0].entry, true, 'single file should be an entry file'); | ||
t.deepEqual(rows[0].deps, {}, "shouldn't have any deps"); | ||
Function(['console'], body.toString())({ | ||
log: function (msg) { t.equal(msg, 'BEEP BOOP') }, | ||
error: console.error | ||
}); | ||
})); | ||
}); | ||
exports.run = function (args) { | ||
process.stdin.pipe(concat(function (body) { | ||
Function(body.toString())(); | ||
})); | ||
}; |
@@ -1,1 +0,21 @@ | ||
problem statement goes here... | ||
First of all, make sure you have `browserify` installed as a command in | ||
your $PATH. | ||
You can do this by running: | ||
npm install -g browserify | ||
If you get permission errors, try putting `sudo` in front of that command. | ||
Once you have browserify installed, write a program that prints the string | ||
'BEEP BOOP' using `console.log()`. | ||
Compile your program with `browserify` and pipe the bundle into | ||
`$ADVENTURE_COMMAND verify` like this: | ||
browserify main.js | $ADVENTURE_COMMAND verify | ||
If you just want to run your solution with the test input without verifying | ||
it you can do: | ||
browserify main.js | $ADVENTURE_COMMAND run |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
22135
25
368
28
5
3
6
8
+ Addedadventure-verify@^2.1.1
+ Addedbrowser-unpack@~0.2.3
+ Addedconcat-stream@^1.4.6
+ Addedfalafel@~0.3.1
+ Addedadventure@2.11.1(transitive)
+ Addedadventure-verify@2.2.0(transitive)
+ Addedbase64-js@0.0.2(transitive)
+ Addedbops@0.0.6(transitive)
+ Addedbrowser-unpack@0.2.3(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcolornames@0.0.2(transitive)
+ Addedconcat-stream@1.2.11.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddeep-equal@0.2.2(transitive)
+ Addeddefined@0.0.0(transitive)
+ Addedduplexer@0.1.2(transitive)
+ Addedduplexer2@0.0.2(transitive)
+ Addedesprima-fb@3001.1.0-dev-harmony-fb(transitive)
+ Addedfalafel@0.3.1(transitive)
+ Addedglob@3.2.11(transitive)
+ Addedhas@0.0.1(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedminimatch@0.3.0(transitive)
+ Addedminimist@0.0.50.2.4(transitive)
+ Addedobject-inspect@1.13.4(transitive)
+ Addedobject-keys@0.4.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedquotemeta@0.0.0(transitive)
+ Addedreadable-stream@1.0.341.1.142.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsigmund@1.0.1(transitive)
+ Addedsplit@0.3.3(transitive)
+ Addedstream-combiner@0.2.2(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedtap-colorize@1.2.0(transitive)
+ Addedtap-parser@0.5.0(transitive)
+ Addedtape@2.14.1(transitive)
+ Addedterminal-menu@2.1.1(transitive)
+ Addedthrough2@0.5.10.6.51.0.0(transitive)
+ Addedto-utf8@0.0.1(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvisualwidth@0.0.1(transitive)
+ Addedxtend@2.1.23.0.04.0.2(transitive)
- Removedadventure@1.1.0(transitive)
- Removedminimist@0.1.0(transitive)
- Removedterminal-menu@0.2.0(transitive)
Updatedadventure@^2.5.0