@batijs/build 0.0.408 → 0.0.411

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 +5 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -366,9 +366,11 @@ Please report this issue to https://github.com/vikejs/bati`
366
366
  }
367
367
  }
368
368
  let previousOp = void 0;
369
+ let previousOpContent = void 0;
369
370
  for (const op of rearranger.compute()) {
370
371
  if (previousOp?.destination !== op.destination) {
371
372
  previousOp = void 0;
373
+ previousOpContent = void 0;
372
374
  }
373
375
  let report = {};
374
376
  if (op.kind === "file") {
@@ -390,9 +392,11 @@ Please report this issue to https://github.com/vikejs/bati`
390
392
  if (report.content) {
391
393
  await safeWriteFile(op.destination, report.content.trimStart());
392
394
  }
395
+ previousOpContent = report.content ?? previousOpContent;
393
396
  previousOp = {
394
397
  ...op,
395
- ...report
398
+ ...report,
399
+ content: previousOpContent
396
400
  };
397
401
  }
398
402
  for (const target of RelationImport.computeUnimportedFiles()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/build",
3
- "version": "0.0.408",
3
+ "version": "0.0.411",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -10,11 +10,11 @@
10
10
  "devDependencies": {
11
11
  "@types/node": "^18.19.76",
12
12
  "tsup": "^8.4.0",
13
- "@batijs/features": "0.0.408",
14
- "@batijs/compile": "0.0.408"
13
+ "@batijs/compile": "0.0.411",
14
+ "@batijs/features": "0.0.411"
15
15
  },
16
16
  "dependencies": {
17
- "@batijs/core": "0.0.408"
17
+ "@batijs/core": "0.0.411"
18
18
  },
19
19
  "main": "./dist/index.js",
20
20
  "module": "./dist/index.js",