tsdown 0.11.4 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { UserConfig, UserConfigFn } from "./options-D9qjlfFP.js";
1
+ import { UserConfig, UserConfigFn } from "./options-BPeORY5t.js";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  /**
package/dist/config.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { UserConfig, UserConfigFn } from "./options-D9qjlfFP.js";
2
- import { defineConfig$1 as defineConfig } from "./config-CQUFL4vH.js";
1
+ import { UserConfig, UserConfigFn } from "./options-BPeORY5t.js";
2
+ import { defineConfig$1 as defineConfig } from "./config-DQE4wDWb.js";
3
3
  export { UserConfig, UserConfigFn, defineConfig };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { BuildContext, Options, ResolvedOptions, TsdownHooks, UserConfig, UserConfigFn } from "./options-D9qjlfFP.js";
2
- import { defineConfig$1 as defineConfig } from "./config-CQUFL4vH.js";
1
+ import { BuildContext, Options, ResolvedOptions, TsdownHooks, UserConfig, UserConfigFn } from "./options-BPeORY5t.js";
2
+ import { defineConfig$1 as defineConfig } from "./config-DQE4wDWb.js";
3
3
 
4
4
  //#region src/utils/logger.d.ts
5
5
  declare class Logger {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from "./config-yiJy1jd0.js";
2
- import { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin, fsCopy, fsRemove, fsStat, getPackageType, lowestCommonAncestor, normalizeFormat, prettyFormat, readPackageJson } from "./plugins-BPU33dye.js";
2
+ import { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin, fsCopy, fsRemove, fsStat, getPackageType, lowestCommonAncestor, normalizeFormat, prettyFormat, readPackageJson } from "./plugins-CPt-D0Cs.js";
3
3
  import { debounce, resolveComma, slash, toArray } from "./general-CPYs4M61.js";
4
4
  import { logger } from "./logger-DYeY_1KP.js";
5
5
  import path from "node:path";
@@ -622,6 +622,7 @@ async function buildSingle(config, clean) {
622
622
  async function getBuildOptions(config, format, cjsDts) {
623
623
  const { entry, external, plugins: userPlugins, outDir, platform, alias, treeshake, sourcemap, dts, minify, unused, target, define, shims, tsconfig, cwd, report, env, removeNodeProtocol, loader } = config;
624
624
  const plugins = [];
625
+ if (removeNodeProtocol) plugins.push(NodeProtocolPlugin());
625
626
  if (config.pkg || config.skipNodeModulesBundle) plugins.push(ExternalPlugin(config));
626
627
  if (dts) {
627
628
  const { dts: dtsPlugin } = await import("rolldown-plugin-dts");
@@ -654,7 +655,6 @@ async function getBuildOptions(config, format, cjsDts) {
654
655
  await LightningCSSPlugin({ target })
655
656
  );
656
657
  plugins.push(userPlugins);
657
- if (removeNodeProtocol) plugins.push(NodeProtocolPlugin());
658
658
  const inputOptions = await mergeUserOptions({
659
659
  input: entry,
660
660
  cwd,
@@ -1,5 +1,5 @@
1
1
  import { logger } from "./logger-DYeY_1KP.js";
2
- import { version } from "./package-y1rDBz8S.js";
2
+ import { version } from "./package-B9R2bt2m.js";
3
3
  import process from "node:process";
4
4
  import { bold, green, underline } from "ansis";
5
5
  import { readFile, unlink, writeFile } from "node:fs/promises";
@@ -130,7 +130,7 @@ interface Options$3 {
130
130
  *
131
131
  * Accepts a single target (e.g., `'es2020'`, `'node18'`) or an array of targets.
132
132
  *
133
- * @see {@link https://tsdown.dev/guide/target#supported-targets} for a list of valid targets and more details.
133
+ * @see {@link https://tsdown.dev/options/target#supported-targets} for a list of valid targets and more details.
134
134
  *
135
135
  * @example
136
136
  * ```jsonc
@@ -0,0 +1,5 @@
1
+ //#region package.json
2
+ var version = "0.11.5";
3
+
4
+ //#endregion
5
+ export { version };
@@ -95,6 +95,7 @@ function NodeProtocolPlugin() {
95
95
  return {
96
96
  name: "tsdown:node-protocol",
97
97
  resolveId: {
98
+ order: "pre",
98
99
  filter: { id: /^node:/ },
99
100
  handler(id) {
100
101
  return {
package/dist/plugins.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReportPlugin$1 as ReportPlugin, ResolvedOptions } from "./options-D9qjlfFP.js";
1
+ import { ReportPlugin$1 as ReportPlugin, ResolvedOptions } from "./options-BPeORY5t.js";
2
2
  import { Plugin } from "rolldown";
3
3
  import { PackageJson } from "pkg-types";
4
4
 
package/dist/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin } from "./plugins-BPU33dye.js";
1
+ import { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin } from "./plugins-CPt-D0Cs.js";
2
2
  import "./general-CPYs4M61.js";
3
3
  import "./logger-DYeY_1KP.js";
4
4
 
package/dist/run.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolveComma, toArray } from "./general-CPYs4M61.js";
3
3
  import { logger } from "./logger-DYeY_1KP.js";
4
- import { version } from "./package-y1rDBz8S.js";
4
+ import { version } from "./package-B9R2bt2m.js";
5
5
  import module from "node:module";
6
6
  import process from "node:process";
7
7
  import { dim } from "ansis";
@@ -20,7 +20,7 @@ cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).op
20
20
  await build$1(flags);
21
21
  });
22
22
  cli.command("migrate", "Migrate from tsup to tsdown").option("-c, --cwd <dir>", "Working directory").option("-d, --dry-run", "Dry run").action(async (args) => {
23
- const { migrate } = await import("./migrate-CaE0IkIE.js");
23
+ const { migrate } = await import("./migrate-BtPH5ywH.js");
24
24
  await migrate(args);
25
25
  });
26
26
  async function runCLI() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "description": "The Elegant Bundler for Libraries",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -66,7 +66,7 @@
66
66
  "empathic": "^1.1.0",
67
67
  "hookable": "^5.5.3",
68
68
  "rolldown": "1.0.0-beta.8-commit.2a5c6a6",
69
- "rolldown-plugin-dts": "^0.11.4",
69
+ "rolldown-plugin-dts": "^0.12.0",
70
70
  "semver": "^7.7.1",
71
71
  "tinyexec": "^1.0.1",
72
72
  "tinyglobby": "^0.2.13",
@@ -1,5 +0,0 @@
1
- //#region package.json
2
- var version = "0.11.4";
3
-
4
- //#endregion
5
- export { version };