forked from cult-of-coders/redis-oplog
-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Meteor 3.1 #15
Merged
StorytellerCZ
merged 21 commits into
Meteor-Community-Packages:meteor-3
from
leonardoventurini:meteor-3.1
Dec 11, 2024
Merged
Meteor 3.1 #15
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ea94507
fix version
leonardoventurini 4b2d68a
fix method name
leonardoventurini cecbbf9
use local files instead of package
leonardoventurini e720ed7
adjust test matrix
leonardoventurini 6dc8498
adjust versions
leonardoventurini 64dcff7
use latest ubuntu
leonardoventurini 081d1f8
make cursor backwards compatible
leonardoventurini b7e2781
add commands
leonardoventurini 5947b54
exclude arch
leonardoventurini 2415b80
finetune tested versions
leonardoventurini d034513
adjust test
leonardoventurini f282e44
disable fail fast
leonardoventurini 5bbf612
fix tests
leonardoventurini 39b510b
add log to test
leonardoventurini 64c2b6d
run cd in subshell
leonardoventurini e63b5e6
allow test to run independent from setup
leonardoventurini baba36b
fix allow deny issue
leonardoventurini 396e576
add command for checkout
leonardoventurini 0886f34
add perf improvements
leonardoventurini 0f48157
Merge branch 'meteor-3' into meteor-3.1
leonardoventurini ef88b11
change version
leonardoventurini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
function @setup-test() { | ||
local meteor_version=${1:-"3.1"} | ||
|
||
echo "🚀 Setting up test environment for Meteor ${meteor_version}" | ||
|
||
rm -rf test | ||
meteor create --release ${meteor_version} --bare test | ||
|
||
( | ||
cd test | ||
meteor npm i --save puppeteer@1.18.1 simpl-schema@3.4.6 chai@4.3.6 | ||
) | ||
} | ||
|
||
function @test() { | ||
local meteor_version=${1:-"3.1"} | ||
|
||
echo "🚀 Running tests with Meteor ${meteor_version}" | ||
|
||
( | ||
cd test | ||
METEOR_PACKAGE_DIRS="../" TEST_BROWSER_DRIVER=puppeteer meteor test-packages \ | ||
--raw-logs \ | ||
--once \ | ||
--driver-package meteortesting:mocha \ | ||
--release ${meteor_version} \ | ||
--exclude-archs=web.browser.legacy \ | ||
../ | ||
) | ||
} | ||
|
||
function @testd { | ||
( | ||
cd test | ||
METEOR_PACKAGE_DIRS="../" TEST_BROWSER_DRIVER=puppeteer meteord test-packages \ | ||
--raw-logs \ | ||
--once \ | ||
--driver-package meteortesting:mocha \ | ||
--exclude-archs=web.browser.legacy \ | ||
../ | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import { assert } from 'chai'; | ||
import {Mongo} from 'meteor/mongo'; | ||
import { Mongo } from 'meteor/mongo'; | ||
|
||
const InitialAddCollection = new Mongo.Collection('initial_add') | ||
const InitialAddCollection = new Mongo.Collection('initial_add'); | ||
describe('Initial Add', function () { | ||
let lastDocId; | ||
before(function () { | ||
InitialAddCollection.remove({}); | ||
for (let i = 0; i <= 10; i++) { | ||
lastDocId = InitialAddCollection.insert({number: i}) | ||
} | ||
}); | ||
let lastDocId; | ||
before(async function () { | ||
await InitialAddCollection.removeAsync({}); | ||
for (let i = 0; i <= 10; i++) { | ||
lastDocId = await InitialAddCollection.insertAsync({ number: i }); | ||
} | ||
}); | ||
|
||
it('Should not crash on initial add', function (done) { | ||
Meteor.defer(() => { | ||
let err; | ||
InitialAddCollection.find().observeChanges({ | ||
added(_id, doc) { | ||
if (err) return; | ||
Meteor._sleepForMs(10) // simulate a more costly operation | ||
try { | ||
assert.isDefined(doc) | ||
} catch (e) { | ||
err = e | ||
} | ||
} | ||
}); | ||
done(err); | ||
}); | ||
Meteor.defer(() => { | ||
InitialAddCollection.remove({_id: lastDocId}) | ||
}) | ||
}) | ||
it('Should not crash on initial add', function (done) { | ||
Meteor.defer(async () => { | ||
let err; | ||
await InitialAddCollection.find().observeChanges({ | ||
async added(_id, doc) { | ||
if (err) return; | ||
await Meteor._sleepForMs(10); // simulate a more costly operation | ||
try { | ||
assert.isDefined(doc); | ||
} catch (e) { | ||
err = e; | ||
} | ||
}, | ||
}); | ||
done(err); | ||
}); | ||
Meteor.defer(async () => { | ||
await InitialAddCollection.removeAsync({ _id: lastDocId }); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 3.0.0-rc.3
There was no 3.0 release. If this is enough to get us Meteor 3 compat I'm happy to release this as 3.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests pass and some companies are already using it in production. I think it should be 3.0 do reduce confusion IMO.