@travetto/compiler 8.0.0-alpha.6 → 8.0.0-alpha.7
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.
- package/package.json +1 -1
- package/src/state.ts +6 -5
package/package.json
CHANGED
package/src/state.ts
CHANGED
|
@@ -182,15 +182,16 @@ export class CompilerState implements CompilerHost {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
switch (ManifestModuleUtil.getFileType(sourceFile)) {
|
|
185
|
-
case 'js':
|
|
186
|
-
case 'typings':
|
|
187
185
|
case 'package-json': {
|
|
188
186
|
const text = this.readFile(sourceFile)!;
|
|
189
|
-
const finalText =
|
|
187
|
+
const finalText = CompilerUtil.rewritePackageJSON(this.#manifest, text);
|
|
190
188
|
const location = this.#tscOutputFileToOuptut.get(output) ?? output;
|
|
191
|
-
this.#writeFile(location, finalText
|
|
189
|
+
this.#writeFile(location, finalText);
|
|
190
|
+
this.#writeExternalTypings(location, finalText);
|
|
192
191
|
break;
|
|
193
192
|
}
|
|
193
|
+
case 'js':
|
|
194
|
+
case 'typings': this.writeFile(output, this.readFile(sourceFile)!); break;
|
|
194
195
|
case 'ts': {
|
|
195
196
|
const program = await this.getProgram(needsNewProgram);
|
|
196
197
|
const tsSourceFile = program.getSourceFile(sourceFile)!;
|
|
@@ -329,7 +330,7 @@ export class CompilerState implements CompilerHost {
|
|
|
329
330
|
|
|
330
331
|
const location = this.#tscOutputFileToOuptut.get(outputFile) ?? outputFile;
|
|
331
332
|
|
|
332
|
-
if (ManifestModuleUtil.TYPINGS_WITH_MAP_EXT_REGEX.test(outputFile)
|
|
333
|
+
if (ManifestModuleUtil.TYPINGS_WITH_MAP_EXT_REGEX.test(outputFile)) {
|
|
333
334
|
this.#writeExternalTypings(location, text, bom);
|
|
334
335
|
}
|
|
335
336
|
|