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

bunshine

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunshine - npm Package Compare versions

Comparing version 0.12.2 to 0.12.3

2

package.json
{
"name": "bunshine",
"version": "0.12.2",
"version": "0.12.3",
"module": "server/server.ts",

@@ -5,0 +5,0 @@ "type": "module",

@@ -1,7 +0,7 @@

<img alt="Bunshine Logo" src="https://github.com/kensnyder/bunshine/raw/main/assets/bunshine-logo.png?v=0.12.2" width="200" height="187" />
<img alt="Bunshine Logo" src="https://github.com/kensnyder/bunshine/raw/main/assets/bunshine-logo.png?v=0.12.3" width="200" height="187" />
[![NPM Link](https://img.shields.io/npm/v/bunshine?v=0.12.2)](https://npmjs.com/package/bunshine)
[![Dependencies](https://badgen.net/static/dependencies/3/green?v=0.12.2)](https://www.npmjs.com/package/bunshine?activeTab=dependencies)
![Test Coverage: 97%](https://badgen.net/static/test%20coverage/96%25/green?v=0.12.2)
[![ISC License](https://img.shields.io/npm/l/bunshine.svg?v=0.12.2)](https://opensource.org/licenses/ISC)
[![NPM Link](https://img.shields.io/npm/v/bunshine?v=0.12.3)](https://npmjs.com/package/bunshine)
[![Dependencies](https://badgen.net/static/dependencies/3/green?v=0.12.3)](https://www.npmjs.com/package/bunshine?activeTab=dependencies)
![Test Coverage: 97%](https://badgen.net/static/test%20coverage/97%25/green?v=0.12.3)
[![ISC License](https://img.shields.io/npm/l/bunshine.svg?v=0.12.3)](https://opensource.org/licenses/ISC)

@@ -8,0 +8,0 @@ # Bunshine

@@ -84,3 +84,3 @@ import type { BunFile, Server } from 'bun';

}
/** A shorthand for `new Response(fileBody, fileHeaders)` */
/** A shorthand for `new Response(bunFile, fileHeaders)` */
async file(

@@ -87,0 +87,0 @@ filenameOrBunFile: string | BunFile,

@@ -42,3 +42,4 @@ import { BunFile } from 'bun';

) {
return new Response(file, {
const body = process.versions.bun ? file : await file.arrayBuffer();
return new Response(body, {
status: 200,

@@ -45,0 +46,0 @@ headers: {

@@ -64,4 +64,5 @@ import type { BunFile } from 'bun';

} else {
const body = process.versions.bun ? file : await file.arrayBuffer();
// not in zipped cache; return original file
return new Response(file, {
return new Response(body, {
status: 200,

@@ -68,0 +69,0 @@ headers: {

@@ -95,7 +95,7 @@ import type { ServeOptions, Server } from 'bun';

}
listen(options: ListenOptions) {
if (typeof options === 'number') {
options = { port: options };
listen(portOrOptions: ListenOptions) {
if (typeof portOrOptions === 'number') {
portOrOptions = { port: portOrOptions };
}
const server = Bun.serve(this.getExport(options));
const server = Bun.serve(this.getExport(portOrOptions));
this.server = server;

@@ -102,0 +102,0 @@ return server;

@@ -244,6 +244,7 @@ import { BunFile } from 'bun';

} else {
const body = process.versions.bun ? file : await file.arrayBuffer();
// Bun will automatically set content-type and content-length,
// but delays until the response is actually sent, but middleware might
// want to know the file details ahead of time
response = new Response(file, {
response = new Response(body, {
headers: {

@@ -250,0 +251,0 @@ 'Content-Length': String(file.size),

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