bun-plugin-dtsx 0.10.9 → 0.11.0

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -116,6 +116,7 @@ function computeConfigHash(config) {
116
116
  };
117
117
  return createHash("md5").update(JSON.stringify(relevantConfig)).digest("hex");
118
118
  }
119
+ var cleanedOutdirs = new Set;
119
120
  function dts(options = {}) {
120
121
  const {
121
122
  onSuccess,
@@ -146,6 +147,14 @@ function dts(options = {}) {
146
147
  try {
147
148
  const config = normalizeConfig(dtsOptions, build);
148
149
  const configHash = computeConfigHash(config);
150
+ if (config.clean) {
151
+ const outdirPath = resolve(config.cwd ?? process.cwd(), config.outdir ?? "./dist");
152
+ if (cleanedOutdirs.has(outdirPath)) {
153
+ config.clean = false;
154
+ } else {
155
+ cleanedOutdirs.add(outdirPath);
156
+ }
157
+ }
149
158
  if (incremental) {
150
159
  cache = new IncrementalCache(resolve(cacheDir), configHash);
151
160
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "bun-plugin-dtsx",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.10.9",
5
+ "version": "0.11.0",
6
6
  "description": "A Bun Bundler plugin that auto generates your DTS types extremely fast.",
7
7
  "author": "Chris Breuer <chris@ow3.org>",
8
8
  "license": "MIT",
@@ -52,6 +52,6 @@
52
52
  "lint:fix": "bun x --bun pickier . --fix"
53
53
  },
54
54
  "dependencies": {
55
- "@stacksjs/dtsx": "0.10.9"
55
+ "@stacksjs/dtsx": "0.11.0"
56
56
  }
57
57
  }