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

bun-repl

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bun-repl - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

package.json
{
"type": "module",
"name": "bun-repl",
"version": "2.0.3",
"version": "2.0.4",
"description": "Experimental REPL for Bun",

@@ -6,0 +6,0 @@ "main": "src/module/repl.ts",

@@ -23,3 +23,3 @@ #!/usr/bin/env bun

const validFlags = [
'-h', '--help', '-e', '--eval', '-p', '--print', '--debug'
'-h', '--help', '-e', '--eval', '-p', '--print', '--debug', '--sloppy'
] as const;

@@ -46,2 +46,3 @@ if (process.argv.length > 2) {

-e, --eval <...> Evaluates given code and silently exits.
--sloppy Runs the REPL in sloppy mode.

@@ -48,0 +49,0 @@ * Options with <...> as argument must be passed last.

@@ -6,3 +6,3 @@ import swc from '@swc/core';

sourceMaps: true,
isModule: true,
isModule: !process.argv.includes('--sloppy'),
minify: false,

@@ -9,0 +9,0 @@ swcrc: false,

@@ -14,2 +14,3 @@ import swc from '@swc/core';

const safeUUID = () => StringReplaceAll(randomUUID(), '-', '') as string;
const SLOPPY_MODE = process.argv.includes('--sloppy');

@@ -52,3 +53,3 @@ export default class Transpiler extends swc.Compiler {

let importsData = [] as ({ requireVar: string, requireStr: string, info: replTranspiledImportInfo, uuid: string })[];
code = '"use strict";void 0;' + code
code = (SLOPPY_MODE ? '' : '"use strict";void 0;') + code
.replaceAll(/(?:var|let|const) (_.+?) = require\("(.+?)"\);[ \t\n;]*\/\*\$replTranspiledImport:({.+?})\*\//g,

@@ -55,0 +56,0 @@ ($0, requireVar: string, requireStr: string, infoStr: string) => {

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