Merge branch 'release-2.14' into feature/logging-types

This commit is contained in:
Gabriel Grubba
2023-12-05 16:53:41 -03:00
committed by GitHub
52 changed files with 371 additions and 109 deletions

View File

@@ -25,15 +25,15 @@ Hacktoberfest release! 🎉
#### Migration Steps
##### Android splash screen
If you have been using `splash-screen` for Cordova, you need to update your code as Android changed their splash screen API,
the `cordova-plugin-splashscreen` is now on `cordova-android` core, so we have removed the dependency from the `splash-screen`
If you have been using `splash-screen` for Cordova, you need to update your code as Android changed their splash screen API,
the `cordova-plugin-splashscreen` is now on `cordova-android` core, so we have removed the dependency from the `splash-screen`
package. As a result we are dropping the support for dark mode splash screen on Android.
To create this now you need to create two themes on your `config.xml` file.
> Note that it's still possible to have it by adding the according themes with App.appendToConfig and App.addResourceFile - but this is not something Meteor will do automagically right now.
> Note that it's still possible to have it by adding the according themes with App.appendToConfig and App.addResourceFile - but this is not something Meteor will do automatically right now.
TODO: @matheusccastroo sample on how the new config should look and link to relevant Cordova docs
TODO: @matheusccastroo sample on how the new config should look and link to relevant Cordova docs
## Breaking Changes
@@ -55,7 +55,7 @@ TODO: @matheusccastroo sample on how the new config should look and link to rele
- Updated `semver` to v7.5.4
- Updated `@meteorjs/babel` to v7.18.4
- Cordova has been updated to v12.0.1 for Android and v7.0.1 for iOS
- `meteor create` command was re-made to be more interactive
- `meteor create` command was re-made to be more interactive
## Meteor Version Release
@@ -113,7 +113,7 @@ TODO: @matheusccastroo sample on how the new config should look and link to rele
- Added `appleMail` user agent to allow modern bundle on iPads
* `mongo@get-version`
- Added deprecation messages into type definitions
- Added deprecation messages into type definitions
- Fix ObjectIDs handling in oplogV2V1Converter
* `modules@get-version`
@@ -175,7 +175,7 @@ TODO: @matheusccastroo sample on how the new config should look and link to rele
- Remove logging request/response in google_server
* NPM `@meteorjs/babel@7.18.4`
- Updated `@meteorjs/reify` to v0.24.1
- Updated `@meteorjs/reify` to v0.24.1
* NPM `@meteorjs/babel-preset-meteor@7.10.1`
- Add Facebook in-app browser

View File

@@ -20,7 +20,7 @@ Hacktoberfest release! 🎉
* You can now set `DISABLE_SOCKJS_CORS=1` if you want to prevent SockJS from setting CORS headers. Do not set this option if you will have DDP clients from other origins connecting to the DDP server. [PR](https://github.com/meteor/meteor/pull/12789)
* Added guide on (how to prepare for Meteor 3.0 migration)[https://guide.meteor.com/prepare-meteor-3.0].
* Added guide on [how to prepare for Meteor 3.0 migration](https://guide.meteor.com/prepare-meteor-3.0).
* New DDP merge strategy `NO_MERGE_MULTI`, which is similar to `NO_MERGE`, but it does track whether a document is used by multiple publications. [PR](https://github.com/meteor/meteor/pull/12742)
@@ -28,13 +28,28 @@ Hacktoberfest release! 🎉
* Added `Accounts.createUserAsync` into the client.
* Many packages had their underscore dependency removed.
* Cordova has been updated to v12.0.1 for Android and v7.0.1 for iOS
* `meteor create` command is now interactive!
#### Migration Steps
TODO
##### Android splash screen
If you have been using `splash-screen` for Cordova, you need to update your code as Android changed their splash screen API,
the `cordova-plugin-splashscreen` is now on `cordova-android` core, so we have removed the dependency from the `splash-screen`
package. As a result we are dropping the support for dark mode splash screen on Android.
To create this now you need to create two themes on your `config.xml` file.
> Note that it's still possible to have it by adding the according themes with App.appendToConfig and App.addResourceFile - but this is not something Meteor will do automagically right now.
TODO: @matheusccastroo sample on how the new config should look and link to relevant Cordova docs
## Breaking Changes
N/A
* `splash-screen` package has removed the `cordova-plugin-splashscreen` dependency. See migration steps for more info.
## Docs
@@ -49,19 +64,47 @@ N/A
- Fixed build issue in Vue skeleton
- Updated `source-map-support`
- Fixed bugs in negated “in” and “instanceof” expressions
- Updated `semver` to v7.5.4
- Updated `@meteorjs/babel` to v7.18.4
- Cordova has been updated to v12.0.1 for Android and v7.0.1 for iOS
- `meteor create` command was re-made to be more interactive
## Meteor Version Release
* `accounts-base@2.2.8`
* `accounts-base@2.2.9`
- Ensure that `onLogin` callback fires properly
- Indexes are now created asynchronously
* `accounts-oauth@1.4.3`
- Indexes are now created asynchronously
* `accounts-password@2.4.0`
- Add `Accounts.createUserAsync` to the client, a promise-based version of `Accounts.createUser`
- Indexes are now created asynchronously
* `accounts-passwordless@2.1.3`
* `accounts-passwordless@2.1.4`
- Fix #12401, ensure that user is found with ID
- Indexes are now created asynchronously
* `ddp-server@2.6.2`:
* `babel-compiler@7.10.5`
- Updated `@meteorjs/babel` to v7.18.4
* `boilerplate-generator@1.7.2`
- Removed Underscore dependency
* `browser-policy-content@1.1.3`
- Removed Underscore dependency
* `constraint-solver@1.2.1`
- Removed Underscore dependency
* `crosswalk@1.7.2`
- Updated `cordova-plugin-crosswalk-webview` to v2.4.0
- Deprecated the package
* `ddp-rate-limiter@1.2.1`
- Removed Underscore dependency
* `ddp-server@2.7.0`:
- Allow setting `DISABLE_SOCKJS_CORS` to prevent SockJS from setting CORS headers
- Added new publication strategy `NO_MERGE_MULTI`
@@ -72,30 +115,84 @@ N/A
- Update `node-fetch` to version 1.6.12
- Update `whatwg-fetch` to version 3.6.17
* `logging@1.3.2`:
* `logging@1.3.3`:
- Added TS types
* `meteor@1.11.3`:
* `meteor@1.11.4`:
- Improve TS types
* `modern-browsers@0.1.10`
- Added `appleMail` user agent to allow modern bundle on iPads
* `mongo@1.16.8`
- Added deprecation messages into type definitions
- Fix ObjectIDs handling in oplogV2V1Converter
* `modules@0.20.0`
- Updated `@meteorjs/babel` to v7.18.4
* `npm-mongo@4.17.0`:
- Bumped MongoDB driver to version 4.17
* `react-fast-refresh@0.2.7`:
* `oauth@2.2.1`
- Indexes are now created asynchronously
- `remove` DB calls migrated to `removeAsync
* `launch-screen@2.0.0`
- Removed `cordova-plugin-splashscreen` dependency
* `logic-solver@2.0.8`
- Removed Underscore dependency
* `package-version-parser@3.2.2`
- Updated `semver` to v7.5.4
* `react-fast-refresh@0.2.8`:
- Updated `semver` to version 7.5.4
* `service-configuration@1.3.2`
- Indexes are now created asynchronously
- Add types for ConfigError
* `socket-stream-client@0.5.2`
- Removed Underscore dependency
* `test-server-tests-in-console-once@1.0.12`
- Removed Underscore dependency
* `tinytest@1.2.3`
- Removed Underscore dependency
* `webapp@1.13.5`
- Updated `cordova-plugin-meteor-webapp` to v2.0.3
- Updated `cookie-parser` to v1.4.6
- Updated `send` to v0.18.0
- Updated `stream-to-string` to v1.2.1
- Updated `qs` to v6.11.2
- Updated `@types/connect` to v3.4.38
## Independent releases
* `google-oauth@1.4.4`:
- Remove logging request/response in google_server
* NPM `@meteorjs/babel@7.18.4`
- Updated `@meteorjs/reify` to v0.24.1
* NPM `@meteorjs/babel-preset-meteor@7.10.1`
- Add Facebook in-app browser
* NPM `cordova-plugin-meteor-webapp@2.0.2`
- Fixed Android hot code push failing
* NPM `cordova-plugin-meteor-webapp@2.0.3`
- Fix pull manifest from correct url if parameter are used in baseurl
* NPM `meteor-node-stubs@1.2.6`
- Update dependencies
- Deep update dependencies that were highlighted by `npm audit`
## Contributors
- [@StorytellerCZ](https://github.com/sponsors/StorytellerCZ)
@@ -110,6 +207,12 @@ N/A
- [@ebroder](https://github.com/ebroder)
- [@BANSAL-NISHU](https://github.com/BANSAL-NISHU)
- [@salmanhasni](https://github.com/salmanhasni)
- [@jdgjsag67251](https://github.com/jdgjsag67251)
- [@guncebektas](https://github.com/guncebektas)
- [@harryadel](https://github.com/harryadel)
- [@dd137](https://github.com/dd137)
- [@matheusccastroo](https://github.com/matheusccastroo)
- [@mr-loop-1](https://github.com/mr-loop-1)
For making this great framework even better!
@@ -225,10 +328,10 @@ for more information about the problems and issues you might find while migratin
#### Internal changes
* `ddp-server@2.6.2`:
* `ddp-server@2.7.0`:
- Updated livedata server test to be more easily debbuged.
* `mongo@1.16.7`:
* `mongo@1.16.8`:
- Updated deprecated reference in Mongo package.
#### Migration Steps

View File

@@ -80,7 +80,7 @@ If the initial run of an autorun throws an exception, the computation
is automatically stopped and won't be rerun.
### Tracker.autorun and async callbacks
`Tracker.autorun` can accept an `async` callback function.
`Tracker.autorun` can accept an `async` callback function.
To preserve reactivity for the reactive variables inside the async callback function, you must use a `Tracker.withComputation` call as described below:
{% apibox "Tracker.withComputation" %}
@@ -94,7 +94,7 @@ Tracker.autorun(async function example1(computation) {
// 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());
@@ -112,7 +112,7 @@ The `react-meteor-data` package uses `Tracker.withComputation` to make the `useT
More can be seen [here](https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data#maintaining-the-reactive-context)
### Using async callbacks in versions of Meteor prior to 2.10
`Tracker.autorun` can accept an `async` callback function.
`Tracker.autorun` can accept an `async` callback function.
However, the async call back function will only be dependent on reactive functions called prior to any called functions that return a promise.
Example 1 - autorun `example1()` **is not** dependent on reactive changes to the `Meteor.users` collection. Because it is dependent on nothing reactive it will run only once:
@@ -302,6 +302,41 @@ recomputed at flush time.
This property is a convenience to support the common pattern where a
computation has logic specific to the first run.
{% apibox "Tracker.Computation#firstRunPromise" %}
`Computation.firstRunPromise` will be set to the result of the call of the autorun function after the initial computation has been completed. If the autorun function is an async function, it'll then contain its promise, thus making the completion of the execution await-able. That allows us to manually synchronize autoruns like this:
```js
await Tracker.autorun(async () => {
await Meteor.userAsync();
(...more async code...)
}).firstRunPromise;
await Tracker.autorun(async () => {
await asyncSomeOrOther();
(...more async code...)
}).firstRunPromise;
```
For a better developer experience `firstRunPromise` is automatically appended to your async `autorun` calls so you don't have to write them yourself. Meaning this also works:
```js
await Tracker.autorun(async () => {
await Meteor.userAsync();
(...more async code...)
});
await Tracker.autorun(async () => {
await asyncSomeOrOther();
(...more async code...)
});
```
<h2 id="tracker_dependency"><span>Tracker.Dependency</span></h2>
A Dependency represents an atomic unit of reactive data that a

View File

@@ -33,7 +33,7 @@ required.
This is the default command. Simply running `meteor` is the
same as `meteor run`.
To pass additional options to Node.js use the `SERVER_NODE_OPTIONS` environment variable. E.g. for Windows PowerShell:
To pass additional options to Node.js use the `SERVER_NODE_OPTIONS` environment variable. E.g. for Windows PowerShell:
`$env:SERVER_NODE_OPTIONS = '--inspect' | meteor run`. Or for Linux: `SERVER_NODE_OPTIONS=--inspect-brk meteor run`.
To specify a port to listen on (instead of the default 3000), use `--port [PORT]`.
@@ -43,6 +43,9 @@ For example: `meteor run --port 4000`
will run the development server on `http://localhost:4000`
and the development MongoDB instance on `mongodb://localhost:4001`.
To open your default browser you can pass the `--open` flag.
For example: `meteor run --open`
Run `meteor help run` to see the full list of options.
<h2 id="meteordebug">meteor debug</h2>
@@ -83,21 +86,24 @@ option to other `meteor` tool commands, such as `meteor run` and `meteor test-pa
<h2 id="meteorcreate">meteor create <i>app-name</i></h2>
The command `meteor create app-name` is the default command for creating a new Meteor project. It creates a subdirectory
named `app-name` and copies a template app into it. You can pass an absolute or relative path. If you pass a relative
The command `meteor create app-name` is the default command for creating a new Meteor project. It creates a subdirectory
named `app-name` and copies a template app into it. You can pass an absolute or relative path. If you pass a relative
path, it will be resolved relative to the current working directory. By default, it generates a React project.
See the flags below to learn how you can generate different types of apps.
Using only `meteor create` will create a promt to help you choose the type of app you want to create,
giving you the options with the flags below.
<h3 id="apollo">--apollo</h3>
The command `meteor create --apollo app-name` creates a Meteor app with [React](https://react.dev/),
[Apollo](https://www.apollographql.com/) (GraphQL), and [MongoDB](https://www.mongodb.com/). To create a complete app,
including testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use
The command `meteor create --apollo app-name` creates a Meteor app with [React](https://react.dev/),
[Apollo](https://www.apollographql.com/) (GraphQL), and [MongoDB](https://www.mongodb.com/). To create a complete app,
including testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use
Apollo, refer to the [GraphQL section](https://react-tutorial.meteor.com/simple-todos-graphql/).
Npm packages included: `@apollo/client`, `@apollo/server`, `@babel/runtime`, `body-parser`, `express`,
Npm packages included: `@apollo/client`, `@apollo/server`, `@babel/runtime`, `body-parser`, `express`,
`graphql` `meteor-node-stubs`, `react`, `react-dom`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,
@@ -107,7 +113,7 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="bare">--bare</h3>
The command `meteor create --bare app-name` creates an empty Meteor app with [Blaze](https://blazejs.org) and
The command `meteor create --bare app-name` creates an empty Meteor app with [Blaze](https://blazejs.org) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Blaze tutorial](https://blaze-tutorial.meteor.com/).
@@ -119,22 +125,22 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="blaze-app">--blaze</h3>
The command `meteor create --blaze app-name` creates a Meteor app with [Blaze](https://blazejs.org) and
The command `meteor create --blaze app-name` creates a Meteor app with [Blaze](https://blazejs.org) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Blaze tutorial](https://blaze-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `jquery`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `blaze-html-templates`, `jquery`, `reactive-var`,
`tracker`, `standard-minifier-css`, `standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`,
`tracker`, `standard-minifier-css`, `standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`,
`hot-module-replacement`, `blaze-hot`.
<h3 id="chakra-ui">--chakra-ui</h3>
The command `meteor create --chakra-ui app-name` creates a Meteor app with [React](https://react.dev/),
[Chakra-UI](https://chakra-ui.com/), and [MongoDB](https://www.mongodb.com/). To create a complete app, including
testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use Chakra-UI,
The command `meteor create --chakra-ui app-name` creates a Meteor app with [React](https://react.dev/),
[Chakra-UI](https://chakra-ui.com/), and [MongoDB](https://www.mongodb.com/). To create a complete app, including
testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use Chakra-UI,
refer to the [Simple Tasks](https://github.com/fredmaiaarantes/simpletasks) example.
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `@chakra-ui/icons`, `@chakra-ui/react`, `@emotion/react`
@@ -147,10 +153,10 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="full">--full</h3>
The command `meteor create --full app-name` creates a Meteor app with [Blaze](https://blazejs.org) and
The command `meteor create --full app-name` creates a Meteor app with [Blaze](https://blazejs.org) and
[MongoDB](https://www.mongodb.com/). It creates a more complete, imports-based project that closely matches the
[file structure](https://guide.meteor.com/structure.html#javascript-structure) recommended by the
[Meteor Guide](https://guide.meteor.com/). To create a complete app, including testing and deployment, follow the
[file structure](https://guide.meteor.com/structure.html#javascript-structure) recommended by the
[Meteor Guide](https://guide.meteor.com/). To create a complete app, including testing and deployment, follow the
[Blaze tutorial](https://blaze-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `jquery`, `chai`.
@@ -172,7 +178,7 @@ Meteor packages included: `meteor`, `standard-minifier-css`, `standard-minifier-
<h3 id="package">--package</h3>
The command `meteor create --package package-name` creates a new package. If used in an existing app, it will create a
The command `meteor create --package package-name` creates a new package. If used in an existing app, it will create a
package in the `packages` directory. Check the [Meteor Guide](https://guide.meteor.com/writing-atmosphere-packages.html)
for more information on how to get started writing packages.
@@ -180,7 +186,7 @@ for more information on how to get started writing packages.
<h3 id="prototype">--prototype</h3>
The command `meteor create --prototype app-name` creates a project with the prototype purpose packages (`autopublish`
and `insecure`). If you use them, you can change your collections quickly and create prototype apps very quickly.
and `insecure`). If you use them, you can change your collections quickly and create prototype apps very quickly.
However, these packages are not supposed to be used in production.
For more information about security, you can read our [security checklist](https://guide.meteor.com/security.html#checklist).
@@ -189,28 +195,28 @@ It can be used with other flags that create apps, such as `--react`, `blaze`, or
<h3 id="react">--react</h3>
The command `meteor create --react app-name` creates a Meteor app with [React](https://react.dev/) and
[MongoDB](https://www.mongodb.com/). It functions in the same way as if you don't use any flags. To create a complete
The command `meteor create --react app-name` creates a Meteor app with [React](https://react.dev/) and
[MongoDB](https://www.mongodb.com/). It functions in the same way as if you don't use any flags. To create a complete
app, including testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,
`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`,
`react-meteor-data`.
<h3 id="release">--release</h3>
The command `meteor create app-name --release {meteor-version}` creates a Meteor app with the release specified in the
command. For instance, you can create a Meteor app with the `2.8` release using `meteor create app-name --release 2.8`.
By default, it generates a React app, but you can use it with other flags that create apps such as `--blaze`,
The command `meteor create app-name --release {meteor-version}` creates a Meteor app with the release specified in the
command. For instance, you can create a Meteor app with the `2.8` release using `meteor create app-name --release 2.8`.
By default, it generates a React app, but you can use it with other flags that create apps such as `--blaze`,
`--svelte`, `--vue`, or `--typescript`.
<h3 id="solid">--solid</h3>
The command `meteor create --solid app-name` creates a Meteor app with [Solid](https://www.solidjs.com/),
The command `meteor create --solid app-name` creates a Meteor app with [Solid](https://www.solidjs.com/),
[Vite](https://vitejs.dev/), and [MongoDB](https://www.mongodb.com/). You can see an example on the
[meteor-solid-app](https://github.com/fredmaiaarantes/meteor-solid-app/releases/tag/milestone-2.0) repository.
@@ -223,7 +229,7 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="svelte">--svelte</h3>
The command `meteor create --svelte app-name` creates a Meteor app with [Svelte](https://svelte.dev/) and
The command `meteor create --svelte app-name` creates a Meteor app with [Svelte](https://svelte.dev/) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Svelte tutorial](https://svelte-tutorial.meteor.com/).
@@ -239,7 +245,7 @@ You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteo
<h3 id="tailwind">--tailwind</h3>
The command `meteor create --tailwind app-name` creates a Meteor app with [React](https://react.dev/),
The command `meteor create --tailwind app-name` creates a Meteor app with [React](https://react.dev/),
[Tailwind CSS](https://tailwindcss.com), and [MongoDB](https://www.mongodb.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `autoprefixer`, `postcss`, `postcss-load-config`, `tailwindcss`.
@@ -251,9 +257,9 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="typescript">--typescript</h3>
The command `meteor create --typescript app-name` creates a Meteor app with [React](https://react.dev/),
[TypeScript](https://www.typescriptlang.org/), and [MongoDB](https://www.mongodb.com/). Check the
[Meteor Guide](https://guide.meteor.com/build-tool.html#typescript) for more information about TypeScript and how to
The command `meteor create --typescript app-name` creates a Meteor app with [React](https://react.dev/),
[TypeScript](https://www.typescriptlang.org/), and [MongoDB](https://www.mongodb.com/). Check the
[Meteor Guide](https://guide.meteor.com/build-tool.html#typescript) for more information about TypeScript and how to
use it with other UI frameworks.
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `@types/mocha`, `@types/node`, `@types/react`, `@types/react-dom`, `typescript`.
@@ -265,8 +271,8 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
<h3 id="vue">--vue</h3>
The command `meteor create --vue app-name` creates a Meteor app with [Vue 3](https://vuejs.org/),
[Tailwind CSS](https://tailwindcss.com), [Vite](https://vitejs.dev/), and [MongoDB](https://www.mongodb.com/). To
The command `meteor create --vue app-name` creates a Meteor app with [Vue 3](https://vuejs.org/),
[Tailwind CSS](https://tailwindcss.com), [Vite](https://vitejs.dev/), and [MongoDB](https://www.mongodb.com/). To
create a complete app, including testing and deployment, follow the [Vue 3 tutorial](https://vue3-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`, `vue-router`, `@types/meteor`, `@vitejs/plugin-vue`, `autoprefixer`, `postcss`, `tailwindcss`, `vite`.
@@ -276,20 +282,20 @@ Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive
`vite:bundler`.
You can also use Vue 3 with Vite by using the [jorgenvatle:meteor-vite](https://github.com/JorgenVatle/meteor-vite)
package. You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/vue)
package. You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/vue)
repository.
<h3 id="vue-2">--vue-2</h3>
The command `meteor create --vue-2 app-name` creates a Meteor app with [Vue 2](https://v2.vuejs.org/) and
The command `meteor create --vue-2 app-name` creates a Meteor app with [Vue 2](https://v2.vuejs.org/) and
[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the
[Vue 2 tutorial](https://vue-tutorial.meteor.com/).
Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`.
Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`,
`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `tracker`, `static-html`, `akryum:vue-component`,
`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `tracker`, `static-html`, `akryum:vue-component`,
`meteortesting:mocha`, `johanbrook:publication-collector`.
@@ -303,7 +309,7 @@ used as a command line only operation as well.
> By default, the generator will use JavaScript but if it detects that you have a
``tsconfig.json`` file in your project, it will use TypeScript instead.
running
running
```bash
meteor generate customer
@@ -511,7 +517,7 @@ It will prompt the following questions.
---
---
<h3 id="meteorgenerate-templating"> Using your own template </h3>
@@ -533,7 +539,7 @@ You can use your own templates for scaffolding your specific workloads. To do th
Out of the box is provided a few functions such as replacing ``$$name$$``, ``$$PascalName$$`` and ``$$camelName$$``
these replacements come from this function:
_Note that scaffoldName is the name that you have passed as argument_
```js
@@ -661,7 +667,7 @@ If you want to connect to your free MongoDB shared cluster using your on setting
```
packages: {
mongo: {
options: {
options: {
tlsAllowInvalidCertificates: true,
},
},
@@ -685,7 +691,7 @@ Your project should be a git repository as the commit hash is going to be used t
The `cache-build` option is available since Meteor 1.11.
{% endpullquote %}
With the argument `--container-size` you can change your app's container size using the deploy command. The valid arguments are: `tiny`, `compact`, `standard`, `double`, `quad`, `octa`, and `dozen`. One more thing to note here is that the `--container-size` flag can only be used when the `--plan` option is already specified, otherwise using the `--container-size` option will throw an error with the message : `Error deploying application: Internal error`. To see more about the difference and prices of each one you can check [here](https://www.meteor.com/cloud#pricing-section).
With the argument `--container-size` you can change your app's container size using the deploy command. The valid arguments are: `tiny`, `compact`, `standard`, `double`, `quad`, `octa`, and `dozen`. One more thing to note here is that the `--container-size` flag can only be used when the `--plan` option is already specified, otherwise using the `--container-size` option will throw an error with the message : `Error deploying application: Internal error`. To see more about the difference and prices of each one you can check [here](https://www.meteor.com/cloud#pricing-section).
{% pullquote warning %}
The `--container-size` option is available since Meteor 2.4.1.
@@ -912,7 +918,7 @@ upload the build to the architecture that you were using to publish it. You can
use `publish-for-arch` to upload a build to a different architecture from a
different machine.
If you have already published a package but need to update it's metadata
If you have already published a package but need to update it's metadata
(the content of `Package.describe`) or the README you can actually achieve this
via `meteor publish --update`.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'A user account system',
version: '2.2.9-beta2140.4',
version: '2.2.9-beta2140.7',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for OAuth-based login services",
version: "1.4.3-beta2140.4",
version: "1.4.3-beta2140.7",
});
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: '2.4.0-beta2140.4',
version: '2.4.0-beta2140.7',
});
Npm.depends({

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Configure content security policies",
version: "1.1.3-beta2140.4"
version: "1.1.3-beta2140.7"
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Given the set of the constraints, picks a satisfying configuration",
version: "1.2.1-beta2140.4"
version: "1.2.1-beta2140.7"
});
Npm.depends({

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-beta2140.4',
version: '1.7.2-beta2140.7',
documentation: null,
deprecated: true
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ddp-rate-limiter',
version: '1.2.1-beta2140.4',
version: '1.2.1-beta2140.7',
// 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: '2.7.0-beta2140.4',
version: '2.7.0-beta2140.7',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "(Deprecated) Include a standard set of Meteor packages in your app",
version: '1.2.8-beta2140.4',
version: '1.2.8-beta2140.7',
deprecated: true,
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Moved to meteor-platform",
version: '1.0.11-beta2140.4',
version: '1.0.11-beta2140.7',
deprecated: true,
documentation: 'README.md'
});

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "fetch",
version: '0.1.4-beta2140.4',
version: '0.1.4-beta2140.7',
summary: "Isomorphic modern/legacy/Node polyfill for WHATWG fetch()",
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.0-beta2140.4'
version: '2.0.0-beta2140.7'
});
Package.onUse(function(api) {

View File

@@ -1,7 +1,7 @@
Package.describe({
summary: 'Logging facility.',
documentation: 'README.md',
version: '1.3.3-beta2140.4'
version: '1.3.3-beta2140.7',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "General satisfiability solver for logic problems",
version: '2.0.8'
version: '2.0.9-beta2140.7'
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'The Meteor command-line tool',
version: '2.14.0-beta.4',
version: '2.14.0-beta.7',
});
Package.includeTool();

View File

@@ -2,7 +2,7 @@
Package.describe({
summary: "Core Meteor environment",
version: '1.11.4-beta2140.4',
version: '1.11.4-beta2140.7',
});
Package.registerBuildPlugin({

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'mobile-experience',
version: '1.1.1-beta2140.4',
version: '1.1.1-beta2140.7',
summary: 'Packages for a great mobile user experience',
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'modern-browsers',
version: '0.1.10-beta2140.4',
version: '0.1.10-beta2140.7',
summary:
'API for defining the boundary between modern and legacy ' +
'JavaScript clients',

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "modules",
version: "0.20.0-beta2140.4",
version: "0.20.0-beta2140.7",
summary: "CommonJS module system",
documentation: "README.md"
});

View File

@@ -9,7 +9,7 @@
Package.describe({
summary: "Adaptor for using MongoDB and Minimongo over DDP",
version: '1.16.8-beta2140.4',
version: '1.16.8-beta2140.7',
});
Npm.depends({

View File

@@ -3,7 +3,7 @@
Package.describe({
summary: "Wrapper around the mongo npm package",
version: '4.17.0-beta2140.4',
version: '4.17.0-beta2140.7',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for OAuth-based services",
version: '2.2.1-beta2140.4',
version: '2.2.1-beta2140.7',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Parses Meteor Smart Package version strings",
version: "3.2.2-beta2140.4",
version: "3.2.2-beta2140.7",
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'react-fast-refresh',
version: '0.2.8-beta2140.4',
version: '0.2.8-beta2140.7',
summary: 'Automatically update React components with HMR',
documentation: 'README.md',
devOnly: true,

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Manage the configuration for third-party services',
version: '1.3.2-beta2140.4',
version: '1.3.2-beta2140.7',
});
Package.onUse(function(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "socket-stream-client",
version: '0.5.2-beta2140.4',
version: '0.5.2-beta2140.7',
summary: "Provides the ClientStream abstraction used by ddp-client",
documentation: "README.md"
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Run tests interactively in the browser",
version: '1.3.4-beta2140.4',
version: '1.3.4-beta2140.7',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Run tests noninteractively, with results going to the console.',
version: '1.2.5',
version: '1.2.6-beta2140.7',
});
Package.onUse(function(api) {

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@@ -0,0 +1,10 @@
{
"lockfileVersion": 1,
"dependencies": {
"lodash.has": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/lodash.has/-/lodash.has-4.5.2.tgz",
"integrity": "sha512-rnYUdIo6xRCJnQmbVFEwcxF144erlD+M3YcJUVesflU9paQaE8p+fJDcIQrlMYbxoANFL+AB9hZrzSBBk5PL+g=="
}
}
}

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Run server tests noninteractively, with results going to the console.",
version: '1.0.12-beta2140.4'
version: '1.0.12-beta2140.7'
});
Npm.depends({

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@@ -0,0 +1,10 @@
{
"lockfileVersion": 1,
"dependencies": {
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="
}
}
}

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Tiny testing framework",
version: '1.2.3-beta2140.4'
version: '1.2.3-beta2140.7'
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Dependency tracker to allow reactive callbacks",
version: '1.3.2',
version: '1.3.3-beta2140.7',
});
Package.onUse(function (api) {

View File

@@ -16,6 +16,10 @@ export namespace Tracker {
* True during the initial run of the computation at the time `Tracker.autorun` is called, and false on subsequent reruns and at other times.
*/
firstRun: boolean;
/**
* Forces autorun blocks to be executed in synchronous-looking order by storing the value autorun promise thus making it awaitable.
*/
firstRunPromise: Promise<unknown>
/**
* Invalidates this computation so that it will be rerun.
*/

View File

@@ -196,6 +196,16 @@ Tracker.Computation = class Computation {
this._onError = onError;
this._recomputing = false;
/**
* @summary Forces autorun blocks to be executed in synchronous-looking order by storing the value autorun promise thus making it awaitable.
* @locus Client
* @memberOf Tracker.Computation
* @instance
* @name firstRunPromise
* @returns {Promise<unknown>}
*/
this.firstRunPromise = undefined;
var errored = true;
try {
this._compute();
@@ -207,6 +217,22 @@ Tracker.Computation = class Computation {
}
}
/**
* Resolves the firstRunPromise with the result of the autorun function.
* @param {*} onResolved
* @param {*} onRejected
* @returns{Promise<unknown}
*/
then(onResolved, onRejected) {
return this.firstRunPromise.then(onResolved, onRejected);
};
catch(onRejected) {
return this.firstRunPromise.catch(onRejected)
};
// http://docs.meteor.com/#computation_oninvalidate
/**
@@ -297,10 +323,18 @@ Tracker.Computation = class Computation {
var previousInCompute = inCompute;
inCompute = true;
try {
Tracker.withComputation(this, () => {
withNoYieldsAllowed(this._func)(this);
// In case of async functions, the result of this function will contain the promise of the autorun function
// & make autoruns await-able.
const firstRunPromise = Tracker.withComputation(this, () => {
return withNoYieldsAllowed(this._func)(this);
});
// We'll store the firstRunPromise on the computation so it can be awaited by the callers, but only
// during the first run. We don't want things to get mixed up.
if (this.firstRun) {
this.firstRunPromise = Promise.resolve(firstRunPromise);
}
} finally {
inCompute = previousInCompute;
}
@@ -560,15 +594,12 @@ Tracker._runFlush = function (options) {
* thrown. Defaults to the error being logged to the console.
* @returns {Tracker.Computation}
*/
Tracker.autorun = function (f, options) {
Tracker.autorun = function (f, options = {}) {
if (typeof f !== 'function')
throw new Error('Tracker.autorun requires a function argument');
options = options || {};
constructingComputation = true;
var c = new Tracker.Computation(
f, Tracker.currentComputation, options.onError);
var c = new Tracker.Computation(f, Tracker.currentComputation, options.onError);
if (Tracker.active)
Tracker.onInvalidate(function () {

View File

@@ -297,7 +297,7 @@ Tinytest.add("tracker - lifecycle", function (test) {
test.equal(c, Tracker.currentComputation);
test.equal(c.stopped, false);
test.equal(c.invalidated, false);
test.equal(c.firstRun, firstRun);
test.equal(c.firstRun, firstRun);
Tracker.onInvalidate(makeCb()); // 1, 6, ...
Tracker.afterFlush(makeCb()); // 2, 7, ...
@@ -630,6 +630,53 @@ Tinytest.addAsync('tracker - async function - stepped', async function (test) {
test.equal(count, limit, 'after resolve');
});
Tinytest.addAsync('tracker - async function - synchronize', async test => {
let counter = 0;
await Tracker.autorun(async () => {
test.equal(counter, 0);
counter += 1;
test.equal(counter, 1);
await new Promise(resolve => setTimeout(resolve));
test.equal(counter, 1);
counter *= 2;
test.equal(counter, 2);
});
await Tracker.autorun(async () => {
test.equal(counter, 2);
counter += 1;
test.equal(counter, 3);
await new Promise(resolve => setTimeout(resolve));
test.equal(counter, 3);
counter *= 2;
test.equal(counter, 6);
});
})
Tinytest.addAsync('tracker - async function - synchronize - firstRunPromise', async test => {
let counter = 0
await Tracker.autorun(async () => {
test.equal(counter, 0);
counter += 1;
test.equal(counter, 1);
await new Promise(resolve => setTimeout(resolve));
test.equal(counter, 1);
counter *= 2;
test.equal(counter, 2);
}).firstRunPromise;
await Tracker.autorun(async () => {
test.equal(counter, 2);
counter += 1;
test.equal(counter, 3);
await new Promise(resolve => setTimeout(resolve));
test.equal(counter, 3);
counter *= 2;
test.equal(counter, 6);
}).firstRunPromise;
})
Tinytest.add('computation - #flush', function (test) {
var i = 0, j = 0, d = new Tracker.Dependency;
var c1 = Tracker.autorun(function () {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'typescript',
version: '4.9.5-beta2140.4',
version: '4.9.5-beta2140.7',
summary:
'Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files',
documentation: 'README.md',

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Serves a Meteor app over HTTP',
version: '1.13.5',
version: '1.13.6-beta2140.7',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
{
"track": "METEOR",
"version": "2.14-beta.4",
"version": "2.14-beta.7",
"recommended": false,
"official": false,
"description": "Meteor experimental release"