Skip to content

Commit

Permalink
Add upgrader to add jquery dependency for blaze-users.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebakerckhof authored and Ben Newman committed Dec 18, 2019
1 parent 7e753ff commit 8ec8cc1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
1 change: 1 addition & 0 deletions tools/tests/apps/modules/.meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
1 change: 1 addition & 0 deletions tools/tests/apps/standard-app/.meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ notices-for-facebook-graph-api-2
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
1.7-split-underscore-from-meteor-base
1.8.3-split-jquery-from-blaze
19 changes: 19 additions & 0 deletions tools/upgraders.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,25 @@ safely remove it using 'meteor remove underscore'.`,
packagesFile.addPackages([`underscore`]);
packagesFile.writeIfModified();
}
},

'1.8.3-split-jquery-from-blaze': function (projectContext) {
const packagesFile = projectContext.projectConstraintsFile;
if (! packagesFile.getConstraint(`jquery`) &&
packagesFile.getConstraint(`blaze-html-templates`)) {

maybePrintNoticeHeader();
Console.info(
`The jquery package has become a weak dependency of the blaze package. \
Since you will most likely need jquery as the commonly used blaze backend \
and it was not listed in your .meteor/packages files, it has \
been added automatically. If your app is not using jquery, then you can \
safely remove it using 'meteor remove jquery'.`,
Console.options({ bulletPoint: "1.8.3: " })
);
packagesFile.addPackages([`jquery`]);
packagesFile.writeIfModified();
}
}

////////////
Expand Down

0 comments on commit 8ec8cc1

Please sign in to comment.