mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,7 @@
|
||||
[submodule "packages/non-core/blaze"]
|
||||
path = packages/non-core/blaze
|
||||
url = https://github.com/meteor/blaze.git
|
||||
url = https://github.com/meteor/blaze.git
|
||||
[submodule "npm-packages/cordova-plugin-meteor-webapp/src/ios/GCDWebServer"]
|
||||
path = npm-packages/cordova-plugin-meteor-webapp/src/ios/GCDWebServer
|
||||
url = https://github.com/meteor/GCDWebServer.git
|
||||
branch = master
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
language: node_js
|
||||
os: linux
|
||||
dist: xenial
|
||||
dist: jammy
|
||||
node_js:
|
||||
- "14.17.6"
|
||||
cache:
|
||||
@@ -11,7 +11,7 @@ script:
|
||||
- travis_retry ./packages/test-in-console/run.sh
|
||||
env:
|
||||
global:
|
||||
- CXX=g++-4.8
|
||||
- CXX=g++11
|
||||
- phantom=false
|
||||
- PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium
|
||||
jobs:
|
||||
@@ -24,4 +24,4 @@ addons:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
- g++-11
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
| Version | Support Status
|
||||
| ------- | --------------
|
||||
| 2.x.y | ✅ all security issues
|
||||
| 1.12.x | 🚧 only critical security issues
|
||||
| <= 1.11.x | ❌ no longer supportted
|
||||
| <= 1.12.x | ❌ no longer supported
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
||||
57
docs/generators/changelog/versions/2.15.0.md
Normal file
57
docs/generators/changelog/versions/2.15.0.md
Normal file
@@ -0,0 +1,57 @@
|
||||
## v2.15.0, 2024-02-05
|
||||
|
||||
### Highlights
|
||||
|
||||
* Bumps embedded MongoDB to 7.0.5.
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Internal API changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
In development, if you're using Linux, you might get an error like `version GLIBCXX_3.4.26 not found` or something related to g++.
|
||||
|
||||
This is related to your g++ version. With MongoDB 7, you need to have g++ 11 or higher. So make sure to have this updated.
|
||||
|
||||
This will happen only if you are trying to run your Meteor application with a MongoDB 7 version. If you run your app with a MONGO_URL pointing to a different MongoDB version, you won't have this issue.
|
||||
|
||||
```bash
|
||||
|
||||
meteor update --release 2.15
|
||||
|
||||
```
|
||||
|
||||
|
||||
#### Meteor Version Release
|
||||
|
||||
|
||||
* `Command line`:
|
||||
- The bundle version was changed to include embedded MongoDB to 7.0.5.
|
||||
- Fix cordova launch screen warnings on 2.15 [PR #12971]
|
||||
* `underscore@get-version`:
|
||||
- A test related to [PR #12798] to see if the tests can manage the first update step. [PR #12912]
|
||||
* `service-configuration@get-version`:
|
||||
- added new types* [PR #12922]
|
||||
* `meteor@get-version`:
|
||||
- added new types [PR #12922]
|
||||
* `accounts-base@get-version`:
|
||||
- Added missing type for createUserVerifyingEmail [PR #12919]
|
||||
|
||||
#### Special thanks to
|
||||
|
||||
- [@Grubba27](https://github.com/Grubba27).
|
||||
- [@denihs](https://github.com/denihs).
|
||||
- [@mcorbelli](https://github.com/mcorbelli).
|
||||
- [@matheusccastroo](https://github.com/matheusccastroo).
|
||||
- [@StorytellerCZ](https://github.com/StorytellerCZ).
|
||||
- [@ebroder](https://github.com/ebroder).
|
||||
- [@nachocodoner](https://github.com/nachocodoner).
|
||||
|
||||
For making this great framework even better!
|
||||
|
||||
|
||||
@@ -10,6 +10,63 @@
|
||||
|
||||
|
||||
|
||||
## v2.15.0, 2024-02-05
|
||||
|
||||
### Highlights
|
||||
|
||||
* Bumps embedded MongoDB to 7.0.5.
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Internal API changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
In development, if you're using Linux, you might get an error like `version GLIBCXX_3.4.26 not found` or something related to g++.
|
||||
|
||||
This is related to your g++ version. With MongoDB 7, you need to have g++ 11 or higher. So make sure to have this updated.
|
||||
|
||||
This will happen only if you are trying to run your Meteor application with a MongoDB 7 version. If you run your app with a MONGO_URL pointing to a different MongoDB version, you won't have this issue.
|
||||
|
||||
```bash
|
||||
|
||||
meteor update --release 2.15
|
||||
|
||||
```
|
||||
|
||||
|
||||
#### Meteor Version Release
|
||||
|
||||
|
||||
* `Command line`:
|
||||
- The bundle version was changed to include embedded MongoDB to 7.0.5.
|
||||
- Fix cordova launch screen warnings on 2.15 [PR](https://github.com/meteor/meteor/pull/12971)
|
||||
* `underscore@1.6.0`:
|
||||
- A test related to [PR](https://github.com/meteor/meteor/pull/12798) to see if the tests can manage the first update step. [PR](https://github.com/meteor/meteor/pull/12912)
|
||||
* `service-configuration@1.3.3`:
|
||||
- added new types* [PR](https://github.com/meteor/meteor/pull/12922)
|
||||
* `meteor@1.11.5`:
|
||||
- added new types [PR](https://github.com/meteor/meteor/pull/12922)
|
||||
* `accounts-base@2.2.10`:
|
||||
- Added missing type for createUserVerifyingEmail [PR](https://github.com/meteor/meteor/pull/12919)
|
||||
|
||||
#### Special thanks to
|
||||
|
||||
- [@Grubba27](https://github.com/Grubba27).
|
||||
- [@denihs](https://github.com/denihs).
|
||||
- [@mcorbelli](https://github.com/mcorbelli).
|
||||
- [@matheusccastroo](https://github.com/matheusccastroo).
|
||||
- [@StorytellerCZ](https://github.com/StorytellerCZ).
|
||||
- [@ebroder](https://github.com/ebroder).
|
||||
- [@nachocodoner](https://github.com/nachocodoner).
|
||||
|
||||
For making this great framework even better!
|
||||
|
||||
|
||||
## v2.14.0, 2023-12-12
|
||||
|
||||
### Highlights
|
||||
@@ -74,7 +131,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
|
||||
|
||||
## Meteor Version Release
|
||||
|
||||
* `accounts-base@2.2.9`
|
||||
* `accounts-base@2.2.10`
|
||||
- Ensure that `onLogin` callback fires properly
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
@@ -131,7 +188,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
|
||||
* `logic-solver@2.0.9`
|
||||
- Removed Underscore dependency
|
||||
|
||||
* `meteor@1.11.4`:
|
||||
* `meteor@1.11.5`:
|
||||
- Improve TS types
|
||||
|
||||
* `mobile-experience@1.1.1`:
|
||||
@@ -160,7 +217,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
|
||||
* `react-fast-refresh@0.2.8`:
|
||||
- Updated `semver` to version 7.5.4
|
||||
|
||||
* `service-configuration@1.3.2`
|
||||
* `service-configuration@1.3.3`
|
||||
- Indexes are now created asynchronously
|
||||
- Add types for ConfigError
|
||||
|
||||
@@ -186,7 +243,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
|
||||
* `typescript@4.9.5`:
|
||||
- Updated to 4.9.5
|
||||
|
||||
* `webapp@1.13.6`
|
||||
* `webapp@1.13.8`
|
||||
- Updated `cordova-plugin-meteor-webapp` to v2.0.3
|
||||
- Updated `cookie-parser` to v1.4.6
|
||||
- Updated `send` to v0.18.0
|
||||
|
||||
@@ -90,13 +90,13 @@ Tracker.autorun(async function example1(computation) {
|
||||
// Code before the first await will stay reactive.
|
||||
reactiveVar1.get(); // This will trigger a rerun.
|
||||
|
||||
let links = await LinksCollection.findAsync({}).fetch(); // First async call will stay reactive.
|
||||
let links = await LinksCollection.find({}).fetchAsync(); // First async call will stay reactive.
|
||||
|
||||
// Code after the first await looses Tracker.currentComputation: no reactivity.
|
||||
reactiveVar2.get(); // This won't trigger a rerun.
|
||||
|
||||
// You can bring back reactivity with the Tracker.withCompuation wrapper:
|
||||
let users = await Tracker.withComputation(computation, () => Meteor.users.findAsync({}).fetch());
|
||||
let users = await Tracker.withComputation(computation, () => Meteor.users.find({}).fetchAsync());
|
||||
|
||||
// Code below will again not be reactive, so you will need another Tracker.withComputation.
|
||||
const value = Tracker.withComputation(computation, () => reactiveVar3.get()); // This will trigger a rerun.
|
||||
|
||||
2
meteor
2
meteor
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BUNDLE_VERSION=14.21.4.8
|
||||
BUNDLE_VERSION=14.21.4.9
|
||||
|
||||
|
||||
# OS Check. Put here because here is where we download the precompiled
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-meteor-webapp",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-meteor-webapp",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "Cordova plugin that serves a Meteor web app through a local server and implements hot code push",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-meteor-webapp",
|
||||
|
||||
Submodule npm-packages/cordova-plugin-meteor-webapp/src/ios/GCDWebServer added at 38e9bf08e0
@@ -14,6 +14,7 @@ npm install -g meteor
|
||||
|
||||
| NPM Package | Meteor Official Release |
|
||||
|-------------|-------------------------|
|
||||
| 2.15.0 | 2.15.0 |
|
||||
| 2.14.0 | 2.14.0 |
|
||||
| 2.13.3 | 2.13.3 |
|
||||
| 2.13.1 | 2.13.1 |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const METEOR_LATEST_VERSION = '2.14';
|
||||
const METEOR_LATEST_VERSION = '2.15';
|
||||
const sudoUser = process.env.SUDO_USER || '';
|
||||
function isRoot() {
|
||||
return process.getuid && process.getuid() === 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meteor",
|
||||
"version": "2.14.0",
|
||||
"version": "2.15.0",
|
||||
"description": "Install Meteor",
|
||||
"main": "install.js",
|
||||
"scripts": {
|
||||
|
||||
16
packages/accounts-base/accounts-base.d.ts
vendored
16
packages/accounts-base/accounts-base.d.ts
vendored
@@ -48,6 +48,16 @@ export namespace Accounts {
|
||||
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
|
||||
): Promise<string>;
|
||||
|
||||
function createUserVerifyingEmail(
|
||||
options: {
|
||||
username?: string | undefined;
|
||||
email?: string | undefined;
|
||||
password?: string | undefined;
|
||||
profile?: Meteor.UserProfile | undefined;
|
||||
},
|
||||
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
|
||||
): Promise<string>;
|
||||
|
||||
function config(options: {
|
||||
sendVerificationEmail?: boolean | undefined;
|
||||
forbidClientAccountCreation?: boolean | undefined;
|
||||
@@ -324,9 +334,9 @@ export namespace Accounts {
|
||||
type Password =
|
||||
| string
|
||||
| {
|
||||
digest: string;
|
||||
algorithm: 'sha-256';
|
||||
};
|
||||
digest: string;
|
||||
algorithm: 'sha-256';
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'A user account system',
|
||||
version: '2.2.9',
|
||||
version: '2.2.10',
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'The Meteor command-line tool',
|
||||
version: '2.14.0',
|
||||
version: '2.15.0',
|
||||
});
|
||||
|
||||
Package.includeTool();
|
||||
|
||||
5
packages/meteor/meteor.d.ts
vendored
5
packages/meteor/meteor.d.ts
vendored
@@ -69,6 +69,9 @@ export namespace Meteor {
|
||||
function user(options?: {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): User | null;
|
||||
function userAsync(options?: {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): Promise<Meteor.User | null>;
|
||||
|
||||
function userId(): string | null;
|
||||
var users: Mongo.Collection<User>;
|
||||
@@ -241,7 +244,7 @@ export namespace Meteor {
|
||||
>(
|
||||
name: string,
|
||||
args: ReadonlyArray<EJSONable | EJSONableProperty>,
|
||||
options?: MethodApplyOptions,
|
||||
options?: MethodApplyOptions<Result>,
|
||||
asyncCallback?: (
|
||||
error: global_Error | Meteor.Error | undefined,
|
||||
result?: Result
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Package.describe({
|
||||
summary: "Core Meteor environment",
|
||||
version: '1.11.4',
|
||||
version: '1.11.5',
|
||||
});
|
||||
|
||||
Package.registerBuildPlugin({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'Manage the configuration for third-party services',
|
||||
version: '1.3.2',
|
||||
version: '1.3.3',
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
||||
@@ -10,7 +10,7 @@ class ConfigError extends Error {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export declare var ServiceConfiguration: {
|
||||
export var ServiceConfiguration: {
|
||||
configurations: Mongo.Collection<Configuration>;
|
||||
ConfigError: typeof ConfigError
|
||||
};
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"@types/underscore": {
|
||||
"version": "1.11.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.4.tgz",
|
||||
"integrity": "sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg=="
|
||||
"version": "1.11.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.9.tgz",
|
||||
"integrity": "sha512-M63wKUdsjDFUfyFt1TCUZHGFk9KDAa5JP0adNUErbm0U45Lr06HtANdYRP+GyleEopEoZ4UyBcdAC5TnW4Uz2w=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
Package.describe({
|
||||
summary: "Collection of small helpers: _.map, _.each, ...",
|
||||
version: '1.0.13',
|
||||
version: '1.6.0',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
'@types/underscore': '1.11.4',
|
||||
'@types/underscore': '1.11.9',
|
||||
});
|
||||
Package.onUse(function (api) {
|
||||
// Like all packages, we have an implicit depedency on the 'meteor'
|
||||
// Like all packages, we have an implicit dependency on the 'meteor'
|
||||
// package, which provides such things as the *.js file handler. Use
|
||||
// an undocumented API to allow 'meteor' to alter us even though we
|
||||
// depend on it. This is necessary since 'meteor' depends on us. One
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Underscore.js 1.5.2
|
||||
// Underscore.js 1.6.0
|
||||
// http://underscorejs.org
|
||||
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
// Underscore may be freely distributed under the MIT license.
|
||||
|
||||
(function() {
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
// Current version.
|
||||
_.VERSION = '1.5.2';
|
||||
_.VERSION = '1.6.0';
|
||||
|
||||
// Collection Functions
|
||||
// --------------------
|
||||
@@ -100,7 +100,7 @@
|
||||
// Handles objects with the built-in `forEach`, arrays, and raw objects.
|
||||
// Delegates to **ECMAScript 5**'s native `forEach` if available.
|
||||
var each = _.each = _.forEach = function(obj, iterator, context) {
|
||||
if (obj == null) return;
|
||||
if (obj == null) return obj;
|
||||
if (nativeForEach && obj.forEach === nativeForEach) {
|
||||
obj.forEach(iterator, context);
|
||||
} else if (looksLikeArray(obj)) {
|
||||
@@ -113,6 +113,7 @@
|
||||
if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
// Return the results of applying the iterator to each element.
|
||||
@@ -178,10 +179,10 @@
|
||||
};
|
||||
|
||||
// Return the first value which passes a truth test. Aliased as `detect`.
|
||||
_.find = _.detect = function(obj, iterator, context) {
|
||||
_.find = _.detect = function(obj, predicate, context) {
|
||||
var result;
|
||||
any(obj, function(value, index, list) {
|
||||
if (iterator.call(context, value, index, list)) {
|
||||
if (predicate.call(context, value, index, list)) {
|
||||
result = value;
|
||||
return true;
|
||||
}
|
||||
@@ -192,33 +193,33 @@
|
||||
// Return all the elements that pass a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `filter` if available.
|
||||
// Aliased as `select`.
|
||||
_.filter = _.select = function(obj, iterator, context) {
|
||||
_.filter = _.select = function(obj, predicate, context) {
|
||||
var results = [];
|
||||
if (obj == null) return results;
|
||||
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
|
||||
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (iterator.call(context, value, index, list)) results.push(value);
|
||||
if (predicate.call(context, value, index, list)) results.push(value);
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
// Return all the elements for which a truth test fails.
|
||||
_.reject = function(obj, iterator, context) {
|
||||
_.reject = function(obj, predicate, context) {
|
||||
return _.filter(obj, function(value, index, list) {
|
||||
return !iterator.call(context, value, index, list);
|
||||
return !predicate.call(context, value, index, list);
|
||||
}, context);
|
||||
};
|
||||
|
||||
// Determine whether all of the elements match a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `every` if available.
|
||||
// Aliased as `all`.
|
||||
_.every = _.all = function(obj, iterator, context) {
|
||||
iterator || (iterator = _.identity);
|
||||
_.every = _.all = function(obj, predicate, context) {
|
||||
predicate || (predicate = _.identity);
|
||||
var result = true;
|
||||
if (obj == null) return result;
|
||||
if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
|
||||
if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (!(result = result && iterator.call(context, value, index, list))) return breaker;
|
||||
if (!(result = result && predicate.call(context, value, index, list))) return breaker;
|
||||
});
|
||||
return !!result;
|
||||
};
|
||||
@@ -226,13 +227,13 @@
|
||||
// Determine if at least one element in the object matches a truth test.
|
||||
// Delegates to **ECMAScript 5**'s native `some` if available.
|
||||
// Aliased as `any`.
|
||||
var any = _.some = _.any = function(obj, iterator, context) {
|
||||
iterator || (iterator = _.identity);
|
||||
var any = _.some = _.any = function(obj, predicate, context) {
|
||||
predicate || (predicate = _.identity);
|
||||
var result = false;
|
||||
if (obj == null) return result;
|
||||
if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
|
||||
if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
|
||||
each(obj, function(value, index, list) {
|
||||
if (result || (result = iterator.call(context, value, index, list))) return breaker;
|
||||
if (result || (result = predicate.call(context, value, index, list))) return breaker;
|
||||
});
|
||||
return !!result;
|
||||
};
|
||||
@@ -258,19 +259,13 @@
|
||||
|
||||
// Convenience version of a common use case of `map`: fetching a property.
|
||||
_.pluck = function(obj, key) {
|
||||
return _.map(obj, function(value){ return value[key]; });
|
||||
return _.map(obj, _.property(key));
|
||||
};
|
||||
|
||||
// Convenience version of a common use case of `filter`: selecting only objects
|
||||
// containing specific `key:value` pairs.
|
||||
_.where = function(obj, attrs, first) {
|
||||
if (_.isEmpty(attrs)) return first ? void 0 : [];
|
||||
return _[first ? 'find' : 'filter'](obj, function(value) {
|
||||
for (var key in attrs) {
|
||||
if (attrs[key] !== value[key]) return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
_.where = function(obj, attrs) {
|
||||
return _.find(obj, _.matches(attrs));
|
||||
};
|
||||
|
||||
// Convenience version of a common use case of `find`: getting the first object
|
||||
@@ -286,13 +281,15 @@
|
||||
if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
|
||||
return Math.max.apply(Math, obj);
|
||||
}
|
||||
if (!iterator && _.isEmpty(obj)) return -Infinity;
|
||||
var result = {computed : -Infinity, value: -Infinity};
|
||||
var result = -Infinity, lastComputed = -Infinity;
|
||||
each(obj, function(value, index, list) {
|
||||
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
||||
computed > result.computed && (result = {value : value, computed : computed});
|
||||
if (computed > lastComputed) {
|
||||
result = value;
|
||||
lastComputed = computed;
|
||||
}
|
||||
});
|
||||
return result.value;
|
||||
return result;
|
||||
};
|
||||
|
||||
// Return the minimum element (or element-based computation).
|
||||
@@ -300,16 +297,18 @@
|
||||
if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
|
||||
return Math.min.apply(Math, obj);
|
||||
}
|
||||
if (!iterator && _.isEmpty(obj)) return Infinity;
|
||||
var result = {computed : Infinity, value: Infinity};
|
||||
var result = Infinity, lastComputed = Infinity;
|
||||
each(obj, function(value, index, list) {
|
||||
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
||||
computed < result.computed && (result = {value : value, computed : computed});
|
||||
if (computed < lastComputed) {
|
||||
result = value;
|
||||
lastComputed = computed;
|
||||
}
|
||||
});
|
||||
return result.value;
|
||||
return result;
|
||||
};
|
||||
|
||||
// Shuffle an array, using the modern version of the
|
||||
// Shuffle an array, using the modern version of the
|
||||
// [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
|
||||
_.shuffle = function(obj) {
|
||||
var rand;
|
||||
@@ -323,11 +322,12 @@
|
||||
return shuffled;
|
||||
};
|
||||
|
||||
// Sample **n** random values from an array.
|
||||
// If **n** is not specified, returns a single random element from the array.
|
||||
// Sample **n** random values from a collection.
|
||||
// If **n** is not specified, returns a single random element.
|
||||
// The internal `guard` argument allows it to work with `map`.
|
||||
_.sample = function(obj, n, guard) {
|
||||
if (arguments.length < 2 || guard) {
|
||||
if (n == null || guard) {
|
||||
if (obj.length !== +obj.length) obj = _.values(obj);
|
||||
return obj[_.random(obj.length - 1)];
|
||||
}
|
||||
return _.shuffle(obj).slice(0, Math.max(0, n));
|
||||
@@ -335,12 +335,14 @@
|
||||
|
||||
// An internal function to generate lookup iterators.
|
||||
var lookupIterator = function(value) {
|
||||
return _.isFunction(value) ? value : function(obj){ return obj[value]; };
|
||||
if (value == null) return _.identity;
|
||||
if (_.isFunction(value)) return value;
|
||||
return _.property(value);
|
||||
};
|
||||
|
||||
// Sort the object's values by a criterion produced by an iterator.
|
||||
_.sortBy = function(obj, value, context) {
|
||||
var iterator = lookupIterator(value);
|
||||
_.sortBy = function(obj, iterator, context) {
|
||||
iterator = lookupIterator(iterator);
|
||||
return _.pluck(_.map(obj, function(value, index, list) {
|
||||
return {
|
||||
value: value,
|
||||
@@ -360,9 +362,9 @@
|
||||
|
||||
// An internal function used for aggregate "group by" operations.
|
||||
var group = function(behavior) {
|
||||
return function(obj, value, context) {
|
||||
return function(obj, iterator, context) {
|
||||
var result = {};
|
||||
var iterator = value == null ? _.identity : lookupIterator(value);
|
||||
iterator = lookupIterator(iterator);
|
||||
each(obj, function(value, index) {
|
||||
var key = iterator.call(context, value, index, obj);
|
||||
behavior(result, key, value);
|
||||
@@ -374,7 +376,7 @@
|
||||
// Groups the object's values by a criterion. Pass either a string attribute
|
||||
// to group by, or a function that returns the criterion.
|
||||
_.groupBy = group(function(result, key, value) {
|
||||
(_.has(result, key) ? result[key] : (result[key] = [])).push(value);
|
||||
_.has(result, key) ? result[key].push(value) : result[key] = [value];
|
||||
});
|
||||
|
||||
// Indexes the object's values by a criterion, similar to `groupBy`, but for
|
||||
@@ -425,7 +427,9 @@
|
||||
// allows it to work with `_.map`.
|
||||
_.first = _.head = _.take = function(array, n, guard) {
|
||||
if (array == null) return void 0;
|
||||
return (n == null) || guard ? array[0] : slice.call(array, 0, n);
|
||||
if ((n == null) || guard) return array[0];
|
||||
if (n < 0) return [];
|
||||
return slice.call(array, 0, n);
|
||||
};
|
||||
|
||||
// Returns everything but the last entry of the array. Especially useful on
|
||||
@@ -440,11 +444,8 @@
|
||||
// values in the array. The **guard** check allows it to work with `_.map`.
|
||||
_.last = function(array, n, guard) {
|
||||
if (array == null) return void 0;
|
||||
if ((n == null) || guard) {
|
||||
return array[array.length - 1];
|
||||
} else {
|
||||
return slice.call(array, Math.max(array.length - n, 0));
|
||||
}
|
||||
if ((n == null) || guard) return array[array.length - 1];
|
||||
return slice.call(array, Math.max(array.length - n, 0));
|
||||
};
|
||||
|
||||
// Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
|
||||
@@ -485,6 +486,16 @@
|
||||
return _.difference(array, slice.call(arguments, 1));
|
||||
};
|
||||
|
||||
// Split an array into two arrays: one whose elements all satisfy the given
|
||||
// predicate, and one whose elements all do not satisfy the predicate.
|
||||
_.partition = function(array, predicate) {
|
||||
var pass = [], fail = [];
|
||||
each(array, function(elem) {
|
||||
(predicate(elem) ? pass : fail).push(elem);
|
||||
});
|
||||
return [pass, fail];
|
||||
};
|
||||
|
||||
// Produce a duplicate-free version of the array. If the array has already
|
||||
// been sorted, you have the option of using a faster algorithm.
|
||||
// Aliased as `unique`.
|
||||
@@ -518,7 +529,7 @@
|
||||
var rest = slice.call(arguments, 1);
|
||||
return _.filter(_.uniq(array), function(item) {
|
||||
return _.every(rest, function(other) {
|
||||
return _.indexOf(other, item) >= 0;
|
||||
return _.contains(other, item) >= 0;
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -533,7 +544,7 @@
|
||||
// Zip together multiple lists into a single array -- elements that share
|
||||
// an index go together.
|
||||
_.zip = function() {
|
||||
var length = _.max(_.pluck(arguments, "length").concat(0));
|
||||
var length = _.max(_.pluck(arguments, 'length').concat(0));
|
||||
var results = new Array(length);
|
||||
for (var i = 0; i < length; i++) {
|
||||
results[i] = _.pluck(arguments, '' + i);
|
||||
@@ -639,19 +650,27 @@
|
||||
};
|
||||
|
||||
// Partially apply a function by creating a version that has had some of its
|
||||
// arguments pre-filled, without changing its dynamic `this` context.
|
||||
// arguments pre-filled, without changing its dynamic `this` context. _ acts
|
||||
// as a placeholder, allowing any combination of arguments to be pre-filled.
|
||||
_.partial = function(func) {
|
||||
var args = slice.call(arguments, 1);
|
||||
var boundArgs = slice.call(arguments, 1);
|
||||
return function() {
|
||||
return func.apply(this, args.concat(slice.call(arguments)));
|
||||
var position = 0;
|
||||
var args = boundArgs.slice();
|
||||
for (var i = 0, length = args.length; i < length; i++) {
|
||||
if (args[i] === _) args[i] = arguments[position++];
|
||||
}
|
||||
while (position < arguments.length) args.push(arguments[position++]);
|
||||
return func.apply(this, args);
|
||||
};
|
||||
};
|
||||
|
||||
// Bind all of an object's methods to that object. Useful for ensuring that
|
||||
// all callbacks defined on an object belong to it.
|
||||
// Bind a number of an object's methods to that object. Remaining arguments
|
||||
// are the method names to be bound. Useful for ensuring that all callbacks
|
||||
// defined on an object belong to it.
|
||||
_.bindAll = function(obj) {
|
||||
var funcs = slice.call(arguments, 1);
|
||||
if (funcs.length === 0) throw new Error("bindAll must be passed function names");
|
||||
if (funcs.length === 0) throw new Error('bindAll must be passed function names');
|
||||
each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
|
||||
return obj;
|
||||
};
|
||||
@@ -690,12 +709,12 @@
|
||||
var previous = 0;
|
||||
options || (options = {});
|
||||
var later = function() {
|
||||
previous = options.leading === false ? 0 : new Date;
|
||||
previous = options.leading === false ? 0 : _.now();
|
||||
timeout = null;
|
||||
result = func.apply(context, args);
|
||||
};
|
||||
return function() {
|
||||
var now = new Date;
|
||||
var now = _.now();
|
||||
if (!previous && options.leading === false) previous = now;
|
||||
var remaining = wait - (now - previous);
|
||||
context = this;
|
||||
@@ -705,6 +724,7 @@
|
||||
timeout = null;
|
||||
previous = now;
|
||||
result = func.apply(context, args);
|
||||
context = args = null;
|
||||
} else if (!timeout && options.trailing !== false) {
|
||||
timeout = setTimeout(later, remaining);
|
||||
}
|
||||
@@ -718,24 +738,32 @@
|
||||
// leading edge, instead of the trailing.
|
||||
_.debounce = function(func, wait, immediate) {
|
||||
var timeout, args, context, timestamp, result;
|
||||
|
||||
var later = function() {
|
||||
var last = _.now() - timestamp;
|
||||
if (last < wait) {
|
||||
timeout = setTimeout(later, wait - last);
|
||||
} else {
|
||||
timeout = null;
|
||||
if (!immediate) {
|
||||
result = func.apply(context, args);
|
||||
context = args = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return function() {
|
||||
context = this;
|
||||
args = arguments;
|
||||
timestamp = new Date();
|
||||
var later = function() {
|
||||
var last = (new Date()) - timestamp;
|
||||
if (last < wait) {
|
||||
timeout = setTimeout(later, wait - last);
|
||||
} else {
|
||||
timeout = null;
|
||||
if (!immediate) result = func.apply(context, args);
|
||||
}
|
||||
};
|
||||
timestamp = _.now();
|
||||
var callNow = immediate && !timeout;
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
if (callNow) result = func.apply(context, args);
|
||||
if (callNow) {
|
||||
result = func.apply(context, args);
|
||||
context = args = null;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
};
|
||||
@@ -757,11 +785,7 @@
|
||||
// allowing you to adjust arguments, run code before and after, and
|
||||
// conditionally execute the original function.
|
||||
_.wrap = function(func, wrapper) {
|
||||
return function() {
|
||||
var args = [func];
|
||||
push.apply(args, arguments);
|
||||
return wrapper.apply(this, args);
|
||||
};
|
||||
return _.partial(wrapper, func);
|
||||
};
|
||||
|
||||
// Returns a function that is the composition of a list of functions, each
|
||||
@@ -791,8 +815,9 @@
|
||||
|
||||
// Retrieve the names of an object's properties.
|
||||
// Delegates to **ECMAScript 5**'s native `Object.keys`
|
||||
_.keys = nativeKeys || function(obj) {
|
||||
if (obj !== Object(obj)) throw new TypeError('Invalid object');
|
||||
_.keys = function(obj) {
|
||||
if (!_.isObject(obj)) return [];
|
||||
if (nativeKeys) return nativeKeys(obj);
|
||||
var keys = [];
|
||||
for (var key in obj) if (_.has(obj, key)) keys.push(key);
|
||||
return keys;
|
||||
@@ -947,7 +972,8 @@
|
||||
// from different frames are.
|
||||
var aCtor = a.constructor, bCtor = b.constructor;
|
||||
if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
|
||||
_.isFunction(bCtor) && (bCtor instanceof bCtor))) {
|
||||
_.isFunction(bCtor) && (bCtor instanceof bCtor))
|
||||
&& ('constructor' in a && 'constructor' in b)) {
|
||||
return false;
|
||||
}
|
||||
// Add the first object to the stack of traversed objects.
|
||||
@@ -1087,6 +1113,30 @@
|
||||
return value;
|
||||
};
|
||||
|
||||
_.constant = function(value) {
|
||||
return function () {
|
||||
return value;
|
||||
};
|
||||
};
|
||||
|
||||
_.property = function(key) {
|
||||
return function(obj) {
|
||||
return obj[key];
|
||||
};
|
||||
};
|
||||
|
||||
// Returns a predicate for checking whether an object has a given set of `key:value` pairs.
|
||||
_.matches = function(attrs) {
|
||||
return function(obj) {
|
||||
if (obj === attrs) return true; //avoid comparing an object to itself.
|
||||
for (var key in attrs) {
|
||||
if (attrs[key] !== obj[key])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Run a function **n** times.
|
||||
_.times = function(n, iterator, context) {
|
||||
var accum = Array(Math.max(0, n));
|
||||
@@ -1103,6 +1153,9 @@
|
||||
return min + Math.floor(Math.random() * (max - min + 1));
|
||||
};
|
||||
|
||||
// A (possibly faster) way to get the current timestamp as an integer.
|
||||
_.now = Date.now || function() { return new Date().getTime(); };
|
||||
|
||||
// List of HTML entities for escaping.
|
||||
var entityMap = {
|
||||
escape: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'Serves a Meteor app over HTTP',
|
||||
version: '1.13.6',
|
||||
version: '1.13.8',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
@@ -25,7 +25,7 @@ Npm.strip({
|
||||
|
||||
// whitelist plugin is now included in the core
|
||||
Cordova.depends({
|
||||
'cordova-plugin-meteor-webapp': '2.0.3',
|
||||
'cordova-plugin-meteor-webapp': '2.0.4',
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"track": "METEOR",
|
||||
"version": "2.14-rc.3",
|
||||
"version": "2.15-rc.1",
|
||||
"recommended": false,
|
||||
"official": false,
|
||||
"description": "Meteor experimental release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"track": "METEOR",
|
||||
"version": "2.14",
|
||||
"version": "2.15",
|
||||
"recommended": false,
|
||||
"official": true,
|
||||
"description": "The Official Meteor Distribution"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -u
|
||||
UNAME=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
NODE_VERSION=14.21.4
|
||||
MONGO_VERSION_64BIT=6.0.3
|
||||
MONGO_VERSION_64BIT=7.0.5
|
||||
MONGO_VERSION_32BIT=3.2.22
|
||||
NPM_VERSION=6.14.18
|
||||
|
||||
|
||||
@@ -12,10 +12,12 @@ done
|
||||
echo "BRANCH_NAME = $BRANCH_NAME"
|
||||
echo "VERSION = $VERSION"
|
||||
|
||||
git fetch origin && git checkout release/METEOR@"$VERSION" &&
|
||||
git reset --hard origin/"$BRANCH_NAME" &&
|
||||
git clean -df &&
|
||||
./meteor admin make-bootstrap-tarballs --target-arch os.windows.x86_64 "$VERSION" win64 &&
|
||||
git fetch origin
|
||||
git checkout release/METEOR@"$VERSION"
|
||||
git reset --hard origin/"$BRANCH_NAME"
|
||||
git clean -df
|
||||
|
||||
./meteor admin make-bootstrap-tarballs --target-arch os.windows.x86_64 "$VERSION" win64 &&
|
||||
aws s3 cp --acl public-read win64/meteor-bootstrap-os.windows.x86_64.tar.gz s3://com.meteor.static/packages-bootstrap/"$VERSION"/ &&
|
||||
./meteor admin make-bootstrap-tarballs --target-arch os.linux.x86_64 "$VERSION" linux64 &&
|
||||
aws s3 cp --acl public-read linux64/meteor-bootstrap-os.linux.x86_64.tar.gz s3://com.meteor.static/packages-bootstrap/"$VERSION"/ &&
|
||||
|
||||
@@ -49,14 +49,6 @@ function spawnMongod(mongodPath, port, dbPath, replSetName) {
|
||||
// Use mmapv1 on 32bit platforms, as our binary doesn't support WT
|
||||
if (process.arch === 'ia32') {
|
||||
args.push('--storageEngine', 'mmapv1', '--smallfiles');
|
||||
} else if (process.platform !== 'linux') {
|
||||
// MongoDB 4, which we use on 64-bit systems, displays a banner in the
|
||||
// Mongo shell about a free monitoring service, which can be disabled
|
||||
// with this flag. However, the custom Linux build (see MONGO_BASE_URL
|
||||
// in scripts/generate-dev-bundle.sh) neither displays the banner nor
|
||||
// supports the flag, so it's safe/important to avoid passing the flag
|
||||
// to mongod on 64-bit linux.
|
||||
args.push('--enableFreeMonitoring', 'off');
|
||||
}
|
||||
|
||||
// run with rosetta on mac m1
|
||||
|
||||
Reference in New Issue
Block a user