mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Merge pull request #17362 from overleaf/bg-chai-object-id-tests
fix for chai object id tests GitOrigin-RevId: 98123dbc930c6ee57be3a118177426120482c5f4
This commit is contained in:
parent
3083d8082f
commit
9babc70df7
24 changed files with 85 additions and 499 deletions
481
package-lock.json
generated
481
package-lock.json
generated
|
@ -41974,7 +41974,6 @@
|
|||
"celebrate": "^15.0.3",
|
||||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"p-map": "^4.0.0",
|
||||
"request": "^2.88.2"
|
||||
|
@ -41999,73 +41998,6 @@
|
|||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"services/docstore/node_modules/gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"services/docstore/node_modules/mongodb": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz",
|
||||
"integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.2.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"services/docstore/node_modules/mongodb/node_modules/bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"services/docstore/node_modules/sinon": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.3.tgz",
|
||||
|
@ -42114,7 +42046,6 @@
|
|||
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
|
||||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2",
|
||||
"requestretry": "^7.1.0"
|
||||
|
@ -42131,73 +42062,6 @@
|
|||
"typescript": "^5.0.4"
|
||||
}
|
||||
},
|
||||
"services/document-updater/node_modules/bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"services/document-updater/node_modules/gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"services/document-updater/node_modules/mongodb": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz",
|
||||
"integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.2.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"services/filestore": {
|
||||
"name": "@overleaf/filestore",
|
||||
"dependencies": {
|
||||
|
@ -42377,7 +42241,6 @@
|
|||
"bunyan": "^1.8.15",
|
||||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"octonode": "^0.9.5",
|
||||
"p-limit": "^2.2.0",
|
||||
|
@ -42394,73 +42257,6 @@
|
|||
"typescript": "^5.0.4"
|
||||
}
|
||||
},
|
||||
"services/github-sync/node_modules/bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"services/github-sync/node_modules/gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"services/github-sync/node_modules/mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"services/github-sync/node_modules/p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
|
@ -43867,7 +43663,6 @@
|
|||
"bunyan": "^1.8.15",
|
||||
"express": "^4.19.2",
|
||||
"method-override": "^3.0.0",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2"
|
||||
},
|
||||
|
@ -43880,73 +43675,6 @@
|
|||
"typescript": "^5.0.4"
|
||||
}
|
||||
},
|
||||
"services/notifications/node_modules/bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"services/notifications/node_modules/gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"services/notifications/node_modules/mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"services/project-history": {
|
||||
"name": "@overleaf/project-history",
|
||||
"dependencies": {
|
||||
|
@ -44309,7 +44037,6 @@
|
|||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"lru-cache": "^5.1.1",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"oauth": "0.9.15",
|
||||
"request": "^2.88.2",
|
||||
|
@ -44326,14 +44053,6 @@
|
|||
"typescript": "^5.0.4"
|
||||
}
|
||||
},
|
||||
"services/third-party-references/node_modules/bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"services/third-party-references/node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
|
@ -44343,65 +44062,6 @@
|
|||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"services/third-party-references/node_modules/gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"services/third-party-references/node_modules/mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"services/third-party-references/node_modules/sinon": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz",
|
||||
|
@ -52048,7 +51708,6 @@
|
|||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"p-map": "^4.0.0",
|
||||
"request": "^2.88.2",
|
||||
|
@ -52064,34 +51723,6 @@
|
|||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz",
|
||||
"integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==",
|
||||
"requires": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.2.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"sinon": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.3.tgz",
|
||||
|
@ -52139,7 +51770,6 @@
|
|||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2",
|
||||
"requestretry": "^7.1.0",
|
||||
|
@ -52148,34 +51778,6 @@
|
|||
"sinon-chai": "^3.7.0",
|
||||
"timekeeper": "^2.0.0",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q=="
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz",
|
||||
"integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==",
|
||||
"requires": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.2.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@overleaf/eslint-plugin": {
|
||||
|
@ -52342,7 +51944,6 @@
|
|||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"octonode": "^0.9.5",
|
||||
"p-limit": "^2.2.0",
|
||||
|
@ -52354,32 +51955,6 @@
|
|||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q=="
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"requires": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
|
@ -52461,40 +52036,11 @@
|
|||
"express": "^4.19.2",
|
||||
"method-override": "^3.0.0",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2",
|
||||
"sandboxed-module": "^2.0.4",
|
||||
"sinon": "^9.2.4",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q=="
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"requires": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@overleaf/o-error": {
|
||||
|
@ -52975,7 +52521,6 @@
|
|||
"lodash": "^4.17.21",
|
||||
"lru-cache": "^5.1.1",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"oauth": "0.9.15",
|
||||
"request": "^2.88.2",
|
||||
|
@ -52985,38 +52530,12 @@
|
|||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz",
|
||||
"integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q=="
|
||||
},
|
||||
"diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",
|
||||
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"gaxios": "^5.0.0",
|
||||
"json-bigint": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.1.0.tgz",
|
||||
"integrity": "sha512-AvzNY0zMkpothZ5mJAaIo2bGDjlJQqqAbn9fvtVgwIIUPEfdrqGxqNjjbuKyrgQxg2EvCmfWdjq+4uj96c0YPw==",
|
||||
"requires": {
|
||||
"@mongodb-js/saslprep": "^1.1.0",
|
||||
"bson": "^6.1.0",
|
||||
"mongodb-connection-string-url": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"sinon": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz",
|
||||
|
|
3
services/chat/.mocharc.json
Normal file
3
services/chat/.mocharc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"require": "test/setup.js"
|
||||
}
|
9
services/chat/test/setup.js
Normal file
9
services/chat/test/setup.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
import chai from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import { ObjectId } from 'mongodb'
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
ObjectId.cacheHexString = true
|
||||
|
||||
chai.should()
|
||||
chai.use(chaiAsPromised)
|
|
@ -1,6 +1,10 @@
|
|||
import chai from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import sinonChai from 'sinon-chai'
|
||||
import { ObjectId } from 'mongodb'
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
ObjectId.cacheHexString = true
|
||||
|
||||
chai.should()
|
||||
chai.use(chaiAsPromised)
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
"celebrate": "^15.0.3",
|
||||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"p-map": "^4.0.0",
|
||||
"request": "^2.88.2"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const sinon = require('sinon')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const async = require('async')
|
||||
const DocstoreApp = require('./helpers/DocstoreApp')
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const sinon = require('sinon')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const DocstoreApp = require('./helpers/DocstoreApp')
|
||||
|
||||
const DocstoreClient = require('./helpers/DocstoreClient')
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const sinon = require('sinon')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const DocstoreApp = require('./helpers/DocstoreApp')
|
||||
|
||||
const DocstoreClient = require('./helpers/DocstoreClient')
|
||||
|
|
|
@ -5,6 +5,9 @@ const chaiAsPromised = require('chai-as-promised')
|
|||
const SandboxedModule = require('sandboxed-module')
|
||||
const timersPromises = require('timers/promises')
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb-legacy').ObjectId.cacheHexString = true
|
||||
|
||||
process.env.BACKEND = 'gcs'
|
||||
|
||||
// Chai configuration
|
||||
|
@ -31,6 +34,8 @@ SandboxedModule.configure({
|
|||
requires: {
|
||||
'@overleaf/logger': stubs.logger,
|
||||
'timers/promises': timersPromises,
|
||||
'mongodb-legacy': require('mongodb-legacy'),
|
||||
bson: require('bson'),
|
||||
},
|
||||
globals: { Buffer, JSON, Math, console, process },
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@ const sinon = require('sinon')
|
|||
const { expect } = require('chai')
|
||||
const modulePath = '../../../app/js/DocArchiveManager.js'
|
||||
const SandboxedModule = require('sandboxed-module')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const Errors = require('../../../app/js/Errors')
|
||||
|
||||
describe('DocArchiveManager', function () {
|
||||
|
|
|
@ -2,7 +2,7 @@ const SandboxedModule = require('sandboxed-module')
|
|||
const sinon = require('sinon')
|
||||
const { expect } = require('chai')
|
||||
const modulePath = require('path').join(__dirname, '../../../app/js/DocManager')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const Errors = require('../../../app/js/Errors')
|
||||
|
||||
describe('DocManager', function () {
|
||||
|
|
|
@ -5,7 +5,7 @@ const modulePath = require('path').join(
|
|||
__dirname,
|
||||
'../../../app/js/HttpController'
|
||||
)
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const Errors = require('../../../app/js/Errors')
|
||||
|
||||
describe('HttpController', function () {
|
||||
|
|
|
@ -4,7 +4,7 @@ const modulePath = require('path').join(
|
|||
__dirname,
|
||||
'../../../app/js/MongoManager'
|
||||
)
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const { assert, expect } = require('chai')
|
||||
const Errors = require('../../../app/js/Errors')
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ const modulePath = require('path').join(
|
|||
__dirname,
|
||||
'../../../app/js/RangeManager'
|
||||
)
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
|
||||
describe('RangeManager', function () {
|
||||
beforeEach(function () {
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
|
||||
"express": "^4.19.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^6.2.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2",
|
||||
"requestretry": "^7.1.0"
|
||||
|
|
|
@ -4,6 +4,9 @@ const sinonChai = require('sinon-chai')
|
|||
const SandboxedModule = require('sandboxed-module')
|
||||
const sinon = require('sinon')
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb-legacy').ObjectId.cacheHexString = true
|
||||
|
||||
// Chai configuration
|
||||
chai.should()
|
||||
chai.use(chaiAsPromised)
|
||||
|
@ -27,6 +30,7 @@ const stubs = {
|
|||
SandboxedModule.configure({
|
||||
requires: {
|
||||
'@overleaf/logger': stubs.logger,
|
||||
'mongodb-legacy': require('mongodb-legacy'), // for ObjectId comparisons
|
||||
},
|
||||
globals: { Buffer, JSON, Math, console, process },
|
||||
})
|
||||
|
|
3
services/filestore/.mocharc.json
Normal file
3
services/filestore/.mocharc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"require": "test/setup.js"
|
||||
}
|
34
services/filestore/test/setup.js
Normal file
34
services/filestore/test/setup.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
const sinon = require('sinon')
|
||||
const SandboxedModule = require('sandboxed-module')
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb').ObjectId.cacheHexString = true
|
||||
|
||||
const sandbox = sinon.createSandbox()
|
||||
const stubs = {
|
||||
logger: {
|
||||
debug: sandbox.stub(),
|
||||
log: sandbox.stub(),
|
||||
info: sandbox.stub(),
|
||||
warn: sandbox.stub(),
|
||||
err: sandbox.stub(),
|
||||
error: sandbox.stub(),
|
||||
fatal: sandbox.stub(),
|
||||
},
|
||||
}
|
||||
|
||||
SandboxedModule.configure({
|
||||
requires: {
|
||||
'@overleaf/logger': stubs.logger,
|
||||
},
|
||||
})
|
||||
|
||||
exports.mochaHooks = {
|
||||
beforeEach() {
|
||||
this.logger = stubs.logger
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
sandbox.reset()
|
||||
},
|
||||
}
|
|
@ -6,20 +6,16 @@ const { FailedCommandError } = require('../../../app/js/Errors')
|
|||
const SandboxedModule = require('sandboxed-module')
|
||||
|
||||
describe('ImageOptimiser', function () {
|
||||
let ImageOptimiser, SafeExec, logger
|
||||
let ImageOptimiser, SafeExec
|
||||
const sourcePath = '/wombat/potato.eps'
|
||||
|
||||
beforeEach(function () {
|
||||
SafeExec = {
|
||||
promises: sinon.stub().resolves(),
|
||||
}
|
||||
logger = {
|
||||
warn: sinon.stub(),
|
||||
}
|
||||
ImageOptimiser = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
'./SafeExec': SafeExec,
|
||||
'@overleaf/logger': logger,
|
||||
'@overleaf/metrics': {
|
||||
Timer: sinon.stub().returns({ done: sinon.stub() }),
|
||||
},
|
||||
|
@ -65,7 +61,7 @@ describe('ImageOptimiser', function () {
|
|||
})
|
||||
|
||||
it('should log a warning', function () {
|
||||
expect(logger.warn).to.have.been.calledOnce
|
||||
expect(this.logger.warn).to.have.been.calledOnce
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -4,6 +4,9 @@ const config = require('config')
|
|||
const fetch = require('node-fetch')
|
||||
const { knex, mongodb } = require('../storage')
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb').ObjectId.cacheHexString = true
|
||||
|
||||
chai.use(chaiAsPromised)
|
||||
|
||||
async function setupPostgresDatabase() {
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"bunyan": "^1.8.15",
|
||||
"express": "^4.19.2",
|
||||
"method-override": "^3.0.0",
|
||||
"mongodb": "^6.1.0",
|
||||
"mongodb-legacy": "^6.0.1",
|
||||
"request": "^2.88.2"
|
||||
},
|
||||
|
|
|
@ -4,6 +4,9 @@ const SandboxedModule = require('sandboxed-module')
|
|||
// Chai configuration
|
||||
chai.should()
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb-legacy').ObjectId.cacheHexString = true
|
||||
|
||||
// SandboxedModule configuration
|
||||
SandboxedModule.configure({
|
||||
requires: {
|
||||
|
@ -16,6 +19,7 @@ SandboxedModule.configure({
|
|||
error() {},
|
||||
fatal() {},
|
||||
},
|
||||
'mongodb-legacy': require('mongodb-legacy'), // for ObjectId comparisons
|
||||
},
|
||||
globals: { Buffer, JSON, console, process },
|
||||
})
|
||||
|
|
|
@ -15,7 +15,7 @@ const { expect } = require('chai')
|
|||
const modulePath = '../../../app/js/Notifications.js'
|
||||
const SandboxedModule = require('sandboxed-module')
|
||||
const assert = require('assert')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
|
||||
const userId = '51dc93e6fb625a261300003b'
|
||||
const notificationId = '574ee8d6f40c3a244e704249'
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
import chai from 'chai'
|
||||
import sinonChai from 'sinon-chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
const { ObjectId } = mongodb
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
ObjectId.cacheHexString = true
|
||||
|
||||
// Chai configuration
|
||||
chai.should()
|
||||
|
|
Loading…
Reference in a new issue