@djangocfg/nextjs 1.0.17 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/nextjs",
3
- "version": "1.0.17",
3
+ "version": "2.1.1",
4
4
  "description": "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -95,13 +95,13 @@
95
95
  "check-links": "tsx src/scripts/check-links.ts"
96
96
  },
97
97
  "peerDependencies": {
98
- "@djangocfg/api": "^1.4.47",
98
+ "@djangocfg/api": "^2.1.1",
99
99
  "next": "^15.5.7"
100
100
  },
101
101
  "devDependencies": {
102
- "@djangocfg/imgai": "^1.0.33",
103
- "@djangocfg/layouts": "^2.0.17",
104
- "@djangocfg/typescript-config": "^1.4.47",
102
+ "@djangocfg/imgai": "^2.1.1",
103
+ "@djangocfg/layouts": "^2.1.1",
104
+ "@djangocfg/typescript-config": "^2.1.1",
105
105
  "@types/node": "^24.7.2",
106
106
  "@types/react": "19.2.2",
107
107
  "@types/react-dom": "19.2.1",
@@ -31,7 +31,6 @@ export const DJANGOCFG_PACKAGES = [
31
31
  '@djangocfg/nextjs',
32
32
  '@djangocfg/api',
33
33
  '@djangocfg/centrifugo',
34
- '@djangocfg/imgai',
35
34
  '@djangocfg/eslint-config',
36
35
  '@djangocfg/typescript-config',
37
36
  ] as const;
@@ -12,7 +12,7 @@ import chalk from 'chalk';
12
12
  import consola from 'consola';
13
13
  import Conf from 'conf';
14
14
  import semver from 'semver';
15
- import { DJANGOCFG_PACKAGES } from '../constants';
15
+ import { DJANGOCFG_PACKAGES, PACKAGE_NAME } from '../constants';
16
16
  import { isCI } from '../utils/env';
17
17
  import { detectPackageManager } from './installer';
18
18
 
@@ -146,12 +146,21 @@ async function fetchLatestVersion(packageName: string): Promise<string | null> {
146
146
 
147
147
  /**
148
148
  * Check all @djangocfg packages for updates
149
+ * All packages are aligned to the version of @djangocfg/nextjs (master package)
149
150
  * Skips workspace:* packages unless forceCheckWorkspace is true
150
151
  */
151
152
  export async function checkForUpdates(options: { forceCheckWorkspace?: boolean } = {}): Promise<PackageVersion[]> {
152
153
  const results: PackageVersion[] = [];
153
154
 
154
- // Check packages in parallel
155
+ // First, get the latest version of master package (@djangocfg/nextjs)
156
+ // All other packages should align to this version
157
+ const masterLatest = await fetchLatestVersion(PACKAGE_NAME);
158
+ if (!masterLatest) {
159
+ // Can't determine target version, skip update check
160
+ return results;
161
+ }
162
+
163
+ // Check packages against master version
155
164
  const checks = DJANGOCFG_PACKAGES.map(async (name) => {
156
165
  // Skip workspace packages unless force mode
157
166
  const isWorkspace = !shouldCheckUpdates(name);
@@ -164,10 +173,10 @@ export async function checkForUpdates(options: { forceCheckWorkspace?: boolean }
164
173
  return null;
165
174
  }
166
175
 
167
- const latest = await fetchLatestVersion(name);
168
- const hasUpdate = !!(latest && current && semver.gt(latest, current));
176
+ // All packages should update to master package version
177
+ const hasUpdate = !!(masterLatest && current && semver.gt(masterLatest, current));
169
178
 
170
- return { name, current, latest, hasUpdate };
179
+ return { name, current, latest: masterLatest, hasUpdate };
171
180
  });
172
181
 
173
182
  const checkResults = await Promise.all(checks);