Socket
Socket
Sign inDemoInstall

rollup

Package Overview
Dependencies
Maintainers
1
Versions
818
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

6

CHANGELOG.md
# rollup changelog
## 0.5.0
* Command line interface
* Sourcemap generation
* Correct behaviour with `export { x as y } from 'z'`
## 0.4.1

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

38

dist/rollup.js

@@ -732,2 +732,8 @@ 'use strict';

walk(ast, {
enter: function (node) {
_this.magicString.addSourcemapLocation(node.start);
}
});
this.statements = ast.body.map(function (node) {

@@ -738,2 +744,3 @@ var magicString = _this.magicString.snip(node.start, node.end);

} catch (err) {
err.code = 'PARSE_ERROR';
err.file = path$$;

@@ -820,3 +827,3 @@ throw err;

localName: localName,
name: exportedName
name: localName
};

@@ -1379,10 +1386,16 @@ }

return {
code: magicString.toString(),
map: magicString.generateMap({
includeContent: true,
file: options.dest
// TODO
})
};
var code = magicString.toString();
var map = magicString.generateMap({
includeContent: true,
file: options.sourceMapFile || options.dest
// TODO
});
// make sources relative. TODO fix this upstream?
var dir = path.dirname(map.file);
map.sources = map.sources.map(function (source) {
return source ? path.relative(dir, source) : null;
});
return { code: code, map: map };
};

@@ -1442,3 +1455,8 @@

format: options.format,
globalName: options.globalName
globalName: options.globalName,
// sourcemap options
sourceMap: options.sourceMap,
sourceMapFile: options.sourceMapFile,
sourceMapRoot: options.sourceMapRoot
});

@@ -1445,0 +1463,0 @@

{
"name": "rollup",
"version": "0.4.1",
"version": "0.5.0",
"description": "Next-generation ES6 module bundler",
"main": "dist/rollup.js",
"jsnext:main": "src/rollup.js",
"bin": {
"rollup": "./bin/index.js"
},
"scripts": {

@@ -39,7 +42,10 @@ "test": "mocha",

"mocha": "^2.2.4",
"source-map-support": "^0.2.10"
"source-map-support": "^0.2.10",
"source-map": "^0.1.40"
},
"dependencies": {
"acorn": "^1.1.0",
"magic-string": "^0.5.1",
"chalk": "^1.0.0",
"magic-string": "^0.5.3",
"minimist": "^1.1.1",
"sander": "^0.3.3"

@@ -46,0 +52,0 @@ },

@@ -1,2 +0,2 @@

import { basename, dirname, extname, resolve } from 'path';
import { basename, dirname, extname, relative, resolve } from 'path';
import { readFile, Promise } from 'sander';

@@ -276,10 +276,16 @@ import MagicString from 'magic-string';

return {
code: magicString.toString(),
map: magicString.generateMap({
includeContent: true,
file: options.dest
// TODO
})
};
const code = magicString.toString();
let map = magicString.generateMap({
includeContent: true,
file: options.sourceMapFile || options.dest
// TODO
});
// make sources relative. TODO fix this upstream?
const dir = dirname( map.file );
map.sources = map.sources.map( source => {
return source ? relative( dir, source ) : null
});
return { code, map };
}

@@ -286,0 +292,0 @@

@@ -6,2 +6,3 @@ import { relative } from 'path';

import Statement from './Statement';
import walk from './ast/walk';
import analyse from './ast/analyse';

@@ -40,2 +41,8 @@ import { blank, has, keys } from './utils/object';

walk( ast, {
enter: node => {
this.magicString.addSourcemapLocation( node.start );
}
});
this.statements = ast.body.map( node => {

@@ -46,2 +53,3 @@ const magicString = this.magicString.snip( node.start, node.end );

} catch ( err ) {
err.code = 'PARSE_ERROR';
err.file = path;

@@ -126,3 +134,3 @@ throw err;

localName,
name: exportedName
name: localName
};

@@ -129,0 +137,0 @@ }

@@ -21,3 +21,8 @@ import { basename } from 'path';

format: options.format,
globalName: options.globalName
globalName: options.globalName,
// sourcemap options
sourceMap: options.sourceMap,
sourceMapFile: options.sourceMapFile,
sourceMapRoot: options.sourceMapRoot
});

@@ -24,0 +29,0 @@

Sorry, the diff of this file is not supported yet

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