New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 1.8.2 #10522
Release 1.8.2 #10522
Commits on May 16, 2019
-
Update reify and @babel/runtime to latest versions in dev bundle.
We ended up with two different versions of the reify package (0.19.0 and 0.19.1) in the last build of the dev bundle, which seems to have caused the test failures.
-
Commits on May 17, 2019
Commits on Jun 17, 2019
-
Add missing dot in query parameter (#10581)
So that emails from other users are not exposed.
-
Add assets to watchSet, again (#10565)
Follow-up to #10452.
Commits on Jun 19, 2019
Commits on Jun 20, 2019
-
Update ecmascript-runtime-{client,server} to use core-js@3.1.4. (#10588)
-
Use full power of compiler plugins to compile unanticipated modules.
Instead of merely supporting ECMAScript module syntax via Reify, we should really be compiling unanticipated modules (typically within node_modules) using the same logic that the rest of the application uses. Note: this processing applies only to .js files for now, since that's what the ImportScanner works with. Should help with #10563.
-
-
Avoid double-compilation of @babel/runtime-related packages.
Now that we have the ability to invoke Babel via compiler plugins for individual modules encountered by the ImportScanner, it's possible the ImportScanner will try to compile @babel/runtime/helpers/* modules. These modules are not safe to recompile because they use native syntax (such as typeof) in ways that do not need additional transformation or simulation, and would be broken by applying the usual Babel transforms. It may bother you that this list of packages is hard-coded, or that it might grow over time. To ease those concerns, I would say: 1. We can release new versions of the babel-compiler and ecmascript packages whenever we need to. 2. These particular npm packages belong in this list because Babel itself assumes they have already been compiled, so there shouldn't be (m)any other packages that fit that narrow criterion. In other words, this is just a list of packages that must be left untouched in order to bootstrap the Babel compiler system, and the babel-compiler package is where the details of that system primarily reside, so that's where we should put this list, until/unless we find a better solution.
-
-
-
Compile import/export syntax in @babel/runtime-related modules.
Case in point: @babel/runtime/helpers/esm/typeof.js uses ECMAScript module syntax (import, export), but must not be compiled with transforms like @babel/plugin-transform-typeof-symbol, since it's part of the runtime library depended upon by that transform. This logic is an extreme implementation detail for sure, but at least babel-compiler is the only code that needs to know about this complexity.
-
-
-
Commits on Jun 23, 2019
-
-
Merge pull request #10585 from meteor/invoke-compileOneJsResource-fro…
…m-ImportScanner Support full ECMAScript compilation of modules unexpectedly imported from node_modules.
-
Update dev-bundle-tool-package.js (#10592)
Need to update version "node-gyp" to "5.0.1", due to deprecated packages into 3.7.0
-
-
-
-
-
Give different Timestamps to operations within a transaction.
Follow-up to #10420, per this comment by @conorstrejcek: #10420 (comment) Should help with #10512.
-
Commits on Jun 24, 2019
-
-
Update node-pre-gyp to version 0.13.0.
Since PR #10592 updated node-gyp to the latest version, we should update node-pre-gyp as well.
-
Stop using Mongo Timestamp as cacheKey in DocFetcher.
See my comment in issue #10512 for motivation: #10512 (comment) I think the changes in b0cb1ce are still worthwhile because they ensure ops within a transaction have distinct Timestamps, with the caveat that we should avoid assuming those Timestamps are necessarily unique.
-
Commits on Jun 25, 2019
-
Move meteorBabelHelpers to modules package, and restrict to legacy bu…
…ndle. (#10596) Should fix #10595. Code from the application `node_modules` directory becomes part of the `modules` package, so that it can be imported by any other package that uses the module system, regardless of package load order. Now that we compile code from `node_modules` using `babel-compiler` and `meteor-babel` (#10585), `node_modules` code requires the same runtime environment as any other Meteor JS code. For the most part, this need is satisfied by the `@babel/runtime/helpers/...` modules, which are also defined in the `modules` package because they come from `node_modules`. However, in the legacy bundle, `meteorBabelHelpers.sanitizeForInObject` is used to fix buggy for-in iteration in older Internet Explorers. Thankfully, this extra helper code does not need to be included in the modern or server bundles, but only in legacy code.
-
-
-
-
Commits on Jun 28, 2019
Commits on Jun 29, 2019
Commits on Jul 1, 2019
-
Support meteor.nodeModules.recompile package.json configuration option.
Example: "meteor": { "mainModule": ..., "testModule": ..., "nodeModules": { "recompile": { "very-modern-package": ["client", "server"], "alternate-notation-for-client-and-server": true, "somewhat-modern-package": "legacy", "another-package": ["legacy", "server"] } } } The keys of the meteor.nodeModules.recompile configuration object are npm package names, and the values specify for which bundles those packages should be recompiled using the Meteor compiler plugins system, as if the packages were part of the Meteor application. For example, if an npm package uses const/let syntax or arrow functions, that's fine for modern and server code, but you would probably want to recompile the package when building the legacy bundle. To accomplish this, specify "legacy" or ["legacy"] as the value of the package's property, similar to somewhat-modern-package above. These strings and arrays of strings have the same meaning as the second argument to api.addFiles(files, where) in a package.js file. This configuration serves pretty much the same purpose as symlinking an application directory into node_modules, but without any symlinking: https://forums.meteor.com/t/litelement-import-litelement-html/45042/8?u=benjamn The meteor.nodeModules.recompile configuration currently applies to the application node_modules directory only (not to Npm.depends dependencies in Meteor packages). Recompiled packages must be direct dependencies of the application.
-
Compile unanticipated node_modules code with Reify only, again.
In PR #10585, I tried enabling full compiler plugin processing for any modules imported from `node_modules` that were not otherwise handled by compiler plugins, but doing that for all packages was just too slow, not to mention potentially dangerous for modules whose code cannot be safely recompiled by Babel. The primary reasons for wanting to recompile node_modules are 1. to enable "native" ECMAScript `import`/`export` syntax (given that Node.js still does not fully support ESM syntax yet), and 2. to compile standard syntax like `const`, `let`, classes, and arrow functions for legacy browsers. The first goal can be achieved by compiling unanticipated `node_modules` code with Reify, which is much faster than Babel, in part because Reify can avoid doing any parsing when the source contains no `import` or `export` identifiers. This compilation is also cached on disk, so its impact should only be felt during cold builds after a `meteor reset`. The second goal can be accomplished using the new `package.json` configuration option `meteor.nodeModules.recompile`, which causes the recompiled packages to be handled by the normal compiler plugins system, so that the `ImportScanner`'s fallback compilation is not necessary. Before this option was introduced, this recompilation behavior could be achieved by symlinking application directories into `node_modules`, but that always felt like an esoteric hack.
-
Update meteor-babel and reify to latest versions.
This ensures we wrap modules with a function to rename the `module` identifier to something more reliable when the ImportScanner compiles unanticipated modules imported from node_modules.
Commits on Jul 2, 2019
-
Avoid delegating to module.useNode() for .js and .mjs modules.
This partially reverts f0d39b8 by simply including .js and .mjs modules in the server bundle, rather than delegating to pure Node evaluation. In practice, whether or not the package has a "module" entry point (or "type":"module") in its package.json was not a perfect indicator of whether it should be compiled with Reify and bundled, or left untouched and handled by Node. Truly native modules (such as those with a .node file extension) should always be handled by Node, so module.useNode() definitely still has a role to play in the server bundle.
-
-
Test that ESM modules can be imported from npm packages.
With appropriate meteor.nodeModules.recompile configuration, that is.
-
-
Keep using module.useNode() instead of bundling server node_modules.
This partially reverts commit 4dfc741. Some server packages, especially those that rely on __dirname or __filename (e.g. puppeteer), simply cannot be included in the server bundle, and must be evaluated natively by Node. As long as we have a Module.prototype._compile hook to process natively evaluated modules with Reify, module.useNode() can still benefit from ESM import/export syntax.
-
Update meteor-babel to version 7.4.18.
This allows us to take advantage of the features.compileForShell option when compiling code in the `meteor shell` REPL.
-
-
Use default parser for Reify Module.prototype._compile hook.
This saves us from having to install @babel/parser in the server bundle. There is currently a bug in Reify that prevents it from loading this parser by default, but we can work around that on the Meteor side for now.
-
Update reify to version 0.20.10.
We don't need to build a whole new dev bundle just for this upgrade, since we've already worked around the bug that it fixes, but it will get picked up the next time we build the dev bundle for Meteor 1.8.2.
-
Merge pull request #10603 from meteor/meteor.nodeModules.recompile-pa…
…ckage.json-config Support meteor.nodeModules.recompile package.json configuration option.
Commits on Jul 3, 2019
-
Remove hasModuleEntryPoint logic from PackageSource#_findSources.
Now that we have the meteor.nodeModules.recompile configuration (#10603), we don't need to guess which packages might need to be recompiled.
-
Use reify/lib/parsers/babel rather than acorn.
Acorn seems to have trouble parsing code that @babel/parser parses successfully, such as the dist/esm.js file in markdown-to-jsx@6.10.2.
-
-
Give different Timestamps to operations within a transaction.
Follow-up to #10420, per this comment by @conorstrejcek: #10420 (comment) Should help with #10512.
-
Stop using Mongo Timestamp as cacheKey in DocFetcher.
See my comment in issue #10512 for motivation: #10512 (comment) I think the changes in b0cb1ce are still worthwhile because they ensure ops within a transaction have distinct Timestamps, with the caveat that we should avoid assuming those Timestamps are necessarily unique.
-
-
Fall back to package.json "main" field if "module" cannot be resolved.
The meteor/tools/isobuild/resolver.js changes are the static half of the puzzle. The runtime half was implemented in install@0.13.0 with this commit: benjamn/install@233aa75
-
Commits on Jul 4, 2019
-
-
-
-
-
-
-
-
-
Merge pull request #10607 from meteor/convert-tools/fs/files-to-types…
…cript Convert tools/fs/files.js to TypeScript.
-
-
-
-
-
-
-
Commits on Jul 5, 2019
-
-
-
-
-
Fix return types of fs.{watchFile,unwatchFile}.
These methods return a StatWatcher object with various useful methods, but @types/node apparently gets this completely wrong, assuming void.
-
Convert tools/fs/safe-watcher.js to TypeScript.
This completes the TypeScript conversion of the tools/fs directory. 🎉
-
Commits on Jul 6, 2019
-
Convert tools/tool-env/profile.js to TypeScript.
Unfortunately, this conversion triggered an error due to one of the shortcomings of the Babel implementation of TypeScript: SyntaxError: /tools/tool-env/profile.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript 278 | } 279 | > 280 | export namespace Profile { | ^ 281 | export let enabled = !! process.env.METEOR_PROFILE; 282 | 283 | export function time<TResult>(bucket: string, f: () => TResult) { at File.buildCodeFrameError (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/core/lib/transformation/file/file.js:261:12) at transpileNamespace (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/namespace.js:25:25) at PluginPass.TSModuleDeclaration (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/index.js:271:32) at newFn (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/visitors.js:193:21) at NodePath._call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:88:12) at TraversalContext.visitQueue (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:118:16) at TraversalContext.visitMultiple (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:85:17) at TraversalContext.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:144:19)
-
Update meteor-babel to version 7.5.3.
TypeScript is now supported by the actual TypeScript compiler, rather than by @babel/preset-typescript: meteor/babel#25
-
-
-
Test that the ganalytics npm package is importable.
As reported by @arggh in this comment: #10522 (comment)
-
Fix importing of unanticipated .mjs modules in ImportScanner.
Should fix this problem reported by @arggh: #10522 (comment)
-
-
Commits on Jul 7, 2019
Commits on Jul 10, 2019
-
Merge pull request #10610 from meteor/core-typescript-plugin
Implement an official TypeScript compiler plugin.
-
Commits on Jul 15, 2019
-
Make
meteor npx tsc
run without errors, and test it.This makes type checking possible without an external tool like VSCode.
-
Convert tools/utils/eachline.js to TypeScript (#10614)
Thanks to @menewman for tackling this small but important module!
-
-
Explicitly install version 3.5.3 of typescript in dev bundle.
The typescript package was previously installed as a dependency of meteor-babel, but it clearly deserves to be a direct dependency.
-
Assume npx (as in
meteor npx ...
) is a valid command.Sometimes, before dev_bundle/bin/.meteor-commands.json has been written, a command like `./meteor npx tsc` can fail because `npx` is not blessed in the same way `node` and `npm` are. Since `npx` is a core tool that we want folks to be able to use without confusion, I think it makes sense to include it in the list of known subcommands.
-
Avoid use of forEach in Base64 encode method (#10629)
For strings we convert to Uint8Array, which does not support forEach on any version of IE, and is not polyfilled by default.
-
-
-
Revert "Temporarily disable SIGKILL self-test on devel branch."
This reverts commit 5c32331. This test is passing reliably on the release-1.8.2 branch, so we should keep running it there.
-
Commits on Jul 16, 2019
Commits on Jul 19, 2019
Commits on Jul 21, 2019
-
Convert tools/utils/archinfo.js to TypeScript. (#10624)
* Updated code to use modern JS * Added types * Stopped using 2 underscore functions (1 remaining)
-
Commits on Jul 26, 2019
Commits on Jul 30, 2019
Commits on Sep 5, 2019
-
-
-
Add files to unibuild.watchSet only if needed by unibuild.arch.
Most importantly, this change means that changes to files not used by the server bundle will not trigger a server restart. Fixes #10449 by implementing the strategy I described in this comment: #10414 (comment)
Commits on Sep 6, 2019
-
Explicitly track potentially unused WatchSet files.
The previous implementation simply avoided calling watchSet.addFile for potentially unused files, trusting that addFile would be called later if the file was eventually used. However, this strategy left the contents of watchSet.files incomplete for tasks such as IsopackCache._checkUpToDate, which require full information about all files, even the ones that might not be used by the bundle. The new strategy maintains metadata about potentially unused files in a separate data structure, which will be merged/cloned/serialized/deserialized along with other WatchSet data.
-
-
Merge pull request #10686 from meteor/conservative-server-restart
Avoid restarting server in development when changed file(s) not used by server bundle.
-
-
Go back to using LRU cache for findImportedModuleIdentifiers.
Should fix #10674. May help with #10608. cc @houshuang @klaussner
-
-
Update typescript version to 3.6.2.
Most of these changes came for free with the update of meteor-babel to version 7.6.0, but a few remaining spots needed to be updated.
-
Commits on Sep 8, 2019
-
Use json5 for optimisticReadJsonOrNull.
Because json5 is more tolerant of non-standards-compliant input, it has no trouble with \t tab characters outside of string literals, so this change should fix issue #10688. Note that json5 is already installed in dev_bundle/lib/node_modules/json5, because it is a dependency of @babel/core, so we don't need to rebuild the dev bundle immediately, though it would be a good idea to do so before the next beta/RC release.
Commits on Sep 18, 2019
-
-
-
Improve the shouldWatch function in tools/fs/optimistic.ts. (#10693)
This function determines whether the optimistic caching system should subscribe to file change notifications for a given path. Note that Meteor has other ways of watching for file changes (e.g. the WatchSet abstraction), as well as other mechanisms for invalidating cached results, so time and resources can often be saved by returning false here, if we know that the path will be watched in other ways. Improvements: - Add METEOR_PROFILE instrumentation to the shouldWatch implementation. - Stop exporting shouldWatch, since it is no longer used anywhere else in the codebase. - Return false early to avoid watching files inside the .meteor directory, a significant shortcut. - Allow watching files in application node_modules directories that are not located directly in the root application directory (closes #10664).
Commits on Sep 19, 2019
-
Allow creating Meteor apps with --typescript skeleton.
Just as developers can run meteor create --react my-react-app meteor create --minimal my-minimal-app meteor create --bare my-bare-app meteor create --full my-full-app they can now run meteor create --typescript my-typescript-app to produce a new TypeScript application, based on the --react application, configured using a recommended tsconfig.json file. This app represents the current best/simplest-known way to set up a Meteor-compatible TypeScript application, but it is still very much a work in progress. Please feel free to submit pull requests to improve it, or create issues to discuss how it should work. For example, the community-maintained @types/meteor package covers all the core packages used by this starter application, but it has not been updated in a while, so there will no doubt be meteor/* packages with missing types. In future versions, Meteor should ideally generate the appropriate .d.ts files from TypeScript package source code, so that no separate @types/meteor/* declarations need to be maintained.
-
-
Merge pull request #10695 from meteor/meteor-create-typescript-skeleton
Allow creating Meteor apps with --typescript skeleton.
-
Pass tsconfig.json path to meteor-babel via features.typescript.
This information is not used by meteor-babel, yet, but it will become important as Meteor's TypeScript support begins to honor tsconfig.json.
-
-
-
-
Install typescript in devDependencies of skel-typescript.
This is important so that tools like VSCode will pick up the correct version of the TypeScript SDK, rather than whatever default version was installed with VSCode.
-
-
Revert "Use json5 for optimisticReadJsonOrNull."
This reverts commit 5124cb4. Perhaps unsurprisingly, JSON5 is much slower than JSON, so much so that "other optimisticReadJsonOrNull" has become the single most expensive leaf when building one of our internal applications. We will have to find another solution.
-
Sanitize risky whitespace characters to recover from failed JSON.parse.
-
Restore CLI progress messages by revisiting progress.ts conversion.
I noticed recently that progress messages were no longer displayed (though the ASCII spinner was still animating). I bisected the problem to the progress.ts conversion in #10650, and I attempted to reproduce the conversion, step by step. The problem ended up being the renaming of ._title to .title, which was a mistake because external code accesses progress._title. Once I updated those invasive access points, progress messages began displaying once again.
-
Commits on Sep 22, 2019
Commits on Sep 23, 2019
-
-
Use optimisticStatOrNull in readAndStatDirectory.
This drastically (by more than half) cuts down the number of calls to files.stat that occur during PackageSource#_findSources scanning.
-
-
Commits on Oct 24, 2019
-
-
Merge pull request #10730 from filipenevola/cannot-find-module-dynami…
…c-imports Fixes `cannot find module` error when using dynamic imports in massive projects
-
-
-
Commits on Nov 4, 2019
Commits on Nov 5, 2019
-
tools/deploy: provide more context for version-status errors (#10670)
Also only print the error once on failure.
-
Set a higher LRU cache size for makeCheapPathFunction entries.
In PR #10720, we introduced the makeCheapPathFunction in an effort to reduce the caching overhead for very frequently called (and already pretty quick) operations like files.stat. However, the default maximum LRU cache size of Math.pow(2, 16) can cause quite a bit of cache eviction churn for large applications, which @veered has identified as a potential source of build performance problems. By setting the maximum cache size to Math.pow(2, 20) instead, I am no longer seeing any files.stat calls in the profiling output for rebuilding a large internal app, saving several seconds of rebuild time. The obvious downside is that this cache might accumulate more memory over time, which is why I didn't just set the max to Infinity, though that might be a viable option if the total set of paths ever stat'd is small enough to fit into the available memory. In the future, I hope to find ways of managing LRU cache size that respond to actual memory pressure (relative to available memory), rather than pruning the cache after an arbitrary numeric threshold is reached.
-
Update meteor-babel to version 7.7.0.
Note that typescript has been updated to version 3.7.2 as part of this update: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-rc/
-
Avoid using console.error on success in Windows dev bundle scripts.
The scripts/generate-dev-bundle.ps1 script fails if any external command logs to STDERR instead of STDOUT, apparently.
-
Stop creating @babel/runtime/helpers/builtin junction on Windows.
Although I managed to make this work somewhat better in my previous commit, we still have to create a .tar.gz archive of the dev bundle, and 7z appears not to handle junction points very well. I think it will be much simpler to avoid the helpers/builtin symlinking hack on Windows.
-
Bump package versions for 1.8.2-rc.6 release.
I made a small mistake publishing rc.5 (forgot to bump meteor-release-experimental.json), so it seemed simpler to skip straight to rc.6.
Commits on Nov 6, 2019
-
Merge pull request #10543 from brucejo75/accounts_call_onLogin_callba…
…cks_startup [fix #10157] Make sure onLogin callbacks are called during startup.
Commits on Nov 8, 2019
-
-
-
Prefer "main" field of package.json over "module" in legacy bundle.
#10658 (comment) #10658 (comment) As usual, changes to module resolution logic need to happen in parallel in tools/isobuild/resolver.ts and in packages/modules-runtime. However, thanks to the modern/legacy system, it's easy to make the modules-runtime package behave exactly the way(s) we want in the server, modern client, and legacy client bundles.
-
-
Merge pull request #10765 from meteor/prefer-main-over-module-in-lega…
…cy-bundle Prefer "main" field of package.json over "module" in legacy bundle.
-
-
Commits on Nov 9, 2019
Commits on Nov 11, 2019
-
Write files in Builder#_copyDirectory asynchronously.
Using fs.writeFileSync in a serial style becomes especially costly when we're writing a lot of files. In a recent profiling exercise I did on Windows, nearly 80% of the time taken by Builder#_copyDirectory was spent just closing the written files. By using the asynchronous fs.writeFile function, we should be able to parallelize at least some of this work, and await all the promises at the very end of copying the directory.
-
-
Commits on Nov 12, 2019
-
Merge pull request #10771 from meteor/copy-directories-asynchronously
Write files in Builder#_copyDirectory asynchronously.
-
Update license range for year 2019 (#10699)
Better late than never, right?
-
-
Attempt to make static-html self-tests less flaky.
Salvaged from PR #10771, which I had to revert because it caused EMFILE (too many open files) errors on Windows.
-
Bump package versions for 1.8.2-rc.9 release.
Note that publishing 1.8.2-rc.8 failed on all platforms due to EMFILE (too many open files) errors, which necessitated reverting PR #10771.
-
Rewrite files.rename on Windows to retry after 50ms intervals.
Falling back to a full recursive copy was MUCH more expensive than waiting a short amount of time before retrying the rename. This aligns with the way graceful-fs handles EPERM and EACCES errors on Windows: https://www.npmjs.com/package/graceful-fs#improvements-over-fs-module
-
-
-
Temporarily wrap files.rename on non-Windows platforms to validate sa…
…fety. Now that files.rename uses Promise.prototype.await on Windows, it's important to be sure it never gets called outside of a Fiber. Though we don't run our full test suite on Windows, we can validate this expectation by wrapping files.rename on all platforms. This commit should be reverted once the validation is complete.
-
Revert "Temporarily wrap files.rename on non-Windows platforms to val…
…idate safety." This reverts commit 52d4809, as promised in the previous commit message.
-
Merge pull request #10774 from meteor/enable-additional-appveyor-debu…
…gging-output Fix mysterious Windows AppVeyor test stalls.
-
Commits on Nov 13, 2019
-
Allow relative --test-app-path arguments when running test-packages.
#10772 (comment) The assertion in tools/fs/optimistic.ts was failing if I passed a relative path for --test-app-path, and passing the path as a second argument when calling assert made it easier to tell what was going on, so I decided to keep that change.