Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f3d641d1c1 | |||
1fd74928c5 | |||
0f4c2cbba4 | |||
0b68a2dd57 | |||
fda3204cfb |
23
changelog.md
23
changelog.md
@ -1,5 +1,28 @@
|
|||||||
# 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)
|
||||||
|
Improve logging mechanism with structured logs for publish process
|
||||||
|
|
||||||
|
- Enhanced log messages to provide more clarity during module publishing.
|
||||||
|
- Ensured logging captures steps of publish and init process in TsPublish and PublishModule classes respectively.
|
||||||
|
|
||||||
|
## 2024-10-21 - 1.2.3 - fix(classes.publishmodule)
|
||||||
|
Add missing 'type: module' to dynamically generated package.json
|
||||||
|
|
||||||
|
- Ensure that the 'type: module' field is included in each dynamically generated package.json file for consistent module handling.
|
||||||
|
|
||||||
|
## 2024-10-21 - 1.2.3 - fix(classes.publishmodule)
|
||||||
|
Add missing 'type: module' to dynamically generated package.json
|
||||||
|
|
||||||
|
- Ensure that the 'type: module' field is included in each dynamically generated package.json file for consistent module handling.
|
||||||
|
|
||||||
## 2024-10-21 - 1.2.2 - fix(publishmodule)
|
## 2024-10-21 - 1.2.2 - fix(publishmodule)
|
||||||
Fix bug in package.json creation for publish module
|
Fix bug in package.json creation for publish module
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tspublish",
|
"name": "@git.zone/tspublish",
|
||||||
"version": "1.2.2",
|
"version": "1.2.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"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.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tspublish',
|
name: '@git.zone/tspublish',
|
||||||
version: '1.2.2',
|
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;
|
||||||
@ -74,6 +74,7 @@ export class PublishModule {
|
|||||||
const packageJson = {
|
const packageJson = {
|
||||||
name: this.options.name,
|
name: this.options.name,
|
||||||
version: this.options.version,
|
version: this.options.version,
|
||||||
|
type: 'module',
|
||||||
description: '',
|
description: '',
|
||||||
exports: {
|
exports: {
|
||||||
'.': {
|
'.': {
|
||||||
@ -87,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);
|
||||||
}
|
}
|
||||||
@ -96,7 +109,7 @@ export class PublishModule {
|
|||||||
this.options.monoRepoDir,
|
this.options.monoRepoDir,
|
||||||
`dist_publish_${this.options.packageSubFolder}`
|
`dist_publish_${this.options.packageSubFolder}`
|
||||||
);
|
);
|
||||||
|
|
||||||
// package.json
|
// package.json
|
||||||
await plugins.smartfile.fs.ensureEmptyDir(this.options.publishModDirFullPath);
|
await plugins.smartfile.fs.ensureEmptyDir(this.options.publishModDirFullPath);
|
||||||
const packageJson = await plugins.smartfile.SmartFile.fromString(
|
const packageJson = await plugins.smartfile.SmartFile.fromString(
|
||||||
@ -107,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`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user