buster-coffee
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -11,2 +11,3 @@ var coffee = require("coffee-script"); | ||
path: jsPath, | ||
etag: coffeeResource.etag, | ||
content: function () { | ||
@@ -13,0 +14,0 @@ if (coffeeResource.encoding === "base64") { |
{ | ||
"name": "buster-coffee", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Buster.JS extension: Automatically compile CoffeeScript files before running tests", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jodal/buster-coffee", |
# buster-coffee | ||
[![Build Status](https://secure.travis-ci.org/jodal/buster-coffee.png)](http://travis-ci.org/jodal/buster-coffee) | ||
An extension for [Buster.JS](http://busterjs.org) to automatically compile your | ||
@@ -34,2 +36,11 @@ [CoffeeScript](http://coffeescript.org) files before running tests. | ||
## Example web project using AMD/RequireJS | ||
If you are using buster-amd, you don't need buster-coffee to compile | ||
your CoffeeScript files, but can instead use e.g. the require-cs AMD loader | ||
plugin. See the `demo-amd/` dir for an extensive example project, using | ||
Buster.JS to test AMD modules written in CoffeeScript and loaded with | ||
RequireJS. | ||
## Node.js and `require()` | ||
@@ -45,2 +56,8 @@ | ||
### 0.1.4 (2013-01-06) | ||
- Set the ETag on the generated JavaScript resource to the same as the original | ||
CoffeeScript resource. This ensures that any generated JavaScript cached by | ||
Buster.JS will be invalidated when the CoffeeScript source changes. | ||
### 0.1.3 (2012-05-24) | ||
@@ -47,0 +64,0 @@ |
@@ -12,2 +12,3 @@ var buster = require("buster"); | ||
path: "/bar.js", | ||
etag: "22eea2d643fdeb0867fb4233a334cd04a3490652", | ||
content: "var bar = 7;" | ||
@@ -19,2 +20,3 @@ }); | ||
path: "/cafe.coffee", | ||
etag: "9996f32e9ec29ec814ab89182bb4dd05d36e13f6", | ||
content: "a = 42", | ||
@@ -27,2 +29,3 @@ encoding: "utf-8" // This should not be base64 encoded | ||
path: "/diner.js", | ||
etag: "212e9b7214acf4f2df671a0679e8167a9c230324", | ||
content: "bar = 8;" | ||
@@ -67,2 +70,12 @@ }); | ||
"reuse the etag of the .coffee resource on the .js resource": function () { | ||
extension.configure(this.config); | ||
this.config.emit("load:resources", this.resourceSet); | ||
var coffeeResource = this.resourceSet.get("/cafe.coffee"); | ||
var jsResource = this.resourceSet.get("/cafe.coffee.js"); | ||
assert.defined(coffeeResource.etag); | ||
assert.equals(coffeeResource.etag, jsResource.etag); | ||
}, | ||
"handles base64 encoded .coffee resources": function (done) { | ||
@@ -76,3 +89,3 @@ // XXX resource.mimeType() may think that .coffee files are binary | ||
path: "/more.coffee", | ||
content: new Buffer("b = 42").toString('base64') | ||
content: new Buffer("b = 42").toString("base64") | ||
}); | ||
@@ -94,4 +107,4 @@ this.resourceSet.loadPath.append("/more.coffee"); | ||
path: "/invalid.coffee", | ||
content: '. # invalid CoffeeScript', | ||
encoding: 'utf-8' | ||
content: ". # invalid CoffeeScript", | ||
encoding: "utf-8" | ||
}); | ||
@@ -98,0 +111,0 @@ this.resourceSet.loadPath.append("/invalid.coffee"); |
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
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 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
2056693
107
44467
84
1
2
17
7