meteor v1.8.2 Release Notes
Release Date: 2019-07-30 // over 4 years ago-
๐ฅ Breaking changes
Module-level variable declarations named
require
orexports
are no longer automatically renamed, so they may collide with module function parameters of the same name, leading to errors likeUncaught SyntaxError: Identifier 'exports' has already been declared
. See this comment by @SimonSimCity.๐
Plugin.fs
methods are now always sync and no longer accept a callback.
Migration Steps
โก๏ธ Be sure to update the
@babel/runtime
npm package to its latest version (currently 7.7.2):meteor npm install @babel/runtime@latest
๐ New Meteor applications now depend on
[email protected]
, so it may be a good idea to update to the same major version:meteor npm install meteor-node-stubs@next
๐ฆ If you are the author of any Meteor packages, and you encounter errors when using those packages in a Meteor 1.8.2 application (for example,
module.watch
being undefined), we recommend that you bump the minor version of your package and republish it using Meteor 1.8.2, so Meteor 1.8.2 applications will automatically use the new version of the package, as compiled by Meteor 1.8.2:cd path/to/your/package # Add api.versionsFrom("1.8.2") to Package.onUse in package.js... meteor --release 1.8.2 publish
This may not be necessary for all packages, especially those that have been recently republished using Meteor 1.8.1, or local packages in the
packages/
directory (which are always recompiled from source). However, republishing packages is a general solution to a wide variety of package versioning and compilation problems, and package authors can make their users' lives easier by handling these issues proactively.
๐ Changes
โก๏ธ Node has been updated to version 8.16.2.
โก๏ธ The
npm
npm package has been updated to version 6.13.0, and our fork of itspacote
dependency has been updated to version 9.5.9.๐ New Meteor applications now include an official
typescript
package, supporting TypeScript compilation of.ts
and.tsx
modules, which can be added to existing apps by runningmeteor add typescript
.๐ New TypeScript-based Meteor applications can be created by running
meteor create --typescript new-typescript-app
This app skeleton contains a recommended tsconfig.json file, and should serve as a reference for how to make TypeScript and Meteor work together (to the best of our current knowledge). PR #10695
When bundling modern client code, the Meteor module system now prefers the
"module"
field inpackage.json
(if defined) over the"main"
field, which should unlock variousimport
/export
-based optimizations such as tree shaking in future versions of Meteor. As before, server code uses only the"main"
field, like Node.js, and legacy client code prefers"browser"
,"main"
, and then"module"
. PR #10541, PR #10765.ECMAScript module syntax (
import
,export
, and dynamicimport()
) is now supported by default everywhere, including in modules imported fromnode_modules
, thanks to the Reify compiler.If you need to import code from
node_modules
that uses modern syntax beyond module syntax, it is now possible to enable recompilation for specific npm packages using themeteor.nodeModules.recompile
option in your application'spackage.json
file. See PR #10603 for further explanation.๐ The Meteor build process is now able to detect whether files changed in development were actually used by the server bundle, so that a full server restart can be avoided when no files used by the server bundle have changed. Client-only refreshes are typically much faster than server restarts. Run
meteor add autoupdate
to enable client refreshes, if you are not already using theautoupdate
package. Issue #10449 PR #10686๐ฆ The
mongodb
npm package used by thenpm-mongo
Meteor package has been updated to version 3.2.7.โก๏ธ The
meteor-babel
npm package has been updated to version 7.7.0, enabling compilation of themeteor/tools
codebase with TypeScript (specifically, version 3.7.2 of thetypescript
npm package).โก๏ธ The
reify
npm package has been updated to version 0.20.12.๐ฆ The
core-js
npm package used byecmascript-runtime-client
andecmascript-runtime-server
has been updated to version 3.2.1.๐ฆ The
terser
npm package used byminifier-js
(and indirectly bystandard-minifier-js
) has been updated to version 4.3.1.โก๏ธ The
node-gyp
npm package has been updated to version 5.0.1, andnode-pre-gyp
has been updated to 0.13.0.โก๏ธ The
optimism
npm package has been updated to version 0.11.3, which enables caching of thrown exceptions as well as ordinary results, in addition to performance improvements.โก๏ธ The
pathwatcher
npm package has been updated to version 8.1.0.๐ฆ The
underscore
npm package installed in the Meteor dev bundle (for use by themeteor/tools
codebase) has been updated from version 1.5.2 to version 1.9.1, and@types/underscore
has been installed for better TypeScript support.In addition to the
.js
and.jsx
file extensions, theecmascript
compiler plugin now automatically handles JavaScript modules with the.mjs
file extension.โ Add
--cordova-server-port
option to override local port where Cordova will serve static resources, which is useful when multiple Cordova apps are built from the same application source code, since by default the port is generated using the ID from the application's.meteor/.id
file.๐ฆ The
--test-app-path <directory>
option formeteor test-packages
andmeteor test
now accepts relative paths as well as absolute paths.