chore: release — development → main - #364
Conversation
DX | 12-08-2026 | Release | Back-merge
Reword the warning logged when a referenced content type is not yet imported so it no longer implies permanent data loss. The reference is deferred and restored later in the same run, so the previous "Removing the field from schema..." wording was misleading. DX-10153 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per-item environments/locales were collapsed into batch-level arrays, so every item inherited the batch union: backup-dir assets published to every environment found in the backup, and revert unpublished using the first log entry's environments. Batches are now keyed on (locale, environment set). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…rors streamRelease now throws GithubError for HTTP 4xx/5xx responses instead of silently piping the error body (e.g. "404: Not Found") into the zlib decompressor. This was the root cause of the Z_DATA_ERROR crash when the cli-use branch was absent from a repo. extract now attaches an error handler directly on the zlib.createUnzip() stream. Node's pipe() does not forward stream errors, so without this listener a zlib failure emitted an unhandled error event and crashed the process rather than rejecting the Promise cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moving cliux.loader() (spinner stop) out of finally and into catch before cliux.error() prevents the spinner's carriage-return from wiping the error line. Success path stops the spinner inline after getLatest resolves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the generic cliux.error+rethrow pattern with a single clean Error throw so oclif prints one message. Message names both the repo and the missing cli-use branch so the developer knows exactly what to check on GitHub. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GraphQL requests reused the CDA (REST) host and a hardcoded region alias, so any non-default region got a 403 hitting a REST host with a GraphQL query. Resolve the region's actual GraphQL delivery endpoint instead, failing with a clear error when a region has none configured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Add stream.on('error', reject) to handle network/IO failures on the
source stream, not just zlib decompression errors
- Use distinct error message for non-404 HTTP failures (5xx, 403, etc.)
so users aren't told "repo not found" when it's a server/auth error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Widen CLI_BOOTSTRAP_APP_UNAVAILABLE to cover both repo and branch missing, not just branch, since GitHub returns 404 for both cases - Change status check from >= 400 to < 200 || >= 400 so unexpected non-2xx responses (e.g. stray 3xx) are also rejected as invalid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eference-warning fix(import): clarify global field reference-field warning message
- Widen status check from >= 400 to >= 300 so unexpected 3xx responses are rejected before being streamed into extract() - Add regression test asserting a 302 response throws GithubError - Update .talismanrc checksum for github.test.js to reflect new 302 test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sinon was used in tests but only available via pnpm workspace hoisting. Adding it explicitly to the package's own devDependencies ensures consistent resolution under strict pnpm module resolution. Version ^21.1.2 matches the standard used across most packages in the monorepo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(bulk-operations): publish only to scoped targets
fix(tsgen): resolve the real GraphQL endpoint per region
fix(bootstrap): reject on non-2xx tarball response and handle zlib errors
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
chore: package version bump
1814a67
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
1 similar comment
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate findings remain across compatibility, asset publishing, bootstrap messaging, batching, and secret scanning.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Description: Release updates for CLI plugins, including scoped asset publishing, Global Field restoration, tsgen GraphQL error handling, dependency refreshes, and documentation updates.
Changes:
- Adds target-aware backup asset publishing and batching.
- Improves import, tsgen, and bootstrap error handling.
- Updates package versions, dependencies, tests, and generated documentation.
File summaries
| File | Summary |
|---|---|
pnpm-workspace.yaml |
Updates dependency overrides. |
packages/contentstack-variants/package.json |
Release and dependency bump. |
packages/contentstack-seed/README.md |
Updates displayed version. |
packages/contentstack-seed/package.json |
Release and dependency bump. |
packages/contentstack-query-export/package.json |
Release and dependency bump. |
packages/contentstack-migration/README.md |
Updates displayed version. |
packages/contentstack-migration/package.json |
Release and dependency bump. |
packages/contentstack-migrate-rte/README.md |
Updates displayed version. |
packages/contentstack-migrate-rte/package.json |
Release and dependency bump. |
packages/contentstack-import/src/utils/content-type-helper.ts |
Clarifies deferred reference restoration. |
packages/contentstack-import/src/import/modules/assets.ts |
Updates post-scan publish guidance. |
packages/contentstack-import/src/commands/cm/stacks/import.ts |
Updates post-import publish guidance. |
packages/contentstack-import/README.md |
Updates displayed version. |
packages/contentstack-import/package.json |
Release and dependency bump. |
packages/contentstack-import-setup/README.md |
Updates displayed version. |
packages/contentstack-import-setup/package.json |
Release and dependency bump. |
packages/contentstack-external-migrate/package.json |
Dependency updates. |
packages/contentstack-export/README.md |
Updates displayed version. |
packages/contentstack-export/package.json |
Release and dependency bump. |
packages/contentstack-export-to-csv/README.md |
Updates displayed version. |
packages/contentstack-export-to-csv/package.json |
Release and dependency bump. |
packages/contentstack-content-type/README.md |
Updates displayed version. |
packages/contentstack-content-type/package.json |
Release and dependency bump. |
packages/contentstack-clone/README.md |
Regenerates command documentation. nit (3 votes): duplicate and invalid command usage remains. |
packages/contentstack-clone/package.json |
Release and dependency bump. |
packages/contentstack-cli-tsgen/test/unit/helper.test.ts |
Adds GraphQL host tests. |
packages/contentstack-cli-tsgen/src/lib/helper.ts |
Resolves region-specific GraphQL hosts. |
packages/contentstack-cli-tsgen/src/commands/tsgen.ts |
Uses resolved hosts and surfaces underlying errors. |
packages/contentstack-cli-tsgen/package.json |
Release and dependency bump. |
packages/contentstack-cli-cm-regex-validate/README.md |
Updates displayed version. |
packages/contentstack-cli-cm-regex-validate/package.json |
Release and dependency bump. |
packages/contentstack-bulk-operations/test/unit/utils/revert-retry-handler.test.ts |
Tests environment preservation. |
packages/contentstack-bulk-operations/test/unit/utils/item-fetcher.test.ts |
Tests requested publish locales. |
packages/contentstack-bulk-operations/test/unit/utils/batch-helper.test.ts |
Tests target-specific batching. |
packages/contentstack-bulk-operations/test/unit/utils/backup-dir-asset-fetcher.test.ts |
Tests backup asset target scanning. |
packages/contentstack-bulk-operations/test/unit/services/bulk-operation-service.test.ts |
Tests scoped environment payloads. |
packages/contentstack-bulk-operations/src/utils/revert-retry-handler.ts |
Preserves environments during revert and retry. |
packages/contentstack-bulk-operations/src/utils/item-fetcher.ts |
Separates locale hints from publish locales. |
packages/contentstack-bulk-operations/src/utils/interactive.ts |
Handles --backup-dir. |
packages/contentstack-bulk-operations/src/utils/index.ts |
Exports batching and scanning utilities. |
packages/contentstack-bulk-operations/src/utils/data-dir-asset-fetcher.ts |
Replaced by backup-directory scanning. |
packages/contentstack-bulk-operations/src/utils/config-builder.ts |
Builds backup-directory configuration. |
packages/contentstack-bulk-operations/src/utils/batch-helper.ts |
Implements target-aware batching. moderate (1 vote): per-key buckets can exceed the intended memory bound. |
packages/contentstack-bulk-operations/src/utils/backup-dir-asset-fetcher.ts |
Maps backup assets to publish targets. moderate (2 votes): unusable publish details can be counted as eligible. |
packages/contentstack-bulk-operations/src/services/bulk-operation-service.ts |
Prevents environment widening in bulk payloads. |
packages/contentstack-bulk-operations/src/messages/index.ts |
Adds backup-directory messaging. |
packages/contentstack-bulk-operations/src/interfaces/index.ts |
Adds backup-directory types. |
packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts |
Implements scoped backup publishing. critical (2 votes): removes the --data-dir/-d interface without a compatibility alias. moderate (1 vote): dry-run performs scan-status API requests. moderate (1 vote): scan targets include assets without valid publish targets. moderate (1 vote): backup-dir is not rejected for CMS-only operations. |
packages/contentstack-bulk-operations/src/base-bulk-command.ts |
Skips untargeted items. |
packages/contentstack-bulk-operations/README.md |
Documents backup publishing. |
packages/contentstack-bulk-operations/package.json |
Release and dependency bump. |
packages/contentstack-branches/README.md |
Updates displayed version. |
packages/contentstack-branches/package.json |
Release and dependency bump. |
packages/contentstack-bootstrap/test/github.test.js |
Adds GitHub error tests. |
packages/contentstack-bootstrap/src/bootstrap/index.ts |
Converts GitHub 404s into user-facing errors. moderate (1 vote): custom branches are reported as cli-use. |
packages/contentstack-bootstrap/src/bootstrap/github/client.ts |
Handles HTTP statuses and stream errors. |
packages/contentstack-bootstrap/README.md |
Updates displayed version. |
packages/contentstack-bootstrap/package.json |
Release and dependency bump. |
packages/contentstack-bootstrap/messages/index.json |
Adds bootstrap error messages. moderate (2 votes): the error text hard-codes the cli-use branch. |
packages/contentstack-audit/README.md |
Updates displayed version. |
packages/contentstack-audit/package.json |
Release and dependency bump. |
packages/contentstack-asset-management/package.json |
Release and dependency bump. |
packages/contentstack-apps-cli/README.md |
Updates displayed version. |
packages/contentstack-apps-cli/package.json |
Release and dependency bump. |
.talismanrc |
Updates secret-scan allowlists. critical (1 vote): removing existing fixture exceptions may cause secret-scan failures. |
Review details
Suppressed comments (5)
packages/contentstack-bootstrap/src/bootstrap/index.ts:79
- The 404 path always formats the message with the literal
cli-usebranch, even though the constructor accepts and usesappConfig.branchfor custom branches. Users requesting a different branch will receive an incorrect remediation message; pass the resolved branch into the message or use the branch fromthis.repo.
if (error instanceof GithubError && error.status === 404) {
throw new Error(messageHandler.parse('CLI_BOOTSTRAP_APP_UNAVAILABLE', this.appConfig.source));
}
packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts:308
- The
--dry-runhelp text promises that no API calls are made, but this return is reached only afterfetchScanStatusByUIDshas already issued management API requests. Check dry-run mode before that request (and define how scan-gating is represented in the preview), or change the flag contract to explicitly allow read-only API calls.
}
if (dryRun) {
log.info($t(messages.BACKUP_DIR_DRY_RUN));
return;
packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts:269
targetUidsis built from every UID in the import mapper, but that mapper also contains assets that pass 1 counted as skipped because they have nopublish_details(and assets whose details yield no valid target). A backup containing only such assets can therefore report clean publishable assets, prompt the user, and fetch scan status beforestreamAndPublishenqueues nothing. Track or return only UIDs with a valid publish target and use that set for the scan-status/dashboard counts.
this.bulkOperationConfig.environments = stats.environments;
this.bulkOperationConfig.locales = stats.locales;
packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts:95
- Because
backup-diris not included in the CMS-only flag list insrc/utils/operation-flag-matrix.ts,--operation delete|move --backup-dir ...passes the operation matrix and then silently ignores the directory in the CS Assets path. Add this new flag to the CMS-only list (and cover the invalid combination) so it is rejected like--folder-uid.
'backup-dir': flags.string({
description: messages.BACKUP_DIR_FLAG_DESC,
// Environments and locales are always derived per-asset from the backup.
exclusive: ['source-env', 'folder-uid', 'environments', 'locales'],
packages/contentstack-bulk-operations/src/utils/batch-helper.ts:67
- This stores up to 50 items for every distinct
(locale, environment-set)key untilend(). A backup containing many different environment subsets can therefore retain most or all assets in memory, contradicting the previous one-batch memory bound and risking high memory use on large imports. Flush or otherwise bound buckets while preserving target-specific batching, and account for the resulting batch count.
private readonly buckets = new Map<string, { locale: string; environments: string[]; items: PublishItem[] }>();
private batchCount = 0;
private skipped = 0;
constructor(
- Files reviewed: 65/66 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Pull request overview
Copilot reviewed 67 out of 68 changed files in this pull request and generated 6 comments.
Suppressed comments (4)
packages/contentstack-import/src/utils/content-type-helper.ts:1
- The updated warning claims the reference “will be restored once it is imported,” but this is inside
removeReferenceFields(and the prior message explicitly said the field is being removed). If the code still removes the reference field from the schema at this point, this message is misleading—either revert to wording that reflects removal, or adjust the implementation to actually defer/remediate references later.
packages/contentstack-clone/README.md:1 - This README section appears to contain duplicated command entries and a malformed USAGE line (
csdx cm:stack-clone cm:stacks:clone). Please regenerate the oclif docs (or manually remove duplicates) so the commands list has a single entry and the generated usage matches the actual invocation.
packages/contentstack-clone/README.md:1 - This README section appears to contain duplicated command entries and a malformed USAGE line (
csdx cm:stack-clone cm:stacks:clone). Please regenerate the oclif docs (or manually remove duplicates) so the commands list has a single entry and the generated usage matches the actual invocation.
packages/contentstack-cli-tsgen/test/unit/helper.test.ts:1 - The test mock reaches into an internal module path (
@contentstack/cli-utilities/lib/region-endpoints), which is brittle and can break on refactors/packaging changes. SinceresolveCanonicalEndpointsis imported from@contentstack/cli-utilitiesin production code, preferjest.requireActual("@contentstack/cli-utilities")and takeresolveCanonicalEndpointsfrom there.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved findings remain in release automation, bootstrap messaging, import error handling, and bulk-operations behavior.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (7)
.github/workflows/release-production-plugins.yml:39
- The workflow loads
release.jsonbut never referencessteps.release_config.outputs(or any exported variables), so all publish steps run unconditionally and the per-plugin release switches have no effect. Gate each publish step with the loaded release configuration, or remove this configuration-loading step if this workflow is intentionally always-all.
- name: Reading Configuration
id: release_config
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: .github/config/release.json
.talismanrc:5
- This hunk removes the existing Talisman ignore entries for unchanged audit fixtures and source files, even though those files still contain the fake
api_key/secret_keyfixture values that the ignores cover. The secret scan can now fail on these known test values; preserve the existing ignores or scrub the fixtures and update the checksums deliberately.
- filename: packages/contentstack-bulk-operations/src/utils/backup-dir-asset-fetcher.ts
checksum: fbf1ef882bf4ea8f06a7a28b9248a07e01f5a5d2d4da98dbb9ee52bc16ce318a
- filename: packages/contentstack-bulk-operations/test/unit/utils/backup-dir-asset-fetcher.test.ts
checksum: b905524c952aff0f089fa5347e0db18479b75a438cd9ae77e2dfe1cb203d7e59
packages/contentstack-bootstrap/messages/index.json:7
- This message hardcodes the default
cli-usebranch, but the bootstrap command accepts a custom branch. A 404 for a custom branch will therefore report the wrong branch and mislead the user; pass the actual selected branch or use wording that does not namecli-use.
"CLI_BOOTSTRAP_APP_UNAVAILABLE": "Unable to download \"%s\": the repository or branch \"cli-use\" was not found. Ensure both exist on GitHub.",
packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts:92
- Replacing the public
--data-diroption with--backup-dirmakes existing 2.0 automation fail with an unknown flag while this package is released as 2.1.0. Keep--data-diras a deprecated alias, or treat this as a documented breaking major release and migrate the config API consistently.
'backup-dir': flags.string({
packages/contentstack-bulk-operations/src/utils/backup-dir-asset-fetcher.ts:136
- Pass 1 counts any mapped asset with a non-empty
publish_detailsarray as eligible, but it does not return the eligible target UID set. The command later uses every mapper value for scan-status counts, so mapped assets with no publish details can be shown as clean and trigger confirmation even though pass 2 emits no batch. Return and use only eligible target UIDs.
eligible++;
// Same targets pass 2 batches on, so the counts stay exact.
const targets = assetPublishTargets(asset, environmentsMap);
packages/contentstack-bulk-operations/src/utils/item-fetcher.ts:138
- This makes
publish_details.localethe requested locale whileitem.localeremains the fallback resolution hint. The single/bulk operation loggers currently persist onlyitem.locale(bulk stores requested locales only at the batch level), and revert/retry reconstruct target details fromitem.locale, so a fallback entry published to e.g.fr-frwill later be retried or reverted inen-us. Persist and use the requested locale in the operation logs.
publish_details: validEnvironments.map((env) => ({
environment: env,
locale,
})),
packages/contentstack-clone/README.md:45
- This adds a second complete generated section for the same clone command: the original section starts again at line 98, while this inserted section also has a duplicate index entry and an incorrect
cm:stack-clone cm:stacks:cloneusage line. Remove the duplicate block and regenerate the README from the manifest.
- Files reviewed: 67/68 changed files
- Comments generated: 5
- Review effort level: Lite
Summary
Release PR merging
developmentintomain(27 commits).Package version bumps
@contentstack/cli-apps2.0.02.0.1@contentstack/cli-asset-management1.0.01.0.1@contentstack/cli-audit2.0.02.0.1@contentstack/cli-cm-branches2.0.02.0.1@contentstack/cli-cm-clone2.0.02.0.1@contentstack/cli-cm-export2.0.02.0.1@contentstack/cli-cm-export-to-csv2.0.02.0.1@contentstack/cli-cm-import2.0.02.0.1@contentstack/cli-cm-import-setup2.0.02.0.1@contentstack/cli-cm-migrate-rte2.0.02.0.1@contentstack/cli-cm-regex-validate2.0.02.0.1@contentstack/cli-content-type2.0.02.0.1@contentstack/cli-migration2.0.02.0.1@contentstack/cli-query-export2.0.02.0.1@contentstack/cli-seed2.0.02.0.1@contentstack/cli-variants2.0.02.0.1@contentstack/cli-external-migrate2.0.02.0.1Bug fixes
Maintenance
🤖 Generated with Claude Code