-
-
Notifications
You must be signed in to change notification settings - Fork 937
fix: rebrand internal .aiox-core/package.json + add namespace drift gate (#739 Bug 2) #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
edda142
fix: rebrand internal .aiox-core/package.json + add namespace drift gate
rafaelscosta 7d4fd5e
fix: address CodeRabbit feedback on PR #746 + sync install-manifest
rafaelscosta 1f4cb2b
chore(sync): propagate devops.md release-procedure section to IDE pro…
rafaelscosta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| #!/usr/bin/env node | ||
| /** | ||
| * .aiox-core/package.json namespace + version sync validator | ||
| * | ||
| * Story #739 (Bug 2 follow-up): the internal `.aiox-core/package.json` | ||
| * manifest drifted to the legacy `@aiox-fullstack/core@4.31.1` namespace | ||
| * while the surface package moved to `@aiox-squads/core@5.x`. Several | ||
| * releases shipped stale internal metadata that confused tooling and | ||
| * misled operators investigating upgrade issues. | ||
| * | ||
| * This validator runs in the pre-publish surface to catch the drift | ||
| * before it ships again. | ||
| * | ||
| * Validation rules: | ||
| * 1. `.aiox-core/package.json` MUST exist. | ||
| * 2. `name` MUST end with `-internal` (it is NOT a published package on | ||
| * its own — `private: true` + suffix avoids npm registry confusion | ||
| * with the parent surface). | ||
| * 3. `private` MUST be true. | ||
| * 4. `version` MUST equal the root `package.json` version (single source | ||
| * of truth: the parent surface drives the framework version). | ||
| * 5. No `peerDependencies` referencing the legacy `@aiox-fullstack/*` | ||
| * namespace. | ||
| * | ||
| * Exit codes: 0 = PASS, 1 = FAIL | ||
| * Usage: node scripts/validate-aiox-core-namespace.js | ||
| */ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| const ROOT = path.resolve(__dirname, '..'); | ||
| const INTERNAL_PKG = path.join(ROOT, '.aiox-core', 'package.json'); | ||
| const ROOT_PKG = path.join(ROOT, 'package.json'); | ||
|
|
||
| function fail(msg) { | ||
| console.error(`FAIL: ${msg}`); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| function main() { | ||
| if (!fs.existsSync(INTERNAL_PKG)) { | ||
| fail('.aiox-core/package.json not found'); | ||
| } | ||
| if (!fs.existsSync(ROOT_PKG)) { | ||
| fail('root package.json not found'); | ||
| } | ||
|
|
||
| const internal = JSON.parse(fs.readFileSync(INTERNAL_PKG, 'utf8')); | ||
| const root = JSON.parse(fs.readFileSync(ROOT_PKG, 'utf8')); | ||
|
|
||
| if (!internal.name) { | ||
| fail('.aiox-core/package.json missing `name` field'); | ||
| } | ||
| const EXPECTED_SCOPE = '@aiox-squads/'; | ||
| if (!internal.name.startsWith(EXPECTED_SCOPE)) { | ||
| fail( | ||
| `.aiox-core/package.json name "${internal.name}" must start with "${EXPECTED_SCOPE}" ` + | ||
| '(current org scope — names like `@aiox-fullstack/*` are legacy, see Story #739)', | ||
| ); | ||
| } | ||
| if (!internal.name.endsWith('-internal')) { | ||
| fail( | ||
| `.aiox-core/package.json name "${internal.name}" must end with "-internal" ` + | ||
| '(internal manifest, not a separately-published package — see Story #739)', | ||
| ); | ||
| } | ||
| if (internal.private !== true) { | ||
| fail('.aiox-core/package.json must declare `"private": true` (internal-only)'); | ||
| } | ||
| if (internal.version !== root.version) { | ||
| fail( | ||
| `version drift: .aiox-core/package.json version "${internal.version}" ` + | ||
| `does not match root package.json version "${root.version}". ` + | ||
| 'They must move in lockstep — root is SOT.', | ||
| ); | ||
| } | ||
|
|
||
| const peerDeps = internal.peerDependencies || {}; | ||
| const legacyPeers = Object.keys(peerDeps).filter((d) => d.startsWith('@aiox-fullstack/')); | ||
| if (legacyPeers.length > 0) { | ||
| fail( | ||
| `legacy @aiox-fullstack/* peerDependencies in .aiox-core/package.json: ${legacyPeers.join(', ')}. ` + | ||
| 'These packages do not exist; drop the peerDependencies block or rename to the current namespace.', | ||
| ); | ||
| } | ||
|
|
||
| console.log( | ||
| `PASS: .aiox-core/package.json is in sync with root (name=${internal.name}, version=${internal.version})`, | ||
| ); | ||
| process.exit(0); | ||
| } | ||
|
|
||
| main(); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.