fix: rename all packages from @mosaic/* to @mosaicstack/*
- Updated all package.json name fields and dependency references - Updated all TypeScript/JavaScript imports - Updated .woodpecker/publish.yml filters and registry paths - Updated tools/install.sh scope default - Updated .npmrc registry paths (worktree + host) - Enhanced update-checker.ts with checkForAllUpdates() multi-package support - Updated CLI update command to show table of all packages - Added KNOWN_PACKAGES, formatAllPackagesTable, getInstallAllCommand - Marked checkForUpdate() with @deprecated JSDoc Closes #391
This commit is contained in:
@@ -88,17 +88,17 @@ describe('formatUpdateNotice', () => {
|
||||
expect(notice).toContain('Update available');
|
||||
});
|
||||
|
||||
it('uses @mosaic/mosaic for installs', async () => {
|
||||
it('uses @mosaicstack/mosaic for installs', async () => {
|
||||
execSyncMock.mockImplementation((command: string) => {
|
||||
if (command.includes('ls -g --depth=0 --json')) {
|
||||
return JSON.stringify({
|
||||
dependencies: {
|
||||
'@mosaic/mosaic': { version: '0.0.19' },
|
||||
'@mosaicstack/mosaic': { version: '0.0.19' },
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (command.includes('view @mosaic/mosaic version')) {
|
||||
if (command.includes('view @mosaicstack/mosaic version')) {
|
||||
return '0.0.20';
|
||||
}
|
||||
|
||||
@@ -111,26 +111,26 @@ describe('formatUpdateNotice', () => {
|
||||
|
||||
expect(result.current).toBe('0.0.19');
|
||||
expect(result.latest).toBe('0.0.20');
|
||||
expect(result.currentPackage).toBe('@mosaic/mosaic');
|
||||
expect(result.targetPackage).toBe('@mosaic/mosaic');
|
||||
expect(notice).toContain('@mosaic/mosaic@latest');
|
||||
expect(result.currentPackage).toBe('@mosaicstack/mosaic');
|
||||
expect(result.targetPackage).toBe('@mosaicstack/mosaic');
|
||||
expect(notice).toContain('@mosaicstack/mosaic@latest');
|
||||
});
|
||||
|
||||
it('does not query legacy @mosaic/cli package', async () => {
|
||||
it('does not query legacy @mosaicstack/cli package', async () => {
|
||||
execSyncMock.mockImplementation((command: string) => {
|
||||
if (command.includes('view @mosaic/cli')) {
|
||||
throw new Error('Should not query @mosaic/cli');
|
||||
if (command.includes('view @mosaicstack/cli')) {
|
||||
throw new Error('Should not query @mosaicstack/cli');
|
||||
}
|
||||
|
||||
if (command.includes('ls -g --depth=0 --json')) {
|
||||
return JSON.stringify({
|
||||
dependencies: {
|
||||
'@mosaic/mosaic': { version: '0.0.19' },
|
||||
'@mosaicstack/mosaic': { version: '0.0.19' },
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (command.includes('view @mosaic/mosaic version')) {
|
||||
if (command.includes('view @mosaicstack/mosaic version')) {
|
||||
return '0.0.20';
|
||||
}
|
||||
|
||||
@@ -140,11 +140,11 @@ describe('formatUpdateNotice', () => {
|
||||
const { checkForUpdate } = await importUpdateChecker();
|
||||
const result = checkForUpdate({ skipCache: true });
|
||||
|
||||
expect(result.targetPackage).toBe('@mosaic/mosaic');
|
||||
expect(result.targetPackage).toBe('@mosaicstack/mosaic');
|
||||
expect(result.latest).toBe('0.0.20');
|
||||
// Verify no @mosaic/cli queries were made
|
||||
// Verify no @mosaicstack/cli queries were made
|
||||
const calls = execSyncMock.mock.calls.map((c: any[]) => c[0] as string);
|
||||
expect(calls.some((c) => c.includes('@mosaic/cli'))).toBe(false);
|
||||
expect(calls.some((c) => c.includes('@mosaicstack/cli'))).toBe(false);
|
||||
});
|
||||
|
||||
it('returns empty result when package is not installed', async () => {
|
||||
@@ -153,7 +153,7 @@ describe('formatUpdateNotice', () => {
|
||||
return JSON.stringify({ dependencies: {} });
|
||||
}
|
||||
|
||||
if (command.includes('view @mosaic/mosaic version')) {
|
||||
if (command.includes('view @mosaicstack/mosaic version')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user