Skip to content

Commit

Permalink
build(Meteor): migrate full app to Meteor 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jankapunkt committed Aug 6, 2024
1 parent ff2b795 commit 1dda42b
Show file tree
Hide file tree
Showing 41 changed files with 4,192 additions and 2,411 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
.deploy
.coverage
packages/
36 changes: 20 additions & 16 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

[email protected].1 # Packages every Meteor app needs to have
mongo@1.16.6 # The database Meteor supports right now
[email protected].2 # Packages every Meteor app needs to have
mongo@2.0.0 # The database Meteor supports right now

#[email protected] # JS minifier run for production mode
zodern:remove-client-js
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable ECMAScript2015+ syntax in app code

#========================================
# Performance
#========================================
# zodern:remove-client-js

#========================================
# testing
#========================================
meteortesting:mocha
lmieulet:meteor-coverage@3.2.0!
lmieulet:meteor-legacy-coverage
meteortesting:mocha@3.2.0!
lmieulet:meteor-coverage@4.3.0
lmieulet:meteor-legacy-coverage@0.4.0

#========================================
# core
Expand All @@ -35,7 +39,7 @@ leaonline:method-factory
leaonline:grid-factory
leaonline:http-factory
leaonline:service-registry
leaonline:webapp
# leaonline:webapp

jkuester:[email protected]
# leaonline:status
Expand All @@ -44,10 +48,10 @@ jkuester:[email protected]
# accounts / oauth
#========================================
# alanning:roles
accounts-base@2.2.8
accounts-base
leaonline:accounts-lea
leaonline:ddp-login-handler
service-configuration@1.3.1
service-configuration

#========================================
# files
Expand All @@ -57,19 +61,19 @@ ostrio:files
#========================================
# collections
#========================================
aldeed:collection2
matb33:collection-hooks
aldeed:collection2@4.0.3
matb33:collection-hooks@2.0.0-rc.2
dburles:mongo-collection-instances


#========================================
# SECURITY
#========================================
sha@1.0.9
audit-argument-checks@1.0.7
force-ssl@1.1.0
sha
audit-argument-checks
force-ssl

#========================================
# reporting
#========================================
email@2.2.5
email
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.12
METEOR@3.0.1
182 changes: 91 additions & 91 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
[email protected]
[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
aldeed:[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
jkuester:[email protected]
lai:collection-extensions@0.3.0
lai:collection-extensions@1.0.0-rc300.10
leaonline:[email protected]
leaonline:collection-factory@1.0.4
leaonline:corelib@1.0.0
leaonline:ddp-login-handler@2.0.0
leaonline:collection-factory@2.0.0
leaonline:corelib@2.0.0
leaonline:ddp-login-handler@3.0.0
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
lmieulet:[email protected]
lmieulet:[email protected]
[email protected]
[email protected]
matb33:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
leaonline:[email protected]
lmieulet:[email protected]
lmieulet:[email protected]
[email protected]
[email protected]
matb33:[email protected]
mdg:[email protected]
meteor@1.11.2
[email protected].1
meteortesting:browser-tests@1.5.1
meteortesting:mocha@2.1.0
meteortesting:mocha-core@8.1.2
minimongo@1.9.3
[email protected].9
modules@0.19.0
[email protected].1
mongo@1.16.6
[email protected].3
[email protected].0
[email protected].8
npm-mongo@4.16.0
oauth@2.2.0
[email protected].2
ordered-dict@1.1.0
ostrio:cookies@2.7.2
meteor@2.0.0
[email protected].2
meteortesting:browser-tests@1.7.0
meteortesting:mocha@3.2.0
meteortesting:mocha-core@8.2.0
minimongo@2.0.0
[email protected].11
modules@0.20.1
[email protected].2
mongo@2.0.0
[email protected].4-beta300.7
[email protected].1
[email protected].9
npm-mongo@4.17.3
oauth@3.0.0
[email protected].3
ordered-dict@1.2.0
ostrio:cookies@2.8.1
ostrio:[email protected]
ostrio:files@2.3.3
ostrio:files@3.0.0-beta.6
ostrio:[email protected]
promise@0.12.2
promise@1.0.0
raix:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
tmeasday:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
zodern:[email protected]
zodern:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
zodern:[email protected]
32 changes: 13 additions & 19 deletions imports/api/collection/tests/CollectionTimeStamps.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { stub, restoreAll } from '../../../../tests/helpers/testHelpers'
describe(CollectionTimeStamp.name, function () {
const collection = new Mongo.Collection(null)
const name = Random.id()
let mailStub
beforeEach(() => {
mailStub = stub(Email, 'sendAsync', () => {})
})

afterEach(function () {
restoreAll()
Expand All @@ -25,7 +29,7 @@ describe(CollectionTimeStamp.name, function () {

// insert
await asyncTimeout(50)
const insertDocId = collection.insert({})
const insertDocId = await collection.insertAsync({})
const afterInsert = CollectionTimeStamp.get(name)
expect(afterInsert).to.be.above(now)
now = afterInsert
Expand All @@ -34,7 +38,7 @@ describe(CollectionTimeStamp.name, function () {
await asyncTimeout(50)
// should still be equal
expect(CollectionTimeStamp.get(name)).to.equal(now)
collection.update(insertDocId, { $set: { foo: 'bar' } })
await collection.updateAsync(insertDocId, { $set: { foo: 'bar' } })
const afterUpdate = CollectionTimeStamp.get(name)
expect(afterUpdate).to.be.above(now)
now = afterUpdate
Expand All @@ -43,32 +47,24 @@ describe(CollectionTimeStamp.name, function () {
await asyncTimeout(50)
// should still be equal
expect(CollectionTimeStamp.get(name)).to.equal(now)
collection.remove(insertDocId)
await collection.removeAsync(insertDocId)
const afterRemove = CollectionTimeStamp.get(name)
expect(afterRemove).to.be.above(now)
})
it('throws if the collection does not exist', async function () {
let sent = false
stub(Email, 'send', () => {
sent = true
})
const unknown = Random.id()

expect(() => CollectionTimeStamp.register(unknown))
.to.throw(`Expected collection for ${unknown}`)
await asyncTimeout(50) // email send is deferred
expect(sent).to.equal(true)
expect(mailStub.calledOnce).to.equal(true)
})
it('throws on access to unregistered collection', async function () {
let sent = false
stub(Email, 'send', () => {
sent = true
})
const unknown = Random.id()
expect(() => CollectionTimeStamp.get(unknown))
.to.throw(`No collection for ${unknown} registered`)
await asyncTimeout(50) // email send is deferred
expect(sent).to.equal(true)
expect(mailStub.calledOnce).to.equal(true)
})
it('provides a route for accessing the timestamp', async function () {
const now = Date.now()
Expand All @@ -78,14 +74,12 @@ describe(CollectionTimeStamp.name, function () {
})
}
await asyncTimeout(50)
const lastUpdate = CollectionTimeStamp.routes.get.run.call(env)
const lastUpdate = await CollectionTimeStamp.routes.get.run.call(env)
expect(lastUpdate).to.be.below(now)
})
it('ignores already registered collections', function () {
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
for (let i = 0; i < 10; i++) {
expect(CollectionTimeStamp.register(name, collection)).to.equal(undefined)
}
})
})
Loading

0 comments on commit 1dda42b

Please sign in to comment.