Comparing version 7.2.0 to 8.0.0
#!/usr/bin/env node | ||
"use strict"; | ||
var _chunkE33JV7SQjs = require('./chunk-E33JV7SQ.js'); | ||
require('./chunk-NSPLMNA4.js'); | ||
var _chunk4NKJYYK3js = require('./chunk-4NKJYYK3.js'); | ||
require('./chunk-EPAEWGCP.js'); | ||
var _chunkGEVDEBBWjs = require('./chunk-GEVDEBBW.js'); | ||
require('./chunk-B7UJSB4N.js'); | ||
var _chunkUIX4URMVjs = require('./chunk-UIX4URMV.js'); | ||
require('./chunk-GQ77QZBO.js'); | ||
// src/cli-default.ts | ||
_chunkE33JV7SQjs.main.call(void 0, ).catch(_chunkGEVDEBBWjs.handleError); | ||
_chunk4NKJYYK3js.main.call(void 0, ).catch(_chunkUIX4URMVjs.handleError); |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkE33JV7SQjs = require('./chunk-E33JV7SQ.js'); | ||
require('./chunk-NSPLMNA4.js'); | ||
require('./chunk-B7UJSB4N.js'); | ||
var _chunk4NKJYYK3js = require('./chunk-4NKJYYK3.js'); | ||
require('./chunk-EPAEWGCP.js'); | ||
require('./chunk-GQ77QZBO.js'); | ||
exports.main = _chunkE33JV7SQjs.main; | ||
exports.main = _chunk4NKJYYK3js.main; |
#!/usr/bin/env node | ||
"use strict"; | ||
var _chunkE33JV7SQjs = require('./chunk-E33JV7SQ.js'); | ||
require('./chunk-NSPLMNA4.js'); | ||
var _chunk4NKJYYK3js = require('./chunk-4NKJYYK3.js'); | ||
require('./chunk-EPAEWGCP.js'); | ||
var _chunkGEVDEBBWjs = require('./chunk-GEVDEBBW.js'); | ||
require('./chunk-B7UJSB4N.js'); | ||
var _chunkUIX4URMVjs = require('./chunk-UIX4URMV.js'); | ||
require('./chunk-GQ77QZBO.js'); | ||
// src/cli-node.ts | ||
_chunkE33JV7SQjs.main.call(void 0, { | ||
_chunk4NKJYYK3js.main.call(void 0, { | ||
skipNodeModulesBundle: true | ||
}).catch(_chunkGEVDEBBWjs.handleError); | ||
}).catch(_chunkUIX4URMVjs.handleError); |
@@ -5,57 +5,2 @@ import { BuildOptions, Metafile, Plugin as Plugin$1, Loader } from 'esbuild'; | ||
/** Mark some properties as required, leaving others unchanged */ | ||
declare type MarkRequired<T, RK extends keyof T> = Exclude<T, RK> & Required<Pick<T, RK>>; | ||
type Logger = ReturnType<typeof createLogger>; | ||
declare const createLogger: (name?: string) => { | ||
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; | ||
}; | ||
type ChunkInfo = { | ||
type: 'chunk'; | ||
code: string; | ||
map?: string | RawSourceMap | null; | ||
path: string; | ||
/** | ||
* Sets the file mode | ||
*/ | ||
mode?: number; | ||
entryPoint?: string; | ||
exports?: string[]; | ||
imports?: Metafile['outputs'][string]['imports']; | ||
}; | ||
type RenderChunk = (this: PluginContext, code: string, chunkInfo: ChunkInfo) => MaybePromise<{ | ||
code: string; | ||
map?: object | string | SourceMap$1 | null; | ||
} | undefined | null | void>; | ||
type BuildStart = (this: PluginContext) => MaybePromise<void>; | ||
type BuildEnd = (this: PluginContext, ctx: { | ||
writtenFiles: WrittenFile[]; | ||
}) => MaybePromise<void>; | ||
type ModifyEsbuildOptions = (this: PluginContext, options: BuildOptions) => void; | ||
type Plugin = { | ||
name: string; | ||
esbuildOptions?: ModifyEsbuildOptions; | ||
buildStart?: BuildStart; | ||
renderChunk?: RenderChunk; | ||
buildEnd?: BuildEnd; | ||
}; | ||
type PluginContext = { | ||
format: Format; | ||
splitting?: boolean; | ||
options: NormalizedOptions; | ||
logger: Logger; | ||
}; | ||
type WrittenFile = { | ||
readonly name: string; | ||
readonly size: number; | ||
}; | ||
type TreeshakingStrategy = boolean | TreeshakingOptions | TreeshakingPreset; | ||
declare type GeneratedColumn = number; | ||
@@ -130,2 +75,3 @@ declare type SourcesIndex = number; | ||
type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020; | ||
@@ -330,2 +276,57 @@ | ||
/** Mark some properties as required, leaving others unchanged */ | ||
declare type MarkRequired<T, RK extends keyof T> = Exclude<T, RK> & Required<Pick<T, RK>>; | ||
type Logger = ReturnType<typeof createLogger>; | ||
declare const createLogger: (name?: string) => { | ||
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; | ||
}; | ||
type ChunkInfo = { | ||
type: 'chunk'; | ||
code: string; | ||
map?: string | RawSourceMap | null; | ||
path: string; | ||
/** | ||
* Sets the file mode | ||
*/ | ||
mode?: number; | ||
entryPoint?: string; | ||
exports?: string[]; | ||
imports?: Metafile['outputs'][string]['imports']; | ||
}; | ||
type RenderChunk = (this: PluginContext, code: string, chunkInfo: ChunkInfo) => MaybePromise<{ | ||
code: string; | ||
map?: object | string | SourceMap$1 | null; | ||
} | undefined | null | void>; | ||
type BuildStart = (this: PluginContext) => MaybePromise<void>; | ||
type BuildEnd = (this: PluginContext, ctx: { | ||
writtenFiles: WrittenFile[]; | ||
}) => MaybePromise<void>; | ||
type ModifyEsbuildOptions = (this: PluginContext, options: BuildOptions) => void; | ||
type Plugin = { | ||
name: string; | ||
esbuildOptions?: ModifyEsbuildOptions; | ||
buildStart?: BuildStart; | ||
renderChunk?: RenderChunk; | ||
buildEnd?: BuildEnd; | ||
}; | ||
type PluginContext = { | ||
format: Format; | ||
splitting?: boolean; | ||
options: NormalizedOptions; | ||
logger: Logger; | ||
}; | ||
type WrittenFile = { | ||
readonly name: string; | ||
readonly size: number; | ||
}; | ||
type TreeshakingStrategy = boolean | TreeshakingOptions | TreeshakingPreset; | ||
type KILL_SIGNAL = 'SIGKILL' | 'SIGTERM'; | ||
@@ -360,2 +361,10 @@ type Format = 'cjs' | 'esm' | 'iife'; | ||
}; | ||
type ExperimentalDtsConfig = { | ||
entry?: InputOption; | ||
/** | ||
* Overrides `compilerOptions` | ||
* This option takes higher priority than `compilerOptions` in tsconfig.json | ||
*/ | ||
compilerOptions?: any; | ||
}; | ||
type BannerOrFooter = { | ||
@@ -419,2 +428,3 @@ js?: string; | ||
dts?: boolean | string | DtsConfig; | ||
experimentalDts?: boolean | string | ExperimentalDtsConfig; | ||
sourcemap?: boolean | 'inline'; | ||
@@ -432,4 +442,5 @@ /** Always bundle modules matching given patterns */ | ||
* Code splitting | ||
* Default to `true` | ||
* You may want to disable code splitting sometimes: [`#255`](https://github.com/egoist/tsup/issues/255) | ||
* Default to `true` for ESM, `false` for CJS. | ||
* | ||
* You can set it to `true` explicitly, and may want to disable code splitting sometimes: [`#255`](https://github.com/egoist/tsup/issues/255) | ||
*/ | ||
@@ -527,4 +538,11 @@ splitting?: boolean; | ||
}; | ||
type NormalizedOptions = Omit<MarkRequired<Options, 'entry' | 'outDir'>, 'dts' | 'format'> & { | ||
interface NormalizedExperimentalDtsConfig { | ||
entry: { | ||
[entryAlias: string]: string; | ||
}; | ||
compilerOptions?: any; | ||
} | ||
type NormalizedOptions = Omit<MarkRequired<Options, 'entry' | 'outDir'>, 'dts' | 'experimentalDts' | 'format'> & { | ||
dts?: DtsConfig; | ||
experimentalDts?: NormalizedExperimentalDtsConfig; | ||
tsconfigResolvePaths: Record<string, string[]>; | ||
@@ -531,0 +549,0 @@ tsconfigDecoratorMetadata?: boolean; |
{ | ||
"name": "tsup", | ||
"version": "7.2.0", | ||
"version": "8.0.0", | ||
"description": "Bundle your TypeScript library with no config, powered by esbuild", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.js", | ||
"debug": "^4.3.1", | ||
"esbuild": "^0.18.2", | ||
"esbuild": "^0.19.2", | ||
"execa": "^5.0.0", | ||
@@ -42,3 +42,3 @@ "globby": "^11.0.3", | ||
"resolve-from": "^5.0.0", | ||
"rollup": "^3.2.5", | ||
"rollup": "^4.0.2", | ||
"source-map": "0.8.0-beta.0", | ||
@@ -49,3 +49,4 @@ "sucrase": "^3.20.3", | ||
"devDependencies": { | ||
"@rollup/plugin-json": "5.0.1", | ||
"@microsoft/api-extractor": "^7.38.3", | ||
"@rollup/plugin-json": "6.0.1", | ||
"@swc/core": "1.2.218", | ||
@@ -65,4 +66,3 @@ "@types/debug": "4.1.7", | ||
"resolve": "1.20.0", | ||
"rollup-plugin-dts": "5.3.0", | ||
"rollup-plugin-hashbang": "3.0.0", | ||
"rollup-plugin-dts": "6.1.0", | ||
"sass": "1.62.1", | ||
@@ -82,4 +82,5 @@ "strip-json-comments": "4.0.0", | ||
"@swc/core": "^1", | ||
"@microsoft/api-extractor": "^7.36.0", | ||
"postcss": "^8.4.12", | ||
"typescript": ">=4.1.0" | ||
"typescript": ">=4.5.0" | ||
}, | ||
@@ -95,8 +96,11 @@ "peerDependenciesMeta": { | ||
"optional": true | ||
}, | ||
"@microsoft/api-extractor": { | ||
"optional": true | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=16.14" | ||
"node": ">=18" | ||
}, | ||
"packageManager": "pnpm@8.6.0" | ||
"packageManager": "pnpm@8.10.5" | ||
} |
@@ -19,2 +19,4 @@ # tsup | ||
yarn add tsup --dev | ||
# Or pnpm | ||
pnpm add tsup -D | ||
``` | ||
@@ -21,0 +23,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
74
501149
18
12892
25
+ Added@esbuild/aix-ppc64@0.19.12(transitive)
+ Added@esbuild/android-arm@0.19.12(transitive)
+ Added@esbuild/android-arm64@0.19.12(transitive)
+ Added@esbuild/android-x64@0.19.12(transitive)
+ Added@esbuild/darwin-arm64@0.19.12(transitive)
+ Added@esbuild/darwin-x64@0.19.12(transitive)
+ Added@esbuild/freebsd-arm64@0.19.12(transitive)
+ Added@esbuild/freebsd-x64@0.19.12(transitive)
+ Added@esbuild/linux-arm@0.19.12(transitive)
+ Added@esbuild/linux-arm64@0.19.12(transitive)
+ Added@esbuild/linux-ia32@0.19.12(transitive)
+ Added@esbuild/linux-loong64@0.19.12(transitive)
+ Added@esbuild/linux-mips64el@0.19.12(transitive)
+ Added@esbuild/linux-ppc64@0.19.12(transitive)
+ Added@esbuild/linux-riscv64@0.19.12(transitive)
+ Added@esbuild/linux-s390x@0.19.12(transitive)
+ Added@esbuild/linux-x64@0.19.12(transitive)
+ Added@esbuild/netbsd-x64@0.19.12(transitive)
+ Added@esbuild/openbsd-x64@0.19.12(transitive)
+ Added@esbuild/sunos-x64@0.19.12(transitive)
+ Added@esbuild/win32-arm64@0.19.12(transitive)
+ Added@esbuild/win32-ia32@0.19.12(transitive)
+ Added@esbuild/win32-x64@0.19.12(transitive)
+ Added@microsoft/api-extractor@7.47.8(transitive)
+ Added@microsoft/api-extractor-model@7.29.7(transitive)
+ Added@microsoft/tsdoc@0.15.0(transitive)
+ Added@microsoft/tsdoc-config@0.17.0(transitive)
+ Added@rollup/rollup-android-arm-eabi@4.21.3(transitive)
+ Added@rollup/rollup-android-arm64@4.21.3(transitive)
+ Added@rollup/rollup-darwin-arm64@4.21.3(transitive)
+ Added@rollup/rollup-darwin-x64@4.21.3(transitive)
+ Added@rollup/rollup-linux-arm-gnueabihf@4.21.3(transitive)
+ Added@rollup/rollup-linux-arm-musleabihf@4.21.3(transitive)
+ Added@rollup/rollup-linux-arm64-gnu@4.21.3(transitive)
+ Added@rollup/rollup-linux-arm64-musl@4.21.3(transitive)
+ Added@rollup/rollup-linux-powerpc64le-gnu@4.21.3(transitive)
+ Added@rollup/rollup-linux-riscv64-gnu@4.21.3(transitive)
+ Added@rollup/rollup-linux-s390x-gnu@4.21.3(transitive)
+ Added@rollup/rollup-linux-x64-gnu@4.21.3(transitive)
+ Added@rollup/rollup-linux-x64-musl@4.21.3(transitive)
+ Added@rollup/rollup-win32-arm64-msvc@4.21.3(transitive)
+ Added@rollup/rollup-win32-ia32-msvc@4.21.3(transitive)
+ Added@rollup/rollup-win32-x64-msvc@4.21.3(transitive)
+ Added@rushstack/node-core-library@5.8.0(transitive)
+ Added@rushstack/rig-package@0.5.3(transitive)
+ Added@rushstack/terminal@0.14.1(transitive)
+ Added@rushstack/ts-command-line@4.22.7(transitive)
+ Added@types/argparse@1.0.38(transitive)
+ Added@types/estree@1.0.5(transitive)
+ Addedajv@8.12.08.13.0(transitive)
+ Addedajv-draft-04@1.0.0(transitive)
+ Addedajv-formats@3.0.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedesbuild@0.19.12(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfs-extra@7.0.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedimport-lazy@4.0.0(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedjju@1.4.0(transitive)
+ Addedjson-schema-traverse@1.0.0(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedminimatch@3.0.8(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedrequire-from-string@2.0.2(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedrollup@4.21.3(transitive)
+ Addedsemver@7.5.4(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstring-argv@0.3.2(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@8.1.1(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtypescript@5.4.2(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedyallist@4.0.0(transitive)
- Removed@esbuild/android-arm@0.18.20(transitive)
- Removed@esbuild/android-arm64@0.18.20(transitive)
- Removed@esbuild/android-x64@0.18.20(transitive)
- Removed@esbuild/darwin-arm64@0.18.20(transitive)
- Removed@esbuild/darwin-x64@0.18.20(transitive)
- Removed@esbuild/freebsd-arm64@0.18.20(transitive)
- Removed@esbuild/freebsd-x64@0.18.20(transitive)
- Removed@esbuild/linux-arm@0.18.20(transitive)
- Removed@esbuild/linux-arm64@0.18.20(transitive)
- Removed@esbuild/linux-ia32@0.18.20(transitive)
- Removed@esbuild/linux-loong64@0.18.20(transitive)
- Removed@esbuild/linux-mips64el@0.18.20(transitive)
- Removed@esbuild/linux-ppc64@0.18.20(transitive)
- Removed@esbuild/linux-riscv64@0.18.20(transitive)
- Removed@esbuild/linux-s390x@0.18.20(transitive)
- Removed@esbuild/linux-x64@0.18.20(transitive)
- Removed@esbuild/netbsd-x64@0.18.20(transitive)
- Removed@esbuild/openbsd-x64@0.18.20(transitive)
- Removed@esbuild/sunos-x64@0.18.20(transitive)
- Removed@esbuild/win32-arm64@0.18.20(transitive)
- Removed@esbuild/win32-ia32@0.18.20(transitive)
- Removed@esbuild/win32-x64@0.18.20(transitive)
- Removedesbuild@0.18.20(transitive)
- Removedrollup@3.29.4(transitive)
Updatedesbuild@^0.19.2
Updatedrollup@^4.0.2