fix(config): migrate configuration handling from npmextra to smartconfig

This commit is contained in:
2026-03-24 15:05:07 +00:00
parent 3358a0eacc
commit 470e87eb79
20 changed files with 58 additions and 26 deletions

View File

@@ -19,6 +19,10 @@ node_modules/
dist/
dist_*/
# rust
rust/target/
dist_rust/
# AI
.claude/
.serena/

View File

@@ -1,5 +1,13 @@
# Changelog
## 2026-03-24 - 2.13.10 - fix(config)
migrate configuration handling from npmextra to smartconfig
- replace @push.rocks/npmextra with @push.rocks/smartconfig across config, commit, format, and service modules
- switch managed project config file references from npmextra.json to smartconfig.json
- update formatting and package metadata checks to include smartconfig.json
- extend the gitignore template with Rust build output directories
## 2026-03-11 - 2.13.9 - fix(deps,readme)
bump dependencies and update README to prefer pnpm and document semantic commit flags

View File

@@ -69,7 +69,7 @@
"@push.rocks/early": "^4.0.4",
"@push.rocks/gulp-function": "^3.0.7",
"@push.rocks/lik": "^6.3.1",
"@push.rocks/npmextra": "^5.3.3",
"@push.rocks/smartconfig": "^6.0.0",
"@push.rocks/projectinfo": "^5.0.2",
"@push.rocks/smartcli": "^4.0.20",
"@push.rocks/smartdelay": "^3.0.5",

26
pnpm-lock.yaml generated
View File

@@ -26,15 +26,15 @@ importers:
'@push.rocks/lik':
specifier: ^6.3.1
version: 6.3.1
'@push.rocks/npmextra':
specifier: ^5.3.3
version: 5.3.3
'@push.rocks/projectinfo':
specifier: ^5.0.2
version: 5.0.2
'@push.rocks/smartcli':
specifier: ^4.0.20
version: 4.0.20
'@push.rocks/smartconfig':
specifier: ^6.0.0
version: 6.0.0
'@push.rocks/smartdelay':
specifier: ^3.0.5
version: 3.0.5
@@ -1072,6 +1072,9 @@ packages:
'@push.rocks/smartclickhouse@2.2.0':
resolution: {integrity: sha512-eTzKiREIPSzL1kPkVyD6vEbn+WV/DvQqDjP67VlhNlQGbRcemnJG/eLrUUR1ytmdIqnsZGEK6UYBgyj5nhzLNQ==}
'@push.rocks/smartconfig@6.0.0':
resolution: {integrity: sha512-ohXwJdbDXV2budErnZKWBOz01YkjP6gJsZ7QM9+6Wsh+r7O1CVT3JpV+mD8xJWy5tZRHI+3B9L8z0+WkIDtKzw==}
'@push.rocks/smartcrypto@2.0.4':
resolution: {integrity: sha512-1+/5bsjyataf5uUkUNnnVXGRAt+gHVk1KDzozjTqgqJxHvQk1d9fVDohL6CxUhUucTPtu5VR5xNBiV8YCDuGyw==}
@@ -5752,6 +5755,23 @@ snapshots:
'@push.rocks/smarturl': 3.1.0
'@push.rocks/webrequest': 4.0.5
'@push.rocks/smartconfig@6.0.0':
dependencies:
'@push.rocks/qenv': 6.1.3
'@push.rocks/smartfile': 11.2.7
'@push.rocks/smartjson': 5.2.0
'@push.rocks/smartlog': 3.2.1
'@push.rocks/smartpath': 6.0.0
'@push.rocks/smartpromise': 4.2.3
'@push.rocks/smartrx': 3.0.10
'@push.rocks/taskbuffer': 3.5.0
'@tsclass/tsclass': 9.3.0
transitivePeerDependencies:
- '@nuxt/kit'
- react
- supports-color
- vue
'@push.rocks/smartcrypto@2.0.4':
dependencies:
'@push.rocks/smartpromise': 4.2.3

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '2.13.9',
version: '2.13.10',
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
}

View File

@@ -38,7 +38,7 @@ export class GitzoneConfig {
public data: IGitzoneConfigData;
public async readConfigFromCwd() {
const npmextraInstance = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(paths.cwd);
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('@git.zone/cli', {});
// Read szci config for backward compatibility

View File

@@ -9,7 +9,7 @@ import { ReleaseConfig } from '../mod_config/classes.releaseconfig.js';
export const run = async (argvArg: any) => {
// Read commit config from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const gitzoneConfig = npmextraConfig.dataFor<{
commit?: {
alwaysTest?: boolean;

View File

@@ -31,7 +31,7 @@ export class CommitConfig {
* Load configuration from npmextra.json
*/
public async load(): Promise<void> {
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
this.config = {
@@ -44,7 +44,7 @@ export class CommitConfig {
* Save configuration to npmextra.json
*/
public async save(): Promise<void> {
const npmextraPath = plugins.path.join(this.cwd, 'npmextra.json');
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json

View File

@@ -33,7 +33,7 @@ export class ReleaseConfig {
* Load configuration from npmextra.json
*/
public async load(): Promise<void> {
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
// Also check szci for backward compatibility
@@ -49,7 +49,7 @@ export class ReleaseConfig {
* Save configuration to npmextra.json
*/
public async save(): Promise<void> {
const npmextraPath = plugins.path.join(this.cwd, 'npmextra.json');
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json

View File

@@ -6,7 +6,7 @@ export const run = async (projectArg: Project) => {
const gitzoneConfig = await projectArg.gitzoneConfig;
// Get copy configuration from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const copyConfig = npmextraConfig.dataFor<any>('gitzone.format.copy', {
patterns: [],
});

View File

@@ -76,7 +76,7 @@ const migrateAccessLevel = (npmextraJson: any): boolean => {
*/
export const run = async (projectArg: Project) => {
const formatSmartstream = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`npmextra.json`]),
plugins.smartgulp.src([`smartconfig.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const fileString = fileArg.contents.toString();
const npmextraJson = JSON.parse(fileString);

View File

@@ -73,7 +73,7 @@ export const run = async (projectArg: Project) => {
const formatStreamWrapper = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`package.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
const fileString = fileArg.contents.toString();
const packageJson = JSON.parse(fileString);
@@ -149,7 +149,7 @@ export const run = async (projectArg: Project) => {
'dist_ts_web/**/*',
'assets/**/*',
'cli.js',
'npmextra.json',
'smartconfig.json',
'readme.md',
];

View File

@@ -18,7 +18,7 @@ export class CopyFormatter extends BaseFormatter {
const changes: IPlannedChange[] = [];
// Get copy configuration from npmextra.json
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const copyConfig = npmextraConfig.dataFor<{ patterns: ICopyPattern[] }>(
'gitzone.format.copy',
{ patterns: [] },

View File

@@ -70,7 +70,7 @@ export class NpmextraFormatter extends BaseFormatter {
async analyze(): Promise<IPlannedChange[]> {
const changes: IPlannedChange[] = [];
const npmextraPath = 'npmextra.json';
const npmextraPath = 'smartconfig.json';
// Check if file exists
const exists = await plugins.smartfs.file(npmextraPath).exists();

View File

@@ -101,7 +101,7 @@ export class PackageJsonFormatter extends BaseFormatter {
const packageJson = JSON.parse(currentContent);
// Get gitzone config from npmextra
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
// Set metadata from gitzone config
@@ -156,7 +156,7 @@ export class PackageJsonFormatter extends BaseFormatter {
'dist_ts_web/**/*',
'assets/**/*',
'cli.js',
'npmextra.json',
'smartconfig.json',
'readme.md',
];

View File

@@ -21,7 +21,7 @@ export class PrettierFormatter extends BaseFormatter {
const rootConfigFiles = [
'package.json',
'tsconfig.json',
'npmextra.json',
'smartconfig.json',
'.prettierrc',
'.prettierrc.json',
'.prettierrc.js',
@@ -232,7 +232,7 @@ export class PrettierFormatter extends BaseFormatter {
private async getPrettierConfig(): Promise<any> {
// Try to load prettier config from the project
const prettierConfig = new plugins.npmextra.Npmextra();
const prettierConfig = new plugins.npmextra.Smartconfig();
return prettierConfig.dataFor('prettier', {
// Default prettier config
singleQuote: true,

View File

@@ -47,7 +47,7 @@ export let run = async (
const planner = new FormatPlanner();
// Get configuration from npmextra
const npmextraConfig = new plugins.npmextra.Npmextra();
const npmextraConfig = new plugins.npmextra.Smartconfig();
const formatConfig = npmextraConfig.dataFor<any>('@git.zone/cli.format', {
interactive: true,
showDiffs: false,

View File

@@ -11,7 +11,7 @@ import * as smartobject from '@push.rocks/smartobject';
import * as smartnpm from '@push.rocks/smartnpm';
import * as smartstream from '@push.rocks/smartstream';
import * as through2 from 'through2';
import * as npmextra from '@push.rocks/npmextra';
import * as npmextra from '@push.rocks/smartconfig';
import * as smartdiff from '@push.rocks/smartdiff';
export {

View File

@@ -42,7 +42,7 @@ export class ServiceManager {
* Load service configuration from npmextra.json
*/
private async loadServiceConfiguration(): Promise<void> {
const npmextraConfig = new plugins.npmextra.Npmextra(process.cwd());
const npmextraConfig = new plugins.npmextra.Smartconfig(process.cwd());
const gitzoneConfig = npmextraConfig.dataFor<any>('@git.zone/cli', {});
// Check if services array exists
@@ -75,7 +75,7 @@ export class ServiceManager {
* Save service configuration to npmextra.json
*/
private async saveServiceConfiguration(services: string[]): Promise<void> {
const npmextraPath = plugins.path.join(process.cwd(), 'npmextra.json');
const npmextraPath = plugins.path.join(process.cwd(), 'smartconfig.json');
let npmextraData: any = {};
// Read existing npmextra.json if it exists

View File

@@ -1,6 +1,6 @@
import * as smartlog from '@push.rocks/smartlog';
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
import * as npmextra from '@push.rocks/npmextra';
import * as npmextra from '@push.rocks/smartconfig';
import * as path from 'path';
import * as projectinfo from '@push.rocks/projectinfo';
import * as smartcli from '@push.rocks/smartcli';