Merge branch 'release-3.0' into fix/release-3-crash-failed-build

This commit is contained in:
Jan Dvorak
2024-05-24 16:24:55 +02:00
committed by GitHub
189 changed files with 3488 additions and 3485 deletions

32
.envrc Normal file
View File

@@ -0,0 +1,32 @@
#!/bin/env zsh
#
# Commands and shortcuts for Meteor core development, you can load these in your terminal by running `source .envrc`.
# Or by adding `[[ -s .envrc ]] && source .envrc` to your `.zshrc` or `.bashrc`.
#
export ROOT_DIR=$(git rev-parse --show-toplevel)
function @meteor {
"$ROOT_DIR/meteor" "$@"
}
function @test-package {
@meteor test-packages "$@" --exclude-archs=web.browser.legacy,web.cordova
}
function @test-packages {
TINYTEST_FILTER="$1" @meteor test-packages --exclude-archs=web.browser.legacy,web.cordova
}
function @test-self {
@meteor self-test "$@"
}
function @check-syntax {
node "$ROOT_DIR/scripts/admin/check-legacy-syntax/check-syntax.js"
}
function @generate-dev-bundle {
"$ROOT_DIR/scripts/generate-dev-bundle.sh"
}

View File

@@ -0,0 +1,55 @@
name: Meteor Selftest Windows
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- release-3.0
push:
branches:
- release-3.0
env:
METEOR_PRETTY_OUTPUT: 0
SELF_TEST_TOOL_NODE_FLAGS: ' '
TOOL_NODE_FLAGS: --expose-gc
TIMEOUT_SCALE_FACTOR: 20
METEOR_HEADLESS: true
SELF_TEST_EXCLUDE: '^NULL-LEAVE-THIS-HERE-NULL$'
jobs:
test:
runs-on: windows-2019-meteor
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Install dependencies
shell: pwsh
run: |
$env:PATH = "C:\Program Files\7-Zip;$env:PATH"
.\scripts\windows\ci\install.ps1
- name: Run tests
shell: pwsh
run: |
$env:PATH = "C:\Program Files\7-Zip;$env:PATH"
.\scripts\windows\ci\test.ps1
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
.\dev_bundle
.\.babel-cache
.\.meteor
key: ${{ runner.os }}-meteor-${{ hashFiles('**/package-lock.json') }}

View File

@@ -16,15 +16,12 @@ jobs:
defaults:
run:
working-directory: npm-packages/eslint-plugin-meteor
strategy:
matrix:
node-version: 20.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20.x
cache: npm
- run: npm ci
- run: npm test

View File

@@ -16,15 +16,12 @@ jobs:
defaults:
run:
working-directory: npm-packages/meteor-babel
strategy:
matrix:
node-version: 20.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 14.x
cache: npm
- run: npm ci
- run: npm run test

View File

@@ -1,47 +0,0 @@
version: '{build}'
branches:
except:
- /^dev-bundle-/
skip_branch_with_pr: true
clone_folder: C:\projects\meteor
image: Visual Studio 2019
environment:
METEOR_PRETTY_OUTPUT: 0
SELF_TEST_TOOL_NODE_FLAGS: " "
TOOL_NODE_FLAGS: --expose-gc
TIMEOUT_SCALE_FACTOR: 8
METEOR_HEADLESS: true
SELF_TEST_EXCLUDE: "^NULL-LEAVE-THIS-HERE-NULL$"
platform:
- x64
matrix:
fast_finish: true
allow_failures:
- platform: x64
# We don't need the actual "build", just the tests.
build: off
install:
- ps: C:\projects\meteor\scripts\windows\appveyor\install.ps1
test_script:
- ps: C:\projects\meteor\scripts\windows\appveyor\test.ps1
on_failure:
- ps: |
$npmLogsDir = "$($Env:AppData)\npm-cache\_logs"
If (Test-Path "$npmLogsDir") {
Get-ChildItem "${npmLogsDir}\*.log" |
% { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}
cache:
- dev_bundle -> meteor
- .babel-cache -> meteor
- .meteor

View File

@@ -10,7 +10,7 @@ description: How to migrate your application to Meteor 3.0.
## What's the status of version 3.0?
**Latest version:** `3.0-rc.1` <br/>
**Latest version:** `3.0-rc.2` <br/>
**Node.js version:** `20.11.1 LTS` <br />
**NPM version:** `10.2.4`
@@ -120,7 +120,7 @@ findOne is not available on the server. Please use findOneAsync instead.
You can create a new Meteor 3.0 project by running the command below:
```bash
meteor create my-new-project --release 3.0-rc.1
meteor create my-new-project --release 3.0-rc.2
```
or alternatively, you can use `npx`
@@ -136,7 +136,7 @@ npx meteor@beta
You can update your Meteor 2.x project by running the command below inside your project folder:
```bash
meteor update --release 3.0-rc.1
meteor update --release 3.0-rc.2
meteor reset #resets local DB and project to a fresh state
```
@@ -156,7 +156,7 @@ The migration will look like this:
```js
// in you package.js
Package.onUse((api) => {
api.versionsFrom(['1.10', '2.3', '3.0-rc.1']);
api.versionsFrom(['1.10', '2.3', '3.0-rc.2']);
// ^^^^^^^ for testing your package with meteor 3.0
api.versionsFrom(['1.10', '2.3', '3.0']);

2
meteor
View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
BUNDLE_VERSION=20.11.1.2
BUNDLE_VERSION=20.12.2.0
# OS Check. Put here because here is where we download the precompiled

View File

@@ -10,11 +10,11 @@ var packageJson = {
dependencies: {
// Explicit dependency because we are replacing it with a bundled version
// and we want to make sure there are no dependencies on a higher version
npm: "10.1.0",
npm: "10.5.0",
pacote: "https://github.com/meteor/pacote/tarball/a81b0324686e85d22c7688c47629d4009000e8b8",
"node-gyp": "9.4.0",
"@mapbox/node-pre-gyp": "1.0.11",
typescript: "4.9.5",
typescript: "5.4.5",
"@meteorjs/babel": "7.19.0-beta.3",
"@meteorjs/reify": "0.24.0",
// So that Babel can emit require("@babel/runtime/helpers/...") calls.

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@
"convert-source-map": "^1.6.0",
"lodash": "^4.17.21",
"meteor-babel-helpers": "0.0.3",
"typescript": "~5.4.3"
"typescript": "~5.4.5"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "7.14.5",

View File

@@ -1,7 +1,7 @@
const os = require('os');
const path = require('path');
const METEOR_LATEST_VERSION = '3.0-rc.1';
const METEOR_LATEST_VERSION = '3.0-rc.2';
const sudoUser = process.env.SUDO_USER || '';
function isRoot() {
return process.getuid && process.getuid() === 0;

View File

@@ -1,6 +1,6 @@
{
"name": "meteor",
"version": "3.0.0-rc.1",
"version": "3.0.0-rc.2",
"description": "Install Meteor",
"main": "install.js",
"scripts": {

6
package-lock.json generated
View File

@@ -3446,9 +3446,9 @@
}
},
"typescript": {
"version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true
},
"unbox-primitive": {

View File

@@ -30,7 +30,7 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.6",
"typescript": "^4.9.5"
"typescript": "^5.4.5"
},
"jshintConfig": {
"esversion": 11

View File

@@ -1,5 +1,5 @@
Package.describe({
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
summary:
'Package used to enable two factor authentication through OTP protocol',
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'A user account system',
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Facebook accounts",
version: '1.3.4-rc300.1',
version: '1.3.4-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Github accounts',
version: '1.5.1-rc300.1',
version: '1.5.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Google accounts",
version: '1.4.1-rc300.1',
version: '1.4.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Meetup accounts',
version: '1.5.1-rc300.1',
version: '1.5.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Meteor developer accounts',
version: '1.5.1-rc300.1',
version: '1.5.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for OAuth-based login services",
version: '1.4.5-rc300.1',
version: '1.4.5-rc300.2',
});
Package.onUse(api => {

View File

@@ -5,7 +5,7 @@ Package.describe({
// 2.2.x in the future. The version was also bumped to 2.0.0 temporarily
// during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2
// through -beta.5 and -rc.0 have already been published.
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
});
Npm.depends({

View File

@@ -1213,7 +1213,6 @@ if (Meteor.isServer) (() => {
// This test properly belongs in accounts-base/accounts_tests.js, but
// this is where the tests that actually log in are.
Tinytest.addAsync('accounts - user() out of context', async test => {
// basic server context, no method.
await test.throwsAsync(
async () =>
await Meteor.user()

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'No-password login/sign-up support for accounts',
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Twitter accounts",
version: '1.5.1-rc300.1',
version: '1.5.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Unstyled version of login widgets',
version: '1.7.1-rc300.1',
version: '1.7.1-rc300.2',
});
Package.onUse(function(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Simple templates to add login widgets to an app",
version: '1.4.3-rc300.1',
version: '1.4.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Sina Weibo accounts",
version: '1.4.1-rc300.1',
version: '1.4.1-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'allow-deny',
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
// Brief, one-line summary of the package.
summary: 'Implements functionality for allow/deny and client-side db operations',
// URL to the Git repository containing the source code for this package.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Try to detect inadequate input sanitization",
version: '1.0.8-rc300.1',
version: '1.0.8-rc300.2',
});
// This package is empty; its presence is detected by livedata.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "(For prototyping only) Publish the entire database to all clients",
version: '1.0.8-rc300.1',
version: '1.0.8-rc300.2',
});
// This package is empty; its presence is detected by several other packages

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Update the client when new client code is available',
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
});
Package.onUse(function(api) {

View File

@@ -1,7 +1,7 @@
Package.describe({
name: "babel-compiler",
summary: "Parser/transpiler for ECMAScript 2015+ syntax",
version: '7.11.0-rc300.1',
version: '7.11.0-rc300.2',
});
Npm.depends({

View File

@@ -1,7 +1,7 @@
Package.describe({
name: "babel-runtime",
summary: "Runtime support for output of Babel transpiler",
version: '1.5.2-rc300.1',
version: '1.5.2-rc300.2',
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Base64 encoding and decoding",
version: '1.0.13-rc300.1',
version: '1.0.13-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Binary Heap datastructure implementation",
version: '1.0.12-rc300.1',
version: '1.0.12-rc300.2',
});
Package.onUse(api => {

View File

@@ -2,7 +2,7 @@ Package.describe({
// These tests are in a separate package so that we can Npm.depend on
// parse5, a html parsing library.
summary: "Tests for the boilerplate-generator package",
version: '1.5.2-rc300.1',
version: '1.5.2-rc300.2',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Generates the boilerplate html from program's manifest",
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for browser-policy packages",
version: '1.0.13-rc300.1',
version: '1.0.13-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Configure content security policies",
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Restrict which websites can frame your app",
version: '1.1.3-rc300.1',
version: '1.1.3-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Configure security policies enforced by the browser",
version: '1.1.3-rc300.1',
version: '1.1.3-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'caching-compiler',
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
summary: 'An easy way to make compiler plugins cache',
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Register callbacks on a hook",
version: '1.6.0-rc300.1',
version: '1.6.0-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Check whether a value matches a pattern',
version: '1.4.2-rc300.1',
version: '1.4.2-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Given the set of the constraints, picks a satisfying configuration",
version: '2.0.0-rc300.1',
version: '2.0.0-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Core runtime to load packages and the app",
version: '1.0.0-rc300.1',
version: '1.0.0-rc300.2',
documentation: null
});

View File

@@ -1,7 +1,7 @@
Package.describe({
summary: "Makes your Cordova application use the Crosswalk WebView \
instead of the System WebView on Android",
version: '1.7.2-rc300.1',
version: '1.7.2-rc300.2',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Code shared beween ddp-client and ddp-server",
version: '1.4.1-rc300.1',
version: '1.4.1-rc300.2',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ddp-rate-limiter',
version: '1.2.1-rc300.1',
version: '1.2.1-rc300.2',
// Brief, one-line summary of the package.
summary: 'The DDPRateLimiter allows users to add rate limits to DDP' +
' methods and subscriptions.',

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data server",
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data framework",
version: '1.4.2-rc300.1',
version: '1.4.2-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Makes the application crawlable to web spiders",
version: "1.1.0-alpha300.5",
version: "1.1.0-alpha300.6",
deprecated: true,
documentation: 'README.md'
});

View File

@@ -56,9 +56,8 @@ Spiderable._urlForPhantom = function (siteAbsoluteUrl, requestUrl) {
return urlParser.format(parsedAbsoluteUrl);
};
var PHANTOM_SCRIPT = Assets.getText("phantom_script.js");
WebApp.handlers.use(function (req, res, next) {
var PHANTOM_SCRIPT = Assets.getTextAsync("phantom_script.js");
// _escaped_fragment_ comes from Google's AJAX crawling spec:
// https://developers.google.com/webmasters/ajax-crawling/docs/specification
if (/\?.*_escaped_fragment_=/.test(req.url) ||

View File

@@ -1,5 +1,5 @@
Package.describe({
version: '0.1.3-rc300.1',
version: '0.1.3-rc300.2',
summary: 'Show build errors in client when using HMR',
documentation: 'README.md',
devOnly: true

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "An implementation of a diff algorithm on arrays and objects.",
version: '1.1.3-rc300.1',
version: '1.1.3-rc300.2',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Disables oplog tailing",
version: '1.0.8-rc300.1',
version: '1.0.8-rc300.2',
});
// This package is empty; its presence is detected by mongo-livedata.

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "dynamic-import",
version: '0.7.4-rc300.1',
version: '0.7.4-rc300.2',
summary: "Runtime support for Meteor 1.5 dynamic import(...) syntax",
documentation: "README.md"
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ecmascript-runtime-client',
version: '0.12.2-rc300.1',
version: '0.12.2-rc300.2',
summary: 'Polyfills for new ECMAScript 2015 APIs like Map and Set',
git:
'https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client',

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "ecmascript-runtime-server",
version: '0.11.1-rc300.1',
version: '0.11.1-rc300.2',
summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set",
git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client",
documentation: "README.md"

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "ecmascript-runtime",
version: '0.8.2-rc300.1',
version: '0.8.2-rc300.2',
summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set",
git: "https://github.com/meteor/ecmascript-runtime",
documentation: "README.md"

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ecmascript',
version: '0.16.9-rc300.1',
version: '0.16.9-rc300.2',
summary: 'Compiler plugin that supports ES2015+ in all .js files',
documentation: 'README.md',
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Extended and Extensible JSON library',
version: '1.1.4-rc300.1',
version: '1.1.4-rc300.2',
});
Package.onUse(function onUse(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Send email messages',
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "es5-shim",
version: '4.8.1-rc300.1',
version: '4.8.1-rc300.2',
summary: "Shims and polyfills to improve ECMAScript 5 support",
documentation: "README.md"
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Blaze configuration templates for Facebook OAuth.",
version: '1.0.4-rc300.1',
version: '1.0.4-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Facebook OAuth flow",
version: '1.11.3-rc300.1',
version: '1.11.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Publish internal app statistics",
version: '1.0.2-rc300.1',
version: '1.0.2-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Display internal app statistics",
version: '1.0.2-rc300.1',
version: '1.0.2-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "fetch",
version: '0.1.5-rc300.1',
version: '0.1.5-rc300.2',
summary: "Isomorphic modern/legacy/Node polyfill for WHATWG fetch()",
documentation: "README.md"
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Internal force-ssl common code.',
version: '1.1.1-rc300.1',
version: '1.1.1-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Require this application to use HTTPS",
version: '1.1.1-rc300.1',
version: '1.1.1-rc300.2',
prodOnly: true
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'GeoJSON utility functions (from https://github.com/maxogden/geojson-js-utils)',
version: '1.0.12-rc300.1',
version: '1.0.12-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Blaze configuration templates for GitHub OAuth.',
version: '1.0.3-rc300.1',
version: '1.0.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -47,8 +47,8 @@ const getAccessToken = async (query) => {
});
const request = await OAuth._fetch(
`https://github.com/login/oauth/access_token?${content.toString()}`,
'POST',
{
method: 'POST',
headers: {
Accept: 'application/json',
'User-Agent': userAgent
@@ -76,8 +76,7 @@ const getAccessToken = async (query) => {
const getIdentity = async (accessToken) => {
try {
const request = await OAuth._fetch('https://api.github.com/user', {
method: 'GET',
const request = await OAuth._fetch('https://api.github.com/user', 'GET', {
headers: {
Accept: 'application/json',
'User-Agent': userAgent,
@@ -95,8 +94,7 @@ const getIdentity = async (accessToken) => {
const getEmails = async (accessToken) => {
try {
const request = await OAuth._fetch('https://api.github.com/user/emails', {
method: 'GET',
const request = await OAuth._fetch('https://api.github.com/user/emails', 'GET', {
headers: {
'User-Agent': userAgent,
Accept: 'application/json',

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'GitHub OAuth flow',
version: '1.4.2-rc300.1',
version: '1.4.2-rc300.3',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Blaze configuration templates for Google OAuth.',
version: '1.0.4-rc300.1',
version: '1.0.4-rc300.2',
});
Package.onUse(api => {

View File

@@ -137,8 +137,7 @@ const getTokens = async (query, callback) => {
redirect_uri: OAuth._redirectUri('google', config),
grant_type: 'authorization_code',
});
const request = await OAuth._fetch('https://accounts.google.com/o/oauth2/token', {
method: 'POST',
const request = await OAuth._fetch('https://accounts.google.com/o/oauth2/token', 'POST', {
headers: {
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
@@ -176,8 +175,8 @@ const getIdentity = async (accessToken, callback) => {
try {
const request = await OAuth._fetch(
`https://www.googleapis.com/oauth2/v1/userinfo?${content.toString()}`,
'GET',
{
method: 'GET',
headers: { Accept: 'application/json' },
}
);
@@ -196,8 +195,8 @@ const getScopes = async (accessToken, callback) => {
try {
const request = await OAuth._fetch(
`https://www.googleapis.com/oauth2/v1/tokeninfo?${content.toString()}`,
'GET',
{
method: 'GET',
headers: { Accept: 'application/json' },
}
);

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Google OAuth flow",
version: '1.4.5-rc300.1',
version: '1.4.5-rc300.3',
});
Cordova.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'hot-code-push',
version: '1.0.5-rc300.1',
version: '1.0.5-rc300.2',
// Brief, one-line summary of the package.
summary: 'Update the client in place when new code is available.',
// URL to the Git repository containing the source code for this package.

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'hot-module-replacement',
version: '0.5.4-rc300.1',
version: '0.5.4-rc300.2',
summary: 'Update code in development without reloading the page',
documentation: 'README.md',
debugOnly: true,

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Dictionary data structure allowing non-string keys",
version: '1.2.0-rc300.1',
version: '1.2.0-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "(For prototyping only) Allow all database writes from the client",
version: '1.0.8-rc300.1',
version: '1.0.8-rc300.2',
});
// This package is empty; its presence is detected by mongo-livedata.

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "inter-process-messaging",
version: '0.1.2-rc300.1',
version: '0.1.2-rc300.2',
summary: "Support for sending messages from the build process to the server process",
documentation: "README.md"
});

View File

@@ -6,7 +6,7 @@ Package.describe({
// between such packages and the build tool.
name: 'launch-screen',
summary: 'Default and customizable launch screen on mobile.',
version: '2.0.1-rc300.1',
version: '2.0.1-rc300.2',
});
Cordova.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Simulates local storage on IE 6,7 using userData",
version: '1.2.1-rc300.1',
version: '1.2.1-rc300.2',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Logging facility.',
version: '1.3.5-rc300.1',
version: '1.3.5-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "General satisfiability solver for logic problems",
version: '3.0.0-rc300.1',
version: '3.0.0-rc300.2',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Blaze configuration templates for the Meetup OAuth flow.',
version: '1.0.3-rc300.1',
version: '1.0.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Meetup OAuth flow',
version: '1.1.3-rc300.1',
version: '1.1.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'meteor-base',
version: '1.5.2-rc300.1',
version: '1.5.2-rc300.2',
// Brief, one-line summary of the package.
summary: 'Packages that every Meteor app needs',
// By default, Meteor will default to using README.md for documentation.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Blaze configuration templates for the Meteor developer accounts OAuth.',
version: '1.0.3-rc300.1',
version: '1.0.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Meteor developer accounts OAuth flow',
version: '1.3.3-rc300.1',
version: '1.3.3-rc300.2',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'The Meteor command-line tool',
version: '3.0.0-rc.1',
version: '3.0.0-rc.2',
});
Package.includeTool();

View File

@@ -11,3 +11,7 @@ Meteor.isFibersDisabled = true;
Meteor._isPromise = function (r) {
return r && typeof r.then === "function";
};
Meteor._runFresh = function (fn) {
return fn();
};

View File

@@ -36,10 +36,16 @@ function updateAslStore(key, value) {
return getAslStore()[key] = value;
}
function runFresh(fn) {
var asyncLocalStorage = getAsl();
return asyncLocalStorage.run({}, fn);
}
Meteor._getAsl = getAsl;
Meteor._getAslStore = getAslStore;
Meteor._getValueFromAslStore = getValueFromAslStore;
Meteor._updateAslStore = updateAslStore;
Meteor._runFresh = runFresh;
Meteor._runAsync = function (fn, ctx, store) {
if (store === undefined) {

View File

@@ -71,7 +71,7 @@ Object.assign(AsynchronousQueue.prototype, {
const promise = new Promise(r => resolve = r);
const runImmediateHandle = (fn) => {
if (Meteor.isServer) {
setImmediate(fn);
Meteor._runFresh(() => setImmediate(fn))
return;
}
setTimeout(fn, 0);

View File

@@ -36,11 +36,26 @@ EVp.getOrNullIfOutsideFiber = function () {
*/
EVp.withValue = function (value, func) {
var saved = currentValues[this.slot];
try {
currentValues[this.slot] = value;
var ret = func();
var isPromise = Meteor._isPromise(ret);
if (isPromise) {
var self = this;
return ret.then(function (res) {
currentValues[self.slot] = saved;
return res
});
}
} catch (e) {
throw e;
} finally {
currentValues[this.slot] = saved;
if (!isPromise) {
currentValues[this.slot] = saved;
}
}
return ret;

View File

@@ -60,20 +60,10 @@ class EnvironmentVariableAsync {
}
return Meteor._runAsync(
async function () {
let ret;
try {
Meteor._updateAslStore(CURRENT_VALUE_KEY_NAME, value);
Meteor._updateAslStore(UPPER_CALL_DYNAMICS_KEY_NAME, dynamics);
ret = await func();
} finally {
Meteor._updateAslStore(CURRENT_VALUE_KEY_NAME, undefined);
Meteor._updateAslStore(
UPPER_CALL_DYNAMICS_KEY_NAME,
undefined,
);
}
return ret;
function () {
Meteor._updateAslStore(CURRENT_VALUE_KEY_NAME, value);
Meteor._updateAslStore(UPPER_CALL_DYNAMICS_KEY_NAME, dynamics);
return func();
},
self,
Object.assign(
@@ -142,10 +132,10 @@ Meteor.EnvironmentVariable = EnvironmentVariableAsync;
/**
* @summary Stores the current Meteor environment variables, and wraps the
* function to run with the environment variables restored. On the server, the
* function is wrapped within a fiber.
* function is wrapped within Async Local Storage.
*
* This function has two reasons:
* 1. Return the function to be executed on the MeteorJS context, having it assinged in the async localstorage.
* 1. Return the function to be executed on the MeteorJS context, having it assigned in Async Local Storage.
* 2. Better error handling, the error message will be more clear.
* @locus Anywhere
* @memberOf Meteor

Some files were not shown because too many files have changed in this diff Show More