fix(publishmodule): Fix syntax errors and improve formatting in classes.publishmodule.ts
This commit is contained in:
parent
0f4c2cbba4
commit
1fd74928c5
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2024-10-21 - 1.2.4 - fix(publishmodule)
|
||||||
|
Fix syntax errors and improve formatting in classes.publishmodule.ts
|
||||||
|
|
||||||
|
- Fixed missing semicolons in multiple locations for improved syntax correctness.
|
||||||
|
- Improved the formatting for better code readability.
|
||||||
|
- Added --no-git-checks flag to the pnpm publish command.
|
||||||
|
|
||||||
## 2024-10-21 - 1.2.3 - fix(logs)
|
## 2024-10-21 - 1.2.3 - fix(logs)
|
||||||
Improve logging mechanism with structured logs for publish process
|
Improve logging mechanism with structured logs for publish process
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tspublish',
|
name: '@git.zone/tspublish',
|
||||||
version: '1.2.3',
|
version: '1.2.4',
|
||||||
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export class PublishModule {
|
|||||||
);
|
);
|
||||||
const monoRepoPackageJson = JSON.parse(
|
const monoRepoPackageJson = JSON.parse(
|
||||||
plugins.smartfile.fs.toStringSync(plugins.path.join(this.options.monoRepoDir, 'package.json'))
|
plugins.smartfile.fs.toStringSync(plugins.path.join(this.options.monoRepoDir, 'package.json'))
|
||||||
)
|
);
|
||||||
this.options.dependencies = {
|
this.options.dependencies = {
|
||||||
...this.options.dependencies,
|
...this.options.dependencies,
|
||||||
...(() => {
|
...(() => {
|
||||||
@ -42,7 +42,7 @@ export class PublishModule {
|
|||||||
resultDependencies[dependency] = monoRepoPackageJson.dependencies[dependency];
|
resultDependencies[dependency] = monoRepoPackageJson.dependencies[dependency];
|
||||||
}
|
}
|
||||||
return resultDependencies;
|
return resultDependencies;
|
||||||
})()
|
})(),
|
||||||
};
|
};
|
||||||
this.options.name = this.options.name || jsonData.name;
|
this.options.name = this.options.name || jsonData.name;
|
||||||
this.options.version = monoRepoPackageJson.version;
|
this.options.version = monoRepoPackageJson.version;
|
||||||
@ -88,6 +88,18 @@ export class PublishModule {
|
|||||||
devDependencies: {
|
devDependencies: {
|
||||||
'@git.zone/tsbuild': await this.getLatestVersionOfPackage('@git.zone/tsbuild'),
|
'@git.zone/tsbuild': await this.getLatestVersionOfPackage('@git.zone/tsbuild'),
|
||||||
},
|
},
|
||||||
|
files: [
|
||||||
|
'ts/**/*',
|
||||||
|
'ts_web/**/*',
|
||||||
|
'dist/**/*',
|
||||||
|
'dist_*/**/*',
|
||||||
|
'dist_ts/**/*',
|
||||||
|
'dist_ts_web/**/*',
|
||||||
|
'assets/**/*',
|
||||||
|
'cli.js',
|
||||||
|
'npmextra.json',
|
||||||
|
'readme.md',
|
||||||
|
],
|
||||||
};
|
};
|
||||||
return JSON.stringify(packageJson, null, 2);
|
return JSON.stringify(packageJson, null, 2);
|
||||||
}
|
}
|
||||||
@ -108,20 +120,23 @@ export class PublishModule {
|
|||||||
await packageJson.write();
|
await packageJson.write();
|
||||||
|
|
||||||
// ts folder
|
// ts folder
|
||||||
await plugins.smartfile.fs.copy(this.options.packageSubFolderFullPath, plugins.path.join(this.options.publishModDirFullPath, this.options.packageSubFolder))
|
await plugins.smartfile.fs.copy(
|
||||||
|
this.options.packageSubFolderFullPath,
|
||||||
|
plugins.path.join(this.options.publishModDirFullPath, this.options.packageSubFolder)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async build() {
|
public async build() {
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
executor: 'bash',
|
executor: 'bash',
|
||||||
})
|
});
|
||||||
await smartshellInstance.exec(`cd ${this.options.publishModDirFullPath} && pnpm run build`);
|
await smartshellInstance.exec(`cd ${this.options.publishModDirFullPath} && pnpm run build`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async publish() {
|
public async publish() {
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
executor: 'bash',
|
executor: 'bash',
|
||||||
})
|
});
|
||||||
await smartshellInstance.exec(`cd ${this.options.publishModDirFullPath} && pnpm publish`);
|
await smartshellInstance.exec(`cd ${this.options.publishModDirFullPath} && pnpm publish --no-git-checks`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user