fix(core): Fixes handling of undefined paths in tsconfig generation.
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tspublish',
|
||||
version: '1.5.0',
|
||||
version: '1.5.1',
|
||||
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
||||
}
|
||||
|
@ -80,8 +80,10 @@ export class PublishModule {
|
||||
const originalTsConfig = plugins.smartfile.fs.toObjectSync(
|
||||
plugins.path.join(paths.cwd, 'tsconfig.json')
|
||||
);
|
||||
for (const path of originalTsConfig.compilerOptions.paths) {
|
||||
originalTsConfig.compilerOptions.paths[path][0] = `.${originalTsConfig.compilerOptions.paths[path][0]}`;
|
||||
if (originalTsConfig?.compilerOptions?.paths) {
|
||||
for (const path of originalTsConfig.compilerOptions.paths) {
|
||||
originalTsConfig.compilerOptions.paths[path][0] = `.${originalTsConfig.compilerOptions.paths[path][0]}`;
|
||||
}
|
||||
}
|
||||
const tsconfigJson = {
|
||||
compilerOptions: {
|
||||
@ -92,7 +94,7 @@ export class PublishModule {
|
||||
moduleResolution: 'NodeNext',
|
||||
esModuleInterop: true,
|
||||
verbatimModuleSyntax: true,
|
||||
paths: originalTsConfig.compilerOptions.paths,
|
||||
paths: originalTsConfig?.compilerOptions?.paths,
|
||||
},
|
||||
exclude: [
|
||||
'dist_*/**/*.d.ts',
|
||||
|
Reference in New Issue
Block a user