You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/29 09:53:23 UTC
[PR] refactor(release): project manifests from shipped files [maka]
Astro-Han opened a new pull request, #4152:
URL: https://github.com/apache/maka/pull/4152
## Summary
Keep the five `./test-only/*` exports in workspace manifests for tests and E2E, while deriving release manifests from the same Maka file policy that decides which build outputs ship.
CLI staging now projects each internal package manifest before packing. Desktop packaging applies the same projection to every nested `@maka` manifest after `app.asar` is built but before Electron embeds ASAR header integrity; the archive rewrite preserves packed, unpacked/native, linked, executable, and empty entries.
## Verification
- `npm run build`
- `npm run typecheck`
- `npm run format:check`
- `npm run lint`
- `node --test scripts/release-manifest-archive.test.mjs scripts/release-cli-file-policy.test.mjs scripts/product-release.test.mjs scripts/desktop-nightly.test.mjs` (47 passed)
- `npm run check:stale`
- `MAKA_CLI_DEVELOPMENT_PEER_TARGET=none npm run release:cli:pack -- --development`; inspected the generated tarball and confirmed all five excluded exports are absent
- `electron-builder --config electron-builder.config.mjs --mac --arm64 --dir --publish never -c.mac.identity=null -c.mac.forceCodeSigning=false`; inspected the resulting `Maka.app` ASAR and confirmed all five excluded exports are absent
- Resolved all five source workspace specifiers with `import.meta.resolve`; each still points at its test/E2E build output
Signed DMG/ZIP and Windows packaging were not run; the macOS directory build intentionally disabled signing while retaining production ASAR and embedded-integrity generation.
## Review focus
PR #3946 currently overlaps `package.json`, `scripts/release-cli-file-policy.mjs`, `scripts/release-cli-file-policy.test.mjs`, and `scripts/release-cli-package.mjs`. A three-way merge of this head (`746dba5087`) with #3946 head (`76d4f20262`) is textually clean. Because both change the release package path, rerun the release suite after whichever PR lands second.
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Codex diagnosed the release boundary, implemented the shared manifest projection and Electron archive integration, and added/ran the tests and artifact checks.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(release): project manifests from shipped files [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4152:
URL: https://github.com/apache/maka/pull/4152
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(release): project manifests from shipped files [maka]
Posted by "ARE404 (via GitHub)" <gi...@apache.org>.
ARE404 commented on code in PR #4152:
URL: https://github.com/apache/maka/pull/4152#discussion_r3886413410
##########
apps/desktop/electron-builder.config.mjs:
##########
@@ -17,18 +17,38 @@
* under the License.
*/
-import { readFileSync } from 'node:fs';
+import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
+import { join } from 'node:path';
import {
DESKTOP_NIGHTLY_FEED_URL,
resolveDesktopBuildVersion,
resolveRuntimeHostSetupPackage,
} from '../../scripts/desktop-nightly.mjs';
+import { workspaceReleaseManifest } from '../../scripts/release-cli-file-policy.mjs';
import { resolveProductManifestIdentity } from '../../scripts/product-release-identity.mjs';
function readManifest(relativePath) {
return JSON.parse(readFileSync(new URL(relativePath, import.meta.url), 'utf8'));
}
+async function stageReleaseManifests({ packager }) {
+ const stage = await packager.info.tempDirManager.createTempDir({
+ prefix: 'maka-release-manifests',
+ });
+ for (const name of ['mcp', 'runtime', 'runtime-host']) {
Review Comment:
[P3] The Electron staging path prunes release manifests only for `mcp`, `runtime`, and `runtime-host`. The npm-CLI and standalone paths prune every workspace, so the Electron asar keeps whatever `exports` each other `@maka/*` package ships as-is, including any `./test-only/*` branches. If the desktop depends on a package other than these three that exposes test-only exports, they will ride into the archive. Consider deriving the full set of shipped `@maka` package names (e.g. from the desktop's dependencies) instead of a hardcoded triple, so staging stays consistent with the other two packaging paths.
##########
scripts/release-cli-file-policy.mjs:
##########
@@ -245,6 +245,55 @@ export function isMakaDevelopmentArtifact(relativePath) {
);
}
+function releaseExportTarget(target) {
+ if (typeof target === 'string') {
+ return isMakaDevelopmentArtifact(target) ? undefined : target;
Review Comment:
[P3] Leaf-level pruning also drops `*.d.ts`(map) and `*.js.map` targets from the release `exports` and strips source maps from copied `dist`. For CLI/internal packages that don't ship types this is intended, but the reachability consequence is worth an explicit note: production stack traces will no longer be source-mapped, and any consumer expecting types from `@maka/*` will not find them in the release. I verified no shipped (non-test) module imports a pruned branch (only e2e/test-only code references `test-only/*`), so this is not a correctness break today — just record the intended surface.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org