You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

tsup

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.10.3 to 5.11.0

dist/chunk-BLVOTVP5.js

7

assets/cjs_shims.js
// Shim globals in cjs bundle
// There's a weird bug that esbuild will always inject importMetaUrl
// if we export it as `const importMetaUrl = ... __filename ...`
// But using a function will not cause this issue
export const importMetaUrlShim =
const getImportMetaUrl = () =>
typeof document === 'undefined'

@@ -8,1 +11,3 @@ ? new URL('file:' + __filename).href

new URL('main.js', document.baseURI).href
export const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()

7

assets/esm_shims.js

@@ -5,5 +5,6 @@ // Shim globals in esm bundle

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const getFilename = () => fileURLToPath(import.meta.url)
const getDirname = () => path.dirname(getFilename())
export { __dirname, __filename }
export const __dirname = /* @__PURE__ */ getDirname()
export const __filename = /* @__PURE__ */ getFilename()
#!/usr/bin/env node
"use strict";
var _chunk22UE3GRKjs = require('./chunk-22UE3GRK.js');
var _chunkDFU55JEPjs = require('./chunk-DFU55JEP.js');
var _chunk4236V5B2js = require('./chunk-4236V5B2.js');
var _chunkQ4LTJ56Mjs = require('./chunk-Q4LTJ56M.js');
var _chunkTCOZ6O7Ajs = require('./chunk-TCOZ6O7A.js');
var _chunkRR5S67XRjs = require('./chunk-RR5S67XR.js');
// src/cli-default.ts
_chunkTCOZ6O7Ajs.init_cjs_shims.call(void 0, );
_chunk22UE3GRKjs.main.call(void 0, ).catch(_chunk4236V5B2js.handleError);
_chunkRR5S67XRjs.init_cjs_shims.call(void 0, );
_chunkDFU55JEPjs.main.call(void 0, ).catch(_chunkQ4LTJ56Mjs.handleError);
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunk22UE3GRKjs = require('./chunk-22UE3GRK.js');
require('./chunk-TCOZ6O7A.js');
var _chunkDFU55JEPjs = require('./chunk-DFU55JEP.js');
require('./chunk-RR5S67XR.js');
exports.main = _chunk22UE3GRKjs.main;
exports.main = _chunkDFU55JEPjs.main;
#!/usr/bin/env node
"use strict";
var _chunk22UE3GRKjs = require('./chunk-22UE3GRK.js');
var _chunkDFU55JEPjs = require('./chunk-DFU55JEP.js');
var _chunk4236V5B2js = require('./chunk-4236V5B2.js');
var _chunkQ4LTJ56Mjs = require('./chunk-Q4LTJ56M.js');
var _chunkTCOZ6O7Ajs = require('./chunk-TCOZ6O7A.js');
var _chunkRR5S67XRjs = require('./chunk-RR5S67XR.js');
// src/cli-node.ts
_chunkTCOZ6O7Ajs.init_cjs_shims.call(void 0, );
_chunk22UE3GRKjs.main.call(void 0, {
_chunkRR5S67XRjs.init_cjs_shims.call(void 0, );
_chunkDFU55JEPjs.main.call(void 0, {
skipNodeModulesBundle: true
}).catch(_chunk4236V5B2js.handleError);
}).catch(_chunkQ4LTJ56Mjs.handleError);

@@ -1,3 +0,4 @@

import { BuildOptions, Plugin, Loader } from 'esbuild';
import { Metafile, BuildOptions, Plugin as Plugin$1, Loader } from 'esbuild';
import { InputOption } from 'rollup';
import { RawSourceMap } from 'source-map';

@@ -7,2 +8,46 @@ /** Mark some properties as required, leaving others unchanged */

declare type Logger = ReturnType<typeof createLogger>;
declare const createLogger: (name?: string | undefined) => {
setName(_name: string): void;
success(label: string, ...args: any[]): void;
info(label: string, ...args: any[]): void;
error(label: string, ...args: any[]): void;
warn(label: string, ...args: any[]): void;
log(label: string, type: 'info' | 'success' | 'error' | 'warn', ...data: unknown[]): void;
};
declare type ChunkInfo = {
type: 'chunk';
code: string;
map?: string | RawSourceMap | null;
path: string;
/**
* Sets the file mode
*/
mode?: number;
};
declare type MaybePromise<T> = T | Promise<T>;
declare type RenderChunk = (this: PluginContext, code: string, chunkInfo: ChunkInfo) => MaybePromise<{
code: string;
map?: object | string;
} | undefined | null | void>;
declare type BuildStart = (this: PluginContext) => MaybePromise<void>;
declare type BuildEnd = (this: PluginContext, ctx: {
metafile?: Metafile;
}) => MaybePromise<void>;
declare type ModifyEsbuildOptions = (this: PluginContext, options: BuildOptions) => void;
declare type Plugin = {
name: string;
esbuildOptions?: ModifyEsbuildOptions;
buildStart?: BuildStart;
renderChunk?: RenderChunk;
buildEnd?: BuildEnd;
};
declare type PluginContext = {
format: Format;
splitting?: boolean;
options: NormalizedOptions;
logger: Logger;
};
declare type Format = 'cjs' | 'esm' | 'iife';

@@ -58,3 +103,3 @@ declare type DtsConfig = {

dts?: boolean | string | DtsConfig;
sourcemap?: BuildOptions['sourcemap'];
sourcemap?: boolean;
/** Always bundle modules matching given patterns */

@@ -64,4 +109,2 @@ noExternal?: (string | RegExp)[];

external?: (string | RegExp)[];
/** Transform the result with `@babel/core` */
babel?: boolean;
/**

@@ -82,3 +125,3 @@ * Replace `process.env.NODE_ENV` with `production` or `development`

clean?: boolean | string[];
esbuildPlugins?: Plugin[];
esbuildPlugins?: Plugin$1[];
esbuildOptions?: (options: BuildOptions, context: {

@@ -132,2 +175,18 @@ format: Format;

tsconfig?: string;
/**
* Inject CSS as style tags to document head
* @default {false}
*/
injectStyle?: boolean;
/**
* Inject cjs and esm shims if needed
* @default {true}
*/
shims?: boolean;
/**
* TSUP plugins
* @experimental
* @alpha
*/
plugins?: Plugin[];
};

@@ -134,0 +193,0 @@

{
"name": "tsup",
"version": "5.10.3",
"version": "5.11.0",
"main": "dist/index.js",

@@ -32,11 +32,11 @@ "bin": {

"require": [
"sucrase//register"
"sucrase/register"
]
},
"dependencies": {
"bundle-require": "^2.1.7",
"bundle-require": "^2.1.8",
"cac": "^6.7.12",
"chokidar": "^3.5.1",
"debug": "^4.3.1",
"esbuild": "^0.13.15",
"esbuild": "^0.14.2",
"execa": "^5.0.0",

@@ -48,11 +48,9 @@ "globby": "^11.0.3",

"rollup": "^2.60.0",
"sucrase": "^3.20.1",
"source-map": "^0.7.3",
"sucrase": "^3.20.3",
"tree-kill": "^1.2.2"
},
"devDependencies": {
"@babel/core": "^7.13.15",
"@rollup/plugin-json": "^4.1.0",
"@swc/core": "^1.2.112",
"@types/babel__core": "^7.1.16",
"@types/buble": "^0.19.2",
"@types/debug": "^4.1.5",

@@ -64,3 +62,2 @@ "@types/flat": "^5.0.2",

"ava": "^4.0.0-rc.1",
"buble": "^0.20.0",
"colorette": "^2.0.16",

@@ -80,3 +77,3 @@ "consola": "^2.15.3",

"tsconfig-paths": "^3.12.0",
"tsup": "^5.10.0",
"tsup": "^5.10.3",
"typescript": "^4.2.4",

@@ -83,0 +80,0 @@ "wait-for-expect": "^3.0.2"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc