Skip to content
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

New: Migration Scripts (fixes #57) #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

New: Migration Scripts (fixes #57) #58

wants to merge 1 commit into from

Conversation

joe-replin
Copy link

New

Testing

Test using this branch of the Adapt Framework which includes the scripts that handle the migration.
adaptlearning/adapt_framework#3633

@joe-replin joe-replin self-assigned this Jan 17, 2025
describe('adapt-contrib-blank - v2.0.0 > v4.1.3', async () => {
let blanks;

whereFromPlugin('adapt-contrib-blank - from v2.0.0', { name: 'adapt-contrib-blank', version: '<=4.1.3' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need to check if it's lower than the version we're updating to not equal to. Either '<4.1.3' or '<= 4.1.2'.

Suggested change
whereFromPlugin('adapt-contrib-blank - from v2.0.0', { name: 'adapt-contrib-blank', version: '<=4.1.3' });
whereFromPlugin('adapt-contrib-blank - from v2.0.0', { name: 'adapt-contrib-blank', version: '<4.1.3' });


whereContent('adapt-contrib-blank - where blank', async content => {
blanks = content.filter(({ _component }) => _component === 'blank');
if (blanks) return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per Ollie's suggestion (adaptlearning/adapt-contrib-accordion#159 (comment)) to condense these checks slightly suggested tweek

Suggested change
if (blanks) return true;
return blanks.length

return true;
});

updatePlugin('adapt-contrib-blank - update to v4.1.3', { name: 'adapt-contrib-blank', version: '4.1.3', framework: '>=4' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
updatePlugin('adapt-contrib-blank - update to v4.1.3', { name: 'adapt-contrib-blank', version: '4.1.3', framework: '>=4' });
updatePlugin('adapt-contrib-blank - update to v4.1.3', { name: 'adapt-contrib-blank', version: '4.1.3', framework: '>=5.19.1' });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Reviewing
Development

Successfully merging this pull request may close these issues.

Add Migration Scripts
2 participants