Skip to content

New: Run adapt-migrations directly for all trigger points - #174

Merged
taylortom merged 2 commits into
feature/combined-updatesfrom
feature/direct-migrations
Mar 23, 2026
Merged

New: Run adapt-migrations directly for all trigger points#174
taylortom merged 2 commits into
feature/combined-updatesfrom
feature/direct-migrations

Conversation

@taylortom

Copy link
Copy Markdown
Contributor

New

  • Add adapt-migrations as a direct npm dependency, replacing the grunt subprocess approach
  • Add shared migration utilities: readFrameworkPluginVersions, collectMigrationScripts, runContentMigration, migrateExistingCourses
  • Add public migrateCourses() method on AdaptFrameworkModule for use by contentplugin
  • Framework update (updateFramework()) now captures before/after plugin versions and migrates all existing courses
  • Course import (migrateCourseData()) now runs in-memory migration instead of spawning grunt
  • Include migration results in the POST /update API response
  • Add FW_UPDATE_MIGRATION_FAILED error definition

Testing

  • 17 new unit tests across 4 test files (all passing)
  • npx standard passes
  • Full test suite: 135 tests, 0 failures

Companion PR: adapt-security/adapt-authoring-contentplugin#90 (triggers migrations on plugin update)
Replaces the grunt-based approach from adapt-security/adapt-authoring-contentplugin#29

…plugin update

Replace the grunt-based migration subprocess with direct calls to the
adapt-migrations JS API. Shared utilities (readFrameworkPluginVersions,
collectMigrationScripts, runContentMigration, migrateExistingCourses)
support all three trigger points: framework update, course import, and
plugin update via the new public migrateCourses() method.
@taylortom
taylortom changed the base branch from master to release/2.6.0 March 20, 2026 12:50
@taylortom
taylortom changed the base branch from release/2.6.0 to feature/combined-updates March 23, 2026 20:50
@taylortom
taylortom merged commit 74276ab into feature/combined-updates Mar 23, 2026
2 checks passed
@taylortom
taylortom deleted the feature/direct-migrations branch March 23, 2026 20:56
github-actions Bot pushed a commit that referenced this pull request May 8, 2026
# [3.0.0](v2.6.0...v3.0.0) (2026-05-08)

### Breaking

* Migrations, prebuilt cache, and import improvements (#186) ([5a0d1d0](5a0d1d0)), closes [#186](#186)

### Build

* Bump deps to released majors ([a60e41e](a60e41e))
* Revert errant adapt-migrations bump ([345864b](345864b))

### Chore

* Add packages:write permission to release workflow ([56a5c46](56a5c46))
* Remove adapt-octopus dependency (#193) ([1e11459](1e11459)), closes [#193](#193)
* Update resolveAssets test for drop-and-warn behaviour ([a87b310](a87b310))

### Fix

* Address several import correctness issues ([97987c8](97987c8))
* Apply patchCustomStyle/patchThemeName to in-memory content ([871a11a](871a11a))
* Apply schema defaults to all content types on cache hit (refs #176) ([b2cb531](b2cb531)), closes [#176](#176)
* Cache all build artifacts and apply schema defaults on cache hit ([cc0071a](cc0071a))
* Defer contentplugin dependency to break circular deadlock ([c9cd741](c9cd741))
* Defer updateEnabledPlugins until import completes (refs #109) ([ebb1c11](ebb1c11)), closes [#109](#109)
* Exclude disabled themes/menus from build sources ([18068c7](18068c7)), closes [adaptlearning/adapt_framework#3802](adaptlearning/adapt_framework#3802)
* Guard _shareWithUsers optional chaining in checkContentAccess ([dc2c1cf](dc2c1cf))
* include all installed plugins in preview prebuilt cache ([b4f52b9](b4f52b9))
* Make in-memory migration cache prod-writable and concurrency-safe ([147a2f7](147a2f7))
* Map duplicate assets during import instead of warning (#172) ([080b6a1](080b6a1)), closes [#172](#172)
* Merge master and address PR review comments (refs #186) ([99898c2](99898c2)), closes [#186](#186)
* surface real errors in import dry-run and asset resolution ([0066a58](0066a58))
* Update rollback tests to reflect courseassets removal ([3531709](3531709))
* Use hierarchy index as canonical _sortOrder during import ([5a47f41](5a47f41))
* Use JSON-normalized content on write in migrateExistingCourses ([778a354](778a354))

### New

* Eager shared cache prebuild after invalidation (refs #176) ([30dd01d](30dd01d)), closes [#176](#176)
* import migration to drop invalid vanilla _backgroundStyles values ([ee49d3c](ee49d3c))
* Pre-built compilation cache for preview builds (refs #176) ([491081f](491081f)), closes [#176](#176)
* prebuild shared cache on boot when missing, with build diagnostics ([d1f8f13](d1f8f13))
* Run adapt-migrations directly for all trigger points (#174) ([74276ab](74276ab)), closes [#174](#174)

### Refactor

* Promote prebuiltCache utils to lib/BuildCache.js class ([b04b239](b04b239))

### Update

* Adapt to synchronous adapt-schemas v3 API ([2336a5b](2336a5b)), closes [adapt-security/adapt-authoring-jsonschema#58](adapt-security/adapt-authoring-jsonschema#58)
* Collapse prebuilt cache to single dir, prebuild every theme/menu combo ([b485c23](b485c23))
* Replace courseassets dependency with content._assetIds queries (refs adapt-security/adapt-authoring-content#114) ([ecd72b9](ecd72b9)), closes [adapt-security/adapt-authoring-content#114](adapt-security/adapt-authoring-content#114)
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant