New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

broccoli

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli - npm Package Compare versions

Comparing version 0.13.0 to 0.13.1

lib/#cli.js#

6

CHANGELOG.md
# master
# 0.13.1
* Update dependencies to fix
[various low-severity vulnerabilities](https://github.com/broccolijs/broccoli/issues/196)
in `broccoli serve`
# 0.13.0

@@ -4,0 +10,0 @@

60

docs/symlink-change.md
# Symlink Behavior In Broccoli Plugins
**Summary:** We will soon be changing the contract between Broccoli plugins to
mandate that plugins follow symbolic links inside their input trees. This
includes recursing into symlinked directories.
**Summary:** We are changing the contract between Broccoli plugins to mandate
that plugins follow symbolic links inside their input trees. This includes
recursing into symlinked directories.

@@ -45,3 +45,3 @@ ## Background

The change will happen in two parts.
The change is happening in two parts.

@@ -52,4 +52,2 @@ ### Part 1: Transparently Follow Symlinks

This part is currently underway.
This change should be mostly non-breaking. Breakage can occur when there are

@@ -66,3 +64,3 @@ broken symlinks in source trees, which will now result in build failures; and

Notable places where we need to make changes are:
Here is what plugins need to do accept symlinks:

@@ -111,39 +109,47 @@ #### Use `stat` Instead Of `lstat`

#### Helper Packages
#### Use Up-To-Date Helper Packages
The node-walk-sync and broccoli-kitchen-sink-helpers helper packages currently
do not follow symlinks. We will soon release updated versions that do. If your
plugin uses either of those, make sure that you use a [floating version
spec](https://www.npmjs.org/doc/misc/semver.html#ranges) with "~" or "^" to
automatically get the update, like so:
If you are using node-walk-sync or broccoli-kitchen-sink-helpers, be sure to
use the latest versions, as they have been updated to follow symlinks:
```js
"dependencies": {
"walk-sync": "^0.1.2",
"broccoli-kitchen-sink-helpers": "^0.2.4"
"walk-sync": "^0.1.3",
"broccoli-kitchen-sink-helpers": "^0.2.5"
}
```
#### Auto-Dereference Symlinks
#### Do Not Crash On Broken Symlinks (Emacs Lockfiles)
Once we start using symlinks, the output trees generated by plugins may
contain symlinks.
Emacs in its default configuration creates lockfiles of the form `.#foo.js`,
which are broken symlinks. Trying to stat or open a broken symlink throws an
`ENOENT` exception. It would seem to be wise to not crash when Emacs lockfiles
appear in input trees.
Broccoli will start automatically dereferencing symlinks in a soon-to-be
released version, so that the output generated by `broccoli build` will only
contain regular files and directories.
When plugins iterate over all files in their input trees, they should
generally expect to encounter Emacs lockfiles and ignore them [like
so](https://github.com/joliss/node-walk-sync/blob/b2a3b178ea7bc681d4ab0221686e945f9453645e/index.js#L34-L38)
If you have custom builder code, you may need to invoke
This applies to directory traversal only. It is OK to crash when a file
explicitly specified by the user is a broken symlink.
#### Auto-Dereference Symlinks After Build
Once we start emitting symlinks, the final output tree generated by Broccoli
may contain symlinks into temporary directories.
As of version 0.13.0, Broccoli automatically dereferences symlinks (that is,
it replaces them with the files or directories they point to) when you call
`broccoli build`.
If you are maintaining code that uses Broccoli programmatically, use
[node-copy-dereference](https://github.com/broccolijs/node-copy-dereference)
on the final build output yourself.
at the end of each build to dereference symlinks, [like so](https://github.com/broccolijs/broccoli/blob/48e9b5f450f4dd59e424713c7a9c901b15bc6746/lib/cli.js#L33).
### Part 2: Emit Symlinks As An Optimization
* broccoli-merge-trees
* later: broccoli-filter
...
## Emacs Lock Files
## Performance Gains
...
var path = require('path')
var findup = require('findup-sync')
var Promise = require('rsvp').Promise
var RSVP = require('rsvp')

@@ -18,3 +18,3 @@

return Promise.resolve()
return RSVP.resolve()
.then(function () {

@@ -53,3 +53,3 @@ return readAndReturnNodeFor(self.tree) // call self.tree.read()

}
return Promise.resolve(nodeCache[index])
return RSVP.resolve(nodeCache[index])
}

@@ -66,3 +66,3 @@ var node = {

if (typeof tree === 'string') {
treeDirPromise = Promise.resolve()
treeDirPromise = RSVP.resolve()
.then(function () {

@@ -79,3 +79,3 @@ if (willReadStringTree) willReadStringTree(tree)

var readTreeRunning = false
treeDirPromise = Promise.resolve()
treeDirPromise = RSVP.resolve()
.then(function () {

@@ -93,3 +93,3 @@ return tree.read(function readTree (subtree) {

return Promise.resolve()
return RSVP.resolve()
.then(function () {

@@ -96,0 +96,0 @@ return readAndReturnNodeFor(subtree) // recurse

@@ -39,6 +39,5 @@ var Watcher = require('./watcher')

var liveReload = function() {
// We could pass files: glob.sync('**', {cwd: ...}), but this spams
// stdout with messages and Chrome LiveReload doesn't seem to care
// about the specific files.
livereloadServer.changed({body: {files: ['LiveReload files']}})
// Chrome LiveReload doesn't seem to care about the specific files as long
// as we pass something.
livereloadServer.changed({body: {files: ['livereload_dummy']}})
}

@@ -45,0 +44,0 @@

{
"name": "broccoli",
"description": "Fast client-side asset builder",
"version": "0.13.0",
"version": "0.13.1",
"author": "Jo Liss <joliss42@gmail.com>",
"main": "lib/index.js",
"license": "MIT",
"keywords": ["builder", "build", "frontend", "browser", "asset", "pipeline"],
"repository": {

@@ -15,12 +16,12 @@ "type": "git",

"commander": "^2.0.0",
"connect": "~2.14.1",
"connect": "^3.2.0",
"findup-sync": "^0.1.2",
"handlebars": "^1.3.0",
"handlebars": "^2.0.0",
"mime": "^1.2.11",
"copy-dereference": "^1.0.0",
"rsvp": "^3.0.6",
"tiny-lr": "0.0.5"
"tiny-lr": "^0.1.4"
},
"devDependencies": {
"jshint": "~2.3.0",
"jshint": "~2.5.6",
"tap": "^0.4.8"

@@ -27,0 +28,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc