tsdown 0.22.2 → 0.22.3

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,12 +1,12 @@
1
1
  import { createRequire as __cjs_createRequire } from "node:module";
2
2
  const __cjs_require = __cjs_createRequire(import.meta.url);
3
- import { a as getPackageType, c as isGlobEntry, d as cleanOutDir, i as loadConfigFile, l as toObjectEntry, n as mergeUserOptions, o as writeExports, r as resolveUserConfig, s as buildExe, t as mergeConfig, u as cleanChunks } from "./options-DWGUHu4D.mjs";
4
3
  import { r as fsRemove } from "./fs-qxJxxoCE.mjs";
5
4
  import { a as pkgExists, l as slash, n as importWithError, o as promiseWithResolvers, t as debounce, u as toArray } from "./general-Cp4NiJNK.mjs";
6
5
  import { a as globalLogger, t as LogLevels } from "./logger-BxuhTmAE.mjs";
6
+ import { a as getPackageType, c as isGlobEntry, d as cleanOutDir, i as loadConfigFile, l as toObjectEntry, n as mergeUserOptions, o as writeExports, r as resolveUserConfig, s as buildExe, t as mergeConfig, u as cleanChunks } from "./options-Ce3ueyZH.mjs";
7
7
  import { a as shimsDefine, i as getShimsInject, n as DepsPlugin, o as shimsPlugin } from "./format-DMceewlS.mjs";
8
8
  import { a as ReportPlugin, i as ShebangPlugin, n as endsWithConfig, o as NodeProtocolPlugin, r as addOutDirToChunks, s as copy, t as WatchPlugin } from "./watch-C3ocHLCt.mjs";
9
- import { n as version } from "./debug-DQISqjIY.mjs";
9
+ import { n as version } from "./debug-DLdR-9XB.mjs";
10
10
  import { mkdtemp, readFile, readdir, writeFile } from "node:fs/promises";
11
11
  import path from "node:path";
12
12
  import process from "node:process";
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as mergeConfig } from "./options-DWGUHu4D.mjs";
1
+ import { t as mergeConfig } from "./options-Ce3ueyZH.mjs";
2
2
  //#region src/config.ts
3
3
  function defineConfig(options) {
4
4
  return options;
@@ -1,7 +1,7 @@
1
1
  import { s as resolveComma, u as toArray } from "./general-Cp4NiJNK.mjs";
2
2
  import { createDebug, enable, namespaces } from "obug";
3
3
  //#region package.json
4
- var version = "0.22.2";
4
+ var version = "0.22.3";
5
5
  //#endregion
6
6
  //#region src/features/debug.ts
7
7
  const debugLog = createDebug("tsdown:debug");
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { n as buildWithConfigs, t as build } from "./build-BxT2lm9L.mjs";
2
- import { r as resolveUserConfig, t as mergeConfig } from "./options-DWGUHu4D.mjs";
1
+ import { n as buildWithConfigs, t as build } from "./build-B_nvJe4A.mjs";
3
2
  import { a as globalLogger } from "./logger-BxuhTmAE.mjs";
3
+ import { r as resolveUserConfig, t as mergeConfig } from "./options-Ce3ueyZH.mjs";
4
4
  import { defineConfig } from "./config.mjs";
5
- import { t as enableDebug } from "./debug-DQISqjIY.mjs";
5
+ import { t as enableDebug } from "./debug-DLdR-9XB.mjs";
6
6
  import * as Rolldown from "rolldown";
7
7
  export { Rolldown, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
@@ -7,7 +7,7 @@ import { r as resolveDepsConfig, t as formatBytes } from "./format-DMceewlS.mjs"
7
7
  import { n as resolveTarget } from "./target-CqeSqtms.mjs";
8
8
  import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
9
9
  import path from "node:path";
10
- import process, { env } from "node:process";
10
+ import process from "node:process";
11
11
  import { blue, bold, dim, red, underline } from "ansis";
12
12
  import { createDefu } from "defu";
13
13
  import { createDebug } from "obug";
@@ -24,10 +24,6 @@ import { up as up$1 } from "empathic/package";
24
24
  import { pathToFileURL } from "node:url";
25
25
  import { depsStore, init, isSupported } from "import-without-cache";
26
26
  import { createConfigCoreLoader } from "unconfig-core";
27
- //#region node_modules/.pnpm/is-in-ci@2.0.0/node_modules/is-in-ci/index.js
28
- const check = (key) => key in env && env[key] !== "0" && env[key] !== "false";
29
- const isInCi = check("CI") || check("CONTINUOUS_INTEGRATION");
30
- //#endregion
31
27
  //#region src/features/clean.ts
32
28
  const debug$4 = createDebug("tsdown:clean");
33
29
  const RE_LAST_SLASH = /[/\\]$/;
@@ -518,6 +514,12 @@ async function resolveTsconfig(logger, tsconfig, cwd, color, nameLabel) {
518
514
  return tsconfig;
519
515
  }
520
516
  //#endregion
517
+ //#region src/utils/ci.ts
518
+ function isInCI() {
519
+ const ci = process.env.CI;
520
+ return ci != null && ci !== "0" && ci.toLowerCase() !== "false";
521
+ }
522
+ //#endregion
521
523
  //#region src/utils/package.ts
522
524
  const debug$2 = createDebug("tsdown:package");
523
525
  async function readPackageJson(dir) {
@@ -633,7 +635,7 @@ async function loadConfigFile(inlineConfig, workspace, rootConfig) {
633
635
  globalLogger.info(`config file: ${underline(file)}`, loader === "native" ? "" : `(${loader})`);
634
636
  exported = await exported;
635
637
  if (typeof exported === "function") exported = await exported(inlineConfig, {
636
- ci: isInCi,
638
+ ci: isInCI(),
637
639
  rootConfig
638
640
  });
639
641
  }
@@ -903,8 +905,8 @@ function resolveFeatureOption(value, defaults) {
903
905
  return resolveCIOption(value) ? defaults : false;
904
906
  }
905
907
  function resolveCIOption(value) {
906
- if (value === "ci-only") return isInCi ? true : false;
907
- if (value === "local-only") return isInCi ? false : true;
908
+ if (value === "ci-only") return isInCI();
909
+ if (value === "local-only") return !isInCI();
908
910
  return value;
909
911
  }
910
912
  function filterConfig(filter, configCwd, name) {
package/dist/run.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as globalLogger } from "./logger-BxuhTmAE.mjs";
3
- import { n as version, t as enableDebug } from "./debug-DQISqjIY.mjs";
3
+ import { n as version, t as enableDebug } from "./debug-DLdR-9XB.mjs";
4
4
  import module from "node:module";
5
5
  import process from "node:process";
6
6
  import { blue, hex } from "ansis";
@@ -16,7 +16,7 @@ cli.command("[...files]", "Bundle files", {
16
16
  }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
17
17
  globalLogger.level = flags.logLevel || "info";
18
18
  globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
19
- const { build } = await import("./build-BxT2lm9L.mjs").then((n) => n.r);
19
+ const { build } = await import("./build-B_nvJe4A.mjs").then((n) => n.r);
20
20
  if (input.length > 0) flags.entry = input;
21
21
  await build(flags);
22
22
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsdown",
3
3
  "type": "module",
4
- "version": "0.22.2",
4
+ "version": "0.22.3",
5
5
  "description": "The Elegant Bundler for Libraries",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "access": "public"
45
45
  },
46
46
  "engines": {
47
- "node": "^22.18.0 || >=24.0.0"
47
+ "node": "^22.18.0 || >=24.11.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@arethetypeswrong/core": "^0.18.1",
@@ -54,8 +54,8 @@
54
54
  "typescript": "^5.0.0 || ^6.0.0",
55
55
  "unplugin-unused": "^0.5.0",
56
56
  "unrun": "*",
57
- "@tsdown/exe": "0.22.2",
58
- "@tsdown/css": "0.22.2"
57
+ "@tsdown/exe": "0.22.3",
58
+ "@tsdown/css": "0.22.3"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@arethetypeswrong/core": {
@@ -93,64 +93,62 @@
93
93
  "empathic": "^2.0.1",
94
94
  "hookable": "^6.1.1",
95
95
  "import-without-cache": "^0.4.0",
96
- "obug": "^2.1.1",
96
+ "obug": "^2.1.3",
97
97
  "picomatch": "^4.0.4",
98
- "rolldown": "~1.1.0",
99
- "rolldown-plugin-dts": "^0.25.2",
100
- "semver": "^7.8.1",
98
+ "rolldown": "~1.1.1",
99
+ "rolldown-plugin-dts": "^0.26.0",
100
+ "semver": "^7.8.4",
101
101
  "tinyexec": "^1.2.4",
102
102
  "tinyglobby": "^0.2.17",
103
103
  "tree-kill": "^1.2.2",
104
104
  "unconfig-core": "^7.5.0"
105
105
  },
106
106
  "inlinedDependencies": {
107
- "is-in-ci": "2.0.0",
108
107
  "package-manager-detector": "1.6.0",
109
108
  "pkg-types": "2.3.1"
110
109
  },
111
110
  "devDependencies": {
112
111
  "@arethetypeswrong/core": "^0.18.3",
113
- "@sxzz/eslint-config": "^8.1.0",
112
+ "@sxzz/eslint-config": "^8.2.0",
114
113
  "@sxzz/prettier-config": "^2.3.1",
115
114
  "@sxzz/test-utils": "^0.5.18",
116
- "@types/node": "^25.9.1",
115
+ "@types/node": "^25.9.3",
117
116
  "@types/picomatch": "^4.0.3",
118
117
  "@types/semver": "^7.7.1",
119
- "@typescript/native-preview": "7.0.0-dev.20260603.1",
120
- "@unocss/eslint-plugin": "^66.7.0",
121
- "@vitejs/devtools": "^0.3.1",
122
- "@vitest/coverage-v8": "^4.1.8",
123
- "@vitest/ui": "^4.1.8",
118
+ "@typescript/native-preview": "7.0.0-dev.20260615.1",
119
+ "@unocss/eslint-plugin": "^66.7.2",
120
+ "@vitejs/devtools": "^0.3.3",
121
+ "@vitest/coverage-v8": "^4.1.9",
122
+ "@vitest/ui": "^4.1.9",
124
123
  "@vueuse/core": "^14.3.0",
125
124
  "actionspack": "^0.1.5",
126
- "baseline-browser-mapping": "^2.10.33",
125
+ "baseline-browser-mapping": "^2.10.37",
127
126
  "bumpp": "^11.1.0",
128
127
  "dedent": "^1.7.2",
129
- "eslint": "^10.4.1",
130
- "is-in-ci": "^2.0.0",
131
- "memfs": "^4.57.5",
128
+ "eslint": "^10.5.0",
129
+ "memfs": "^4.57.7",
132
130
  "package-manager-detector": "^1.6.0",
133
131
  "pkg-types": "^2.3.1",
134
132
  "postcss": "^8.5.15",
135
133
  "postcss-import": "^16.1.1",
136
- "prettier": "^3.8.3",
134
+ "prettier": "^3.8.4",
137
135
  "publint": "^0.3.21",
138
- "rolldown-plugin-require-cjs": "^0.4.0",
139
- "sass": "^1.100.0",
136
+ "rolldown-plugin-require-cjs": "^0.4.1",
137
+ "sass": "^1.101.0",
140
138
  "tsnapi": "^0.3.3",
141
139
  "tsx": "^4.22.4",
142
140
  "typescript": "~6.0.3",
143
- "unocss": "^66.7.0",
141
+ "unocss": "^66.7.2",
144
142
  "unplugin-ast": "^0.17.0",
145
143
  "unplugin-raw": "^0.7.0",
146
144
  "unplugin-unused": "^0.5.7",
147
145
  "unplugin-vue": "^7.2.0",
148
- "unrun": "^0.3.0",
146
+ "unrun": "^0.3.1",
149
147
  "vite": "^8.0.16",
150
- "vitest": "^4.1.8",
151
- "vue": "^3.5.35",
152
- "@tsdown/css": "0.22.2",
153
- "@tsdown/exe": "0.22.2"
148
+ "vitest": "^4.1.9",
149
+ "vue": "^3.5.38",
150
+ "@tsdown/css": "0.22.3",
151
+ "@tsdown/exe": "0.22.3"
154
152
  },
155
153
  "prettier": "@sxzz/prettier-config",
156
154
  "scripts": {