Skip to content

feature/2644 regroup asset subtypes and add mcdev migrate - #2646

Merged
JoernBerkefeld merged 7 commits into
developfrom
feature/2644-asset-miration-v2
Sep 16, 2026
Merged

JoernBerkefeld merged 7 commits into
developfrom
feature/2644-asset-miration-v2

Conversation

@JoernBerkefeld

Copy link
Copy Markdown
Contributor

PR details

What changes did you make? (Give an overview)

Further details (optional)

Historical asset group folders are renamed in v10:

  • message -> email
  • jsonmessage -> mobile (jsonmessagetemplate keeps the template group)
  • webpage, webtemplate, cloudpages, landingpage, microsite, interactivecontent and the six *coderesource types -> webstudio

Adds mcdev migrate <cred/bu>, which moves the selected Business Unit's existing retrieve tree into the current layout. Only that one retrieve tree is touched; the deploy and template trees are left alone and no server call is made. Moves are conflict-safe: when any destination path already exists, the whole asset is left in place and reported instead of being moved partially.

createDeltaPkg now ignores byte-identical regrouping moves, so a path change without a content edit produces neither an addition nor a deletion, while an asset that was moved and edited stays actionable in its new location instead of showing up as a logical deletion in the old one.

Also drops the retired xnerd.ampscript-language extension recommendation and updates the boilerplate VS Code file-nesting patterns to the new groups.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)

Historical asset group folders are renamed in v10:

- message -> email
- jsonmessage -> mobile (jsonmessagetemplate keeps the template group)
- webpage, webtemplate, cloudpages, landingpage, microsite,
  interactivecontent and the six *coderesource types -> webstudio

Adds `mcdev migrate <cred/bu>`, which moves the selected Business Unit's
existing retrieve tree into the current layout. Only that one retrieve tree
is touched; the deploy and template trees are left alone and no server call
is made. Moves are conflict-safe: when any destination path already exists,
the whole asset is left in place and reported instead of being moved
partially.

createDeltaPkg now ignores byte-identical regrouping moves, so a path change
without a content edit produces neither an addition nor a deletion, while an
asset that was moved and edited stays actionable in its new location instead
of showing up as a logical deletion in the old one.

Also drops the retired xnerd.ampscript-language extension recommendation and
updates the boilerplate VS Code file-nesting patterns to the new groups.
@JoernBerkefeld JoernBerkefeld added this to the 10.0.0 milestone Sep 13, 2026
@JoernBerkefeld JoernBerkefeld self-assigned this Sep 13, 2026
@JoernBerkefeld JoernBerkefeld linked an issue Sep 13, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label Sep 13, 2026
@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Coverage Report

Commit:257cc34
Base: develop@fd0a632

Type Base This PR
Total Statements Coverage  74.02%  75.42%  (+1.4%)
Total Branches Coverage  72.57%  72.6%  (+0.03%)
Total Functions Coverage  85.74%  86.34%  (+0.6%)
Total Lines Coverage  74.02%  75.42%  (+1.4%)
Details (changed files):
File Statements Branches Functions Lines
lib/cli.js  20.35%  100%  0%  20.35%
lib/index.js  72.02%  67.11%  79.24%  72.02%
lib/metadataTypes/Asset.js  82.35%  74.11%  92%  82.35%
lib/util/devops.js  72.77%  67.92%  83.33%  72.77%
lib/util/init.config.js  69.32%  80%  88.88%  69.32%
lib/util/init.js  27.44%  88.88%  14.28%  27.44%
lib/util/init.npm.js  98.74%  97.95%  100%  98.74%
lib/util/migrations/assetV10.js  94.59%  92.1%  100%  94.59%

The migration guide now lives in the wiki, which is the maintained home for
this material and covers the same ground in more detail:

https://github.com/Accenture/sfmc-devtools/wiki/03.a-~-Migrating-to-v10

Remove the in-repo copy so the two cannot drift apart, and point the README
at the wiki page instead. Before removing it, the one thing the wiki was
missing was carried over: the list of retired legacy boilerplate build
scripts (build, build-cp, build-email) and the note that custom or chained
build commands are preserved.
The v10 asset migration gave no feedback while it ran and could leave
retired group folders behind without explaining why.

- print upfront info stating what happens, that only the local retrieve
  folder is reorganized (no changes on the server) and that it may take
  a while
- show one cli-progress bar per historical group, sized from the owner
  count already gathered before any move
- never throw while removing folders: retry once on EPERM/EBUSY and
  record survivors instead of aborting the run
- replace file-move-driven pruning, which could never remove folders
  that were already empty, with a bottom-up sweep of the retired group
  root; the now-unused pruneEmptyDirectories is removed
- report asset types without a current mapping instead of skipping them
  silently
- distinguish surviving folders that are now empty (safe to remove
  manually) from those that still contain files (must NOT be deleted)
  and name the remaining entries
- guard the directory walk against unreadable entries so the report is
  always produced
- raise the Mocha timeout in the automation and journey suites, which
  exceeded the 2000 ms default on loaded machines
Migrate every BU of one credential in a single run: per-BU reporting with each line prefixed credential/BU, a per-BU catch so one failure cannot abort the run, and partial results returned. Stops the group progress bar on throw so a failed BU no longer leaves a stale bar. Adds mutation-verified coverage for the isolation and bar cleanup.
@JoernBerkefeld
JoernBerkefeld merged commit 68a7c8f into develop Sep 16, 2026
7 checks passed
@JoernBerkefeld
JoernBerkefeld deleted the feature/2644-asset-miration-v2 branch September 16, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] regroup and migrate asset subtypes

1 participant