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

rollup-plugin-serve

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-serve - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

CHANGELOG.md

@@ -6,2 +6,4 @@ # Changelog

## [Unreleased]
### Added
- Default `contentBase` to current project folder

@@ -8,0 +10,0 @@ ## [0.1.0] - 2016-09-29

7

dist/index.cjs.js

@@ -12,3 +12,3 @@ 'use strict';

function serve (options) {
if ( options === void 0 ) options = {};
if ( options === void 0 ) options = { contentBase: '' };

@@ -26,3 +26,3 @@ if (Array.isArray(options) || typeof options === 'string') {

// Remove querystring
var urlPath = request.url.split('?')[0];
var urlPath = decodeURI(request.url.split('?')[0]);

@@ -51,4 +51,3 @@ readFileFromContentBase(options.contentBase, urlPath, function (error, content, filePath) {

} else if (options.historyApiFallback) {
filePath = path.resolve(options.contentBase, 'index.html');
fs.readFile(filePath, function (error, content) {
readFileFromContentBase(options.contentBase, '/index.html', function (error, content, filePath) {
if (error) {

@@ -55,0 +54,0 @@ notFound(response, filePath);

@@ -8,3 +8,3 @@ import { readFile } from 'fs';

function serve (options) {
if ( options === void 0 ) options = {};
if ( options === void 0 ) options = { contentBase: '' };

@@ -22,3 +22,3 @@ if (Array.isArray(options) || typeof options === 'string') {

// Remove querystring
var urlPath = request.url.split('?')[0];
var urlPath = decodeURI(request.url.split('?')[0]);

@@ -47,4 +47,3 @@ readFileFromContentBase(options.contentBase, urlPath, function (error, content, filePath) {

} else if (options.historyApiFallback) {
filePath = resolve(options.contentBase, 'index.html');
readFile(filePath, function (error, content) {
readFileFromContentBase(options.contentBase, '/index.html', function (error, content, filePath) {
if (error) {

@@ -51,0 +50,0 @@ notFound(response, filePath);

{
"name": "rollup-plugin-serve",
"version": "0.3.0",
"version": "0.4.0",
"description": "Serve your rolled up bundle",

@@ -35,10 +35,10 @@ "main": "dist/index.cjs.js",

"dependencies": {
"mime": "^1.3.4",
"opener": "^1.4.2"
"mime": "^1.3.6",
"opener": "^1.4.3"
},
"devDependencies": {
"rollup": "^0.36.4",
"rollup-plugin-buble": "^0.14.0",
"rollup": "^0.43.0",
"rollup-plugin-buble": "^0.15.0",
"rollup-watch": "^2.5.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