Skip to content

Commit

Permalink
Prepare for jquery 3 (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebakerckhof authored and benjamn committed Nov 15, 2019
1 parent e6b8a12 commit f13c2ad
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -20,7 +20,7 @@ test:
override:
# - tests/test-runner/test-all.sh:
# parallel: true
- METEOR_COMMAND=/tmp/meteor/meteor tests/test-runner/test-all.sh:
- METEOR_COMMAND=/tmp/meteor/meteor METEOR_COMMAND_EXTRA_ARGS="--test-app-path test-app" tests/test-runner/test-all.sh:
parallel: true
- cd site; npm run generate
deployment:
Expand Down
4 changes: 1 addition & 3 deletions packages/blaze/attrs.js
Expand Up @@ -171,9 +171,7 @@ var StyleHandler = Blaze._DiffingAttributeHandler.extend({
tokens.remove(match[1]);
}

// XXX No `String.trim` on Safari 4. Swap out $.trim if we want to
// remove strong dep on jquery.
tokens.append(match[1], match[0].trim ? match[0].trim() : $.trim(match[0]));
tokens.append(match[1], match[0].trim());

match = regex.exec(attrString);
}
Expand Down
5 changes: 3 additions & 2 deletions packages/blaze/package.js
Expand Up @@ -6,13 +6,14 @@ Package.describe({
});

Package.onUse(function (api) {
api.use('jquery@1.11.9'); // should be a weak dep, by having multiple "DOM backends"
api.use('jquery@1.11.9 || 3.0.0', { weak: true }); // should be a weak dep, by having multiple "DOM backends"
api.use('tracker@1.1.0');
api.use('check@1.2.3');
api.use('underscore@1.0.9');
api.use('observe-sequence@1.0.12');
api.use('reactive-var@1.0.10');
api.use('ordered-dict@1.0.9');
api.user('ecmascript@0.12.7');

api.export([
'Blaze',
Expand Down Expand Up @@ -50,7 +51,7 @@ Package.onUse(function (api) {
Package.onTest(function (api) {
api.use('tinytest@1.0.11');
api.use('test-helpers@1.0.10');
api.use('jquery@1.11.9'); // strong dependency, for testing jQuery backend
api.use('jquery@1.11.9 || 3.0.0'); // strong dependency, for testing jQuery backend
api.use('underscore@1.0.9');
api.use('reactive-var@1.0.10');
api.use('tracker@1.1.0');
Expand Down
2 changes: 1 addition & 1 deletion packages/spacebars-tests/package.js
Expand Up @@ -12,7 +12,7 @@ Package.onTest(function (api) {
'es5-shim@4.6.14',
'underscore@1.0.9',
'tinytest@1.0.11',
'jquery@1.11.9',
'jquery@1.11.9 || 3.0.0',
'test-helpers@1.0.10',
'reactive-var@1.0.10',
'markdown@1.0.10',
Expand Down
18 changes: 18 additions & 0 deletions test-app/package.json
@@ -0,0 +1,18 @@
{
"name": "blaze-test-app",
"version": "1.0.0",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"jquery": "^3.4.1",
"@babel/runtime": "^7.6.0",
"meteor-node-stubs": "^1.0.0"
}
}
2 changes: 1 addition & 1 deletion tests/test-runner
Submodule test-runner updated 4 files
+24 −0 LICENSE
+19 −4 runner.js
+1 −1 test-all.sh
+4 −2 test-package.sh

0 comments on commit f13c2ad

Please sign in to comment.