From 2b024b2cef1bcfc0069202cfac1639137dd806d6 Mon Sep 17 00:00:00 2001 From: Max Nowack Date: Tue, 19 Mar 2019 18:03:59 +0100 Subject: [PATCH 001/326] Fix bug in minimongo fields projection This fixes a null reference exception while compiling a fields projection, if an array contains a null value --- packages/minimongo/local_collection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/minimongo/local_collection.js b/packages/minimongo/local_collection.js index 5ea83843e0..49fb99b9bf 100644 --- a/packages/minimongo/local_collection.js +++ b/packages/minimongo/local_collection.js @@ -878,7 +878,7 @@ LocalCollection._compileProjection = fields => { const result = details.including ? {} : EJSON.clone(doc); Object.keys(ruleTree).forEach(key => { - if (!hasOwn.call(doc, key)) { + if (doc == null || !hasOwn.call(doc, key)) { return; } @@ -897,7 +897,7 @@ LocalCollection._compileProjection = fields => { } }); - return result; + return doc != null ? result : doc; }; return doc => { From ca399374ffc1be2d3ffeef0f8e853f148e721846 Mon Sep 17 00:00:00 2001 From: Max Nowack Date: Wed, 20 Mar 2019 15:36:12 +0100 Subject: [PATCH 002/326] Extend tests --- packages/minimongo/minimongo_tests_client.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/minimongo/minimongo_tests_client.js b/packages/minimongo/minimongo_tests_client.js index 24455b439e..658f8e12db 100644 --- a/packages/minimongo/minimongo_tests_client.js +++ b/packages/minimongo/minimongo_tests_client.js @@ -1781,13 +1781,13 @@ Tinytest.add('minimongo - fetch with projection, subarrays', test => { fieldB: 'the bad', fieldC: 'the ugly', }], - setB: [{ + setB: [null, { anotherA: { }, anotherB: 'meh', - }, { + }, null, { anotherA: 1234, anotherB: 431, - }], + }, null], }); const equalNonStrict = (a, b, desc) => { @@ -1802,13 +1802,13 @@ Tinytest.add('minimongo - fetch with projection, subarrays', test => { testForProjection({ 'setA.fieldA': 1, 'setB.anotherB': 1, _id: 0 }, { setA: [{ fieldA: 42 }, { fieldA: 'the good' }], - setB: [{ anotherB: 'meh' }, { anotherB: 431 }], + setB: [null, { anotherB: 'meh' }, null, { anotherB: 431 }, null], }); testForProjection({ 'setA.fieldA': 0, 'setB.anotherA': 0, _id: 0 }, { setA: [{fieldB: 33}, {fieldB: 'the bad', fieldC: 'the ugly'}], - setB: [{ anotherB: 'meh' }, { anotherB: 431 }], + setB: [null, { anotherB: 'meh' }, null, { anotherB: 431 }, null], }); c.remove({}); From ac24d0067d25b854999c1f0409ffd062ddff76e9 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Sun, 4 Aug 2019 15:32:29 +0900 Subject: [PATCH 003/326] Convert npm-discards.js to TypeScript --- .eslintignore | 2 +- tools/isobuild/builder.js | 2 +- tools/isobuild/npm-discards.js | 92 ---------------------- tools/isobuild/npm-discards.ts | 99 ++++++++++++++++++++++++ tools/isobuild/package-npm.js | 2 +- tools/isobuild/package-npm.ts | 135 +++++++++++++++++++++++++++++++++ 6 files changed, 237 insertions(+), 95 deletions(-) delete mode 100644 tools/isobuild/npm-discards.js create mode 100644 tools/isobuild/npm-discards.ts create mode 100644 tools/isobuild/package-npm.ts diff --git a/.eslintignore b/.eslintignore index 50cced0770..5228e27ede 100644 --- a/.eslintignore +++ b/.eslintignore @@ -90,7 +90,7 @@ tools/isobuild/js-analyze.js tools/isobuild/linker.js tools/isobuild/linter-plugin.js tools/isobuild/meteor-npm.js -tools/isobuild/npm-discards.js +tools/isobuild/npm-discards.ts tools/isobuild/package-api.js tools/isobuild/package-source.js tools/isobuild/source-arch.js diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 04a23919ec..6215fa2ca6 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -3,7 +3,7 @@ import {WatchSet, readAndWatchFile, sha1} from '../fs/watch'; import files, { symlinkWithOverwrite, } from '../fs/files'; -import NpmDiscards from './npm-discards.js'; +import NpmDiscards from './npm-discards'; import {Profile} from '../tool-env/profile'; import { optimisticReadFile, diff --git a/tools/isobuild/npm-discards.js b/tools/isobuild/npm-discards.js deleted file mode 100644 index b895a1cec0..0000000000 --- a/tools/isobuild/npm-discards.js +++ /dev/null @@ -1,92 +0,0 @@ -var assert = require("assert"); -var files = require('../fs/files'); -var _ = require("underscore"); - -// This class encapsulates a structured specification of files and -// directories that should be stripped from the node_modules directories -// of Meteor packages during `meteor build`, as requested by calling -// `Npm.discard` in package.js files. -function NpmDiscards() { - assert.ok(this instanceof NpmDiscards); - this.discards = {}; -} - -var NDp = NpmDiscards.prototype; - -// Update the current specification of discarded files with additional -// patterns that should be discarded. See the comment in package-source.js -// about `Npm.strip` for an explanation of what should be passed for the -// `discards` parameter. -NDp.merge = function(discards) { - merge(this.discards, discards); -}; - -function merge(into, from) { - _.each(from, function(fromValue, packageName) { - var intoValue = _.has(into, packageName) && into[packageName]; - if (_.isString(fromValue) || - _.isRegExp(fromValue)) { - if (intoValue) { - intoValue.push(fromValue); - } else { - into[packageName] = [fromValue]; - } - } else if (_.isArray(fromValue)) { - if (intoValue) { - intoValue.push.apply(intoValue, fromValue); - } else { - // Make a defensive copy of any arrays passed to `Npm.strip`. - into[packageName] = fromValue.slice(0); - } - } - }); -} - -NDp.shouldDiscard = function shouldDiscard(candidatePath, isDirectory) { - if (typeof isDirectory === "undefined") { - isDirectory = files.lstat(candidatePath).isDirectory(); - } - - for (var currentPath = candidatePath, parentPath; - (parentPath = files.pathDirname(currentPath)) !== currentPath; - currentPath = parentPath) { - if (files.pathBasename(parentPath) === "node_modules") { - var packageName = files.pathBasename(currentPath); - - if (_.has(this.discards, packageName)) { - var relPath = files.pathRelative(currentPath, candidatePath); - - if (isDirectory) { - relPath = files.pathJoin(relPath, files.pathSep); - } - - return this.discards[packageName].some(function(pattern) { - return matches(pattern, relPath); - }); - } - - // Stop at the first ancestor node_modules directory we find. - break; - } - } - - return false; -}; - -// TODO Improve this. For example we don't currently support wildcard -// string patterns (just use a RegExp if you need that flexibility). -function matches(pattern, relPath) { - if (_.isRegExp(pattern)) { - return relPath.match(pattern); - } - - assert.ok(_.isString(pattern)); - - if (pattern.charAt(0) === files.pathSep) { - return relPath.indexOf(pattern.slice(1)) === 0; - } - - return relPath.indexOf(pattern) !== -1; -} - -module.exports = NpmDiscards; diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts new file mode 100644 index 0000000000..dbb6d49111 --- /dev/null +++ b/tools/isobuild/npm-discards.ts @@ -0,0 +1,99 @@ +import * as files from "../fs/files"; + +const hasOwn = Object.prototype.hasOwnProperty; + +type StringOrRegExp = string | RegExp; + +interface Discards { + [packageName: string]: StringOrRegExp[]; +} + +// This class encapsulates a structured specification of files and +// directories that should be stripped from the node_modules directories +// of Meteor packages during `meteor build`, as requested by calling +// `Npm.discard` in package.js files. +class NpmDiscards { + private discards: Discards; + + constructor() { + this.discards = {}; + } + + // Update the current specification of discarded files with additional + // patterns that should be discarded. See the comment in package-source.js + // about `Npm.strip` for an explanation of what should be passed for the + // `discards` parameter. + merge(discards: Discards) { + merge(this.discards, discards); + } + + shouldDiscard(candidatePath: string, isDirectory?: boolean) { + if (isDirectory === void 0) { + isDirectory = files.lstat(candidatePath).isDirectory(); + } + + for (let currentPath = candidatePath, parentPath; + (parentPath = files.pathDirname(currentPath)) !== currentPath; + currentPath = parentPath) { + if (files.pathBasename(parentPath) === "node_modules") { + const packageName = files.pathBasename(currentPath); + + if (hasOwn.call(this.discards, packageName)) { + let relPath = files.pathRelative(currentPath, candidatePath); + + if (isDirectory) { + relPath = files.pathJoin(relPath, files.pathSep); + } + + return this.discards[packageName].some(pattern => + matches(pattern, relPath) + ); + } + + // Stop at the first ancestor node_modules directory we find. + break; + } + } + + return false; + } +} + +function merge(into: Discards, from: Discards) { + Object.keys(from).forEach((packageName: string) => { + const fromValue = from[packageName]; + const intoValue = hasOwn.call(into, packageName) && into[packageName]; + + if (typeof fromValue === "string" || fromValue instanceof RegExp) { + if (intoValue) { + intoValue.push(fromValue); + } else { + into[packageName] = [fromValue]; + } + + } else if (Array.isArray(fromValue)) { + if (intoValue) { + intoValue.push.apply(intoValue, fromValue); + } else { + // Make a defensive copy of any arrays passed to `Npm.strip`. + into[packageName] = fromValue.slice(0); + } + } + }); +} + +// TODO Improve this. For example we don't currently support wildcard +// string patterns (just use a RegExp if you need that flexibility). +function matches(pattern: StringOrRegExp, relPath: string) { + if (pattern instanceof RegExp) { + return relPath.match(pattern); + } + + if (pattern.charAt(0) === files.pathSep) { + return relPath.indexOf(pattern.slice(1)) === 0; + } + + return relPath.includes(pattern); +} + +export default NpmDiscards; diff --git a/tools/isobuild/package-npm.js b/tools/isobuild/package-npm.js index cfc394323d..a8504d4dfd 100644 --- a/tools/isobuild/package-npm.js +++ b/tools/isobuild/package-npm.js @@ -1,6 +1,6 @@ import { ensureOnlyValidVersions } from "../utils/utils.js"; import buildmessage from "../utils/buildmessage.js"; -import NpmDiscards from "./npm-discards.js"; +import NpmDiscards from "./npm-discards"; const nodeRequire = require; diff --git a/tools/isobuild/package-npm.ts b/tools/isobuild/package-npm.ts new file mode 100644 index 0000000000..745a85badb --- /dev/null +++ b/tools/isobuild/package-npm.ts @@ -0,0 +1,135 @@ +import { ensureOnlyValidVersions } from "../utils/utils.js"; +import buildmessage from "../utils/buildmessage.js"; +import NpmDiscards from "./npm-discards"; + +const nodeRequire = require; + +interface Dependencies { + [packageName: string]: string; +} + +interface Discards { + [packageName: string]: (string | RegExp)[]; +} + +export class PackageNpm { + private _dependencies: Dependencies | null; + + /** + * @summary Class of the 'Npm' object visible in package.js + * @locus package.js + * @instanceName Npm + * @showInstanceName true + */ + constructor() { + // Files to be stripped from the installed NPM dependency tree. See + // the Npm.strip comment below for further usage information. + this._discards = new NpmDiscards; + this._dependencies = null; + } + + /** + * @summary Specify which [NPM](https://www.npmjs.org/) packages + * your Meteor package depends on. + * @param {Object} dependencies An object where the keys are package + * names and the values are one of: + * 1. Version numbers in string form + * 2. http(s) URLs of npm packages + * 3. Git URLs in the format described [here](https://docs.npmjs.com/files/package.json#git-urls-as-dependencies) + * + * Https URL example: + * + * ```js + * Npm.depends({ + * moment: "2.8.3", + * async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz" + * }); + * ``` + * + * Git URL example: + * + * ```js + * Npm.depends({ + * moment: "2.8.3", + * async: "git+https://github.com/caolan/async#master" + * }); + * ``` + * @locus package.js + */ + depends(dependencies: Dependencies) { + // XXX make dependencies be separate between use and test, so that + // production doesn't have to ship all of the npm modules used by test + // code + if (this._dependencies) { + buildmessage.error("Npm.depends may only be called once per package", + { useMyCaller: true }); + // recover by ignoring the Npm.depends line + return; + } + + if (typeof dependencies !== 'object') { + buildmessage.error("the argument to Npm.depends should be an " + + "object, like this: {gcd: '0.0.0'}", + { useMyCaller: true }); + // recover by ignoring the Npm.depends line + return; + } + + // don't allow npm fuzzy versions so that there is complete + // consistency when deploying a meteor app + // + // XXX use something like seal or lockdown to have *complete* + // confidence we're running the same code? + try { + ensureOnlyValidVersions(dependencies, { + forCordova: false + }); + + } catch (e) { + buildmessage.error(e.message, { + useMyCaller: true, + downcase: true + }); + + // recover by ignoring the Npm.depends line + return; + } + + this._dependencies = dependencies; + } + + // The `Npm.strip` method makes up for packages that have missing + // or incomplete .npmignore files by telling the bundler to strip out + // certain unnecessary files and/or directories during `meteor build`. + // + // The `discards` parameter should be an object whose keys are + // top-level package names and whose values are arrays of strings + // (or regular expressions) that match paths in that package's + // directory that should be stripped before installation. For + // example: + // + // Npm.strip({ + // connect: [/*\.wmv$/], + // useragent: ["tests/"] + // }); + // + // This means (1) "remove any files with the `.wmv` extension from + // the 'connect' package directory" and (2) "remove the 'tests' + // directory from the 'useragent' package directory." + strip(discards: Discards) { + this._discards.merge(discards); + } + + require(name: string) { + try { + return nodeRequire(name); // from the dev bundle + } catch (e) { + buildmessage.error( + "can't find npm module '" + name + + "'. In package.js, Npm.require can only find built-in modules.", + { useMyCaller: true }); + // recover by, uh, returning undefined, which is likely to + // have some knock-on effects + } + } +} From 143b5d4916251f03fe47fe9397ee34bcca0ede90 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Sun, 4 Aug 2019 15:37:41 +0900 Subject: [PATCH 004/326] Move type and interface into index.d.ts --- tools/index.d.ts | 6 ++++++ tools/isobuild/npm-discards.ts | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/index.d.ts b/tools/index.d.ts index 62c834e501..0f9c11ec43 100644 --- a/tools/index.d.ts +++ b/tools/index.d.ts @@ -17,4 +17,10 @@ declare global { // func-utils.ts makes usage of this feature displayName?: string; } + + type StringOrRegExp = string | RegExp; + + interface Discards { + [packageName: string]: StringOrRegExp[]; + } } diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index dbb6d49111..6391eb082a 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -2,12 +2,6 @@ import * as files from "../fs/files"; const hasOwn = Object.prototype.hasOwnProperty; -type StringOrRegExp = string | RegExp; - -interface Discards { - [packageName: string]: StringOrRegExp[]; -} - // This class encapsulates a structured specification of files and // directories that should be stripped from the node_modules directories // of Meteor packages during `meteor build`, as requested by calling From dd30586cfa8a3f1967a51df48f2eebfe223b6b4b Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Sun, 4 Aug 2019 16:06:22 +0900 Subject: [PATCH 005/326] Remove accidental file change --- tools/isobuild/package-npm.ts | 135 ---------------------------------- 1 file changed, 135 deletions(-) delete mode 100644 tools/isobuild/package-npm.ts diff --git a/tools/isobuild/package-npm.ts b/tools/isobuild/package-npm.ts deleted file mode 100644 index 745a85badb..0000000000 --- a/tools/isobuild/package-npm.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { ensureOnlyValidVersions } from "../utils/utils.js"; -import buildmessage from "../utils/buildmessage.js"; -import NpmDiscards from "./npm-discards"; - -const nodeRequire = require; - -interface Dependencies { - [packageName: string]: string; -} - -interface Discards { - [packageName: string]: (string | RegExp)[]; -} - -export class PackageNpm { - private _dependencies: Dependencies | null; - - /** - * @summary Class of the 'Npm' object visible in package.js - * @locus package.js - * @instanceName Npm - * @showInstanceName true - */ - constructor() { - // Files to be stripped from the installed NPM dependency tree. See - // the Npm.strip comment below for further usage information. - this._discards = new NpmDiscards; - this._dependencies = null; - } - - /** - * @summary Specify which [NPM](https://www.npmjs.org/) packages - * your Meteor package depends on. - * @param {Object} dependencies An object where the keys are package - * names and the values are one of: - * 1. Version numbers in string form - * 2. http(s) URLs of npm packages - * 3. Git URLs in the format described [here](https://docs.npmjs.com/files/package.json#git-urls-as-dependencies) - * - * Https URL example: - * - * ```js - * Npm.depends({ - * moment: "2.8.3", - * async: "https://github.com/caolan/async/archive/71fa2638973dafd8761fa5457c472a312cc820fe.tar.gz" - * }); - * ``` - * - * Git URL example: - * - * ```js - * Npm.depends({ - * moment: "2.8.3", - * async: "git+https://github.com/caolan/async#master" - * }); - * ``` - * @locus package.js - */ - depends(dependencies: Dependencies) { - // XXX make dependencies be separate between use and test, so that - // production doesn't have to ship all of the npm modules used by test - // code - if (this._dependencies) { - buildmessage.error("Npm.depends may only be called once per package", - { useMyCaller: true }); - // recover by ignoring the Npm.depends line - return; - } - - if (typeof dependencies !== 'object') { - buildmessage.error("the argument to Npm.depends should be an " + - "object, like this: {gcd: '0.0.0'}", - { useMyCaller: true }); - // recover by ignoring the Npm.depends line - return; - } - - // don't allow npm fuzzy versions so that there is complete - // consistency when deploying a meteor app - // - // XXX use something like seal or lockdown to have *complete* - // confidence we're running the same code? - try { - ensureOnlyValidVersions(dependencies, { - forCordova: false - }); - - } catch (e) { - buildmessage.error(e.message, { - useMyCaller: true, - downcase: true - }); - - // recover by ignoring the Npm.depends line - return; - } - - this._dependencies = dependencies; - } - - // The `Npm.strip` method makes up for packages that have missing - // or incomplete .npmignore files by telling the bundler to strip out - // certain unnecessary files and/or directories during `meteor build`. - // - // The `discards` parameter should be an object whose keys are - // top-level package names and whose values are arrays of strings - // (or regular expressions) that match paths in that package's - // directory that should be stripped before installation. For - // example: - // - // Npm.strip({ - // connect: [/*\.wmv$/], - // useragent: ["tests/"] - // }); - // - // This means (1) "remove any files with the `.wmv` extension from - // the 'connect' package directory" and (2) "remove the 'tests' - // directory from the 'useragent' package directory." - strip(discards: Discards) { - this._discards.merge(discards); - } - - require(name: string) { - try { - return nodeRequire(name); // from the dev bundle - } catch (e) { - buildmessage.error( - "can't find npm module '" + name + - "'. In package.js, Npm.require can only find built-in modules.", - { useMyCaller: true }); - // recover by, uh, returning undefined, which is likely to - // have some knock-on effects - } - } -} From e79acf2d50ccbd4e698582a366182f37c6cca1e6 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Sun, 4 Aug 2019 16:42:24 +0900 Subject: [PATCH 006/326] Add return types to npm-discards and make them consistent --- tools/isobuild/npm-discards.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 6391eb082a..35ab0a5145 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -17,11 +17,11 @@ class NpmDiscards { // patterns that should be discarded. See the comment in package-source.js // about `Npm.strip` for an explanation of what should be passed for the // `discards` parameter. - merge(discards: Discards) { + merge(discards: Discards): void { merge(this.discards, discards); } - shouldDiscard(candidatePath: string, isDirectory?: boolean) { + shouldDiscard(candidatePath: string, isDirectory?: boolean): boolean { if (isDirectory === void 0) { isDirectory = files.lstat(candidatePath).isDirectory(); } @@ -53,7 +53,7 @@ class NpmDiscards { } } -function merge(into: Discards, from: Discards) { +function merge(into: Discards, from: Discards): void { Object.keys(from).forEach((packageName: string) => { const fromValue = from[packageName]; const intoValue = hasOwn.call(into, packageName) && into[packageName]; @@ -78,9 +78,9 @@ function merge(into: Discards, from: Discards) { // TODO Improve this. For example we don't currently support wildcard // string patterns (just use a RegExp if you need that flexibility). -function matches(pattern: StringOrRegExp, relPath: string) { +function matches(pattern: StringOrRegExp, relPath: string): boolean { if (pattern instanceof RegExp) { - return relPath.match(pattern); + return pattern.test(relPath); } if (pattern.charAt(0) === files.pathSep) { From bc1ce63b96cd1ce39498c8a5d31c9d83a37263e7 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Sun, 4 Aug 2019 16:51:46 +0900 Subject: [PATCH 007/326] Remove extraneous portion of comment on discards type This is now self-evident thanks to the typing we have done. Also the comment was a liar anyway, because the file it referenced was incorrect. --- tools/isobuild/npm-discards.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 35ab0a5145..59f69c943c 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -14,9 +14,7 @@ class NpmDiscards { } // Update the current specification of discarded files with additional - // patterns that should be discarded. See the comment in package-source.js - // about `Npm.strip` for an explanation of what should be passed for the - // `discards` parameter. + // patterns that should be discarded. merge(discards: Discards): void { merge(this.discards, discards); } From 30867aa5779261eefa686dbf7d8972aeec136c67 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Mon, 5 Aug 2019 04:33:25 +0900 Subject: [PATCH 008/326] Readability improvement when copying array --- tools/isobuild/npm-discards.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 59f69c943c..33b950a573 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -68,7 +68,7 @@ function merge(into: Discards, from: Discards): void { intoValue.push.apply(intoValue, fromValue); } else { // Make a defensive copy of any arrays passed to `Npm.strip`. - into[packageName] = fromValue.slice(0); + into[packageName] = Array.from(fromValue); } } }); From 69e164e000367fcc01df30d53dd0590a650b11c8 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Mon, 5 Aug 2019 17:42:48 +0900 Subject: [PATCH 009/326] Rename StringOrRegExp to DiscardPattern --- tools/index.d.ts | 4 ++-- tools/isobuild/npm-discards.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/index.d.ts b/tools/index.d.ts index 0f9c11ec43..83094445f0 100644 --- a/tools/index.d.ts +++ b/tools/index.d.ts @@ -18,9 +18,9 @@ declare global { displayName?: string; } - type StringOrRegExp = string | RegExp; + type DiscardPattern = string | RegExp; interface Discards { - [packageName: string]: StringOrRegExp[]; + [packageName: string]: DiscardPattern[]; } } diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 33b950a573..7c883fd230 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -76,7 +76,7 @@ function merge(into: Discards, from: Discards): void { // TODO Improve this. For example we don't currently support wildcard // string patterns (just use a RegExp if you need that flexibility). -function matches(pattern: StringOrRegExp, relPath: string): boolean { +function matches(pattern: DiscardPattern, relPath: string): boolean { if (pattern instanceof RegExp) { return pattern.test(relPath); } From ccc07044c94c3e063758d3ddae956011f67209b9 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Tue, 6 Aug 2019 13:05:52 +0900 Subject: [PATCH 010/326] Add DiscardsInput type This accommodates an undocumented, but supported syntax for NPM.strip, in which you can pass a string/RegExp instead of an array of string/RegExps --- tools/index.d.ts | 4 ++++ tools/isobuild/npm-discards.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/index.d.ts b/tools/index.d.ts index 83094445f0..1829dd4070 100644 --- a/tools/index.d.ts +++ b/tools/index.d.ts @@ -23,4 +23,8 @@ declare global { interface Discards { [packageName: string]: DiscardPattern[]; } + + interface DiscardsInput { + [packageName: string]: DiscardPattern[] | DiscardPattern; + } } diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 7c883fd230..3ace0e83f2 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -15,7 +15,7 @@ class NpmDiscards { // Update the current specification of discarded files with additional // patterns that should be discarded. - merge(discards: Discards): void { + merge(discards: DiscardsInput): void { merge(this.discards, discards); } @@ -51,7 +51,7 @@ class NpmDiscards { } } -function merge(into: Discards, from: Discards): void { +function merge(into: Discards, from: DiscardsInput): void { Object.keys(from).forEach((packageName: string) => { const fromValue = from[packageName]; const intoValue = hasOwn.call(into, packageName) && into[packageName]; From 979ae3f77f925691638316b46fc5538810bc4501 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Tue, 6 Aug 2019 13:08:38 +0900 Subject: [PATCH 011/326] Update comment on supported syntax for Npm.strip --- tools/isobuild/package-npm.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/isobuild/package-npm.js b/tools/isobuild/package-npm.js index a8504d4dfd..a2dd10d32c 100644 --- a/tools/isobuild/package-npm.js +++ b/tools/isobuild/package-npm.js @@ -103,6 +103,14 @@ export class PackageNpm { // useragent: ["tests/"] // }); // + // Alternatively, a single string or regular expression can be passed + // instead of an array: + // + // Npm.strip({ + // connect: /*\.wmv$/, + // useragent: "tests/" + // }); + // // This means (1) "remove any files with the `.wmv` extension from // the 'connect' package directory" and (2) "remove the 'tests' // directory from the 'useragent' package directory." From 697c37b17d8d7e39949af26f9424a71225604f4d Mon Sep 17 00:00:00 2001 From: "ruither.borba" Date: Tue, 28 Apr 2020 21:42:18 -0300 Subject: [PATCH 012/326] I've been working a package with this part of the roadmap in mind: "it would be great to find a way of making autoupdate less expensive". --- Roadmap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Roadmap.md b/Roadmap.md index a5a1f9268d..cc77a09e37 100644 --- a/Roadmap.md +++ b/Roadmap.md @@ -29,7 +29,7 @@ Implement tree shaking / dead code elimination, which involves pruning the depen A proper service worker build target. Regular Web Workers can be built from a function.toString() but service-workers require an actual server route. ### Ultra-thin Meteor -- Leaders: +- Leaders: [Ruither Borba](https://github.com/delki8) - Status: - - PRs: - From fa6601bab8c9b750fb4ec8963dc38571997504ef Mon Sep 17 00:00:00 2001 From: Zack Newsham Date: Sun, 10 May 2020 22:28:54 -0400 Subject: [PATCH 013/326] Ensure the pathname of the rootUrl is used in the mobile URL --- tools/cordova/builder.js | 5 ++++- tools/utils/utils.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 2af19a016c..2a9f36074a 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -1,5 +1,6 @@ import _ from 'underscore'; import util from 'util'; +import url from 'url'; import path from 'path'; import { Console } from '../console/console.js'; import buildmessage from '../utils/buildmessage.js'; @@ -487,12 +488,14 @@ export class CordovaBuilder { const mobileServerUrl = this.options.mobileServerUrl; + const parsedUrl = url.parse(mobileServerUrl); + const runtimeConfig = { meteorRelease: meteorRelease, gitCommitHash: process.env.METEOR_GIT_COMMIT_HASH || files.findGitCommitHash(applicationPath), ROOT_URL: mobileServerUrl, // XXX propagate it from this.options? - ROOT_URL_PATH_PREFIX: '', + ROOT_URL_PATH_PREFIX: parsedUrl.pathname.replace(/\/$/,"") || '', DDP_DEFAULT_CONNECTION_URL: mobileServerUrl, autoupdate: { versions: { diff --git a/tools/utils/utils.js b/tools/utils/utils.js index 0325c3e5cf..9dc5b65720 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -45,6 +45,7 @@ exports.parseUrl = function (str, defaults) { parsed.protocol = parsed.protocol.replace(/\:$/, ''); return { + pathname: parsed.pathname, protocol: hasScheme ? parsed.protocol : defaultProtocol, hostname: parsed.hostname || defaultHostname, port: parsed.port || defaultPort From 3f66ba5252240c14566d2e2c84a3a2fe7aeb0672 Mon Sep 17 00:00:00 2001 From: znewsham Date: Mon, 11 May 2020 16:09:13 -0400 Subject: [PATCH 014/326] make the default undefined --- tools/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/utils/utils.js b/tools/utils/utils.js index 9dc5b65720..799ac5b08b 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -45,7 +45,7 @@ exports.parseUrl = function (str, defaults) { parsed.protocol = parsed.protocol.replace(/\:$/, ''); return { - pathname: parsed.pathname, + pathname: parsed.pathname === '/' || parsed.pathname === '' ? undefined : parsed.pathname, protocol: hasScheme ? parsed.protocol : defaultProtocol, hostname: parsed.hostname || defaultHostname, port: parsed.port || defaultPort From 21d4c3938849536e4be22d071290a06c5ced2fc5 Mon Sep 17 00:00:00 2001 From: znewsham Date: Mon, 11 May 2020 19:23:46 -0400 Subject: [PATCH 015/326] even stricter --- tools/utils/utils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/utils/utils.js b/tools/utils/utils.js index 799ac5b08b..6af4809e35 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -44,12 +44,15 @@ exports.parseUrl = function (str, defaults) { // for consistency remove colon at the end of protocol parsed.protocol = parsed.protocol.replace(/\:$/, ''); - return { - pathname: parsed.pathname === '/' || parsed.pathname === '' ? undefined : parsed.pathname, + var ret = { protocol: hasScheme ? parsed.protocol : defaultProtocol, hostname: parsed.hostname || defaultHostname, port: parsed.port || defaultPort }; + if (parsed.pathname !== '/' && parsed.pathname) { + ret.pathname = parsed.pathname; + } + return ret; }; // 'options' is an object with 'hostname', 'port', and 'protocol' keys, such as From bf339d78220aa45e4da9928ef38a2deb687e0d30 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 19 May 2020 18:39:51 +0900 Subject: [PATCH 016/326] Update logging package Update dependencies and make debug available for use. --- .../logging/.npm/package/npm-shrinkwrap.json | 101 +++++++++++++----- packages/logging/logging.js | 5 - packages/logging/logging_cordova.js | 2 +- packages/logging/package.js | 10 +- 4 files changed, 81 insertions(+), 37 deletions(-) diff --git a/packages/logging/.npm/package/npm-shrinkwrap.json b/packages/logging/.npm/package/npm-shrinkwrap.json index 8ac3846592..beceaf26cb 100644 --- a/packages/logging/.npm/package/npm-shrinkwrap.json +++ b/packages/logging/.npm/package/npm-shrinkwrap.json @@ -1,34 +1,87 @@ { "lockfileVersion": 1, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, "cli-color": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-0.2.3.tgz", - "integrity": "sha1-CiXOrlpqFgK+f3fShWPDZwAnTog=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz", + "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==" + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==" + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=" + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==" + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=" + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", "dependencies": { - "es5-ext": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.9.2.tgz", - "integrity": "sha1-0uMJ0fIjsHGGSINaz1uII6gGH4o=" - }, - "memoizee": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.2.5.tgz", - "integrity": "sha1-RK0M5zQ5cF85VKWNv195LNSWwBw=", - "dependencies": { - "event-emitter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.2.2.tgz", - "integrity": "sha1-yB43JOtVQHxaDV7jKZQR9wD1QpE=" - }, - "next-tick": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.1.0.tgz", - "integrity": "sha1-GRLM6OubaX1kD7upT48A3sO5Qlk=" - } - } + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" } } + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=" + }, + "memoizee": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", + "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" } } } diff --git a/packages/logging/logging.js b/packages/logging/logging.js index b352392641..f720b28aea 100644 --- a/packages/logging/logging.js +++ b/packages/logging/logging.js @@ -176,11 +176,6 @@ Log._getCallerDetails = () => { obj.time = new Date(); obj.level = level; - // XXX allow you to enable 'debug', probably per-package - if (level === 'debug') { - return; - } - if (intercepted) { interceptedLines.push(EJSON.stringify(obj)); } else if (Meteor.isServer) { diff --git a/packages/logging/logging_cordova.js b/packages/logging/logging_cordova.js index dfa3290394..7ac528befb 100644 --- a/packages/logging/logging_cordova.js +++ b/packages/logging/logging_cordova.js @@ -1,5 +1,5 @@ // Log all uncaught errors so they can be printed to the developer. -// But since Android's adb catlog already prints the uncaught exceptions, we +// But since Android's adb catalog already prints the uncaught exceptions, we // can disable it for Android. if (! /Android/i.test(navigator.userAgent)) { window.onerror = function (msg, url, line) { diff --git a/packages/logging/package.js b/packages/logging/package.js index 65ad237c67..018a921760 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,27 +1,23 @@ Package.describe({ summary: 'Logging facility.', - version: '1.1.20' + version: '2.0.0' }); Npm.depends({ - 'cli-color': '0.2.3' + 'cli-color': '2.0.0' }); Npm.strip({ 'es5-ext': ['test/'] }); -Cordova.depends({ - 'cordova-plugin-console': '1.1.0' // Deprecated, remove in future -}); - Package.onUse(function (api) { api.export('Log'); // The `ecmascript-runtime-client` package is explicitly depended upon // here due to this package's dependency on // `String.prototype.padRight` which is polyfilled only in // `ecmascript-runtime-client@0.6.2` or newer. - api.use(['ejson', 'ecmascript', 'ecmascript-runtime-client@0.6.2']); + api.use(['ejson', 'ecmascript', 'ecmascript-runtime-client']); api.mainModule('logging.js'); api.mainModule('logging_cordova.js', 'web.cordova'); }); From 6f0ecdafbde5ffb8652c98cd4660f4b91877cbe5 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 27 May 2020 10:00:06 +0900 Subject: [PATCH 017/326] Logging - deactivate debug log in production --- packages/logging/logging.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/logging/logging.js b/packages/logging/logging.js index f720b28aea..ea2b945e1b 100644 --- a/packages/logging/logging.js +++ b/packages/logging/logging.js @@ -176,6 +176,11 @@ Log._getCallerDetails = () => { obj.time = new Date(); obj.level = level; + // If we are in production don't write out debug logs. + if (level === 'debug' && Meteor.isProduction) { + return; + } + if (intercepted) { interceptedLines.push(EJSON.stringify(obj)); } else if (Meteor.isServer) { From 29036cfde23b225593361ccbb3ae5165ebf120de Mon Sep 17 00:00:00 2001 From: "ruither.borba" Date: Mon, 1 Jun 2020 21:00:07 -0300 Subject: [PATCH 018/326] #8694 Accounts.config: `sendVerificationEmail` doesn't work, if user is created on the server. - adding a new function to allow developers to create users on the server with an email verification being sent at the end. --- packages/accounts-password/password_server.js | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/packages/accounts-password/password_server.js b/packages/accounts-password/password_server.js index 3291c378ee..10f6cb269d 100644 --- a/packages/accounts-password/password_server.js +++ b/packages/accounts-password/password_server.js @@ -186,7 +186,7 @@ Accounts.findUserByUsername = * @returns {Object} A user if found, else null * @importFromPackage accounts-base */ -Accounts.findUserByEmail = +Accounts.findUserByEmail = (email, options) => Accounts._findUserByQuery({ email }, options); // Generates a MongoDB selector that can be used to perform a fast case @@ -1146,18 +1146,7 @@ Meteor.methods({createUser: function (...args) { error: new Meteor.Error(403, "Signups forbidden") }; - // Create user. result contains id and token. - const userId = createUser(options); - // safety belt. createUser is supposed to throw on error. send 500 error - // instead of sending a verification email with empty userid. - if (! userId) - throw new Error("createUser failed to insert new user"); - - // If `Accounts._options.sendVerificationEmail` is set, register - // a token to verify the user's primary email, and send it to - // that address. - if (options.email && Accounts._options.sendVerificationEmail) - Accounts.sendVerificationEmail(userId, options.email); + const userId = Accounts.createUserVerifyingEmail(options); // client gets logged in as the new user afterwards. return {userId: userId}; @@ -1165,6 +1154,29 @@ Meteor.methods({createUser: function (...args) { ); }}); +// Create user directly on the server. +// +// Differently from Accounts.createUser(), this evaluates the Accounts package +// configurations and send a verification email if the user has been registered +// successfully. +Accounts.createUserVerifyingEmail = (options) => { + options = { ...options }; + // Create user. result contains id and token. + const userId = createUser(options); + // safety belt. createUser is supposed to throw on error. send 500 error + // instead of sending a verification email with empty userid. + if (! userId) + throw new Error("createUser failed to insert new user"); + + // If `Accounts._options.sendVerificationEmail` is set, register + // a token to verify the user's primary email, and send it to + // that address. + if (options.email && Accounts._options.sendVerificationEmail) + Accounts.sendVerificationEmail(userId, options.email); + + return userId; +}; + // Create user directly on the server. // // Unlike the client version, this does not log you in as this user From 9d6c15a4617707caca8ab94a8b659821c16c2461 Mon Sep 17 00:00:00 2001 From: "ruither.borba" Date: Tue, 2 Jun 2020 21:35:55 -0300 Subject: [PATCH 019/326] #8694 Accounts.config: `sendVerificationEmail` doesn't work, if user is created on the server. - changing the behavior to send an enrollment email instead of a verification email if the user wasn't created with a password. --- packages/accounts-password/password_server.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/accounts-password/password_server.js b/packages/accounts-password/password_server.js index 10f6cb269d..191e2a512a 100644 --- a/packages/accounts-password/password_server.js +++ b/packages/accounts-password/password_server.js @@ -1171,8 +1171,13 @@ Accounts.createUserVerifyingEmail = (options) => { // If `Accounts._options.sendVerificationEmail` is set, register // a token to verify the user's primary email, and send it to // that address. - if (options.email && Accounts._options.sendVerificationEmail) - Accounts.sendVerificationEmail(userId, options.email); + if (options.email && Accounts._options.sendVerificationEmail) { + if (options.password) { + Accounts.sendVerificationEmail(userId, options.email); + } else { + Accounts.sendEnrollmentEmail(userId, options.email); + } + } return userId; }; From d85b28ebed2b72c8ee1d958b79b954d36585b98e Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 19:10:46 -0500 Subject: [PATCH 020/326] Add hot module reload for web.browser architecture --- README.md | 52 ++ packages/hot/.npm/plugin/hot-core/.gitignore | 1 + packages/hot/.npm/plugin/hot-core/README | 7 + .../.npm/plugin/hot-core/npm-shrinkwrap.json | 10 + packages/hot/changesets.js | 101 ++++ packages/hot/client.js | 261 ++++++++ packages/hot/package.js | 35 ++ packages/hot/plugin.js | 117 ++++ packages/module-runtime-hot/installer.js | 570 ++++++++++++++++++ packages/module-runtime-hot/modern.js | 61 ++ packages/module-runtime-hot/package.js | 29 + packages/module-runtime-hot/server.js | 93 +++ tools/isobuild/build-events.js | 3 + tools/isobuild/bundler.js | 8 +- tools/isobuild/isopack.js | 5 + tools/isobuild/linker.js | 12 + tools/isobuild/package-source.js | 11 + 17 files changed, 1375 insertions(+), 1 deletion(-) create mode 100644 packages/hot/.npm/plugin/hot-core/.gitignore create mode 100644 packages/hot/.npm/plugin/hot-core/README create mode 100644 packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json create mode 100644 packages/hot/changesets.js create mode 100644 packages/hot/client.js create mode 100644 packages/hot/package.js create mode 100644 packages/hot/plugin.js create mode 100644 packages/module-runtime-hot/installer.js create mode 100644 packages/module-runtime-hot/modern.js create mode 100644 packages/module-runtime-hot/package.js create mode 100644 packages/module-runtime-hot/server.js create mode 100644 tools/isobuild/build-events.js diff --git a/README.md b/README.md index 7fa8cfb1be..e442050a48 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,55 @@ +### Hot Module Reload + +As an alternative to Hot Code Push in development, Hot Module Reload replaces modules in the bundle that were modified without reloading the page. + +Use: +``` + meteor run --release zodern:COMET --include-packages zodern:hot +``` + +#### API + +`module.hot.accept()` - The module will be rerun whenever it or any of its dependencies are modified + +`module.hot.decline()` - If the module or any of its dependencies are modified, hot code push will be used instead of HMR. + +These should be wrapped by +``` +if (module.hot) { + // Use module.hot here +} +``` + +Minifiers are able to remove the if statement for production, though none of the common minifiers for Meteor currently do. + +#### Implementation details + +For now, the linker emits an event that packages, such as zodern:hot, can listen to for an up to date list of files in an unibuild. Eventually this will be replaced with moving the HMR code from a build plugin into the meteor-tool. + +The zodern:hot package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page to be reloaded by hot code push. + +The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. To force it to be loaded at the correct time, the meteor-tool adds the `zodern:modules-runtime-hot` dependency to `modules`. + +#### Remaining tasks + +This is still an early version, and there is still a long list of items to implement. + +- HMR is enabled for the second build after Meteor is started so there is two builds to compare. This should be fixed by storing the necessary information in the linker cache. +- Support full webpack API +- Look into allowing packages to replace the HMR api to allow experimentation +- Look into an api to allow packages to run code before and after each module is run. This could be used to implement react fast reload and for packages to automatically clean up after a file is modified. For example, this could be used to remove methods and publications previously added by a modified file. + +HMR is only enabled for the `web.browser` architectures. These architectures are remaining: +- web.browser.legacy +- web.cordova +- server architectures + +HMR is not supported in these situations. Hot code push will be used instead: +- A package is modified +- A file is added +- A file is removed +- Files were modified that do not have a module id, are bare, are json data, or do not have meteorInstallOptions + # Meteor [![TravisCI Status](https://travis-ci.org/meteor/meteor.svg?branch=devel)](https://travis-ci.org/meteor/meteor) diff --git a/packages/hot/.npm/plugin/hot-core/.gitignore b/packages/hot/.npm/plugin/hot-core/.gitignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/packages/hot/.npm/plugin/hot-core/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/hot/.npm/plugin/hot-core/README b/packages/hot/.npm/plugin/hot-core/README new file mode 100644 index 0000000000..3d492553a4 --- /dev/null +++ b/packages/hot/.npm/plugin/hot-core/README @@ -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. diff --git a/packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json b/packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json new file mode 100644 index 0000000000..1207fd2c85 --- /dev/null +++ b/packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json @@ -0,0 +1,10 @@ +{ + "lockfileVersion": 1, + "dependencies": { + "ws": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.5.tgz", + "integrity": "sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA==" + } + } +} diff --git a/packages/hot/changesets.js b/packages/hot/changesets.js new file mode 100644 index 0000000000..cbe594ba7c --- /dev/null +++ b/packages/hot/changesets.js @@ -0,0 +1,101 @@ +function comparePrelinkResult(previousResult, { + name, + module, +}) { + const { + fileHashes: previousFileHashes, + unreloadableHashes: previousUnreloadable, + } = previousResult || {}; + + const { + addedFiles, + changedFiles, + removedFilePaths, + unreloadable, + unreloadableChanged, + fileHashes + } = compareFiles( + previousFileHashes, + previousUnreloadable, + module.files + ); + + const canCompare = !!previousFileHashes; + const reloadable = canCompare && !unreloadableChanged + + function fileDetailsToSave (file) { + return { + content: file.getPrelinkedOutput({}).toStringWithSourceMap({}), + path: file.absModuleId + } + } + + const result = { + fileHashes, + unreloadableHashes: unreloadable, + removedFilePaths, + reloadable, + addedFiles: reloadable ? addedFiles.map(fileDetailsToSave) : [], + changedFiles: reloadable ? changedFiles.map(fileDetailsToSave) : [], + linkedAt: Date.now(), + name + }; + + return result; +} + +function checkReloadable(file) { + return file.absModuleId && + !file.bare && + !file.jsonData && + file.meteorInstallOptions +} + +function compareFiles(previousHashes = new Map(), previousUnreloadable = [], currentFiles) { + const unreloadable = []; + const currentHashes = new Map(); + const unseenModules = new Map(previousHashes); + + const changedFiles = []; + const addedFiles = []; + + currentFiles.forEach(file => { + if ( + !checkReloadable(file) + ) { + // TODO: we should be using more than just the hash + unreloadable.push(file._inputHash); + return; + } + + // TODO: we should be using more than just the hash + currentHashes.set(file.absModuleId, file._inputHash); + + const previousHash = previousHashes.get(file.absModuleId); + + if (!previousHash) { + addedFiles.push(file); + } else if (previousHash !== file._inputHash) { + changedFiles.push(file); + } + + unseenModules.delete(file.absModuleId); + }); + + const removedFilePaths = unseenModules.keys(); + const unreloadableChanged = unreloadable.length !== previousUnreloadable.length || + unreloadable.some((hash, i) => hash !== previousUnreloadable[i]); + + return { + fileHashes: currentHashes, + addedFiles, + changedFiles, + removedFilePaths, + unreloadable, + unreloadableChanged, + }; +}; + +module.exports = { + comparePrelinkResult +} diff --git a/packages/hot/client.js b/packages/hot/client.js new file mode 100644 index 0000000000..a67eda9040 --- /dev/null +++ b/packages/hot/client.js @@ -0,0 +1,261 @@ +// TODO: add an api to Reify to update cached exports for a module +const ReifyEntry = require('/node_modules/meteor/modules/node_modules/reify/lib/runtime/entry.js') + +// Due to the bundler and proxy running in the same node process +// this could possibly be ran after the next build finished +// TODO: the builder should inject the build time in the bundle +let lastUpdated = Date.now(); + +let arch = __meteor_runtime_config__.isModern ? 'web.browser' : 'web.browser.legacy'; +let enabled = arch === 'web.browser'; + +if (!enabled) { + console.log(`HMR is not supported in ${arch}`); +} + +let pendingReload = null; +let mustReload = false; + +// TODO: handle disconnects +const socket = new WebSocket('ws://localhost:3124'); + +function requestChanges() { + socket.send(JSON.stringify({ + type: 'request-changes', + arch, + after: lastUpdated + })); +} + +socket.addEventListener('open', function () { + console.log('HMR: connected'); +}); + +socket.addEventListener('message', function (event) { + let message = JSON.parse(event.data); + + switch (message.type) { + case 'changes': + // TODO: support removed or added files + const hasUnreloadable = message.changeSets.find(changeSet => { + return !changeSet.reloadable || + changeSet.removedFilePaths.length > 0 || + changeSet.addedFiles.length > 0 + }) + if ( + pendingReload && + hasUnreloadable || + message.changeSets.length === 0 + ) { + console.log('HMR: Unable to do HMR. Falling back to hot code push.') + // Complete hot code push if we can not do hot module reload + mustReload = true; + return pendingReload(); + } + + // In case the user changed how a module works with HMR + // in one of the earlier change sets, we want to apply each + // change set one at a time. + message.changeSets.forEach(changeSet => { + applyChangeset(changeSet); + }); + + if (message.changeSets.length > 0) { + lastUpdated = message.changeSets[message.changeSets.length - 1].linkedAt; + } + } +}); + +function walkTree(pathParts, tree) { + const part = pathParts.shift(); + const _module = tree.contents[part]; + + if (!_module) { + console.log(part, pathParts, _module, tree); + throw new Error('not-exist'); + } + + if (pathParts.length === 0) { + return _module; + } + + return walkTree(pathParts, _module); +} + +function createInlineSourceMap(map) { + return "//# sourceMappingURL=data:application/json;base64," + btoa(JSON.stringify(map)); +} + +function replaceFileContent(file, contents) { + console.log('HMR: replacing module:', file.module.id); + + // TODO: to replace content in packages, we need an eval function that runs + // within the package scope, like dynamic imports does. + const moduleFunction = function () { + // TODO: Use same sourceURL as the sourcemap for the main bundle does + return eval( + // Wrap the function(require,exports,module){...} expression in + // parentheses to force it to be parsed as an expression. + "(" + contents.code + ")\n//# sourceURL=" + file.module.id + + "\n" + createInlineSourceMap(contents.map) + ).apply(this, arguments); + } + + file.contents = moduleFunction; +} + +function rerunFile(file) { + delete file.module.exports; + file.module.loaded = false; + + console.log('HMR: rerunning', file.module.id); + // re-eveluate the file + require(file.module.id); +} + +const oldLink = module.constructor.prototype.link; +module.constructor.prototype.link = function (path) { + if (this._recordImport) { + this._recordImport(path); + }; + return oldLink.apply(this, arguments); +} + +function findReloadableParents(importedBy) { + return Object.values(importedBy).map(parentFile => { + // Force module to be rerun when we complete applying the changeset + parentFile.module.replaceModule(); + + const canAccept = parentFile.module.hot && parentFile.module.hot._canAcceptUpdate(); + if (canAccept === true) { + return parentFile; + } else if ( + canAccept === null && Object.keys(parentFile.importedBy).length > 0 + ) { + // When canAccept is null, whether it is reloadable or not depends on + // if its parents can accept changes. + return findReloadableParents(parentFile.importedBy); + } else { + return false; + } + }).flat(Infinity); +} + +module.constructor.prototype.replaceModule = function (id, contents) { + const moduleId = id || this.id; + const root = this._getRoot(); + + let file; + try { + file = walkTree(moduleId.split('/').slice(1), root); + } catch (e) { + if (e.message === 'not-exist') { + return null; + } + + throw e; + } + + if (!file.contents) { + // File is a dynamic import that hasn't been loaded + return null; + } + + if (contents) { + replaceFileContent(file, contents); + } + + // Clear cached exports + // TODO: check how this affects live bindings for ecmascript modules + delete file.module.exports; + const entry = ReifyEntry.getOrCreate(id); + entry.getters = {}; + entry.setters = {}; + entry.module = null; + Object.keys(entry.namespace).forEach(key => { + if (key !== '__esModule') { + delete entry.namespace[key]; + } + }); + + return file; +} + +function applyChangeset({ + changedFiles +}) { + // TODO: prevent requiring removed files + // TODO: install added files + + const reloadableParents = []; + let hasImportedModules = false; + + changedFiles.forEach(({ content, path }) => { + const file = module.replaceModule(path, content); + + // file will be null for dynamic imports that haven't been + // imported + if (file) { + hasImportedModules = true; + reloadableParents.push(...findReloadableParents({ self: file })); + } else { + console.log(`Unable to replace module ${path}. It is probably a dynamic file that hasn't been imported`); + } + }); + + // Check if some of the module's parents are not reloadable + // In that case, we have to do a full reload + // TODO: record which parents cause this + if ( + hasImportedModules && + reloadableParents.length === 0 || + reloadableParents.some(parent => !parent) + ) { + if (pendingReload) { + return pendingReload(); + } + } + + // TODO: deduplicate + reloadableParents.forEach(parent => { + rerunFile(parent); + }); +} + +let nonRefreshableVersion = (__meteor_runtime_config__.autoupdate.versions || {})['web.browser'].versionNonRefreshable; + +Meteor.startup(() => { + if (!enabled) { + return; + } + + Package['autoupdate'].Autoupdate._clientVersions.watch((doc) => { + if (doc._id !== 'web.browser') { + return; + } + + // We can't do anything here until Reload._onMigrate + // has been called + if (!pendingReload) { + return; + } + + if (doc.versionNonRefreshable !== nonRefreshableVersion) { + requestChanges(); + nonRefreshableVersion = doc.versionNonRefreshable; + } + }); + + // We disable hot code push for js until there were + // changes that can not be applied through HMR. + Package['reload'].Reload._onMigrate((tryReload) => { + if (mustReload) { + return [true]; + } + + pendingReload = tryReload; + requestChanges(); + + return [false]; + }); +}); diff --git a/packages/hot/package.js b/packages/hot/package.js new file mode 100644 index 0000000000..7d4a94335e --- /dev/null +++ b/packages/hot/package.js @@ -0,0 +1,35 @@ +Package.describe({ + name: 'zodern:hot', + version: '0.1.1', + summary: 'Adds Hot Module Reloading to Meteor', + documentation: 'README.md' +}); + +Package.registerBuildPlugin({ + name: 'hot-core', + sources: ['plugin.js'], + use: ['ecmascript'], + npmDependencies: { + ws: '7.2.5' + }, +}); + +Package.onUse(function (api) { + api.use('isobuild:compiler-plugin@1.0.0'); + api.use('babel-compiler'); + api.use('modules'); + api.imply('zodern:modules-runtime-hot'); + api.addFiles('./client.js', 'client'); +}); + +Package.onTest(function (api) { + api.use(["tinytest", "underscore"]); + api.use(["es5-shim", "ecmascript", "babel-compiler"]); + api.addFiles("runtime-tests.js"); + api.addFiles("transpilation-tests.js", "server"); + + api.addFiles("bare-test.js"); + api.addFiles("bare-test-file.js", ["client", "server"], { + bare: true + }); +}); diff --git a/packages/hot/plugin.js b/packages/hot/plugin.js new file mode 100644 index 0000000000..d599998498 --- /dev/null +++ b/packages/hot/plugin.js @@ -0,0 +1,117 @@ +const { + comparePrelinkResult +} = require('./changesets'); + +// Meteor can load the plugin multiple times +// when it is a local package +// Any state that should be preserved is stored in +// this object +const sharedState = global.__hotState || { + initialized: false, + wsServer: null, + wsMessageHandler: null, + prelinkResultHandler: null, + previousPrelinkResults: {}, +}; +global.__hotState = sharedState; + +function findLast(array, compare) { + for (let i = array.length - 1; i > 0; i--) { + if (compare(array[i])) { + return array[i] + } + } +} + +function prelinkResultHandler(prelinkResult) { + const { + isApp, + name, + bundleArch + } = prelinkResult; + + // TODO: we should limit the number of change sets that are saved + // to avoid a memory leak + sharedState.previousPrelinkResults[bundleArch] = + sharedState.previousPrelinkResults[bundleArch] || []; + + // TODO: support HMR in packages + // TODO: support HMR in legacy bundle + if (!isApp || bundleArch !== 'web.browser') { + // Require a full reload whenever a package is modified + sharedState.previousPrelinkResults[bundleArch].push({ + name, + reloadable: false, + linkedAt: Date.now() + }) + return; + } + + // TODO: Meteor should cache some of this data with the linker cache + // so we have something to compare with when linking the first time + // after meteor is started + const changeSets = sharedState.previousPrelinkResults[bundleArch]; + let previousChangeset = findLast(changeSets, (changeSet) => { + return changeSet.name === name; + }); + + const changeset = comparePrelinkResult(previousChangeset, prelinkResult); + sharedState.previousPrelinkResults[bundleArch].push(changeset); +} + +function wsMessageHandler(conn, _message) { + const message = JSON.parse(_message); + + switch(message.type) { + case 'request-changes': { + const { + after, + arch + } = message; + + const changesets = sharedState.previousPrelinkResults[arch] || []; + const newChanges = changesets.filter(({ linkedAt }) => { + return linkedAt > after; + }); + + conn.send(JSON.stringify({ + type: 'changes', + changeSets: newChanges + })); + break; + } + + default: + console.warn('Unknown HMR message:', message.type); + } +} + +// Update handlers so event listeners added during initialization can +// use the latest handlers if this package was modified and rebuilt +sharedState.prelinkResultHandler = prelinkResultHandler; +sharedState.wsMessageHandler = wsMessageHandler; + +function init() { + sharedState.initialized = true; + + // TODO: port should be based on port app is using + // TODO: look into using sockjs instead + const WebSocket = require('ws'); + sharedState.wsServer = new WebSocket.Server({ port: 3124 }); + + // TODO: should require connections to send a secret before + // being able to receive changes + sharedState.wsServer.on('connection', function (ws) { + ws.on('message', (message) => { + sharedState.wsMessageHandler(ws, message); + }); + }); + + Plugin._onPreLinked(function (prelinkResult) { + sharedState.prelinkResultHandler(prelinkResult); + }); +} + +if (!sharedState.initialized) { + init(); +} diff --git a/packages/module-runtime-hot/installer.js b/packages/module-runtime-hot/installer.js new file mode 100644 index 0000000000..98465b386d --- /dev/null +++ b/packages/module-runtime-hot/installer.js @@ -0,0 +1,570 @@ +makeInstaller = function (options) { + "use strict"; + + options = options || {}; + + // These file extensions will be appended to required module identifiers + // if they do not exactly match an installed module. + var defaultExtensions = options.extensions || [".js", ".json"]; + + // If defined, the options.fallback function will be called when no + // installed module is found for a required module identifier. Often + // options.fallback will be implemented in terms of the native Node + // require function, which has the ability to load binary modules. + var fallback = options.fallback; + + // List of fields to look for in package.json files to determine the + // main entry module of the package. The first field listed here whose + // value is a string will be used to resolve the entry module. + var mainFields = options.mainFields || + // If options.mainFields is absent and options.browser is truthy, + // package resolution will prefer the "browser" field of package.json + // files to the "main" field. Note that this only supports + // string-valued "browser" fields for now, though in the future it + // might make sense to support the object version, a la browserify. + (options.browser ? ["browser", "main"] : ["main"]); + + var hasOwn = {}.hasOwnProperty; + function strictHasOwn(obj, key) { + return isObject(obj) && isString(key) && hasOwn.call(obj, key); + } + + // Cache for looking up File objects given absolute module identifiers. + // Invariants: + // filesByModuleId[module.id] === fileAppendId(root, module.id) + // filesByModuleId[module.id].module === module + var filesByModuleId = {}; + + // The file object representing the root directory of the installed + // module tree. + var root = new File("/", new File("/..")); + var rootRequire = makeRequire(root); + + // Merges the given tree of directories and module factory functions + // into the tree of installed modules and returns a require function + // that behaves as if called from a module in the root directory. + function install(tree, options) { + if (isObject(tree)) { + fileMergeContents(root, tree, options); + } + return rootRequire; + } + + // Replace this function to enable Module.prototype.prefetch. + install.fetch = function (ids) { + throw new Error("fetch not implemented"); + }; + + // This constructor will be used to instantiate the module objects + // passed to module factory functions (i.e. the third argument after + // require and exports), and is exposed as install.Module in case the + // caller of makeInstaller wishes to modify Module.prototype. + function Module(id) { + this.id = id; + + // The Node implementation of module.children unfortunately includes + // only those child modules that were imported for the first time by + // this parent module (i.e., child.parent === this). + this.children = []; + + // This object is an install.js extension that includes all child + // modules imported by this module, even if this module is not the + // first to import them. + this.childrenById = {}; + } + + // Used to keep module.prefetch promise resolutions well-ordered. + var lastPrefetchPromise; + + // May be shared by multiple sequential calls to module.prefetch. + // Initialized to {} only when necessary. + var missing; + + Module.prototype.prefetch = function (id) { + var module = this; + var parentFile = getOwn(filesByModuleId, module.id); + + lastPrefetchPromise = lastPrefetchPromise || Promise.resolve(); + var previousPromise = lastPrefetchPromise; + + function walk(module) { + var file = getOwn(filesByModuleId, module.id); + if (fileIsDynamic(file) && !file.pending) { + file.pending = true; + missing = missing || {}; + + // These are the data that will be exposed to the install.fetch + // callback, so it's worth documenting each item with a comment. + missing[module.id] = { + // The CommonJS module object that will be exposed to this + // dynamic module when it is evaluated. Note that install.fetch + // could decide to populate module.exports directly, instead of + // fetching anything. In that case, install.fetch should omit + // this module from the tree that it produces. + module: file.module, + // List of module identifier strings imported by this module. + // Note that the missing object already contains all available + // dependencies (including transitive dependencies), so + // install.fetch should not need to traverse these dependencies + // in most cases; however, they may be useful for other reasons. + // Though the strings are unique, note that two different + // strings could resolve to the same module. + deps: Object.keys(file.deps), + // The options (if any) that were passed as the second argument + // to the install(tree, options) function when this stub was + // first registered. Typically contains options.extensions, but + // could contain any information appropriate for the entire tree + // as originally installed. These options will be automatically + // inherited by the newly fetched modules, so install.fetch + // should not need to modify them. + options: file.options, + // Any stub data included in the array notation from the + // original entry for this dynamic module. Typically contains + // "main" and/or "browser" fields for package.json files, and is + // otherwise undefined. + stub: file.stub + }; + + each(file.deps, function (parentId, id) { + fileResolve(file, id); + }); + + each(module.childrenById, walk); + } + } + + return lastPrefetchPromise = new Promise(function (resolve) { + var absChildId = module.resolve(id); + each(module.childrenById, walk); + resolve(absChildId); + + }).then(function (absChildId) { + // Grab the current missing object and fetch its contents. + var toBeFetched = missing; + missing = null; + + function clearPending() { + if (toBeFetched) { + Object.keys(toBeFetched).forEach(function (id) { + getOwn(filesByModuleId, id).pending = false; + }); + } + } + + return new Promise(function (resolve) { + // The install.fetch function takes an object mapping missing + // dynamic module identifiers to options objects, and should + // return a Promise that resolves to a module tree that can be + // installed. As an optimization, if there were no missing dynamic + // modules, then we can skip calling install.fetch entirely. + resolve(toBeFetched && install.fetch(toBeFetched)); + + }).then(function (tree) { + function both() { + install(tree); + clearPending(); + return absChildId; + } + + // Although we want multiple install.fetch calls to run in + // parallel, it is important that the promises returned by + // module.prefetch are resolved in the same order as the original + // calls to module.prefetch, because previous fetches may include + // modules assumed to exist by more recent module.prefetch calls. + // Whether previousPromise was resolved or rejected, carry on with + // the installation regardless. + return previousPromise.then(both, both); + + }, function (error) { + // Fixes https://github.com/meteor/meteor/issues/10182. + clearPending(); + throw error; + }); + }); + }; + + install.Module = Module; + + function getOwn(obj, key) { + return strictHasOwn(obj, key) && obj[key]; + } + + function isObject(value) { + return value !== null && typeof value === "object"; + } + + function isFunction(value) { + return typeof value === "function"; + } + + function isString(value) { + return typeof value === "string"; + } + + function makeMissingError(id) { + return new Error("Cannot find module '" + id + "'"); + } + + Module.prototype.resolve = function (id) { + var file = fileResolve(filesByModuleId[this.id], id); + if (file) return file.module.id; + var error = makeMissingError(id); + if (fallback && isFunction(fallback.resolve)) { + return fallback.resolve(id, this.id, error); + } + throw error; + }; + + Module.prototype.require = function require(id) { + var result = fileResolve(filesByModuleId[this.id], id); + if (result) { + result.importedBy[this.id] = filesByModuleId[this.id]; + + return fileEvaluate(result, this); + } + + var error = makeMissingError(id); + + if (isFunction(fallback)) { + return fallback( + id, // The missing module identifier. + this.id, // ID of the parent module. + error // The error we would have thrown. + ); + } + + throw error; + }; + + Module.prototype._getRoot = function () { + return root; + } + + Module.prototype._recordImport = function (id) { + var result = fileResolve(filesByModuleId[this.id], id); + result.importedBy[this.id] = filesByModuleId[this.id]; + } + + function makeRequire(file) { + var module = file.module; + + function require(id) { + return module.require(id); + } + + require.extensions = fileGetExtensions(file).slice(0); + + require.resolve = function resolve(id) { + return module.resolve(id); + }; + + return require; + } + + // File objects represent either directories or modules that have been + // installed. When a `File` respresents a directory, its `.contents` + // property is an object containing the names of the files (or + // directories) that it contains. When a `File` represents a module, its + // `.contents` property is a function that can be invoked with the + // appropriate `(require, exports, module)` arguments to evaluate the + // module. If the `.contents` property is a string, that string will be + // resolved as a module identifier, and the exports of the resulting + // module will provide the exports of the original file. The `.parent` + // property of a File is either a directory `File` or `null`. Note that + // a child may claim another `File` as its parent even if the parent + // does not have an entry for that child in its `.contents` object. + // This is important for implementing anonymous files, and preventing + // child modules from using `../relative/identifier` syntax to examine + // unrelated modules. + function File(moduleId, parent) { + var file = this; + + // Link to the parent file. + file.parent = parent = parent || null; + + // The module object for this File, which will eventually boast an + // .exports property when/if the file is evaluated. + file.module = new Module(moduleId); + filesByModuleId[moduleId] = file; + + // The .contents of the file can be either (1) an object, if the file + // represents a directory containing other files; (2) a factory + // function, if the file represents a module that can be imported; (3) + // a string, if the file is an alias for another file; or (4) null, if + // the file's contents are not (yet) available. + file.contents = null; + + // Set of module identifiers imported by this module. Note that this + // set is not necessarily complete, so don't rely on it unless you + // know what you're doing. + file.deps = {}; + + // Files that imported this module. + file.importedBy = {}; + } + + function fileEvaluate(file, parentModule) { + var module = file.module; + if (!strictHasOwn(module, "exports")) { + var contents = file.contents; + if (!contents) { + // If this file was installed with array notation, and the array + // contained one or more objects but no functions, then the combined + // properties of the objects are treated as a temporary stub for + // file.module.exports. This is particularly important for partial + // package.json modules, so that the resolution logic can know the + // value of the "main" and/or "browser" fields, at least, even if + // the rest of the package.json file is not (yet) available. + if (file.stub) { + return file.stub; + } + + throw makeMissingError(module.id); + } + + if (parentModule) { + module.parent = parentModule; + var children = parentModule.children; + if (Array.isArray(children)) { + children.push(module); + } + } + + contents( + makeRequire(file), + // If the file had a .stub, reuse the same object for exports. + module.exports = file.stub || {}, + module, + file.module.id, + file.parent.module.id + ); + + module.loaded = true; + } + + // The module.runModuleSetters method will be deprecated in favor of + // just module.runSetters: https://github.com/benjamn/reify/pull/160 + var runSetters = module.runSetters || module.runModuleSetters; + if (isFunction(runSetters)) { + runSetters.call(module); + } + + return module.exports; + } + + function fileIsDirectory(file) { + return file && isObject(file.contents); + } + + function fileIsDynamic(file) { + return file && file.contents === null; + } + + function fileMergeContents(file, contents, options) { + if (Array.isArray(contents)) { + contents.forEach(function (item) { + if (isString(item)) { + file.deps[item] = file.module.id; + } else if (isFunction(item)) { + contents = item; + } else if (isObject(item)) { + file.stub = file.stub || {}; + each(item, function (value, key) { + file.stub[key] = value; + }); + } + }); + + if (!isFunction(contents)) { + // If the array did not contain a function, merge nothing. + contents = null; + } + + } else if (!isFunction(contents) && + !isString(contents) && + !isObject(contents)) { + // If contents is neither an array nor a function nor a string nor + // an object, just give up and merge nothing. + contents = null; + } + + if (contents) { + file.contents = file.contents || (isObject(contents) ? {} : contents); + if (isObject(contents) && fileIsDirectory(file)) { + each(contents, function (value, key) { + if (key === "..") { + child = file.parent; + + } else { + var child = getOwn(file.contents, key); + + if (!child) { + child = file.contents[key] = new File( + file.module.id.replace(/\/*$/, "/") + key, + file + ); + + child.options = options; + } + } + + fileMergeContents(child, value, options); + }); + } + } + } + + function each(obj, callback, context) { + Object.keys(obj).forEach(function (key) { + callback.call(this, obj[key], key); + }, context); + } + + function fileGetExtensions(file) { + return file.options + && file.options.extensions + || defaultExtensions; + } + + function fileAppendIdPart(file, part, extensions) { + // Always append relative to a directory. + while (file && !fileIsDirectory(file)) { + file = file.parent; + } + + if (!file || !part || part === ".") { + return file; + } + + if (part === "..") { + return file.parent; + } + + var exactChild = getOwn(file.contents, part); + + // Only consider multiple file extensions if this part is the last + // part of a module identifier and not equal to `.` or `..`, and there + // was no exact match or the exact match was a directory. + if (extensions && (!exactChild || fileIsDirectory(exactChild))) { + for (var e = 0; e < extensions.length; ++e) { + var child = getOwn(file.contents, part + extensions[e]); + if (child && !fileIsDirectory(child)) { + return child; + } + } + } + + return exactChild; + } + + function fileAppendId(file, id, extensions) { + var parts = id.split("/"); + + // Use `Array.prototype.every` to terminate iteration early if + // `fileAppendIdPart` returns a falsy value. + parts.every(function (part, i) { + return file = i < parts.length - 1 + ? fileAppendIdPart(file, part) + : fileAppendIdPart(file, part, extensions); + }); + + return file; + } + + function recordChild(parentModule, childFile) { + var childModule = childFile && childFile.module; + if (parentModule && childModule) { + parentModule.childrenById[childModule.id] = childModule; + } + } + + function fileResolve(file, id, parentModule, seenDirFiles) { + var parentModule = parentModule || file.module; + var extensions = fileGetExtensions(file); + + file = + // Absolute module identifiers (i.e. those that begin with a `/` + // character) are interpreted relative to the root directory, which + // is a slight deviation from Node, which has access to the entire + // file system. + id.charAt(0) === "/" ? fileAppendId(root, id, extensions) : + // Relative module identifiers are interpreted relative to the + // current file, naturally. + id.charAt(0) === "." ? fileAppendId(file, id, extensions) : + // Top-level module identifiers are interpreted as referring to + // packages in `node_modules` directories. + nodeModulesLookup(file, id, extensions); + + // If the identifier resolves to a directory, we use the same logic as + // Node to find an `index.js` or `package.json` file to evaluate. + while (fileIsDirectory(file)) { + seenDirFiles = seenDirFiles || []; + + // If the "main" field of a `package.json` file resolves to a + // directory we've already considered, then we should not attempt to + // read the same `package.json` file again. Using an array as a set + // is acceptable here because the number of directories to consider + // is rarely greater than 1 or 2. Also, using indexOf allows us to + // store File objects instead of strings. + if (seenDirFiles.indexOf(file) < 0) { + seenDirFiles.push(file); + + var pkgJsonFile = fileAppendIdPart(file, "package.json"); + var pkg = pkgJsonFile && fileEvaluate(pkgJsonFile, parentModule); + var mainFile, resolved = pkg && mainFields.some(function (name) { + var main = pkg[name]; + if (isString(main)) { + // The "main" field of package.json does not have to begin + // with ./ to be considered relative, so first we try + // simply appending it to the directory path before + // falling back to a full fileResolve, which might return + // a package from a node_modules directory. + return mainFile = fileAppendId(file, main, extensions) || + fileResolve(file, main, parentModule, seenDirFiles); + } + }); + + if (resolved && mainFile) { + file = mainFile; + recordChild(parentModule, pkgJsonFile); + // The fileAppendId call above may have returned a directory, + // so continue the loop to make sure we resolve it to a + // non-directory file. + continue; + } + } + + // If we didn't find a `package.json` file, or it didn't have a + // resolvable `.main` property, the only possibility left to + // consider is that this directory contains an `index.js` module. + // This assignment almost always terminates the while loop, because + // there's very little chance `fileIsDirectory(file)` will be true + // for `fileAppendIdPart(file, "index", extensions)`. However, in + // principle it is remotely possible that a file called `index.js` + // could be a directory instead of a file. + file = fileAppendIdPart(file, "index", extensions); + } + + if (file && isString(file.contents)) { + file = fileResolve(file, file.contents, parentModule, seenDirFiles); + } + + recordChild(parentModule, file); + + return file; + }; + + function nodeModulesLookup(file, id, extensions) { + for (var resolved; file && !resolved; file = file.parent) { + resolved = fileIsDirectory(file) && + fileAppendId(file, "node_modules/" + id, extensions); + } + return resolved; + } + + return install; +}; + +if (typeof exports === "object") { + exports.makeInstaller = makeInstaller; +} diff --git a/packages/module-runtime-hot/modern.js b/packages/module-runtime-hot/modern.js new file mode 100644 index 0000000000..f2b9cc4a76 --- /dev/null +++ b/packages/module-runtime-hot/modern.js @@ -0,0 +1,61 @@ +meteorInstall = makeInstaller({ + // On the client, make package resolution prefer the "browser" field of + // package.json over the "module" field over the "main" field. + browser: true, + mainFields: ["browser", "module", "main"], + + fallback: function (id, parentId, error) { + if (id && id.startsWith('meteor/')) { + var packageName = id.split('/', 2)[1]; + throw new Error( + 'Cannot find package "' + packageName + '". ' + + 'Try "meteor add ' + packageName + '".' + ); + } + + throw error; + } +}); + +let Module = Package['modules-runtime'].meteorInstall.Module; +meteorInstall.Module.prototype.link = Module.prototype.link; + +Object.defineProperty(meteorInstall.Module.prototype, "hot", { + get: function () { + if (!this._hotState) { + this._hotState = { + // if null, whether it accepts depends on all of the modules that + // required it + _hotAccepts: null + }; + } + + let hotState = this._hotState; + + return { + accept() { + if (arguments.length > 0) { + // TODO: support same options as webpack + throw new Error('hot.accept does not support any arguments.'); + } + hotState._hotAccepts = true; + }, + decline() { + if (arguments.length > 0) { + throw new Error('hot.decline does not support any arguments.'); + } + + hotState._hotAccepts = false; + }, + _canAcceptUpdate() { + return hotState._hotAccepts; + } + } + }, + set() {} +}); + +// Due to changes in the comet meteor-tool, this package should be running +// after modules-runtime but before modules. We want modules to use +// our patched meteorInstall +Package['modules-runtime'].meteorInstall = meteorInstall; diff --git a/packages/module-runtime-hot/package.js b/packages/module-runtime-hot/package.js new file mode 100644 index 0000000000..0cae7063fa --- /dev/null +++ b/packages/module-runtime-hot/package.js @@ -0,0 +1,29 @@ +Package.describe({ + name: "zodern:modules-runtime-hot", + version: "0.12.0", + summary: "CommonJS module system with modifications to support HMR", + git: "https://github.com/benjamn/install", + documentation: "README.md" +}); + +Package.onUse(function (api) { + api.addFiles("installer.js", [ + "client", + // "server" + ], { + bare: true + }); + + api.addFiles("modern.js", "modern"); + // api.addFiles("legacy.js", "legacy"); + // api.addFiles("server.js", "server"); + // api.addFiles("profile.js"); + + api.export("meteorInstall", "client"); +}); + +Package.onTest(function (api) { + api.use("tinytest"); + api.use("modules"); // Test modules-runtime via modules. + api.addFiles("modules-runtime-tests.js"); +}); diff --git a/packages/module-runtime-hot/server.js b/packages/module-runtime-hot/server.js new file mode 100644 index 0000000000..81c1509f7c --- /dev/null +++ b/packages/module-runtime-hot/server.js @@ -0,0 +1,93 @@ +// Options that will be populated below and then passed to makeInstaller. +var makeInstallerOptions = {}; + +// RegExp matching strings that don't start with a `.` or a `/`. +var topLevelIdPattern = /^[^./]/; + +// This function will be called whenever a module identifier that hasn't +// been installed is required. For backwards compatibility, and so that we +// can require binary dependencies on the server, we implement the +// fallback in terms of Npm.require. +makeInstallerOptions.fallback = function (id, parentId, error) { + // For simplicity, we honor only top-level module identifiers here. + // We could try to honor relative and absolute module identifiers by + // somehow combining `id` with `dir`, but we'd have to be really careful + // that the resulting modules were located in a known directory (not + // some arbitrary location on the file system), and we only really need + // the fallback for dependencies installed in node_modules directories. + if (topLevelIdPattern.test(id)) { + if (id && id.startsWith('meteor/')) { + const [meteorPrefix, packageName] = id.split('/', 2); + throw new Error( + `Cannot find package "${packageName}". ` + + `Try "meteor add ${packageName}".` + ); + } + if (typeof Npm === "object" && + typeof Npm.require === "function") { + return Npm.require(id, error); + } + } + + throw error; +}; + +makeInstallerOptions.fallback.resolve = function (id, parentId, error) { + if (topLevelIdPattern.test(id)) { + // Allow any top-level identifier to resolve to itself on the server, + // so that makeInstallerOptions.fallback has a chance to handle it. + return id; + } + + throw error; +}; + +meteorInstall = makeInstaller(makeInstallerOptions); + +var Module; + +// If the "modules" package has already run, it set up reify on the Module prototype in modules-runtime +if (Package['modules-runtime']) { + console.log('------- using module from modules-runtime') + Module = Package['modules-runtime'].meteorInstall.Module; + console.log(Module.prototype.link); + meteorInstall.Module.prototype.link = Module.prototype.link; +} else { + console.log('--------- using own Module'); + Module = meteorInstall.Module; +} + +Module.prototype.useNode = function () { + if (typeof npmRequire !== "function") { + // Can't use Node if npmRequire is not defined. + return false; + } + + var parts = this.id.split("/"); + var start = 0; + if (parts[start] === "") ++start; + if (parts[start] === "node_modules" && + parts[start + 1] === "meteor") { + start += 2; + } + + if (parts.indexOf("node_modules", start) < 0) { + // Don't try to use Node for modules that aren't in node_modules + // directories. + return false; + } + + try { + npmRequire.resolve(this.id); + } catch (e) { + return false; + } + + // See tools/static-assets/server/npm-require.js for the implementation + // of npmRequire. Note that this strategy fails when importing ESM + // modules (typically, a .js file in a package with "type": "module" in + // its package.json), as of Node 12.16.0 (Meteor 1.9.1). + this.exports = npmRequire(this.id); + + return true; +}; diff --git a/tools/isobuild/build-events.js b/tools/isobuild/build-events.js new file mode 100644 index 0000000000..45482e88bd --- /dev/null +++ b/tools/isobuild/build-events.js @@ -0,0 +1,3 @@ +const EventEmitter = require('events'); + +export default new EventEmitter(); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 5311ebbfd6..b362b66c42 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1026,8 +1026,14 @@ class Target { add(usedUnibuild); delete onStack[usedUnibuild.id]; }; + let uses = [...unibuild.uses] + if (unibuild.id.startsWith('modules.main')) { + uses.push({ + package: 'zodern:modules-runtime-hot' + }); + } compiler.eachUsedUnibuild({ - dependencies: unibuild.uses, + dependencies: uses, arch: this.arch, isopackCache: isopackCache, skipUnordered: true, diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 696ff87154..df58641df3 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -20,6 +20,7 @@ var Console = require('../console/console.js').Console; var Profile = require('../tool-env/profile').Profile; import { requestGarbageCollection } from "../utils/gc.js"; import { Unibuild } from "./unibuild.js"; +import buildEvents from './build-events.js'; var rejectBadPath = function (p) { if (p.match(/\.\./)) { @@ -790,6 +791,10 @@ _.extend(Isopack.prototype, { }); }, + _onPreLinked: function (handler) { + buildEvents.on('prelinked', handler); + }, + nudge: function () { Console.nudge(true); }, diff --git a/tools/isobuild/linker.js b/tools/isobuild/linker.js index 2450ca09f7..dc26f6b483 100644 --- a/tools/isobuild/linker.js +++ b/tools/isobuild/linker.js @@ -9,6 +9,7 @@ import { sourceMapLength } from '../utils/utils.js'; import files from '../fs/files'; import { findAssignedGlobals } from './js-analyze.js'; import { convert as convertColons } from '../utils/colon-converter.js'; +import buildEvents from './build-events.js'; // A rather small cache size, assuming only one module is being linked // most of the time. @@ -1103,6 +1104,17 @@ export var fullLink = Profile("linker.fullLink", function (inputFiles, { var prelinkedFiles = module.getPrelinkedFiles(); + Profile.time('prelinkedEvent', () => { + buildEvents.emit('prelinked', { + isApp, + bundleArch, + name, + imports, + module, + prelinkedFiles + }); + }); + // If we're in the app, then we just add the import code as its own file in // the front. if (isApp) { diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 27c332c746..c566261100 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -665,6 +665,17 @@ _.extend(PackageSource.prototype, { _.each(api.implies[label], doNotDepOnSelf); }); + if (self.name === 'modules') { + // Since we can't use a forked version of modules + // we add a dependency to patch it + api.uses['web.browser'].push({ + package: 'zodern:modules-runtime-hot', + constraint: '', + unordered: false, + weak: false + }); + } + // Cause packages that use `prodOnly` to automatically depend on the // `isobuild:prod-only` feature package, which will cause an error // when a package using `prodOnly` is run by a version of the tool From 1f771c080df00d62363fbc99e17ad30d4ef30459 Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 19:12:57 -0500 Subject: [PATCH 021/326] Update readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e442050a48..a9c8d910d6 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ This is still an early version, and there is still a long list of items to imple - Support full webpack API - Look into allowing packages to replace the HMR api to allow experimentation - Look into an api to allow packages to run code before and after each module is run. This could be used to implement react fast reload and for packages to automatically clean up after a file is modified. For example, this could be used to remove methods and publications previously added by a modified file. +- Better integration with the autoupdate and reload packages +- Require secret from client before sending changes over websocket +- Submit PRs for reify and install to add necessary apis and functionality for HMR HMR is only enabled for the `web.browser` architectures. These architectures are remaining: - web.browser.legacy From 618c4e63e38d1bc00a8cc1e8fa3eb7ce134dee00 Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 19:34:41 -0500 Subject: [PATCH 022/326] Publish zodern:modules-runtime-hot@0.12.0 --- packages/module-runtime-hot/README.md | 3 +++ packages/module-runtime-hot/package.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 packages/module-runtime-hot/README.md diff --git a/packages/module-runtime-hot/README.md b/packages/module-runtime-hot/README.md new file mode 100644 index 0000000000..e4dcb32b80 --- /dev/null +++ b/packages/module-runtime-hot/README.md @@ -0,0 +1,3 @@ +# zodern:modules-runtime-hot + +Patches modules-runtime to support HMR. diff --git a/packages/module-runtime-hot/package.js b/packages/module-runtime-hot/package.js index 0cae7063fa..6021fc3a59 100644 --- a/packages/module-runtime-hot/package.js +++ b/packages/module-runtime-hot/package.js @@ -25,5 +25,4 @@ Package.onUse(function (api) { Package.onTest(function (api) { api.use("tinytest"); api.use("modules"); // Test modules-runtime via modules. - api.addFiles("modules-runtime-tests.js"); }); From 51e1885f1990a7287781320b3b889f371c6d2cbd Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 20:06:29 -0500 Subject: [PATCH 023/326] Publish zodern:hot@0.1.0 --- packages/hot/README.md | 3 +++ packages/hot/package.js | 17 +++++------------ packages/hot/plugin.js | 10 +++++++--- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 packages/hot/README.md diff --git a/packages/hot/README.md b/packages/hot/README.md new file mode 100644 index 0000000000..d86dad6ddd --- /dev/null +++ b/packages/hot/README.md @@ -0,0 +1,3 @@ +# zodern:hot + +Adds Hot Module Reloading. Learn more at [https://github.com/zodern/comet](https://github.com/zodern/comet). diff --git a/packages/hot/package.js b/packages/hot/package.js index 7d4a94335e..dc2eef0f05 100644 --- a/packages/hot/package.js +++ b/packages/hot/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'zodern:hot', - version: '0.1.1', + version: '0.1.0', summary: 'Adds Hot Module Reloading to Meteor', documentation: 'README.md' }); @@ -8,28 +8,21 @@ Package.describe({ Package.registerBuildPlugin({ name: 'hot-core', sources: ['plugin.js'], - use: ['ecmascript'], + use: ['ecmascript@0.14.3'], npmDependencies: { ws: '7.2.5' }, }); Package.onUse(function (api) { + api.versionsFrom('1.10'); + api.use('isobuild:compiler-plugin@1.0.0'); api.use('babel-compiler'); api.use('modules'); - api.imply('zodern:modules-runtime-hot'); + api.imply('zodern:modules-runtime-hot@0.12.0'); api.addFiles('./client.js', 'client'); }); Package.onTest(function (api) { - api.use(["tinytest", "underscore"]); - api.use(["es5-shim", "ecmascript", "babel-compiler"]); - api.addFiles("runtime-tests.js"); - api.addFiles("transpilation-tests.js", "server"); - - api.addFiles("bare-test.js"); - api.addFiles("bare-test-file.js", ["client", "server"], { - bare: true - }); }); diff --git a/packages/hot/plugin.js b/packages/hot/plugin.js index d599998498..e7f8857a07 100644 --- a/packages/hot/plugin.js +++ b/packages/hot/plugin.js @@ -107,9 +107,13 @@ function init() { }); }); - Plugin._onPreLinked(function (prelinkResult) { - sharedState.prelinkResultHandler(prelinkResult); - }); + if (Plugin._onPreLinked) { + Plugin._onPreLinked(function (prelinkResult) { + sharedState.prelinkResultHandler(prelinkResult); + }); + } else { + console.log('zodern:COMET is required for HMR: https://github.com/zodern/comet'); + } } if (!sharedState.initialized) { From 059951bc25112a64b53134b18ce7677611886ea2 Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 20:18:31 -0500 Subject: [PATCH 024/326] Fix running zodern:hot locally --- packages/hot/package.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/hot/package.js b/packages/hot/package.js index dc2eef0f05..e4b48310d5 100644 --- a/packages/hot/package.js +++ b/packages/hot/package.js @@ -15,8 +15,6 @@ Package.registerBuildPlugin({ }); Package.onUse(function (api) { - api.versionsFrom('1.10'); - api.use('isobuild:compiler-plugin@1.0.0'); api.use('babel-compiler'); api.use('modules'); From 662ed197d67e7defbac26c69f86437a7a60d1a14 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 8 Jun 2020 22:08:37 +0200 Subject: [PATCH 025/326] Fix clearing reify cache --- packages/hot/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hot/client.js b/packages/hot/client.js index a67eda9040..493b96c8af 100644 --- a/packages/hot/client.js +++ b/packages/hot/client.js @@ -168,7 +168,7 @@ module.constructor.prototype.replaceModule = function (id, contents) { // Clear cached exports // TODO: check how this affects live bindings for ecmascript modules delete file.module.exports; - const entry = ReifyEntry.getOrCreate(id); + const entry = ReifyEntry.getOrCreate(moduleId); entry.getters = {}; entry.setters = {}; entry.module = null; From 21976fcbb9ec749e884ec328d265daae657ae448 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 8 Jun 2020 22:16:30 +0200 Subject: [PATCH 026/326] Update readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a9c8d910d6..011a12cb10 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,11 @@ The client uses a modified version of [install](https://www.npmjs.com/package/in #### Remaining tasks -This is still an early version, and there is still a long list of items to implement. +This is an early version, and there is still a long list of items to implement. -- HMR is enabled for the second build after Meteor is started so there is two builds to compare. This should be fixed by storing the necessary information in the linker cache. -- Support full webpack API +- HMR is unavailable until the second time the architecture was linked, usually the second rebuild. This should be fixed by storing the necessary information in the linker cache. +- If the files were modified to be the same as a previous build, Meteor will use a cache entry in the linker cache, and HMR will not be able to apply the changes. +- Support full webpack HMR API - Look into allowing packages to replace the HMR api to allow experimentation - Look into an api to allow packages to run code before and after each module is run. This could be used to implement react fast reload and for packages to automatically clean up after a file is modified. For example, this could be used to remove methods and publications previously added by a modified file. - Better integration with the autoupdate and reload packages From 21c55035d01166e298da1ba56769eb4d46c42163 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 08:55:44 -0500 Subject: [PATCH 027/326] Add dispose handlers and hot data --- packages/hot/client.js | 15 +++++++++++++++ packages/module-runtime-hot/modern.js | 12 +++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/hot/client.js b/packages/hot/client.js index 493b96c8af..c2fe808360 100644 --- a/packages/hot/client.js +++ b/packages/hot/client.js @@ -5,6 +5,7 @@ const ReifyEntry = require('/node_modules/meteor/modules/node_modules/reify/lib/ // this could possibly be ran after the next build finished // TODO: the builder should inject the build time in the bundle let lastUpdated = Date.now(); +let reloadId = 0; let arch = __meteor_runtime_config__.isModern ? 'web.browser' : 'web.browser.legacy'; let enabled = arch === 'web.browser'; @@ -161,6 +162,18 @@ module.constructor.prototype.replaceModule = function (id, contents) { return null; } + const hotState = file.module._hotState; + if (file._reloadedAt !== reloadId && hotState) { + file._reloadedAt = reloadId; + + const hotData = {}; + hotState._disposeHandlers.forEach(cb => { + cb(hotData); + }); + hotState._disposeHandlers = []; + hotState.data = hotData; + } + if (contents) { replaceFileContent(file, contents); } @@ -216,6 +229,8 @@ function applyChangeset({ } } + reloadId += 1; + // TODO: deduplicate reloadableParents.forEach(parent => { rerunFile(parent); diff --git a/packages/module-runtime-hot/modern.js b/packages/module-runtime-hot/modern.js index f2b9cc4a76..02cad25b8e 100644 --- a/packages/module-runtime-hot/modern.js +++ b/packages/module-runtime-hot/modern.js @@ -26,7 +26,9 @@ Object.defineProperty(meteorInstall.Module.prototype, "hot", { this._hotState = { // if null, whether it accepts depends on all of the modules that // required it - _hotAccepts: null + _hotAccepts: null, + _disposeHandlers: [], + data: null }; } @@ -36,7 +38,7 @@ Object.defineProperty(meteorInstall.Module.prototype, "hot", { accept() { if (arguments.length > 0) { // TODO: support same options as webpack - throw new Error('hot.accept does not support any arguments.'); + console.warn('hot.accept does not support any arguments.'); } hotState._hotAccepts = true; }, @@ -47,9 +49,13 @@ Object.defineProperty(meteorInstall.Module.prototype, "hot", { hotState._hotAccepts = false; }, + dispose(cb) { + hotState._disposeHandlers.push(cb); + }, _canAcceptUpdate() { return hotState._hotAccepts; - } + }, + data: hotState.data } }, set() {} From 9dea37dd5a12f85b1a13350b3813bf87348c45b4 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 09:01:29 -0500 Subject: [PATCH 028/326] Apply changes with HMR before build finishes --- packages/hot/changesets.js | 5 +++++ packages/hot/client.js | 18 ++++++++++++++++-- packages/hot/plugin.js | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/packages/hot/changesets.js b/packages/hot/changesets.js index cbe594ba7c..c51aad6596 100644 --- a/packages/hot/changesets.js +++ b/packages/hot/changesets.js @@ -1,3 +1,7 @@ +function createId () { + return `${Date.now()}-${Math.random()}` +} + function comparePrelinkResult(previousResult, { name, module, @@ -38,6 +42,7 @@ function comparePrelinkResult(previousResult, { addedFiles: reloadable ? addedFiles.map(fileDetailsToSave) : [], changedFiles: reloadable ? changedFiles.map(fileDetailsToSave) : [], linkedAt: Date.now(), + id: createId(), name }; diff --git a/packages/hot/client.js b/packages/hot/client.js index c2fe808360..d366742f98 100644 --- a/packages/hot/client.js +++ b/packages/hot/client.js @@ -5,6 +5,7 @@ const ReifyEntry = require('/node_modules/meteor/modules/node_modules/reify/lib/ // this could possibly be ran after the next build finished // TODO: the builder should inject the build time in the bundle let lastUpdated = Date.now(); +let appliedChangeSets = []; let reloadId = 0; let arch = __meteor_runtime_config__.isModern ? 'web.browser' : 'web.browser.legacy'; @@ -30,6 +31,10 @@ function requestChanges() { socket.addEventListener('open', function () { console.log('HMR: connected'); + socket.send(JSON.stringify({ + type: 'register', + arch + })); }); socket.addEventListener('message', function (event) { @@ -48,6 +53,12 @@ socket.addEventListener('message', function (event) { hasUnreloadable || message.changeSets.length === 0 ) { + // This was an attempt to reload before the build finishes + // If we can't, we will wait until the build finishes to properly handle it + if (message.eager) { + return + } + console.log('HMR: Unable to do HMR. Falling back to hot code push.') // Complete hot code push if we can not do hot module reload mustReload = true; @@ -57,11 +68,14 @@ socket.addEventListener('message', function (event) { // In case the user changed how a module works with HMR // in one of the earlier change sets, we want to apply each // change set one at a time. - message.changeSets.forEach(changeSet => { + message.changeSets.filter(changeSet => { + return !appliedChangeSets.includes(changeSet.id) + }).forEach(changeSet => { + appliedChangeSets.push(changeSet.id); applyChangeset(changeSet); }); - if (message.changeSets.length > 0) { + if (!message.eager && message.changeSets.length > 0) { lastUpdated = message.changeSets[message.changeSets.length - 1].linkedAt; } } diff --git a/packages/hot/plugin.js b/packages/hot/plugin.js index e7f8857a07..6cd5ceadf9 100644 --- a/packages/hot/plugin.js +++ b/packages/hot/plugin.js @@ -12,6 +12,7 @@ const sharedState = global.__hotState || { wsMessageHandler: null, prelinkResultHandler: null, previousPrelinkResults: {}, + wsByArch: {} }; global.__hotState = sharedState; @@ -57,6 +58,19 @@ function prelinkResultHandler(prelinkResult) { const changeset = comparePrelinkResult(previousChangeset, prelinkResult); sharedState.previousPrelinkResults[bundleArch].push(changeset); + + // Try to do HMR without waiting for the build to finish + // This might not work once we support HMR for packages + const conns = sharedState.wsByArch[bundleArch] + if (conns) { + conns.forEach(conn => { + conn.send(JSON.stringify({ + type: 'changes', + changeSets: [changeset], + eager: true + })) + }) + } } function wsMessageHandler(conn, _message) { @@ -81,6 +95,16 @@ function wsMessageHandler(conn, _message) { break; } + case 'register': { + const { + arch + } = message; + + sharedState.wsByArch[arch] = sharedState.wsByArch[arch] || []; + sharedState.wsByArch[arch].push(conn); + break; + } + default: console.warn('Unknown HMR message:', message.type); } From 31959a4626239228e2deb6e2e520bbc0c765ab69 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 09:04:05 -0500 Subject: [PATCH 029/326] Disable linker cache when we need to link for HMR --- tools/isobuild/compiler-plugin.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 7a62748f5a..9b76c0e089 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -82,6 +82,13 @@ const LINKER_CACHE = new LRU({ } }); +// For HMR to work, we have to do a full link during the initial +// build and each time the bundle changes. Here we store +// the previous cache key for the app's web.browser arch +// to check if it was modified or if we can use the cache +// TODO: support HMR when using the linker cache +let previousLinkKey = null; + const serverLibPackages = { // Make sure fibers is defined, if nothing else. fibers: true @@ -1688,7 +1695,10 @@ export class PackageSourceBatch { })); const cacheKey = `${cacheKeyPrefix}_${cacheKeySuffix}`; - if (LINKER_CACHE.has(cacheKey)) { + const canUseHMR = isApp && bundleArch === 'web.browser'; + const canUseCache = !canUseHMR || previousLinkKey === cacheKey; + + if (canUseCache && LINKER_CACHE.has(cacheKey)) { if (CACHE_DEBUG) { console.log('LINKER IN-MEMORY CACHE HIT:', linkerOptions.name, bundleArch); @@ -1711,7 +1721,7 @@ export class PackageSourceBatch { }); } - if (cacheFilename) { + if (canUseCache && cacheFilename) { let diskCached = null; try { diskCached = optimisticReadJsonOrNull(cacheFilename); @@ -1786,6 +1796,10 @@ export class PackageSourceBatch { } } + if (canUseHMR) { + previousLinkKey = cacheKey; + } + return ret; } } From cab15fd23e12c7819871407a4e13d241e769e0d9 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 09:04:25 -0500 Subject: [PATCH 030/326] Fix error when unable to resolve module --- packages/module-runtime-hot/installer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/module-runtime-hot/installer.js b/packages/module-runtime-hot/installer.js index 98465b386d..bb7fd91e60 100644 --- a/packages/module-runtime-hot/installer.js +++ b/packages/module-runtime-hot/installer.js @@ -242,7 +242,9 @@ makeInstaller = function (options) { Module.prototype._recordImport = function (id) { var result = fileResolve(filesByModuleId[this.id], id); - result.importedBy[this.id] = filesByModuleId[this.id]; + if (result) { + result.importedBy[this.id] = filesByModuleId[this.id]; + } } function makeRequire(file) { From dc467bd2ef657b8382adad19578156c8924bbb22 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 10:55:29 -0500 Subject: [PATCH 031/326] Add files with HMR --- packages/hot/changesets.js | 3 +- packages/hot/client.js | 60 ++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/packages/hot/changesets.js b/packages/hot/changesets.js index c51aad6596..b79d07f313 100644 --- a/packages/hot/changesets.js +++ b/packages/hot/changesets.js @@ -30,7 +30,8 @@ function comparePrelinkResult(previousResult, { function fileDetailsToSave (file) { return { content: file.getPrelinkedOutput({}).toStringWithSourceMap({}), - path: file.absModuleId + path: file.absModuleId, + meteorInstallOptions: file.meteorInstallOptions } } diff --git a/packages/hot/client.js b/packages/hot/client.js index d366742f98..6fecb73108 100644 --- a/packages/hot/client.js +++ b/packages/hot/client.js @@ -42,12 +42,12 @@ socket.addEventListener('message', function (event) { switch (message.type) { case 'changes': - // TODO: support removed or added files + // TODO: support removed const hasUnreloadable = message.changeSets.find(changeSet => { return !changeSet.reloadable || - changeSet.removedFilePaths.length > 0 || - changeSet.addedFiles.length > 0 + changeSet.removedFilePaths.length > 0 }) + if ( pendingReload && hasUnreloadable || @@ -101,20 +101,25 @@ function createInlineSourceMap(map) { return "//# sourceMappingURL=data:application/json;base64," + btoa(JSON.stringify(map)); } +function createModuleContent (code, map, id) { + return function () { + // TODO: Use same sourceURL as the sourcemap for the main bundle does + return eval( + // Wrap the function(require,exports,module){...} expression in + // parentheses to force it to be parsed as an expression. + "(" + code + ")\n//# sourceURL=" + id + + "\n" + createInlineSourceMap(map) + ).apply(this, arguments); + } + +} + function replaceFileContent(file, contents) { console.log('HMR: replacing module:', file.module.id); // TODO: to replace content in packages, we need an eval function that runs // within the package scope, like dynamic imports does. - const moduleFunction = function () { - // TODO: Use same sourceURL as the sourcemap for the main bundle does - return eval( - // Wrap the function(require,exports,module){...} expression in - // parentheses to force it to be parsed as an expression. - "(" + contents.code + ")\n//# sourceURL=" + file.module.id + - "\n" + createInlineSourceMap(contents.map) - ).apply(this, arguments); - } + const moduleFunction = createModuleContent(contents.code, contents.map, file.module.id); file.contents = moduleFunction; } @@ -156,6 +161,25 @@ function findReloadableParents(importedBy) { }).flat(Infinity); } +function addFiles(files) { + const tree = {}; + + console.log('HMR: Added files', files.map(file => file.path)); + + files.forEach(file => { + const segments = file.path.split('/').slice(1); + let previous = tree; + segments.splice(0, segments.length - 1).forEach(segment => { + previous[segment] = previous[segment] || {} + previous = previous[segment] + }) + previous[segments[0]] = createModuleContent(file.content.code, file.content.map, file.path); + }) + + // TODO: group the files by meteorInstallOptions + meteorInstall(tree, files[0].meteorInstallOptions); +} + module.constructor.prototype.replaceModule = function (id, contents) { const moduleId = id || this.id; const root = this._getRoot(); @@ -209,11 +233,10 @@ module.constructor.prototype.replaceModule = function (id, contents) { } function applyChangeset({ - changedFiles + changedFiles, + addedFiles }) { // TODO: prevent requiring removed files - // TODO: install added files - const reloadableParents = []; let hasImportedModules = false; @@ -230,6 +253,10 @@ function applyChangeset({ } }); + if (addedFiles.length > 0) { + addFiles(addedFiles); + } + // Check if some of the module's parents are not reloadable // In that case, we have to do a full reload // TODO: record which parents cause this @@ -246,6 +273,7 @@ function applyChangeset({ reloadId += 1; // TODO: deduplicate + // TODO: handle errors reloadableParents.forEach(parent => { rerunFile(parent); }); @@ -266,6 +294,8 @@ Meteor.startup(() => { // We can't do anything here until Reload._onMigrate // has been called if (!pendingReload) { + nonRefreshableVersion = doc.versionNonRefreshable; + return; } From fc7e4728d4b4f2c91b54e41549f0c18a1c9c9f00 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 10:56:40 -0500 Subject: [PATCH 032/326] Fix sending removed files list to client --- packages/hot/changesets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hot/changesets.js b/packages/hot/changesets.js index b79d07f313..2a8ee7fd83 100644 --- a/packages/hot/changesets.js +++ b/packages/hot/changesets.js @@ -88,7 +88,7 @@ function compareFiles(previousHashes = new Map(), previousUnreloadable = [], cur unseenModules.delete(file.absModuleId); }); - const removedFilePaths = unseenModules.keys(); + const removedFilePaths = Array.from(unseenModules.keys()); const unreloadableChanged = unreloadable.length !== previousUnreloadable.length || unreloadable.some((hash, i) => hash !== previousUnreloadable[i]); From 4a0849b55961457565b279f1f1f17cd86a0bda96 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 24 Jun 2020 11:07:04 -0500 Subject: [PATCH 033/326] Update readme --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 011a12cb10..db190670d5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ As an alternative to Hot Code Push in development, Hot Module Reload replaces m Use: ``` - meteor run --release zodern:COMET --include-packages zodern:hot + ../path/to/meteor --include-packages zodern:hot ``` #### API @@ -13,6 +13,10 @@ Use: `module.hot.decline()` - If the module or any of its dependencies are modified, hot code push will be used instead of HMR. +`module.hot.dispose((data) => {})` - Adds a callback to run before the module is replaced. Any state that should be preserved can be stored in `data`. It will be available when the module is rerun at `module.hot.data`. + +`module.hot.data` - If the module was reloaded, will have any data set by dispose handlers. If the file was not reloaded, or there were no dispose handlers, it will be `null`. + These should be wrapped by ``` if (module.hot) { @@ -26,31 +30,32 @@ Minifiers are able to remove the if statement for production, though none of the For now, the linker emits an event that packages, such as zodern:hot, can listen to for an up to date list of files in an unibuild. Eventually this will be replaced with moving the HMR code from a build plugin into the meteor-tool. -The zodern:hot package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page to be reloaded by hot code push. +The zodern:hot package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page be reloaded using hot code push. The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. To force it to be loaded at the correct time, the meteor-tool adds the `zodern:modules-runtime-hot` dependency to `modules`. #### Remaining tasks -This is an early version, and there is still a long list of items to implement. +This is an early version, and there is still a long list of items to implement. A partial list is: -- HMR is unavailable until the second time the architecture was linked, usually the second rebuild. This should be fixed by storing the necessary information in the linker cache. -- If the files were modified to be the same as a previous build, Meteor will use a cache entry in the linker cache, and HMR will not be able to apply the changes. +- The linker cache is disabled in some situations for the web.browser architecture since bundles are compared as part of the linking process. We will need to instead store the necessary information in the linker cache, and allow prelinking only the parts that were modified. - Support full webpack HMR API - Look into allowing packages to replace the HMR api to allow experimentation - Look into an api to allow packages to run code before and after each module is run. This could be used to implement react fast reload and for packages to automatically clean up after a file is modified. For example, this could be used to remove methods and publications previously added by a modified file. - Better integration with the autoupdate and reload packages - Require secret from client before sending changes over websocket - Submit PRs for reify and install to add necessary apis and functionality for HMR +- Many other items are documented in the code with TODO comments HMR is only enabled for the `web.browser` architectures. These architectures are remaining: + - web.browser.legacy - web.cordova - server architectures HMR is not supported in these situations. Hot code push will be used instead: + - A package is modified -- A file is added - A file is removed - Files were modified that do not have a module id, are bare, are json data, or do not have meteorInstallOptions From 3cd6c1210f17c9fac824cfa0d41ec132236ed32e Mon Sep 17 00:00:00 2001 From: zodern Date: Fri, 26 Jun 2020 09:29:12 -0500 Subject: [PATCH 034/326] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db190670d5..3d0b05ece9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ As an alternative to Hot Code Push in development, Hot Module Reload replaces m Use: ``` - ../path/to/meteor --include-packages zodern:hot + ../path/to/meteor --extra-packages zodern:hot ``` #### API From ecced0edaee358ef63c297d68b889d38cacf59c7 Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 1 Jul 2020 02:37:44 +0200 Subject: [PATCH 035/326] Rename zodern:hot to hot-module-reload --- README.md | 6 +++--- .../.npm/plugin/hot-core/.gitignore | 0 .../{hot => hot-module-reload}/.npm/plugin/hot-core/README | 0 .../.npm/plugin/hot-core/npm-shrinkwrap.json | 0 packages/hot-module-reload/README.md | 3 +++ packages/{hot => hot-module-reload}/changesets.js | 0 packages/{hot => hot-module-reload}/client.js | 0 packages/{hot => hot-module-reload}/package.js | 4 ++-- packages/{hot => hot-module-reload}/plugin.js | 0 packages/hot/README.md | 3 --- 10 files changed, 8 insertions(+), 8 deletions(-) rename packages/{hot => hot-module-reload}/.npm/plugin/hot-core/.gitignore (100%) rename packages/{hot => hot-module-reload}/.npm/plugin/hot-core/README (100%) rename packages/{hot => hot-module-reload}/.npm/plugin/hot-core/npm-shrinkwrap.json (100%) create mode 100644 packages/hot-module-reload/README.md rename packages/{hot => hot-module-reload}/changesets.js (100%) rename packages/{hot => hot-module-reload}/client.js (100%) rename packages/{hot => hot-module-reload}/package.js (83%) rename packages/{hot => hot-module-reload}/plugin.js (100%) delete mode 100644 packages/hot/README.md diff --git a/README.md b/README.md index 3d0b05ece9..a3dc72cb04 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ As an alternative to Hot Code Push in development, Hot Module Reload replaces m Use: ``` - ../path/to/meteor --extra-packages zodern:hot + ../path/to/meteor --extra-packages hot-module-reload ``` #### API @@ -28,9 +28,9 @@ Minifiers are able to remove the if statement for production, though none of the #### Implementation details -For now, the linker emits an event that packages, such as zodern:hot, can listen to for an up to date list of files in an unibuild. Eventually this will be replaced with moving the HMR code from a build plugin into the meteor-tool. +For now, the linker emits an event that packages, such as `hot-module-reload`, can listen to for an up to date list of files in an unibuild. Eventually this will be replaced with moving the HMR code from a build plugin into the meteor-tool. -The zodern:hot package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page be reloaded using hot code push. +The `hot-module-reload` package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page be reloaded using hot code push. The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. To force it to be loaded at the correct time, the meteor-tool adds the `zodern:modules-runtime-hot` dependency to `modules`. diff --git a/packages/hot/.npm/plugin/hot-core/.gitignore b/packages/hot-module-reload/.npm/plugin/hot-core/.gitignore similarity index 100% rename from packages/hot/.npm/plugin/hot-core/.gitignore rename to packages/hot-module-reload/.npm/plugin/hot-core/.gitignore diff --git a/packages/hot/.npm/plugin/hot-core/README b/packages/hot-module-reload/.npm/plugin/hot-core/README similarity index 100% rename from packages/hot/.npm/plugin/hot-core/README rename to packages/hot-module-reload/.npm/plugin/hot-core/README diff --git a/packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json b/packages/hot-module-reload/.npm/plugin/hot-core/npm-shrinkwrap.json similarity index 100% rename from packages/hot/.npm/plugin/hot-core/npm-shrinkwrap.json rename to packages/hot-module-reload/.npm/plugin/hot-core/npm-shrinkwrap.json diff --git a/packages/hot-module-reload/README.md b/packages/hot-module-reload/README.md new file mode 100644 index 0000000000..82478235c5 --- /dev/null +++ b/packages/hot-module-reload/README.md @@ -0,0 +1,3 @@ +# hot-module-reload + +Adds Hot Module Reloading. diff --git a/packages/hot/changesets.js b/packages/hot-module-reload/changesets.js similarity index 100% rename from packages/hot/changesets.js rename to packages/hot-module-reload/changesets.js diff --git a/packages/hot/client.js b/packages/hot-module-reload/client.js similarity index 100% rename from packages/hot/client.js rename to packages/hot-module-reload/client.js diff --git a/packages/hot/package.js b/packages/hot-module-reload/package.js similarity index 83% rename from packages/hot/package.js rename to packages/hot-module-reload/package.js index e4b48310d5..28fa4084f9 100644 --- a/packages/hot/package.js +++ b/packages/hot-module-reload/package.js @@ -1,7 +1,7 @@ Package.describe({ - name: 'zodern:hot', + name: 'hot-module-reload', version: '0.1.0', - summary: 'Adds Hot Module Reloading to Meteor', + summary: 'Update code in development without reloading the page', documentation: 'README.md' }); diff --git a/packages/hot/plugin.js b/packages/hot-module-reload/plugin.js similarity index 100% rename from packages/hot/plugin.js rename to packages/hot-module-reload/plugin.js diff --git a/packages/hot/README.md b/packages/hot/README.md deleted file mode 100644 index d86dad6ddd..0000000000 --- a/packages/hot/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# zodern:hot - -Adds Hot Module Reloading. Learn more at [https://github.com/zodern/comet](https://github.com/zodern/comet). From d1d9a62538998c5f2b97e5ff3cdbd756734e0bfd Mon Sep 17 00:00:00 2001 From: zodern Date: Wed, 1 Jul 2020 03:24:15 +0200 Subject: [PATCH 036/326] Rename modules-runtime-hot --- README.md | 2 +- packages/hot-module-reload/package.js | 2 +- packages/hot-module-reload/plugin.js | 2 +- .../README.md | 0 .../installer.js | 0 .../modern.js | 0 .../package.js | 4 ++-- .../server.js | 0 packages/modules/package.js | 1 + tools/isobuild/bundler.js | 6 +----- tools/isobuild/package-source.js | 11 ----------- 11 files changed, 7 insertions(+), 21 deletions(-) rename packages/{module-runtime-hot => modules-runtime-hot}/README.md (100%) rename packages/{module-runtime-hot => modules-runtime-hot}/installer.js (100%) rename packages/{module-runtime-hot => modules-runtime-hot}/modern.js (100%) rename packages/{module-runtime-hot => modules-runtime-hot}/package.js (83%) rename packages/{module-runtime-hot => modules-runtime-hot}/server.js (100%) diff --git a/README.md b/README.md index a3dc72cb04..9ad8c2723d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ For now, the linker emits an event that packages, such as `hot-module-reload`, c The `hot-module-reload` package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page be reloaded using hot code push. -The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. To force it to be loaded at the correct time, the meteor-tool adds the `zodern:modules-runtime-hot` dependency to `modules`. +The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. #### Remaining tasks diff --git a/packages/hot-module-reload/package.js b/packages/hot-module-reload/package.js index 28fa4084f9..18a38b3026 100644 --- a/packages/hot-module-reload/package.js +++ b/packages/hot-module-reload/package.js @@ -18,7 +18,7 @@ Package.onUse(function (api) { api.use('isobuild:compiler-plugin@1.0.0'); api.use('babel-compiler'); api.use('modules'); - api.imply('zodern:modules-runtime-hot@0.12.0'); + api.imply('modules-runtime-hot@0.12.0'); api.addFiles('./client.js', 'client'); }); diff --git a/packages/hot-module-reload/plugin.js b/packages/hot-module-reload/plugin.js index 6cd5ceadf9..210663d364 100644 --- a/packages/hot-module-reload/plugin.js +++ b/packages/hot-module-reload/plugin.js @@ -136,7 +136,7 @@ function init() { sharedState.prelinkResultHandler(prelinkResult); }); } else { - console.log('zodern:COMET is required for HMR: https://github.com/zodern/comet'); + console.log('This version of Meteor doesn\'t support hot module reloading'); } } diff --git a/packages/module-runtime-hot/README.md b/packages/modules-runtime-hot/README.md similarity index 100% rename from packages/module-runtime-hot/README.md rename to packages/modules-runtime-hot/README.md diff --git a/packages/module-runtime-hot/installer.js b/packages/modules-runtime-hot/installer.js similarity index 100% rename from packages/module-runtime-hot/installer.js rename to packages/modules-runtime-hot/installer.js diff --git a/packages/module-runtime-hot/modern.js b/packages/modules-runtime-hot/modern.js similarity index 100% rename from packages/module-runtime-hot/modern.js rename to packages/modules-runtime-hot/modern.js diff --git a/packages/module-runtime-hot/package.js b/packages/modules-runtime-hot/package.js similarity index 83% rename from packages/module-runtime-hot/package.js rename to packages/modules-runtime-hot/package.js index 6021fc3a59..5596c743ca 100644 --- a/packages/module-runtime-hot/package.js +++ b/packages/modules-runtime-hot/package.js @@ -1,7 +1,7 @@ Package.describe({ - name: "zodern:modules-runtime-hot", + name: "modules-runtime-hot", version: "0.12.0", - summary: "CommonJS module system with modifications to support HMR", + summary: "Patches modules-runtime to support Hot Module Reload", git: "https://github.com/benjamn/install", documentation: "README.md" }); diff --git a/packages/module-runtime-hot/server.js b/packages/modules-runtime-hot/server.js similarity index 100% rename from packages/module-runtime-hot/server.js rename to packages/modules-runtime-hot/server.js diff --git a/packages/modules/package.js b/packages/modules/package.js index b697b26ec1..6c92fdfd05 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -12,6 +12,7 @@ Npm.depends({ Package.onUse(function(api) { api.use("modules-runtime"); + api.use("modules-runtime-hot", { weak: true }); api.mainModule("client.js", "client"); api.mainModule("server.js", "server"); api.export("meteorInstall"); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index b362b66c42..34915bfa90 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1027,11 +1027,7 @@ class Target { delete onStack[usedUnibuild.id]; }; let uses = [...unibuild.uses] - if (unibuild.id.startsWith('modules.main')) { - uses.push({ - package: 'zodern:modules-runtime-hot' - }); - } + compiler.eachUsedUnibuild({ dependencies: uses, arch: this.arch, diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index c566261100..27c332c746 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -665,17 +665,6 @@ _.extend(PackageSource.prototype, { _.each(api.implies[label], doNotDepOnSelf); }); - if (self.name === 'modules') { - // Since we can't use a forked version of modules - // we add a dependency to patch it - api.uses['web.browser'].push({ - package: 'zodern:modules-runtime-hot', - constraint: '', - unordered: false, - weak: false - }); - } - // Cause packages that use `prodOnly` to automatically depend on the // `isobuild:prod-only` feature package, which will cause an error // when a package using `prodOnly` is run by a version of the tool From 6f7c681357d4a5bec8f5df3f0a4dd1c13b118e56 Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 9 Jul 2020 04:58:43 +0200 Subject: [PATCH 037/326] Integrate React Fast Refresh --- packages/babel-compiler/babel-compiler.js | 7 +- packages/ecmascript/package.js | 10 +++ packages/ecmascript/plugin.js | 15 ++++ packages/ecmascript/react-fast-refresh.js | 102 ++++++++++++++++++++++ packages/hot-module-reload/package.js | 3 +- packages/modules-runtime-hot/installer.js | 34 +++++++- 6 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 packages/ecmascript/react-fast-refresh.js diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index b88abe5a30..ea08fed9c0 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -5,8 +5,9 @@ var JSON5 = Npm.require("json5"); * Plugin.registerCompiler * @param {Object} extraFeatures The same object that getDefaultOptions takes */ -BabelCompiler = function BabelCompiler(extraFeatures) { +BabelCompiler = function BabelCompiler(extraFeatures, modifyBabelConfig) { this.extraFeatures = extraFeatures; + this.modifyBabelConfig = modifyBabelConfig; this._babelrcCache = null; this._babelrcWarnings = Object.create(null); this.cacheDirectory = null; @@ -130,6 +131,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { ? "packages/" + packageName + "/" + inputFilePath : inputFilePath; + if (this.modifyBabelConfig) { + this.modifyBabelConfig(babelOptions, inputFile); + } + try { var result = profile('Babel.compile', function () { return Babel.compile(source, babelOptions, cacheOptions); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 16cac4465e..b77421c3fd 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -5,12 +5,19 @@ Package.describe({ documentation: 'README.md' }); +const sharedDependencies = { + 'react-refresh': '0.8.3' +} + Package.registerBuildPlugin({ name: 'compile-ecmascript', use: ['babel-compiler'], + npmDependencies: sharedDependencies, sources: ['plugin.js'] }); +Npm.depends(sharedDependencies) + Package.onUse(function (api) { api.use('isobuild:compiler-plugin@1.0.0'); api.use('babel-compiler'); @@ -25,6 +32,9 @@ Package.onUse(function (api) { // Runtime support for Meteor 1.5 dynamic import(...) syntax. api.imply('dynamic-import'); + api.use('modules', 'web.browser'); + api.addFiles('react-fast-refresh.js', 'web.browser'); + api.addFiles("ecmascript.js", "server"); api.export("ECMAScript", "server"); }); diff --git a/packages/ecmascript/plugin.js b/packages/ecmascript/plugin.js index 7f6fce671a..d78f38ec65 100644 --- a/packages/ecmascript/plugin.js +++ b/packages/ecmascript/plugin.js @@ -1,7 +1,22 @@ +const reactRefreshPlugin = Npm.require('react-refresh/babel'); + Plugin.registerCompiler({ extensions: ['js', 'jsx', 'mjs'], }, function () { return new BabelCompiler({ react: true + }, (babelOptions, file) => { + // __hotState is set by the hot-module-reload package + const hotReloadingAvailable = !!global.__hotState + + // TODO: this should also use the reloadable checks done by hot-module-reload + const canReload = process.env.NODE_ENV !== 'production' && + file.getArch() === 'web.browser' && + !file.getPackageName() + + if (hotReloadingAvailable && canReload) { + babelOptions.plugins = babelOptions.plugins || [] + babelOptions.plugins.push(reactRefreshPlugin) + } }); }); diff --git a/packages/ecmascript/react-fast-refresh.js b/packages/ecmascript/react-fast-refresh.js new file mode 100644 index 0000000000..d49dde41a9 --- /dev/null +++ b/packages/ecmascript/react-fast-refresh.js @@ -0,0 +1,102 @@ +if (process.env.NODE_ENV !== 'production') { + const runtime = require('react-refresh/runtime'); + + // The react refresh babel plugin only registers functions. For react + // to update other types of exports (such as classes), we have to + // register them + function registerExportsForReactRefresh (moduleId, moduleExports) { + runtime.register(moduleExports, moduleId + ' %exports%'); + + if (moduleExports == null || typeof moduleExports !== 'object') { + // Exit if we can't iterate over exports. + return; + } + + for (var key in moduleExports) { + var desc = Object.getOwnPropertyDescriptor(moduleExports, key); + if (desc && desc.get) { + // Don't invoke getters as they may have side effects. + continue; + } + + var exportValue = moduleExports[key]; + var typeID = moduleId + ' %exports% ' + key; + runtime.register(exportValue, typeID); + } + }; + + // Modules that only export components become React Refresh boundaries. + function isReactRefreshBoundary (moduleExports) { + if (runtime.isLikelyComponentType(moduleExports)) { + return true; + } + if (moduleExports == null || typeof moduleExports !== 'object') { + // Exit if we can't iterate over exports. + return false; + } + + var hasExports = false; + var onlyExportComponents = true; + + for (var key in moduleExports) { + hasExports = true; + + var desc = Object.getOwnPropertyDescriptor(moduleExports, key); + if (desc && desc.get) { + // Don't invoke getters as they may have side effects. + return false; + } + + if (!runtime.isLikelyComponentType(moduleExports[key])) { + onlyExportComponents = false; + } + } + + return hasExports && onlyExportComponents; + }; + + runtime.injectIntoGlobalHook(window); + // window.$RefreshReg$ = () => { }; + // window.$RefreshSig$ = () => type => type; + + module.onRequire({ + before(module) { + if (module.loaded) { + // The module was already executed + return; + } + + var prevRefreshReg = window.$RefreshReg$; + var prevRefreshSig = window.$RefreshSig$; + + window.RefreshRuntime = runtime; + window.$RefreshReg$ = (type, _id) => { + // Note module.id is webpack-specific, this may vary in other bundlers + const fullId = module.id + ' ' + _id; + RefreshRuntime.register(type, fullId); + } + window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform; + + return { + prevRefreshReg, + prevRefreshSig + }; + }, + after(module, beforeData) { + // TODO: handle modules with errors + if (!beforeData) { + return; + } + + window.$RefreshReg$ = beforeData.prevRefreshReg; + window.$RefreshSig$ = beforeData.prevRefreshSig; + if (isReactRefreshBoundary(module.exports)) { + registerExportsForReactRefresh(module.id, module.exports); + module.hot.accept(); + + // TODO: debounce + runtime.performReactRefresh(); + } + } + }); +} diff --git a/packages/hot-module-reload/package.js b/packages/hot-module-reload/package.js index 18a38b3026..2de0338112 100644 --- a/packages/hot-module-reload/package.js +++ b/packages/hot-module-reload/package.js @@ -8,7 +8,7 @@ Package.describe({ Package.registerBuildPlugin({ name: 'hot-core', sources: ['plugin.js'], - use: ['ecmascript@0.14.3'], + use: ['modules'], npmDependencies: { ws: '7.2.5' }, @@ -16,7 +16,6 @@ Package.registerBuildPlugin({ Package.onUse(function (api) { api.use('isobuild:compiler-plugin@1.0.0'); - api.use('babel-compiler'); api.use('modules'); api.imply('modules-runtime-hot@0.12.0'); api.addFiles('./client.js', 'client'); diff --git a/packages/modules-runtime-hot/installer.js b/packages/modules-runtime-hot/installer.js index bb7fd91e60..a7135c20d7 100644 --- a/packages/modules-runtime-hot/installer.js +++ b/packages/modules-runtime-hot/installer.js @@ -73,6 +73,8 @@ makeInstaller = function (options) { this.childrenById = {}; } + var requireHooks = []; + // Used to keep module.prefetch promise resolutions well-ordered. var lastPrefetchPromise; @@ -205,6 +207,10 @@ makeInstaller = function (options) { return new Error("Cannot find module '" + id + "'"); } + Module.prototype.onRequire = function (callbacks) { + requireHooks.push(callbacks); + } + Module.prototype.resolve = function (id) { var file = fileResolve(filesByModuleId[this.id], id); if (file) return file.module.id; @@ -217,10 +223,28 @@ makeInstaller = function (options) { Module.prototype.require = function require(id) { var result = fileResolve(filesByModuleId[this.id], id); + if (result) { result.importedBy[this.id] = filesByModuleId[this.id]; + // Skip any hooks added while requiring this module + var hookCount = requireHooks.length; + var hookData = [] - return fileEvaluate(result, this); + for (var i = 0; i < hookCount; i++) { + if (requireHooks[i].before) { + hookData.push(requireHooks[i].before(result.module)); + } + } + + var moduleExports = fileEvaluate(result, this); + + for (var i = 0; i < hookCount; i++) { + if (requireHooks[i].after) { + requireHooks[i].after(result.module, hookData[i]); + } + } + + return moduleExports; } var error = makeMissingError(id); @@ -240,6 +264,14 @@ makeInstaller = function (options) { return root; } + Module.prototype._getModuleById = function (id) { + var result = fileResolve(filesByModuleId[this.id], id); + if (result) { + return result.module; + } + return null; + } + Module.prototype._recordImport = function (id) { var result = fileResolve(filesByModuleId[this.id], id); if (result) { From cb4e25fd290aa3dd247008e84f9d8a263818a16b Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 9 Jul 2020 05:35:18 +0200 Subject: [PATCH 038/326] Fix fast refresh error when HMR is not available --- packages/ecmascript/react-fast-refresh.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/ecmascript/react-fast-refresh.js b/packages/ecmascript/react-fast-refresh.js index d49dde41a9..e0df3a56c5 100644 --- a/packages/ecmascript/react-fast-refresh.js +++ b/packages/ecmascript/react-fast-refresh.js @@ -1,4 +1,4 @@ -if (process.env.NODE_ENV !== 'production') { +if (process.env.NODE_ENV !== 'production' && module.hot) { const runtime = require('react-refresh/runtime'); // The react refresh babel plugin only registers functions. For react @@ -56,8 +56,6 @@ if (process.env.NODE_ENV !== 'production') { }; runtime.injectIntoGlobalHook(window); - // window.$RefreshReg$ = () => { }; - // window.$RefreshSig$ = () => type => type; module.onRequire({ before(module) { From d83140d48b983af4ec59d4d6237621db105d9b06 Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 9 Jul 2020 22:13:32 +0200 Subject: [PATCH 039/326] Remove unnecessary changes --- README.md | 61 ----------------------- packages/ecmascript/react-fast-refresh.js | 1 - packages/modules-runtime-hot/README.md | 2 +- packages/modules-runtime-hot/modern.js | 5 +- tools/isobuild/bundler.js | 4 +- 5 files changed, 4 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 9ad8c2723d..7fa8cfb1be 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,3 @@ -### Hot Module Reload - -As an alternative to Hot Code Push in development, Hot Module Reload replaces modules in the bundle that were modified without reloading the page. - -Use: -``` - ../path/to/meteor --extra-packages hot-module-reload -``` - -#### API - -`module.hot.accept()` - The module will be rerun whenever it or any of its dependencies are modified - -`module.hot.decline()` - If the module or any of its dependencies are modified, hot code push will be used instead of HMR. - -`module.hot.dispose((data) => {})` - Adds a callback to run before the module is replaced. Any state that should be preserved can be stored in `data`. It will be available when the module is rerun at `module.hot.data`. - -`module.hot.data` - If the module was reloaded, will have any data set by dispose handlers. If the file was not reloaded, or there were no dispose handlers, it will be `null`. - -These should be wrapped by -``` -if (module.hot) { - // Use module.hot here -} -``` - -Minifiers are able to remove the if statement for production, though none of the common minifiers for Meteor currently do. - -#### Implementation details - -For now, the linker emits an event that packages, such as `hot-module-reload`, can listen to for an up to date list of files in an unibuild. Eventually this will be replaced with moving the HMR code from a build plugin into the meteor-tool. - -The `hot-module-reload` package compares the list of files between builds to identify what has changed. When a client tries to do a hot code push, the client will request changes over a websocket from the build plugin. If possible, it will use HMR to update the modules. Otherwise, it will let the page be reloaded using hot code push. - -The client uses a modified version of [install](https://www.npmjs.com/package/install) to allow replacing modules. - -#### Remaining tasks - -This is an early version, and there is still a long list of items to implement. A partial list is: - -- The linker cache is disabled in some situations for the web.browser architecture since bundles are compared as part of the linking process. We will need to instead store the necessary information in the linker cache, and allow prelinking only the parts that were modified. -- Support full webpack HMR API -- Look into allowing packages to replace the HMR api to allow experimentation -- Look into an api to allow packages to run code before and after each module is run. This could be used to implement react fast reload and for packages to automatically clean up after a file is modified. For example, this could be used to remove methods and publications previously added by a modified file. -- Better integration with the autoupdate and reload packages -- Require secret from client before sending changes over websocket -- Submit PRs for reify and install to add necessary apis and functionality for HMR -- Many other items are documented in the code with TODO comments - -HMR is only enabled for the `web.browser` architectures. These architectures are remaining: - -- web.browser.legacy -- web.cordova -- server architectures - -HMR is not supported in these situations. Hot code push will be used instead: - -- A package is modified -- A file is removed -- Files were modified that do not have a module id, are bare, are json data, or do not have meteorInstallOptions - # Meteor [![TravisCI Status](https://travis-ci.org/meteor/meteor.svg?branch=devel)](https://travis-ci.org/meteor/meteor) diff --git a/packages/ecmascript/react-fast-refresh.js b/packages/ecmascript/react-fast-refresh.js index e0df3a56c5..07d875ed20 100644 --- a/packages/ecmascript/react-fast-refresh.js +++ b/packages/ecmascript/react-fast-refresh.js @@ -69,7 +69,6 @@ if (process.env.NODE_ENV !== 'production' && module.hot) { window.RefreshRuntime = runtime; window.$RefreshReg$ = (type, _id) => { - // Note module.id is webpack-specific, this may vary in other bundlers const fullId = module.id + ' ' + _id; RefreshRuntime.register(type, fullId); } diff --git a/packages/modules-runtime-hot/README.md b/packages/modules-runtime-hot/README.md index e4dcb32b80..b73156b591 100644 --- a/packages/modules-runtime-hot/README.md +++ b/packages/modules-runtime-hot/README.md @@ -1,3 +1,3 @@ -# zodern:modules-runtime-hot +# modules-runtime-hot Patches modules-runtime to support HMR. diff --git a/packages/modules-runtime-hot/modern.js b/packages/modules-runtime-hot/modern.js index 02cad25b8e..3abfbed7d8 100644 --- a/packages/modules-runtime-hot/modern.js +++ b/packages/modules-runtime-hot/modern.js @@ -61,7 +61,6 @@ Object.defineProperty(meteorInstall.Module.prototype, "hot", { set() {} }); -// Due to changes in the comet meteor-tool, this package should be running -// after modules-runtime but before modules. We want modules to use -// our patched meteorInstall +// This package should be running after modules-runtime but before modules. +// We want modules to use our patched meteorInstall Package['modules-runtime'].meteorInstall = meteorInstall; diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 34915bfa90..5311ebbfd6 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1026,10 +1026,8 @@ class Target { add(usedUnibuild); delete onStack[usedUnibuild.id]; }; - let uses = [...unibuild.uses] - compiler.eachUsedUnibuild({ - dependencies: uses, + dependencies: unibuild.uses, arch: this.arch, isopackCache: isopackCache, skipUnordered: true, From cb895718465d42ca223be7b513fc178757d92319 Mon Sep 17 00:00:00 2001 From: Leonardo Venturini Date: Wed, 24 Jun 2020 20:45:12 -0400 Subject: [PATCH 040/326] add option to use dynamic origin on fetch requests --- packages/dynamic-import/client.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/dynamic-import/client.js b/packages/dynamic-import/client.js index e63f14d2d6..91eefc4e3c 100644 --- a/packages/dynamic-import/client.js +++ b/packages/dynamic-import/client.js @@ -116,7 +116,15 @@ exports.setSecretKey = function (key) { secretKey = key; }; -var fetchURL = require("./common.js").fetchURL; +const fetchURL = require("./common.js").fetchURL; + +function inIframe() { + try { + return window.self !== window.top; + } catch (e) { + return true; + } +} function fetchMissing(missingTree) { // If the hostname of the URL returned by Meteor.absoluteUrl differs @@ -127,7 +135,21 @@ function fetchMissing(missingTree) { // preflight OPTIONS request, which may add latency to the first dynamic // import() request, so it's a good idea for ROOT_URL to match // location.host if possible, though not strictly necessary. - var url = Meteor.absoluteUrl(fetchURL); + + let url = fetchURL; + + // Lo and behold! + const useDynamicOrigin = Meteor.settings + && Meteor.settings.public + && Meteor.settings.public.packages + && Meteor.settings.public.packages.dynamicImport + && Meteor.settings.public.packages.dynamicImport.useDynamicOrigin; + + if (useDynamicOrigin && location && !inIframe()) { + url = location.origin.concat(url); + } else { + url = Meteor.absoluteUrl(url); + } if (secretKey) { url += "key=" + secretKey; From 3cc48f6df663e73c718c07ced3ec386d93349292 Mon Sep 17 00:00:00 2001 From: Leonardo Venturini Date: Sun, 5 Jul 2020 13:27:19 -0400 Subject: [PATCH 041/326] add option to disable location origin on iframes --- packages/dynamic-import/client.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/dynamic-import/client.js b/packages/dynamic-import/client.js index 91eefc4e3c..61f0410775 100644 --- a/packages/dynamic-import/client.js +++ b/packages/dynamic-import/client.js @@ -2,6 +2,11 @@ var Module = module.constructor; var cache = require("./cache.js"); var meteorInstall = require("meteor/modules").meteorInstall; +var dynamicImportSettings = Meteor.settings + && Meteor.settings.public + && Meteor.settings.public.packages + && Meteor.settings.public.packages.dynamicImport; + // Call module.dynamicImport(id) to fetch a module and any/all of its // dependencies that have not already been fetched, and evaluate them as // soon as they arrive. This runtime API makes it very easy to implement @@ -116,7 +121,7 @@ exports.setSecretKey = function (key) { secretKey = key; }; -const fetchURL = require("./common.js").fetchURL; +var fetchURL = require("./common.js").fetchURL; function inIframe() { try { @@ -136,16 +141,15 @@ function fetchMissing(missingTree) { // import() request, so it's a good idea for ROOT_URL to match // location.host if possible, though not strictly necessary. - let url = fetchURL; + var url = fetchURL; - // Lo and behold! - const useDynamicOrigin = Meteor.settings - && Meteor.settings.public - && Meteor.settings.public.packages - && Meteor.settings.public.packages.dynamicImport - && Meteor.settings.public.packages.dynamicImport.useDynamicOrigin; + var useLocationOrigin = dynamicImportSettings + && dynamicImportSettings.useLocationOrigin; - if (useDynamicOrigin && location && !inIframe()) { + var disableLocationOriginIframe = dynamicImportSettings + && dynamicImportSettings.disableLocationOriginIframe; + + if (useLocationOrigin && location && !(disableLocationOriginIframe && inIframe())) { url = location.origin.concat(url); } else { url = Meteor.absoluteUrl(url); From 00ac165ccd110fad9daa2fa407e084039272cc55 Mon Sep 17 00:00:00 2001 From: Leonardo Venturini Date: Sun, 12 Jul 2020 13:23:09 -0400 Subject: [PATCH 042/326] implement feedback --- packages/dynamic-import/client.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/dynamic-import/client.js b/packages/dynamic-import/client.js index 61f0410775..fab4981168 100644 --- a/packages/dynamic-import/client.js +++ b/packages/dynamic-import/client.js @@ -5,7 +5,7 @@ var meteorInstall = require("meteor/modules").meteorInstall; var dynamicImportSettings = Meteor.settings && Meteor.settings.public && Meteor.settings.public.packages - && Meteor.settings.public.packages.dynamicImport; + && Meteor.settings.public.packages['dynamic-import'] || {}; // Call module.dynamicImport(id) to fetch a module and any/all of its // dependencies that have not already been fetched, and evaluate them as @@ -143,11 +143,9 @@ function fetchMissing(missingTree) { var url = fetchURL; - var useLocationOrigin = dynamicImportSettings - && dynamicImportSettings.useLocationOrigin; + var useLocationOrigin = dynamicImportSettings.useLocationOrigin; - var disableLocationOriginIframe = dynamicImportSettings - && dynamicImportSettings.disableLocationOriginIframe; + var disableLocationOriginIframe = dynamicImportSettings.disableLocationOriginIframe; if (useLocationOrigin && location && !(disableLocationOriginIframe && inIframe())) { url = location.origin.concat(url); From f6f7751e54348d9fe3ccb5929db01654a093a67a Mon Sep 17 00:00:00 2001 From: filipenevola Date: Tue, 11 Aug 2020 16:24:57 -0400 Subject: [PATCH 043/326] #11064 App broken on iOS Safari 9 due to SyntaxError - replaces the user to run Browserstack --- tools/tool-testing/clients/browserstack/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/tool-testing/clients/browserstack/index.js b/tools/tool-testing/clients/browserstack/index.js index 52637e075f..9491f92751 100644 --- a/tools/tool-testing/clients/browserstack/index.js +++ b/tools/tool-testing/clients/browserstack/index.js @@ -20,6 +20,8 @@ const NPM_DEPENDENCIES = { 'browserstack-local': '1.3.0', }; +const USER = 'meteor6QydZD'; + // A memoized key from BrowserStackClient._getBrowserStackKey. let browserStackKey; @@ -68,7 +70,7 @@ export default class BrowserStackClient extends Client { const capabilities = { // Authentication - 'browserstack.user': 'meteoropensource1', + 'browserstack.user': USER, 'browserstack.key': key, // Use the BrowserStackLocal tunnel, to allow BrowserStack to @@ -124,15 +126,18 @@ export default class BrowserStackClient extends Client { // Try to get the credentials from S3 with the s3cmd tool. const outputDir = pathJoin(mkdtemp(), "key"); + const browserstackKey = "s3://meteor-browserstack-keys/browserstack-key"; try { execFileSync("s3cmd", ["get", - "s3://meteor-browserstack-keys/browserstack-key", + browserstackKey, outputDir ]); return (browserStackKey = readFile(outputDir, "utf8").trim()); } catch (e) { // A failure is acceptable here; it was just a try. + console.warn(`Failed to load browserstack key from + ${browserstackKey}`, e); } return (browserStackKey = null); From 4d3830fcf445340c3aabff7aaaba333db130f23d Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sat, 29 Aug 2020 10:08:15 +0200 Subject: [PATCH 044/326] Improve comments about new email hook Improve comment docs about newly accessible email hook. I believe this will fix the issue with docs generation. --- packages/email/email.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/email/email.js b/packages/email/email.js index c9425114fa..ed46eada8b 100644 --- a/packages/email/email.js +++ b/packages/email/email.js @@ -99,8 +99,10 @@ var smtpSend = function (transport, mail) { }; var sendHooks = []; + /** - * Hook that runs before email is sent. + * @summary Hook that runs before email is sent. + * @locus Server * * @param f {function} receives the arguments to Email.send and should return true to go * ahead and send the email (or at least, try subsequent hooks), or From 8fcc22eea485bf4aebbb33c23ae3c44998795d4a Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 2 Sep 2020 23:21:09 +0200 Subject: [PATCH 045/326] Update Facebook Graph API to v8 --- History.md | 2 ++ packages/facebook-oauth/facebook_client.js | 2 +- packages/facebook-oauth/facebook_server.js | 4 ++-- packages/facebook-oauth/package.js | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index c59b1414ee..7fa5923d76 100644 --- a/History.md +++ b/History.md @@ -12,6 +12,8 @@ N/A * `--apollo` skeleton was missing client cache setup [PR #11146](https://github.com/meteor/meteor/pull/11146) +* Facebook OAuth has been updated to `1.8` now using Facebook GraphAPI v8. + ## v1.11, 2020-08-18 ### Breaking changes diff --git a/packages/facebook-oauth/facebook_client.js b/packages/facebook-oauth/facebook_client.js index de6241dd0f..06889ee735 100644 --- a/packages/facebook-oauth/facebook_client.js +++ b/packages/facebook-oauth/facebook_client.js @@ -31,7 +31,7 @@ Facebook.requestCredential = (options, credentialRequestCompleteCallback) => { const loginStyle = OAuth._loginStyle('facebook', config, options); let loginUrl = - `https://www.facebook.com/v5.0/dialog/oauth?client_id=${config.appId}` + + `https://www.facebook.com/v8.0/dialog/oauth?client_id=${config.appId}` + `&redirect_uri=${OAuth._redirectUri('facebook', config)}` + `&display=${display}&scope=${scope}` + `&state=${OAuth._stateParam(loginStyle, credentialToken, options && options.redirectUrl)}`; diff --git a/packages/facebook-oauth/facebook_server.js b/packages/facebook-oauth/facebook_server.js index f761bf52b4..73e8d5e21d 100644 --- a/packages/facebook-oauth/facebook_server.js +++ b/packages/facebook-oauth/facebook_server.js @@ -53,7 +53,7 @@ const getTokenResponse = query => { try { // Request an access token responseContent = HTTP.get( - "https://graph.facebook.com/v5.0/oauth/access_token", { + "https://graph.facebook.com/v8.0/oauth/access_token", { params: { client_id: config.appId, redirect_uri: OAuth._redirectUri('facebook', config), @@ -92,7 +92,7 @@ const getIdentity = (accessToken, fields) => { hmac.update(accessToken); try { - return HTTP.get("https://graph.facebook.com/v5.0/me", { + return HTTP.get("https://graph.facebook.com/v8.0/me", { params: { access_token: accessToken, appsecret_proof: hmac.digest('hex'), diff --git a/packages/facebook-oauth/package.js b/packages/facebook-oauth/package.js index 0ed950e060..4143f52d36 100644 --- a/packages/facebook-oauth/package.js +++ b/packages/facebook-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: "1.7.0" + version: "1.8.0" }); Package.onUse(api => { From 18a30c267ad2e560c057be1ec5d3317c4c31541e Mon Sep 17 00:00:00 2001 From: Bart Sturm Date: Sat, 5 Sep 2020 17:05:05 -0300 Subject: [PATCH 046/326] Allow android-webview-video-poster (fixes #8965) --- packages/boilerplate-generator/template-web.cordova.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/boilerplate-generator/template-web.cordova.js b/packages/boilerplate-generator/template-web.cordova.js index 236fb2e60f..591f3887de 100644 --- a/packages/boilerplate-generator/template-web.cordova.js +++ b/packages/boilerplate-generator/template-web.cordova.js @@ -29,7 +29,7 @@ export const headTemplate = ({ ' ', ' ', ' ', - ' ', + ' ', (headSections.length === 1) ? [cssBundle, headSections[0]].join('\n') From 5222c7aa7d3878203c5b4041677563637ea1fa49 Mon Sep 17 00:00:00 2001 From: zodern Date: Sat, 5 Sep 2020 20:25:04 -0500 Subject: [PATCH 047/326] Set default for react fast refresh globals --- packages/ecmascript/react-fast-refresh.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ecmascript/react-fast-refresh.js b/packages/ecmascript/react-fast-refresh.js index 07d875ed20..933b5800b3 100644 --- a/packages/ecmascript/react-fast-refresh.js +++ b/packages/ecmascript/react-fast-refresh.js @@ -57,6 +57,9 @@ if (process.env.NODE_ENV !== 'production' && module.hot) { runtime.injectIntoGlobalHook(window); + window.$RefreshReg$ = () => {}; + window.$RefreshSig$ = () => type => type; + module.onRequire({ before(module) { if (module.loaded) { From 8b5011dc25cf31be777abf3187cfb4f670b75f17 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 6 Sep 2020 15:43:48 +0200 Subject: [PATCH 048/326] HTTP package: update request to latest & deprecate the package I have updated request npm package to the latest and added debug warnings to the the http calls warning about the package's deprecation. Logging update PR should be probably merged before this. Fetch package also needs a proper documentation going forward. --- packages/http/README.md | 5 +++++ packages/http/httpcall_client.js | 1 + packages/http/httpcall_common.js | 14 ++++++++++++++ packages/http/package.js | 7 ++++--- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/http/README.md b/packages/http/README.md index 01164d04de..bfbbe7311f 100644 --- a/packages/http/README.md +++ b/packages/http/README.md @@ -2,6 +2,11 @@ [Source code of released version](https://github.com/meteor/meteor/tree/master/packages/http) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/http) *** +## Deprecated +This package has been deprecated in favor of the [fetch](https://atmospherejs.com/meteor/fetch) package and new web standards. + +## Docs + `HTTP` provides an HTTP request API on the client and server. To use these functions, add the HTTP package to your project with `$ meteor add http`. diff --git a/packages/http/httpcall_client.js b/packages/http/httpcall_client.js index a8aac475da..c3964ac349 100644 --- a/packages/http/httpcall_client.js +++ b/packages/http/httpcall_client.js @@ -6,6 +6,7 @@ var hasOwn = Object.prototype.hasOwnProperty; /** * @summary Perform an outbound HTTP request. * @locus Anywhere + * @deprecated * @param {String} method The [HTTP method](http://en.wikipedia.org/wiki/HTTP_method) to use, such as "`GET`", "`POST`", or "`HEAD`". * @param {String} url The URL to retrieve. * @param {Object} [options] diff --git a/packages/http/httpcall_common.js b/packages/http/httpcall_common.js index a955ecd3d0..2114b92257 100644 --- a/packages/http/httpcall_common.js +++ b/packages/http/httpcall_common.js @@ -1,6 +1,10 @@ var MAX_LENGTH = 500; // if you change this, also change the appropriate test var slice = Array.prototype.slice; +var deprecationMessage = function() { + Log.debug('The http package has been deprecated, please migrate to the fetch package and new web standards.'); +}; + exports.makeErrorByStatus = function(statusCode, content) { var message = "failed [" + statusCode + "]"; @@ -49,8 +53,10 @@ var HTTP = exports.HTTP = {}; * @param {Object} [callOptions] Options passed on to [`HTTP.call`](#http_call). * @param {Function} [asyncCallback] Callback that is called when the request is completed. Required on the client. * @locus Anywhere + * @deprecated */ HTTP.get = function (/* varargs */) { + deprecationMessage(); return HTTP.call.apply(this, ["GET"].concat(slice.call(arguments))); }; @@ -60,8 +66,10 @@ HTTP.get = function (/* varargs */) { * @param {Object} [callOptions] Options passed on to [`HTTP.call`](#http_call). * @param {Function} [asyncCallback] Callback that is called when the request is completed. Required on the client. * @locus Anywhere + * @deprecated */ HTTP.post = function (/* varargs */) { + deprecationMessage(); return HTTP.call.apply(this, ["POST"].concat(slice.call(arguments))); }; @@ -71,8 +79,10 @@ HTTP.post = function (/* varargs */) { * @param {Object} [callOptions] Options passed on to [`HTTP.call`](#http_call). * @param {Function} [asyncCallback] Callback that is called when the request is completed. Required on the client. * @locus Anywhere + * @deprecated */ HTTP.put = function (/* varargs */) { + deprecationMessage(); return HTTP.call.apply(this, ["PUT"].concat(slice.call(arguments))); }; @@ -82,8 +92,10 @@ HTTP.put = function (/* varargs */) { * @param {Object} [callOptions] Options passed on to [`HTTP.call`](#http_call). * @param {Function} [asyncCallback] Callback that is called when the request is completed. Required on the client. * @locus Anywhere + * @deprecated */ HTTP.del = function (/* varargs */) { + deprecationMessage(); return HTTP.call.apply(this, ["DELETE"].concat(slice.call(arguments))); }; @@ -93,7 +105,9 @@ HTTP.del = function (/* varargs */) { * @param {Object} [callOptions] Options passed on to [`HTTP.call`](#http_call). * @param {Function} [asyncCallback] Callback that is called when the request is completed. Required on the client. * @locus Anywhere + * @deprecated */ HTTP.patch = function (/* varargs */) { + deprecationMessage(); return HTTP.call.apply(this, ["PATCH"].concat(slice.call(arguments))); }; diff --git a/packages/http/package.js b/packages/http/package.js index a106c1c6c3..444d46a2d9 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,10 +1,10 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.4.2' + version: '1.4.3' }); Npm.depends({ - request: "2.88.0" + request: "2.88.2" }); Package.onUse(function (api) { @@ -13,7 +13,8 @@ Package.onUse(function (api) { // This package intentionally does not depend on ecmascript, so that // ecmascript and its dependencies can depend on http without creating // package dependency cycles. - 'modules' + 'modules', + 'logging' // For deprecation message ]); api.mainModule('httpcall_client.js', 'client'); From 6a273ac2513a518a631f88ae2de08a1a471e62c6 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 6 Sep 2020 15:53:26 +0200 Subject: [PATCH 049/326] Note on http deprecation in changelog --- History.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.md b/History.md index c59b1414ee..67bf0e1124 100644 --- a/History.md +++ b/History.md @@ -2,7 +2,7 @@ ### Breaking changes -N/A +* `http` package has been deprecated. Please start on migrating towards the [fetch](https://atmospherejs.com/meteor/fetch) package instead. ### Migration steps From 14368a947c2779caf8d187eac5af7cda828a6473 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 6 Sep 2020 17:19:07 +0200 Subject: [PATCH 050/326] Revert request update in http package --- packages/http/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/http/package.js b/packages/http/package.js index 444d46a2d9..9e1242b96d 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Npm.depends({ - request: "2.88.2" + request: "2.88.0" }); Package.onUse(function (api) { From 982193a48acf119e947070af9e313711b549ae63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Tue, 8 Sep 2020 22:39:31 +0200 Subject: [PATCH 051/326] tool list command added json flag to output packages in json format Implements feature request #406 by allowing to type a --json option and let the tree output be in JSON format. The entries consist of the package name as key and either String value (version number + top-level or expanded-above) or an Object with the following properties: - version (String) - always - local (Boolean) - only if true when package is built from source - weak (Boolean) - only if true - newerVersion (String) - only if exists - dependencies (Object) - only if > 0 and not all weak In order to also support a more detailed output, there is a --details option. If it's active, the following properties are added, too: - earliestCompatibleVersion (String) - always - debugOnly (Boolean) - only if true - prodOnly (Boolean) - only if true - testOnly (Boolean) - only if true - containsPlugins (Boolean) - only if true - lastUpdated (Date-String) - always - published (Date-String) - always --- tools/cli/commands-packages.js | 122 ++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 17 deletions(-) diff --git a/tools/cli/commands-packages.js b/tools/cli/commands-packages.js index fc82f4fc28..2e5a00d7d7 100644 --- a/tools/cli/commands-packages.js +++ b/tools/cli/commands-packages.js @@ -1139,7 +1139,9 @@ main.registerCommand({ requiresApp: true, options: { 'tree': { type: Boolean }, + 'json': { type: Boolean }, 'weak': { type: Boolean }, + 'details': { type: Boolean }, 'allow-incompatible-update': { type: Boolean } }, catalogRefresh: new catalog.Refresh.OnceAtStart({ ignoreErrors: true }) @@ -1154,8 +1156,17 @@ main.registerCommand({ // No need to display the PackageMapDelta here, since we're about to list all // of the packages anyway! - if (options['tree']) { + const showJson = !!options['json']; + const showTree = !!options['tree']; + + if (showJson && showTree) { + throw new Error('can only run for one option,found --json and --tree'); + } + + if (showTree || showJson) { + const jsonOut = showJson && {}; const showWeak = !!options['weak']; + const showDetails = !!options['details']; // Load package details of all used packages (inc. dependencies) const packageDetails = new Map; projectContext.packageMap.eachPackage(function (name, info) { @@ -1172,7 +1183,7 @@ main.registerCommand({ const dontExpand = new Set(topLevelSet.values()); // Recursive function that outputs each package - const printPackage = function (packageToPrint, isWeak, indent1, indent2) { + const printPackage = function ({ packageToPrint, isWeak, indent1, indent2, parent }) { const packageName = packageToPrint.packageName; const depsObj = packageToPrint.dependencies || {}; let deps = Object.keys(depsObj).sort(); @@ -1192,16 +1203,60 @@ main.registerCommand({ const expandedAlready = (deps.length > 0 && dontExpand.has(packageName)); const shouldExpand = (deps.length > 0 && !expandedAlready && !isWeak); - if (indent1 !== '') { - indent1 += (shouldExpand ? '┬' : '─') + ' '; + + // with normal tree display we send the current info to stdout + if (showTree) { + if (indent1 !== '') { + indent1 += (shouldExpand ? '┬' : '─') + ' '; + } + + let suffix = (isWeak ? '[weak]' : ''); + if (expandedAlready) { + suffix += topLevelSet.has(packageName) ? ' (top level)' : ' (expanded above)'; + } + + Console.info(indent1 + packageName + '@' + packageToPrint.version + suffix); } - let suffix = (isWeak ? '[weak]' : ''); - if (expandedAlready) { - suffix += topLevelSet.has(packageName) ? ' (top level)' : ' (expanded above)'; + // with json we add detailed info to the json object + if (showJson) { + if (expandedAlready) { + // on expanded packages we only want to add minimal information to + // keep the json file compact, so we make the value a stirng + if (topLevelSet.has(packageName)) { + parent[packageName] = `${packageToPrint.version}-(top-level)` + } else { + parent[packageName] = `${packageToPrint.version}-(expanded-above)` + } + } else { + // on non-expanded packages we want detailed information but we + // omit falsy values in order to keep the output minimal and readable + const entry = {}; + parent[packageName] = entry; + + Object.entries({ + version: packageToPrint.version, + weak: isWeak, + newerVersion: getNewerVersion(packageName, packageToPrint.version, catalog.official), + earliestCompatibleVersion: showDetails && packageToPrint.earliestCompatibleVersion, + debugOnly: showDetails && packageToPrint.debugOnly, + prodOnly: showDetails && packageToPrint.prodOnly, + testOnly: showDetails && packageToPrint.testOnly, + containsPlugins: showDetails && packageToPrint.containsPlugins, + lastUpdated: showDetails && packageToPrint.lastUpdated, + published: showDetails && packageToPrint.published, + }).forEach(([key, value]) => { + if (value) { + entry[key] = value; + } + }); + + if (shouldExpand) { + entry.dependencies = {}; + } + } } - Console.info(indent1 + packageName + '@' + packageToPrint.version + suffix); if (shouldExpand) { dontExpand.add(packageName); deps.forEach((dep, index) => { @@ -1209,14 +1264,37 @@ main.registerCommand({ const weakRef = references.length > 0 && references.every(r => r.weak); const last = ((index + 1) === deps.length); const child = packageDetails.get(dep); - const newIndent1 = indent2 + (last ? '└─' : '├─'); - const newIndent2 = indent2 + (last ? ' ' : '│ '); - if (child) { - printPackage(child, weakRef, newIndent1, newIndent2); - } else if (weakRef) { - Console.info(newIndent1 + '─ ' + dep + '[weak] package skipped'); - } else { - Console.info(newIndent1 + '─ ' + dep + ' missing?'); + + // with normal tree display we increase indentation + if (showTree) { + const newIndent1 = indent2 + (last ? '└─' : '├─'); + const newIndent2 = indent2 + (last ? ' ' : '│ '); + if (child) { + printPackage({ + packageToPrint: child, + isWeak: weakRef, + indent1: newIndent1, + indent2: newIndent2 + }); + } else if (weakRef) { + Console.info(newIndent1 + '─ ' + dep + '[weak] package skipped'); + } else { + Console.info(newIndent1 + '─ ' + dep + ' missing?'); + } + } + + if (showJson) { + if (child) { + printPackage({ + packageToPrint: child, + isWeak: weakRef, + parent: parent[packageName].dependencies + }); + } else if (weakRef) { + parent[packageName].dependencies[dep] = '[weak]-package-skipped'; + } else { + parent[packageName].dependencies = 'missing?'; + } } }); } @@ -1228,10 +1306,20 @@ main.registerCommand({ if (topLevelPackage) { // Force top level packages to be expanded dontExpand.delete(topLevelPackage.packageName); - printPackage(topLevelPackage, false, '', ''); + printPackage({ + packageToPrint: topLevelPackage, + isWeak: false, + indent1: '', + indent2: '', + parent: jsonOut + }) } }); + if (showJson) { + Console.info(JSON.stringify(jsonOut)) + } + return 0; } From 6803b50defdfcd7bce7ab97fb8fc10e279c7655a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Tue, 8 Sep 2020 23:05:37 +0200 Subject: [PATCH 052/326] tools list command added mising local entry to pacakge entry in json mode --- tools/cli/commands-packages.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cli/commands-packages.js b/tools/cli/commands-packages.js index 2e5a00d7d7..ff78be79e3 100644 --- a/tools/cli/commands-packages.js +++ b/tools/cli/commands-packages.js @@ -1234,8 +1234,11 @@ main.registerCommand({ const entry = {}; parent[packageName] = entry; + const mapInfo = projectContext.packageMap.getInfo(packageName); + Object.entries({ version: packageToPrint.version, + local: mapInfo && mapInfo.kind === 'local', weak: isWeak, newerVersion: getNewerVersion(packageName, packageToPrint.version, catalog.official), earliestCompatibleVersion: showDetails && packageToPrint.earliestCompatibleVersion, From 095f1523ca8a3bbb906fb58823d9f04cfb3edcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Tue, 8 Sep 2020 23:06:29 +0200 Subject: [PATCH 053/326] tools list command update help text with json flag --- tools/cli/help.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cli/help.txt b/tools/cli/help.txt index a0618387e0..c1daf8e276 100644 --- a/tools/cli/help.txt +++ b/tools/cli/help.txt @@ -289,13 +289,17 @@ Options: List the packages explicitly used by your project. Usage: meteor list meteor list --tree [--weak] + meteor list --json [--weak] [--details] Lists the packages that you have explicitly added to your project. Transitive dependencies are not listed unless you use the --tree option, which outputs a tree showing how packages are referenced. +Use the --json option to output the tree in JSON format. + Options: --weak Show weakly referenced dependencies in the tree. + --details Adds more package details to the JSON output. >>> add-platform Add a platform to this project. From a1648ecf735ede02998b11cf526eebcf83cce848 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 9 Sep 2020 12:35:35 -0400 Subject: [PATCH 054/326] Bump boilerplate-generator package version to 1.7.1 --- packages/boilerplate-generator/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index d370abb27a..83fc175361 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '1.7.0' + version: '1.7.1' }); Npm.depends({ From e9f16f1c6275a4f2fad59b07d30c3ffda722a490 Mon Sep 17 00:00:00 2001 From: afrokick Date: Thu, 10 Sep 2020 21:20:24 +0300 Subject: [PATCH 055/326] update postcss to 4.0.32 --- .../.npm/package/npm-shrinkwrap.json | 128 ++++++------------ packages/minifier-css/package.js | 4 +- 2 files changed, 46 insertions(+), 86 deletions(-) diff --git a/packages/minifier-css/.npm/package/npm-shrinkwrap.json b/packages/minifier-css/.npm/package/npm-shrinkwrap.json index 0cf06de439..4fee0a023f 100644 --- a/packages/minifier-css/.npm/package/npm-shrinkwrap.json +++ b/packages/minifier-css/.npm/package/npm-shrinkwrap.json @@ -27,9 +27,9 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==" + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", + "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==" }, "caller-callsite": { "version": "2.0.0", @@ -52,9 +52,9 @@ "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==" }, "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==" + "version": "1.0.30001125", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001125.tgz", + "integrity": "sha512-9f+r7BW8Qli917mU3j0fUaTweT3f3vnX/Lcs+1C73V+RADmFme+Ih0Br8vONQi3X0lseOe6ZHfsZLCA8MSjxUA==" }, "chalk": { "version": "2.4.2", @@ -124,9 +124,9 @@ "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==" }, "css-what": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", - "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", + "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==" }, "cssesc": { "version": "3.0.0", @@ -208,19 +208,19 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==" }, "dot-prop": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", - "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==" }, "electron-to-chromium": { - "version": "1.3.453", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.453.tgz", - "integrity": "sha512-IQbCfjJR0NDDn/+vojTlq7fPSREcALtF8M1n01gw7nQghCtfFYrJ2dfhsp8APr8bANoFC8vRTFVXMOGpT0eetw==" + "version": "1.3.564", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.564.tgz", + "integrity": "sha512-fNaYN3EtKQWLQsrKXui8mzcryJXuA0LbCLoizeX6oayG2emBaS5MauKjCPAvc29NEY4FpLHIUWiP+Y0Bfrs5dg==" }, "entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", - "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" }, "error-ex": { "version": "1.3.2", @@ -228,15 +228,20 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==" }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==" + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==" }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==" }, + "escalade": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -247,11 +252,6 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=" - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -313,9 +313,9 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", + "integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==" }, "is-color-stop": { "version": "1.1.0", @@ -338,9 +338,9 @@ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==" }, "is-resolvable": { "version": "1.1.0", @@ -367,11 +367,6 @@ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=" - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -398,9 +393,9 @@ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" }, "node-releases": { - "version": "1.1.57", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.57.tgz", - "integrity": "sha512-ZQmnWS7adi61A9JsllJ2gdj2PauElcjnOwTp2O011iGzoakTxUsDGSe+6vD7wXbKdqhSFymC0OSx35aAMhrSdw==" + "version": "1.1.61", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz", + "integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==" }, "normalize-url": { "version": "3.3.0", @@ -413,9 +408,9 @@ "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==" }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" }, "object-keys": { "version": "1.1.1", @@ -437,45 +432,20 @@ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==" }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==" - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=" - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=" }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=" - }, "postcss": { - "version": "7.0.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.31.tgz", - "integrity": "sha512-a937VDHE1ftkjk+8/7nj/mrjtmkn69xxzJgRETXdAUU+IgOYPQNJF17haGWbeDxSyk++HA14UA98FurvPyBJOA==" + "version": "7.0.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", + "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==" }, "postcss-calc": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz", - "integrity": "sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ==" + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.4.tgz", + "integrity": "sha512-0I79VRAd1UTkaHzY9w83P39YGO/M3bG7/tNLrHGEunBolfoGM0hSjrGvjoeaj0JE/zIw5GsI2KZ0UwDJqv5hjw==" }, "postcss-colormin": { "version": "4.0.3", @@ -807,16 +777,6 @@ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==" }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==" - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==" - }, "string.prototype.trimstart": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 3cf0016536..eec87a69bc 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,10 +1,10 @@ Package.describe({ summary: 'CSS minifier', - version: '1.5.2' + version: '1.5.3' }); Npm.depends({ - postcss: '7.0.31', + postcss: '7.0.32', cssnano: '4.1.10' }); From 3f1d13d64d86eb11c473fff144b1b9c1735fa6c0 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Thu, 10 Sep 2020 16:16:25 -0400 Subject: [PATCH 056/326] Ignores .npm of minifier-css --- packages/minifier-css/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/minifier-css/.gitignore b/packages/minifier-css/.gitignore index 677a6fc263..c01644335c 100644 --- a/packages/minifier-css/.gitignore +++ b/packages/minifier-css/.gitignore @@ -1 +1,2 @@ .build* +.npm From db0781452fc0a5b1fff4b6d2215e7d8d961e9dda Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 10 Sep 2020 21:09:34 -0500 Subject: [PATCH 057/326] bump mongodb package see https://github.com/mongodb/node-mongodb-native/releases/tag/v3.6.2 expecially: https://github.com/advisories/GHSA-pp7h-53gx-mx7r --- packages/npm-mongo/package.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 808137e6ad..4b88f4acf0 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,12 +3,12 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.8.0", + version: "3.8.1", documentation: null }); Npm.depends({ - mongodb: "3.6.0" + mongodb: "3.6.2" }); Package.onUse(function (api) { From 9cf20cae431b88738c72b18f2773cf236186d3ec Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 11 Sep 2020 06:34:50 -0400 Subject: [PATCH 058/326] Updates npm-shrinkwrap.json for npm-mongo --- .../npm-mongo/.npm/package/npm-shrinkwrap.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json index e93d4b2a87..cb91a9ef22 100644 --- a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json +++ b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json @@ -2,14 +2,14 @@ "lockfileVersion": 1, "dependencies": { "bl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", - "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==" }, "bson": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" }, "core-util-is": { "version": "1.0.2", @@ -37,9 +37,9 @@ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "mongodb": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.0.tgz", - "integrity": "sha512-/XWWub1mHZVoqEsUppE0GV7u9kanLvHxho6EvBxQbShXTKYF9trhZC2NzbulRGeG7xMJHD8IOWRcdKx5LPjAjQ==" + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.2.tgz", + "integrity": "sha512-sSZOb04w3HcnrrXC82NEh/YGCmBuRgR+C1hZgmmv4L6dBz4BkRse6Y8/q/neXer9i95fKUBbFi4KgeceXmbsOA==" }, "process-nextick-args": { "version": "2.0.1", From b9c950d72550d9913f42e13fdc77da644d11a01f Mon Sep 17 00:00:00 2001 From: afrokick Date: Fri, 11 Sep 2020 13:41:33 +0300 Subject: [PATCH 059/326] Bump version to use the latest version of minifier-css --- packages/standard-minifier-css/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 5a58798bbd..5556b5e9ba 100644 --- a/packages/standard-minifier-css/package.js +++ b/packages/standard-minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-css', - version: '1.6.0', + version: '1.6.1', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); From 8dd90e560a325255a351c082a6f148a9d6be2902 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 11 Sep 2020 07:57:49 -0400 Subject: [PATCH 060/326] Bump standard-minifier-css package version to 1.6.1 to update minifier-css@1.5.3 dependency --- packages/standard-minifier-css/package.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 5556b5e9ba..bbf66e0a07 100644 --- a/packages/standard-minifier-css/package.js +++ b/packages/standard-minifier-css/package.js @@ -21,5 +21,6 @@ Package.registerBuildPlugin({ }); Package.onUse(function(api) { + api.use('minifier-css@1.5.3'); api.use('isobuild:minifier-plugin@1.0.0'); }); From d2deab7b2486cea1388f59048a8f448886a2b16c Mon Sep 17 00:00:00 2001 From: Bart Sturm Date: Sat, 12 Sep 2020 11:44:21 -0300 Subject: [PATCH 061/326] Allow setting nonce in browser-policy-content --- packages/browser-policy-content/browser-policy-content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/browser-policy-content/browser-policy-content.js b/packages/browser-policy-content/browser-policy-content.js index fd7e829e7d..4d93d0fea5 100644 --- a/packages/browser-policy-content/browser-policy-content.js +++ b/packages/browser-policy-content/browser-policy-content.js @@ -106,7 +106,7 @@ var addSourceForDirective = function (directive, src) { var toAdd = []; //Only add single quotes to CSP2 script digests - if (/^(sha(256|384|512)-)/i.test(src)) { + if (/^(sha(256|384|512)|nonce)-/i.test(src)) { toAdd.push("'" + src + "'"); } else { src = src.toLowerCase(); From cb062d7e7b30f912856b1e1d6946a5977b3794b8 Mon Sep 17 00:00:00 2001 From: Bart Sturm Date: Sat, 12 Sep 2020 13:20:47 -0300 Subject: [PATCH 062/326] Add tests for nonce and sha --- .../browser-policy/browser-policy-test.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/browser-policy/browser-policy-test.js b/packages/browser-policy/browser-policy-test.js index 19ca95c292..d898f46f6d 100644 --- a/packages/browser-policy/browser-policy-test.js +++ b/packages/browser-policy/browser-policy-test.js @@ -143,6 +143,30 @@ Tinytest.add("browser-policy - csp", function (test) { "default-src 'none'; frame-src https://foo.com; " +
 "object-src http://foo.com https://foo.com; " +
 "frame-ancestors https://foo.com;")); + + // CSP2 options: nonce + BrowserPolicy.content.disallowAll(); + BrowserPolicy.content.allowScriptOrigin('nonce-2gB8y5CrknnK2dgQk'); + test.isTrue(cspsEqual(BrowserPolicy.content._constructCsp(), + "default-src 'none'; script-src 'nonce-2gB8y5CrknnK2dgQk';")); + + // CSP2 options: sha256 + BrowserPolicy.content.disallowAll(); + BrowserPolicy.content.allowScriptOrigin('sha256-KFQx9ysdKgqbAPoY7'); + test.isTrue(cspsEqual(BrowserPolicy.content._constructCsp(), + "default-src 'none'; script-src 'sha256-KFQx9ysdKgqbAPoY7';")); + + // CSP2 options: sha384 + BrowserPolicy.content.disallowAll(); + BrowserPolicy.content.allowScriptOrigin('sha384-mChdKgyBF83ewvbTy'); + test.isTrue(cspsEqual(BrowserPolicy.content._constructCsp(), + "default-src 'none'; script-src 'sha384-mChdKgyBF83ewvbTy';")); + + // CSP2 options: sha512 + BrowserPolicy.content.disallowAll(); + BrowserPolicy.content.allowScriptOrigin('sha512-A8x946bPwaak2LToB'); + test.isTrue(cspsEqual(BrowserPolicy.content._constructCsp(), + "default-src 'none'; script-src 'sha512-A8x946bPwaak2LToB';")); }); Tinytest.add("browser-policy - x-frame-options", function (test) { From 13d2ab1677cdae99fec9f9b7a7e0eaa795eba542 Mon Sep 17 00:00:00 2001 From: Bart Sturm Date: Sat, 12 Sep 2020 15:13:58 -0300 Subject: [PATCH 063/326] Fix double login on enter in accounts-ui-unstyled --- packages/accounts-ui-unstyled/login_buttons_dropdown.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/accounts-ui-unstyled/login_buttons_dropdown.js b/packages/accounts-ui-unstyled/login_buttons_dropdown.js index 3ec72f0dd8..abdd1c4165 100644 --- a/packages/accounts-ui-unstyled/login_buttons_dropdown.js +++ b/packages/accounts-ui-unstyled/login_buttons_dropdown.js @@ -335,10 +335,6 @@ Template._loginButtonsLoggedOutDropdown.events({ if (password !== null) document.getElementById('login-password').value = password; }, - 'keypress #login-username, keypress #login-email, keypress #login-username-or-email, keypress #login-password, keypress #login-password-again': event => { - if (event.keyCode === 13) - loginOrSignup(); - } }); Template._loginButtonsLoggedOutDropdown.helpers({ From d33ec13a87e6b6d29369d9a61ea94b21193bb030 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 9 Sep 2020 09:28:54 +0200 Subject: [PATCH 064/326] Update dependencies & improvements for Apollo skeleton All dependencies accross skeletons have been updated to the latest versions. Apollo skeleton has been updated with improved cache and authorization technique. --- .../skel-apollo/imports/ui/App.jsx | 24 +++++++++++-------- tools/static-assets/skel-apollo/package.json | 8 +++---- .../skel-apollo/server/apollo.js | 8 +------ tools/static-assets/skel-bare/package.json | 2 +- tools/static-assets/skel-full/package.json | 2 +- tools/static-assets/skel-minimal/package.json | 2 +- tools/static-assets/skel-react/package.json | 2 +- .../skel-typescript/package.json | 10 ++++---- tools/static-assets/skel-vue/package.json | 4 ++-- tools/static-assets/skel/package.json | 2 +- 10 files changed, 31 insertions(+), 33 deletions(-) diff --git a/tools/static-assets/skel-apollo/imports/ui/App.jsx b/tools/static-assets/skel-apollo/imports/ui/App.jsx index 4b1621d576..7ebf0cb3a0 100644 --- a/tools/static-assets/skel-apollo/imports/ui/App.jsx +++ b/tools/static-assets/skel-apollo/imports/ui/App.jsx @@ -1,19 +1,23 @@ import React from 'react'; -import { ApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client'; +import { InMemoryCache, ApolloProvider, ApolloClient, ApolloLink } from '@apollo/client'; +import { BatchHttpLink } from '@apollo/client/link/batch-http' +// import { MeteorAccountsLink } from 'meteor/apollo' import { Hello } from './Hello.jsx'; import { Info } from './Info.jsx'; +const cache = new InMemoryCache().restore(window.__APOLLO_STATE__); + +const link = ApolloLink.from([ + // MeteorAccountsLink(), + new BatchHttpLink({ + uri: '/graphql' + }) +]); + const client = new ApolloClient({ uri: '/graphql', - cache: new InMemoryCache(), - /* Uncomment this for accounts use - request: operation => - operation.setContext(() => ({ - headers: { - authorization: Accounts._storedLoginToken() - } - })) - */ + cache, + link, }); export const App = () => ( diff --git a/tools/static-assets/skel-apollo/package.json b/tools/static-assets/skel-apollo/package.json index 3954108e95..7570e30d88 100644 --- a/tools/static-assets/skel-apollo/package.json +++ b/tools/static-assets/skel-apollo/package.json @@ -8,12 +8,12 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@apollo/client": "^3.1.1", - "@babel/runtime": "^7.10.5", + "@apollo/client": "^3.1.5", + "@babel/runtime": "^7.11.2", "apollo-boost": "^0.4.9", - "apollo-server-express": "^2.16.1", + "apollo-server-express": "^2.17.0", "graphql": "^15.3.0", - "meteor-node-stubs": "^1.0.0", + "meteor-node-stubs": "^1.0.1", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/tools/static-assets/skel-apollo/server/apollo.js b/tools/static-assets/skel-apollo/server/apollo.js index fa40ecdaa2..77b5ac4b9f 100644 --- a/tools/static-assets/skel-apollo/server/apollo.js +++ b/tools/static-assets/skel-apollo/server/apollo.js @@ -21,11 +21,5 @@ const server = new ApolloServer({ server.applyMiddleware({ app: WebApp.connectHandlers, - path: '/graphql' -}); - -WebApp.connectHandlers.use('/graphql', (req, res) => { - if (req.method === 'GET') { - res.end(); - } + cors: true }); diff --git a/tools/static-assets/skel-bare/package.json b/tools/static-assets/skel-bare/package.json index 5f95e477c6..2b970219fd 100644 --- a/tools/static-assets/skel-bare/package.json +++ b/tools/static-assets/skel-bare/package.json @@ -5,7 +5,7 @@ "start": "meteor run" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "meteor-node-stubs": "^1.0.1" } } diff --git a/tools/static-assets/skel-full/package.json b/tools/static-assets/skel-full/package.json index b942252d79..6a7d7a5c0a 100644 --- a/tools/static-assets/skel-full/package.json +++ b/tools/static-assets/skel-full/package.json @@ -6,7 +6,7 @@ "test": "meteor test --once --driver-package meteortesting:mocha" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "jquery": "^3.5.1", "meteor-node-stubs": "^1.0.1" }, diff --git a/tools/static-assets/skel-minimal/package.json b/tools/static-assets/skel-minimal/package.json index e4ab0c3f33..ab8fbad718 100644 --- a/tools/static-assets/skel-minimal/package.json +++ b/tools/static-assets/skel-minimal/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "meteor-node-stubs": "^1.0.1" }, "meteor": { diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index e5eb581cb5..e3b8f06f69 100644 --- a/tools/static-assets/skel-react/package.json +++ b/tools/static-assets/skel-react/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "meteor-node-stubs": "^1.0.1", "react": "^16.13.1", "react-dom": "^16.13.1" diff --git a/tools/static-assets/skel-typescript/package.json b/tools/static-assets/skel-typescript/package.json index 9fbd619ca3..976e5c8d12 100644 --- a/tools/static-assets/skel-typescript/package.json +++ b/tools/static-assets/skel-typescript/package.json @@ -8,17 +8,17 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "meteor-node-stubs": "^1.0.1", "react": "^16.13.1", "react-dom": "^16.13.1" }, "devDependencies": { - "@types/meteor": "^1.4.48", - "@types/mocha": "^8.0.0", - "@types/react": "^16.9.43", + "@types/meteor": "^1.4.49", + "@types/mocha": "^8.0.3", + "@types/react": "^16.9.49", "@types/react-dom": "^16.9.8", - "typescript": "^3.9.7" + "typescript": "^4.0.2" }, "meteor": { "mainModule": { diff --git a/tools/static-assets/skel-vue/package.json b/tools/static-assets/skel-vue/package.json index d7fee7c5a1..501baa7d13 100644 --- a/tools/static-assets/skel-vue/package.json +++ b/tools/static-assets/skel-vue/package.json @@ -8,9 +8,9 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.10.5", + "@babel/runtime": "^7.11.2", "meteor-node-stubs": "^1.0.1", - "vue": "^2.6.11", + "vue": "^2.6.12", "vue-meteor-tracker": "^2.0.0-beta.5" }, "meteor": { diff --git a/tools/static-assets/skel/package.json b/tools/static-assets/skel/package.json index f8f2793e57..61bcd56b35 100644 --- a/tools/static-assets/skel/package.json +++ b/tools/static-assets/skel/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.10.4", + "@babel/runtime": "^7.11.2", "jquery": "^3.5.1", "meteor-node-stubs": "^1.0.1" }, From bba0a0661f8b74cc8e1863851a913b3040ee494d Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 13 Sep 2020 11:00:40 +0200 Subject: [PATCH 065/326] Add changelog for skeleton dependencies updates --- History.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.md b/History.md index c59b1414ee..76aec5e13e 100644 --- a/History.md +++ b/History.md @@ -12,6 +12,8 @@ N/A * `--apollo` skeleton was missing client cache setup [PR #11146](https://github.com/meteor/meteor/pull/11146) +* All skeletons got their `npm` dependencies updated. [PR #11172](https://github.com/meteor/meteor/pull/11172) + ## v1.11, 2020-08-18 ### Breaking changes From 75d7c6990b23c922c8db12e95495c5973c453a20 Mon Sep 17 00:00:00 2001 From: Bart Sturm Date: Sun, 13 Sep 2020 08:24:15 -0300 Subject: [PATCH 066/326] Fix refresh on using forgotPassword --- packages/accounts-ui-unstyled/login_buttons_dropdown.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/accounts-ui-unstyled/login_buttons_dropdown.js b/packages/accounts-ui-unstyled/login_buttons_dropdown.js index abdd1c4165..2594d3358e 100644 --- a/packages/accounts-ui-unstyled/login_buttons_dropdown.js +++ b/packages/accounts-ui-unstyled/login_buttons_dropdown.js @@ -238,8 +238,10 @@ Template._loginButtonsLoggedOutDropdown.events({ }, 'keypress #forgot-password-email': event => { - if (event.keyCode === 13) + if (event.keyCode === 13) { + event.preventDefault(); forgotPassword(); + } }, 'click #login-buttons-forgot-password': forgotPassword, From 230662859884b3d517e72a6ce46a5f7113ed7955 Mon Sep 17 00:00:00 2001 From: Chris Visser <2496739+chris-visser@users.noreply.github.com> Date: Sun, 13 Sep 2020 20:48:32 +0200 Subject: [PATCH 067/326] Fixes #11153 to proper vue skel folder structure --- tools/static-assets/skel-vue/{src => client}/main.html | 0 .../skel-vue/{src/client.js => client/main.js} | 4 ++-- .../skel-vue/{src => imports/api}/collections/Links.js | 0 .../{src => imports/api}/collections/Links.tests.js | 2 +- .../static-assets/skel-vue/{src => imports/api}/fixtures.js | 0 .../skel-vue/{src => imports/api}/methods/createLink.js | 0 .../{src => imports/api}/methods/createLink.tests.js | 0 .../skel-vue/{src => imports/api}/methods/index.js | 0 .../skel-vue/{src => imports/api}/publications/index.js | 0 .../skel-vue/{src => imports/api}/publications/links.js | 0 .../{src => imports/api}/publications/links.tests.js | 0 tools/static-assets/skel-vue/{src => imports/ui}/App.vue | 0 .../skel-vue/{src => imports/ui}/components/Hello.vue | 0 .../skel-vue/{src => imports/ui}/components/Info.vue | 2 +- tools/static-assets/skel-vue/{src => imports/ui}/plugins.js | 0 tools/static-assets/skel-vue/package.json | 6 +++--- tools/static-assets/skel-vue/server/main.js | 3 +++ tools/static-assets/skel-vue/src/server.js | 3 --- 18 files changed, 10 insertions(+), 10 deletions(-) rename tools/static-assets/skel-vue/{src => client}/main.html (100%) rename tools/static-assets/skel-vue/{src/client.js => client/main.js} (53%) rename tools/static-assets/skel-vue/{src => imports/api}/collections/Links.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/collections/Links.tests.js (95%) rename tools/static-assets/skel-vue/{src => imports/api}/fixtures.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/methods/createLink.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/methods/createLink.tests.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/methods/index.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/publications/index.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/publications/links.js (100%) rename tools/static-assets/skel-vue/{src => imports/api}/publications/links.tests.js (100%) rename tools/static-assets/skel-vue/{src => imports/ui}/App.vue (100%) rename tools/static-assets/skel-vue/{src => imports/ui}/components/Hello.vue (100%) rename tools/static-assets/skel-vue/{src => imports/ui}/components/Info.vue (95%) rename tools/static-assets/skel-vue/{src => imports/ui}/plugins.js (100%) create mode 100644 tools/static-assets/skel-vue/server/main.js delete mode 100644 tools/static-assets/skel-vue/src/server.js diff --git a/tools/static-assets/skel-vue/src/main.html b/tools/static-assets/skel-vue/client/main.html similarity index 100% rename from tools/static-assets/skel-vue/src/main.html rename to tools/static-assets/skel-vue/client/main.html diff --git a/tools/static-assets/skel-vue/src/client.js b/tools/static-assets/skel-vue/client/main.js similarity index 53% rename from tools/static-assets/skel-vue/src/client.js rename to tools/static-assets/skel-vue/client/main.js index 835acaec7b..665c6aa1b1 100644 --- a/tools/static-assets/skel-vue/src/client.js +++ b/tools/static-assets/skel-vue/client/main.js @@ -1,8 +1,8 @@ import Vue from 'vue' -import './plugins' +import '../imports/ui/plugins' -import App from './App.vue' +import App from '../imports/ui/App.vue' Meteor.startup(() => { new Vue({ diff --git a/tools/static-assets/skel-vue/src/collections/Links.js b/tools/static-assets/skel-vue/imports/api/collections/Links.js similarity index 100% rename from tools/static-assets/skel-vue/src/collections/Links.js rename to tools/static-assets/skel-vue/imports/api/collections/Links.js diff --git a/tools/static-assets/skel-vue/src/collections/Links.tests.js b/tools/static-assets/skel-vue/imports/api/collections/Links.tests.js similarity index 95% rename from tools/static-assets/skel-vue/src/collections/Links.tests.js rename to tools/static-assets/skel-vue/imports/api/collections/Links.tests.js index 0bc5b437dd..ce178512d0 100644 --- a/tools/static-assets/skel-vue/src/collections/Links.tests.js +++ b/tools/static-assets/skel-vue/imports/api/collections/Links.tests.js @@ -4,7 +4,7 @@ import { Meteor } from 'meteor/meteor'; import { assert } from 'chai'; -import Links from './links.js'; +import Links from './Links.js'; if (Meteor.isServer) { describe('links collection', function () { diff --git a/tools/static-assets/skel-vue/src/fixtures.js b/tools/static-assets/skel-vue/imports/api/fixtures.js similarity index 100% rename from tools/static-assets/skel-vue/src/fixtures.js rename to tools/static-assets/skel-vue/imports/api/fixtures.js diff --git a/tools/static-assets/skel-vue/src/methods/createLink.js b/tools/static-assets/skel-vue/imports/api/methods/createLink.js similarity index 100% rename from tools/static-assets/skel-vue/src/methods/createLink.js rename to tools/static-assets/skel-vue/imports/api/methods/createLink.js diff --git a/tools/static-assets/skel-vue/src/methods/createLink.tests.js b/tools/static-assets/skel-vue/imports/api/methods/createLink.tests.js similarity index 100% rename from tools/static-assets/skel-vue/src/methods/createLink.tests.js rename to tools/static-assets/skel-vue/imports/api/methods/createLink.tests.js diff --git a/tools/static-assets/skel-vue/src/methods/index.js b/tools/static-assets/skel-vue/imports/api/methods/index.js similarity index 100% rename from tools/static-assets/skel-vue/src/methods/index.js rename to tools/static-assets/skel-vue/imports/api/methods/index.js diff --git a/tools/static-assets/skel-vue/src/publications/index.js b/tools/static-assets/skel-vue/imports/api/publications/index.js similarity index 100% rename from tools/static-assets/skel-vue/src/publications/index.js rename to tools/static-assets/skel-vue/imports/api/publications/index.js diff --git a/tools/static-assets/skel-vue/src/publications/links.js b/tools/static-assets/skel-vue/imports/api/publications/links.js similarity index 100% rename from tools/static-assets/skel-vue/src/publications/links.js rename to tools/static-assets/skel-vue/imports/api/publications/links.js diff --git a/tools/static-assets/skel-vue/src/publications/links.tests.js b/tools/static-assets/skel-vue/imports/api/publications/links.tests.js similarity index 100% rename from tools/static-assets/skel-vue/src/publications/links.tests.js rename to tools/static-assets/skel-vue/imports/api/publications/links.tests.js diff --git a/tools/static-assets/skel-vue/src/App.vue b/tools/static-assets/skel-vue/imports/ui/App.vue similarity index 100% rename from tools/static-assets/skel-vue/src/App.vue rename to tools/static-assets/skel-vue/imports/ui/App.vue diff --git a/tools/static-assets/skel-vue/src/components/Hello.vue b/tools/static-assets/skel-vue/imports/ui/components/Hello.vue similarity index 100% rename from tools/static-assets/skel-vue/src/components/Hello.vue rename to tools/static-assets/skel-vue/imports/ui/components/Hello.vue diff --git a/tools/static-assets/skel-vue/src/components/Info.vue b/tools/static-assets/skel-vue/imports/ui/components/Info.vue similarity index 95% rename from tools/static-assets/skel-vue/src/components/Info.vue rename to tools/static-assets/skel-vue/imports/ui/components/Info.vue index f20fc4c800..376d60562b 100644 --- a/tools/static-assets/skel-vue/src/components/Info.vue +++ b/tools/static-assets/skel-vue/imports/ui/components/Info.vue @@ -15,7 +15,7 @@ - - - - diff --git a/examples/unfinished/todos-backbone/client/todos.js b/examples/unfinished/todos-backbone/client/todos.js deleted file mode 100644 index cb9e610af6..0000000000 --- a/examples/unfinished/todos-backbone/client/todos.js +++ /dev/null @@ -1,201 +0,0 @@ -// An example Backbone application contributed by -// [Jérôme Gravel-Niquet](http://jgn.me/). This demo uses a simple -// [LocalStorage adapter](backbone-localstorage.html) -// to persist Backbone models within your browser. - -// Load the application once the DOM is ready, using `jQuery.ready`: -$(function(){ - // ask for all the todos in my cache - Meteor.subscribe('todos'); - - // helper functions - - function all () { - return Todos.find(); - }; - - function all_done () { - return Todos.find({done: true}); - }; - - function all_remaining () { - return Todos.find({done: false}); - }; - - function nextOrder () { - var todos = Todos.find({}, {sort: {order: -1}, limit: 1}); - return todos[0] ? todos[0].order + 1 : 1; - }; - - // Todo Item View - // -------------- - - // The DOM element for a todo item... - window.TodoView = Backbone.View.extend({ - - //... is a list tag. - tagName: "li", - - // Cache the template function for a single item. - template: _.template($('#item-template').html()), - - // The DOM events specific to an item. - events: { - "click .check" : "toggleDone", - "dblclick div.todo-text" : "edit", - "click span.todo-destroy" : "clear", - "keypress .todo-input" : "updateOnEnter" - }, - - // Re-render the contents of the todo item. - render: function() { - $(this.el).html(this.template(this.model)); - this.setText(); - return this; - }, - - // To avoid XSS (not that it would be harmful in this particular app), - // we use `jQuery.text` to set the contents of the todo item. - setText: function() { - this.$('.todo-text').text(this.model.text); - this.input = this.$('.todo-input'); - this.input.bind('blur', _.bind(this.close, this)).val(this.model.text); - }, - - // Toggle the `"done"` state of the object. - toggleDone: function() { - Todos.update(this.model._id, {$set: {done: !this.model.done}}); - }, - - // Switch this view into `"editing"` mode, displaying the input field. - edit: function() { - $(this.el).addClass("editing"); - this.input.focus(); - }, - - // Close the `"editing"` mode, saving changes to the todo. - // findLive callback will update this view. - close: function() { - Todos.update(this.model._id, {$set: {text: this.input.val()}}); - $(this.el).removeClass("editing"); - }, - - // If you hit `enter`, we're through editing the item. - updateOnEnter: function(e) { - if (e.keyCode == 13) this.close(); - }, - - // Remove this view from the DOM. - remove: function() { - $(this.el).remove(); - }, - - // destroy the todo object. the findLive callback will g/c this view. - clear: function() { - Todos.remove(this.model._id); - } - }); - - // The Application - // --------------- - - // Our overall **AppView** is the top-level piece of UI. - window.AppView = Backbone.View.extend({ - - // Instead of generating a new element, bind to the existing skeleton of - // the App already present in the HTML. - el: $("#todoapp"), - - // Our template for the line of statistics at the bottom of the app. - statsTemplate: _.template($('#stats-template').html()), - - // Delegated events for creating new items, and clearing done ones. - events: { - "keypress #new-todo": "createOnEnter", - "keyup #new-todo": "showTooltip", - "click .todo-clear a": "clearCompleted" - }, - - todos: [], - - // At initialization we bind to the relevant events on the `Todos` - // collection, when items are added or changed. Kick things off by - // loading any preexisting todos that might be saved in *localStorage*. - initialize: function() { - var self = this; - - this.input = this.$("#new-todo"); - - // spin up the live query. ignore the return value since we never - // stop the query. - Todos.findLive({}, { - added: function (obj, before_idx) { - // add a view node to the DOM - var view = new TodoView({model: obj}); - self.todos.splice(before_idx, 0, view); - self.$("#todo-list").append(view.render().el); - self.render(); - }, - removed: function (obj, at_idx) { - // remove the view node from the DOM - var view = self.todos.splice(at_idx, 1); - view[0].remove(); - self.render(); - }, - changed: function (obj, at_idx) { - // update obj in existing view and rerender - self.todos[at_idx].model = obj; - self.todos[at_idx].render(); - self.render(); - }, - moved: function (old_idx, new_idx) { - // unimplemented -- items don't ever move - }, - sort: {'order': 1} - }); - }, - - // Re-rendering the App just means refreshing the statistics -- the rest - // of the app doesn't change. - render: function() { - console.log("RENDER", all().length, all_done().length, all_remaining().length); - - this.$('#todo-stats').html(this.statsTemplate({ - total: all().length, - done: all_done().length, - remaining: all_remaining().length - })); - }, - - // If you hit return in the main input field, and there is text to save, - // create new **Todo** model. - createOnEnter: function(e) { - var text = this.input.val(); - if (!text || e.keyCode != 13) return; - Todos.insert({text: text, done: false, order: nextOrder()}); - this.input.val(''); - }, - - // Clear all done todo items, destroying their models. - clearCompleted: function() { - _.each(all_done(), function (todo) { Todos.remove(todo._id); }); - return false; - }, - - // Lazily show the tooltip that tells you to press `enter` to save - // a new todo item, after one second. - showTooltip: function(e) { - var tooltip = this.$(".ui-tooltip-top"); - var val = this.input.val(); - tooltip.fadeOut(); - if (this.tooltipTimeout) clearTimeout(this.tooltipTimeout); - if (val == '' || val == this.input.attr('placeholder')) return; - var show = function(){ tooltip.show().fadeIn(); }; - this.tooltipTimeout = _.delay(show, 1000); - } - }); - - // Finally, we kick things off by creating the **App**. - window.App = new AppView; - -}); diff --git a/examples/unfinished/todos-backbone/common.js b/examples/unfinished/todos-backbone/common.js deleted file mode 100644 index a12c5d85e5..0000000000 --- a/examples/unfinished/todos-backbone/common.js +++ /dev/null @@ -1,8 +0,0 @@ -Todos = new Mongo.Collection("todos"); -//Todos.schema({text: String, done: Boolean, order: Number}); - -if (Meteor.isServer) { - Meteor.publish('todos', function () { - return Todos.find(); - }); -} diff --git a/examples/unfinished/todos-backbone/public/destroy.png b/examples/unfinished/todos-backbone/public/destroy.png deleted file mode 100644 index f44a72e5f9fd2b6fc59f87d06a44cbfde37a5770..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lc!2%>hEQA6W7#LkWT^vI!PEWmj`eciN2i8;8lfJ=ZSJovzY1_h4q@jd@O3f5GZDb_uyRG#u*;#i4_ zd!LGIvef_Un>$QPC(pVl_Uui$&&oG5^%Essicd){Yxh~{qv>?|yJk*i>&;Ex%(_}r zXI{{q>33lJGK<8`au@4Y3tB%+-#bqsm@oX{_g7cW_MVNglRN$G%K__K(%~8+VeM-^ zT}_TC;8@gnbbZZvuJ0Sy7c5LXr0%(NQjKAxE$a`7BLxa>Jqj{O5*>aYb)0zbE^*t^ zYWYhxSflERcLdwTIYn(R6@xW`L>rI(7TLC;Dd(zc<20v=*aNN(r`x#0%T4FVxxHv}YbEMjCmGxbpI8||2c2@g1(7AnMfO!I%p|AyhS Vm|wZxYhbuCc)I$ztaD0e0ssswqVfO$ diff --git a/examples/unfinished/todos-backbone/todos.css b/examples/unfinished/todos-backbone/todos.css deleted file mode 100644 index 61ab6cffd7..0000000000 --- a/examples/unfinished/todos-backbone/todos.css +++ /dev/null @@ -1,311 +0,0 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-weight: inherit; - font-style: inherit; - font-size: 100%; - font-family: inherit; - vertical-align: baseline; -} -body { - line-height: 1; - color: black; - background: white; -} -ol, ul { - list-style: none; -} -a img { - border: none; -} - -html { - background: #eeeeee; -} - body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4em; - background: #eeeeee; - color: #333333; - } - -#todoapp { - width: 480px; - margin: 0 auto 40px; - background: white; - padding: 20px; - -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 5px 6px 0; - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 5px 6px 0; - -o-box-shadow: rgba(0, 0, 0, 0.2) 0 5px 6px 0; - box-shadow: rgba(0, 0, 0, 0.2) 0 5px 6px 0; -} - #todoapp h1 { - font-size: 36px; - font-weight: bold; - text-align: center; - padding: 20px 0 30px 0; - line-height: 1; - } - -#create-todo { - position: relative; -} - #create-todo input { - width: 466px; - font-size: 24px; - font-family: inherit; - line-height: 1.4em; - border: 0; - outline: none; - padding: 6px; - border: 1px solid #999999; - -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - -o-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - } - #create-todo input::-webkit-input-placeholder { - font-style: italic; - } - #create-todo span { - position: absolute; - z-index: 999; - width: 170px; - left: 50%; - margin-left: -85px; - } - -#todo-list { - margin-top: 10px; -} - #todo-list li { - padding: 12px 20px 11px 0; - position: relative; - font-size: 24px; - line-height: 1.1em; - border-bottom: 1px solid #cccccc; - } - #todo-list li:after { - content: "\0020"; - display: block; - height: 0; - clear: both; - overflow: hidden; - visibility: hidden; - } - #todo-list li.editing { - padding: 0; - border-bottom: 0; - } - #todo-list .editing .display, - #todo-list .edit { - display: none; - } - #todo-list .editing .edit { - display: block; - } - #todo-list .editing input { - width: 444px; - font-size: 24px; - font-family: inherit; - margin: 0; - line-height: 1.6em; - border: 0; - outline: none; - padding: 10px 7px 0px 27px; - border: 1px solid #999999; - -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - -o-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - box-shadow: rgba(0, 0, 0, 0.2) 0 1px 2px 0 inset; - } - #todo-list .check { - position: relative; - top: 9px; - margin: 0 10px 0 7px; - float: left; - } - #todo-list .done .todo-text { - text-decoration: line-through; - color: #777777; - } - #todo-list .todo-destroy { - position: absolute; - right: 5px; - top: 14px; - display: none; - cursor: pointer; - width: 20px; - height: 20px; - background: url(destroy.png) no-repeat 0 0; - } - #todo-list li:hover .todo-destroy { - display: block; - } - #todo-list .todo-destroy:hover { - background-position: 0 -20px; - } - -#todo-stats { - *zoom: 1; - margin-top: 10px; - color: #777777; -} - #todo-stats:after { - content: "\0020"; - display: block; - height: 0; - clear: both; - overflow: hidden; - visibility: hidden; - } - #todo-stats .todo-count { - float: left; - } - #todo-stats .todo-count .number { - font-weight: bold; - color: #333333; - } - #todo-stats .todo-clear { - float: right; - } - #todo-stats .todo-clear a { - color: #777777; - font-size: 12px; - } - #todo-stats .todo-clear a:visited { - color: #777777; - } - #todo-stats .todo-clear a:hover { - color: #336699; - } - -#instructions { - width: 520px; - margin: 10px auto; - color: #777777; - text-shadow: rgba(255, 255, 255, 0.8) 0 1px 0; - text-align: center; -} - #instructions a { - color: #336699; - } - -#credits { - width: 520px; - margin: 30px auto; - color: #999; - text-shadow: rgba(255, 255, 255, 0.8) 0 1px 0; - text-align: center; -} - #credits a { - color: #888; - } - - -/* - * François 'cahnory' Germain - */ -.ui-tooltip, .ui-tooltip-top, .ui-tooltip-right, .ui-tooltip-bottom, .ui-tooltip-left { - color:#ffffff; - cursor:normal; - display:-moz-inline-stack; - display:inline-block; - font-size:12px; - font-family:arial; - padding:.5em 1em; - position:relative; - text-align:center; - text-shadow:0 -1px 1px #111111; - -webkit-border-top-left-radius:4px ; - -webkit-border-top-right-radius:4px ; - -webkit-border-bottom-right-radius:4px ; - -webkit-border-bottom-left-radius:4px ; - -khtml-border-top-left-radius:4px ; - -khtml-border-top-right-radius:4px ; - -khtml-border-bottom-right-radius:4px ; - -khtml-border-bottom-left-radius:4px ; - -moz-border-radius-topleft:4px ; - -moz-border-radius-topright:4px ; - -moz-border-radius-bottomright:4px ; - -moz-border-radius-bottomleft:4px ; - border-top-left-radius:4px ; - border-top-right-radius:4px ; - border-bottom-right-radius:4px ; - border-bottom-left-radius:4px ; - -o-box-shadow:0 1px 2px #000000, inset 0 0 0 1px #222222, inset 0 2px #666666, inset 0 -2px 2px #444444; - -moz-box-shadow:0 1px 2px #000000, inset 0 0 0 1px #222222, inset 0 2px #666666, inset 0 -2px 2px #444444; - -khtml-box-shadow:0 1px 2px #000000, inset 0 0 0 1px #222222, inset 0 2px #666666, inset 0 -2px 2px #444444; - -webkit-box-shadow:0 1px 2px #000000, inset 0 0 0 1px #222222, inset 0 2px #666666, inset 0 -2px 2px #444444; - box-shadow:0 1px 2px #000000, inset 0 0 0 1px #222222, inset 0 2px #666666, inset 0 -2px 2px #444444; - background-color:#3b3b3b; - background-image:-moz-linear-gradient(top,#555555,#222222); - background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#555555),color-stop(1,#222222)); - filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#555555,EndColorStr=#222222); - -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#555555,EndColorStr=#222222); -} -.ui-tooltip:after, .ui-tooltip-top:after, .ui-tooltip-right:after, .ui-tooltip-bottom:after, .ui-tooltip-left:after { - content:"\25B8"; - display:block; - font-size:2em; - height:0; - line-height:0; - position:absolute; -} -.ui-tooltip:after, .ui-tooltip-bottom:after { - color:#2a2a2a; - bottom:0; - left:1px; - text-align:center; - text-shadow:1px 0 2px #000000; - -o-transform:rotate(90deg); - -moz-transform:rotate(90deg); - -khtml-transform:rotate(90deg); - -webkit-transform:rotate(90deg); - width:100%; -} -.ui-tooltip-top:after { - bottom:auto; - color:#4f4f4f; - left:-2px; - top:0; - text-align:center; - text-shadow:none; - -o-transform:rotate(-90deg); - -moz-transform:rotate(-90deg); - -khtml-transform:rotate(-90deg); - -webkit-transform:rotate(-90deg); - width:100%; -} -.ui-tooltip-right:after { - color:#222222; - right:-0.375em; - top:50%; - margin-top:-.05em; - text-shadow:0 1px 2px #000000; - -o-transform:rotate(0); - -moz-transform:rotate(0); - -khtml-transform:rotate(0); - -webkit-transform:rotate(0); -} -.ui-tooltip-left:after { - color:#222222; - left:-0.375em; - top:50%; - margin-top:.1em; - text-shadow:0 -1px 2px #000000; - -o-transform:rotate(180deg); - -moz-transform:rotate(180deg); - -khtml-transform:rotate(180deg); - -webkit-transform:rotate(180deg); -} diff --git a/examples/unfinished/todos-underscore/.meteor/.gitignore b/examples/unfinished/todos-underscore/.meteor/.gitignore deleted file mode 100644 index 4083037423..0000000000 --- a/examples/unfinished/todos-underscore/.meteor/.gitignore +++ /dev/null @@ -1 +0,0 @@ -local diff --git a/examples/unfinished/todos-underscore/.meteor/packages b/examples/unfinished/todos-underscore/.meteor/packages deleted file mode 100644 index 6bbedad3c8..0000000000 --- a/examples/unfinished/todos-underscore/.meteor/packages +++ /dev/null @@ -1,9 +0,0 @@ -# Meteor packages used by this project, one per line. -# -# 'meteor add' and 'meteor remove' will edit this file for you, -# but you can also edit it by hand. - -jquery -jquery-layout -jquery-history -standard-app-packages diff --git a/examples/unfinished/todos-underscore/.meteor/release b/examples/unfinished/todos-underscore/.meteor/release deleted file mode 100644 index a918a2aa18..0000000000 --- a/examples/unfinished/todos-underscore/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -0.6.0 diff --git a/examples/unfinished/todos-underscore/body.html b/examples/unfinished/todos-underscore/body.html deleted file mode 100644 index 0739651c2d..0000000000 --- a/examples/unfinished/todos-underscore/body.html +++ /dev/null @@ -1,98 +0,0 @@ - -Todos - - - - -
-
-
-
- -
-
- -
    -
    -
    - -
    -
    - -
    - -
    -
    - -
    -
    -

    - To get started, create a new todo list in the left sidebar by - typing its name in the text box. Select a list by clicking on its - name, and rename by double clicking. The active list appears in - the main window pane. You can do the usual here: add items, check - them off as completed, and destroy items. You can also tag items - with one or more tags, by clicking the blue Add new tag - button to the right. All your in-use tags appear at the top. You - can filter the list items by selecting a tag, or click the - leftmost button to return to the full list. -

    - -

    - Inspired by Backbone's - Todo Demo, - with credit to - Jérôme Gravel-Niquet. -

    -
    -
    - - - - - - - - - - diff --git a/examples/unfinished/todos-underscore/client/client.js b/examples/unfinished/todos-underscore/client/client.js deleted file mode 100644 index 1ccb0c4f06..0000000000 --- a/examples/unfinished/todos-underscore/client/client.js +++ /dev/null @@ -1,258 +0,0 @@ -// quick jquery extension to bind text inputs to blur and RET. -$.fn.onBlurOrEnter = function (callback) { - this.bind('blur', callback); - this.bind('keypress', function (evt) { - if (evt.keyCode === 13 && $(this).val()) - callback.call(this, evt); - }); -}; - -// everything else happens after DOM is ready -$(function () { - $('body').layout({north__minSize: 50, - spacing_open: 10, - north__fxSettings: { direction: "vertical" }}); - - // cache the template function for a single item. - var item_template = _.template($('#item-template').html()); - - // this render function could be replaced with a handlebars - // template. underscore template isn't safe for user-entered data - // like the item text (XSS). - function renderItem (obj) { - // generate template for todo - var elt = $(item_template(obj)); - - // set text through jquery for XSS protection - elt.find('.todo-text').text(obj.text); - - // clicking the checkbox toggles done state - elt.find('.check').click(function () { - Todos.update(obj._id, {$set: {done: !obj.done}}); - }); - - // clicking destroy button removes the item - elt.find('.destroy').click(function () { - Todos.remove(obj._id); - }); - - // wire up tag destruction links - elt.find('.tag .remove').click(function () { - var tag = $(this).attr('name'); - $(this).parent().fadeOut(500, function () { - Todos.update(obj._id, {$pull: {tags: tag}}); - }); - }); - - // wire up add tag - elt.find('.addtag').click(function () { - $(this).hide(); - elt.find('.edittag').show(); - elt.find('.edittag input').focus(); - }); - - // wire up edit tag - elt.find('.edittag input').onBlurOrEnter(function () { - elt.find('.edittag').hide(); - elt.find('.addtag').show(); - if ($(this).val() !== '') - Todos.update(obj._id, {$addToSet: {tags: $(this).val()}}); - }); - - // doubleclick on todo text brings up the editor - elt.find('.todo-text').dblclick(function () { - elt.addClass('editing'); - - var input = elt.find('.todo-input'); - input.val(obj.text); - input.focus(); - input.select(); - - input.onBlurOrEnter(function () { - elt.removeClass('editing'); - if ($(this).val() !== '') - Todos.update(obj._id, {$set: {text: elt.find('.todo-input').val()}}); - }); - }); - - return elt[0]; - }; - - // construct new todo from text box - $('#new-todo').bind('keypress', function (evt) { - var list_id = Session.get('list_id'); - var tag = Session.get('tag_filter'); - - // prevent creation of a new todo if nothing is selected - if (!list_id) return; - - var text = $('#new-todo').val(); - - if (evt.keyCode === 13 && text) { - var obj = {text: text, - list_id: list_id, - done: false, - timestamp: (new Date()).getTime()}; - if (tag) obj.tags = [tag]; - - Todos.insert(obj); - $('#new-todo').val(''); - } - }); - - var current_list_stop; - function setCurrentList (list_id) { - Session.set('list_id', list_id); - - $('#items-view').show(); - - // kill current findLive render - if (current_list_stop) - current_list_stop.stop(); - - var query = {list_id: list_id}; - if (Session.get('tag_filter')) - query.tags = Session.get('tag_filter') - - // render individual todo list, stash kill function - current_list_stop = - Meteor.ui.renderList(Todos, $('#item-list'), { - selector: query, - sort: {timestamp: 1}, - render: renderItem, - events: {} - }); - }; - - // render list of lists in the left sidebar. - Meteor.ui.renderList(Lists, $('#lists'), { - sort: {name: 1}, - template: $('#list-template'), - events: { - 'click': function (evt) { - window.History.pushState({list_id: this._id}, - "Todos: " + this.name, - "/" + this._id); - }, - 'dblclick': function (evt) { - var list_elt = $(evt.currentTarget); - var input = list_elt.find('.list-name-input'); - - list_elt.addClass('editing'); - - input.val(this.name); - input.focus(); - input.select(); - - var _id = this._id; - input.onBlurOrEnter(function () { - list_elt.removeClass('editing'); - if (input.val() !== '') - Lists.update(_id, {$set: {name: input.val()}}); - }); - } - } - }); - - // construct new todo list from text box - $('#new-list').bind('keypress', function (evt) { - var text = $('#new-list').val(); - - if (evt.keyCode === 13 && text) { - var list = Lists.insert({name: text}); - $('#new-list').val(''); - window.History.pushState({list_id: list._id}, - "Todos: " + list.name, - "/" + list._id); - } - }); - - // tags and filters - - // the tag filter bar is easy to generate using a simple - // renderList() against a minimongo query. since minimongo doesn't - // support aggregate queries, construct a local collection to serve - // the same purpose, and drive the renderList() off of it. - - var LocalTags = new Mongo.Collection; - (function () { - function updateLocalTags() { - var real = _(Todos.find()).chain().pluck('tags').compact().flatten().uniq().value(); - real.unshift(null); // XXX fake tag - - var computed = _(LocalTags.find()).pluck('tag'); - - _.each(_.difference(real, computed), function (new_tag) { - LocalTags.insert({tag: new_tag}); - }); - - _.each(_.difference(computed, real), function (dead_tag) { - LocalTags.remove({tag: dead_tag}); - }); - }; - - Todos.findLive({}, { - added: function (obj, before_idx) { _.defer(updateLocalTags); }, - removed: function (id, at_idx) { _.defer(updateLocalTags); }, - changed: function (obj, at_idx) { _.defer(updateLocalTags); }, - }); - })(); - - // findLive() against the computed tag table. since we also want a - // show-all button, arrange for the computed table to always include - // a null placeholder tag, and for the template to render that as - // "Show all". always begin the user session with a null filter. - - Session.set('tag_filter', null); - - Meteor.ui.renderList(LocalTags, $('#tag-filter'), { - sort: {tag: 1}, - template: $('#tag-filter-template'), - events: { - 'click': function (evt) { - if (Session.equals('tag_filter', this.tag)) - Session.set('tag_filter', null); - else - Session.set('tag_filter', this.tag); - - setCurrentList(Session.get('list_id')); - } - } - }); - - // load list on statechange (which we drive from several places). - window.History.Adapter.bind(window, 'statechange', function () { - var state = window.History.getState(); - var list = Lists.find(state.data.list_id); - setCurrentList(list._id); - }); - - // subscribe to all available todo lists. once the inital load - // completes, navigate to the list specified by URL, if any. - Meteor.subscribe('lists', function () { - var initial_list_id = window.location.pathname.split('/')[1]; - var list; - - if (initial_list_id) { - list = Lists.find(initial_list_id); - } else { - var lists = Lists.find({}, {sort: {name: 1}, limit: 1}); - list = lists[0]; - } - - if (list) { - window.History.replaceState({list_id: list._id}, - "Todos: " + list.name, - "/" + list._id); - // replaceState doesn't always trigger statechange on reload. if - // you last reloaded the same page and the state is the same, it - // won't fire. so call this here. double calling is not great, but - // OK. - setCurrentList(list._id); - } - }); - - // subscribe to all the items in each list. no need for a callback - // here: todo items are never queried using collection.find(). - Meteor.subscribe('todos'); -}); diff --git a/examples/unfinished/todos-underscore/common.js b/examples/unfinished/todos-underscore/common.js deleted file mode 100644 index 3c18676a60..0000000000 --- a/examples/unfinished/todos-underscore/common.js +++ /dev/null @@ -1,22 +0,0 @@ -Lists = new Mongo.Collection("lists"); - -Todos = new Mongo.Collection("todos"); - -/* Schema support coming soon! - -Lists.schema({text: String}); - -Todos.schema({text: String, - done: Boolean, - tags: [String]}); -*/ - -if (Meteor.isServer) { - Meteor.publish('lists', function () { - return Lists.find(); - }); - - Meteor.publish('todos', function () { - return Todos.find(); - }); -} diff --git a/examples/unfinished/todos-underscore/main.css b/examples/unfinished/todos-underscore/main.css deleted file mode 100644 index 60e850487d..0000000000 --- a/examples/unfinished/todos-underscore/main.css +++ /dev/null @@ -1,221 +0,0 @@ -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4em; - background: #eeeeee; - color: #333333; -} - -.ui-layout-north { - background: #dddddd; -} - -#tag-filter { - margin: 8px; -} - -#items-view { - display: none; - margin: 10px; -} - -#new-todo { - width: 466px; - font-size: 24px; - font-family: inherit; - line-height: 1.4em; - border: 0; - outline: none; - padding: 6px; - border: 1px solid #999999; - margin-left: 75px; -} - -.ui-layout-west { - padding: 10px; - border-right: solid 1px #cccccc; -} - -.ui-layout-south { - border-top: solid 1px black; - padding: 10px; - background: #cccccc; -} - -#help p { - margin: 8px; -} - -.ui-layout-center { - overflow: auto; -} - -#lists .list { - margin: 2px; - font-weight: bold; -} - -#lists .list-name .empty { - font-size: 0.9em; - font-style: italic; -} - -#lists .editing .display, -#lists .edit { - display: none; -} -#lists .editing .edit { - display: block; -} -#lists .editing input { - font-family: inherit; - margin: 0; - line-height: 1.6em; - border: 0; - outline: none; - padding: 10px 7px 0px 27px; - border: 1px solid #999999; -} -#lists .selected { - background-color: lightblue; -} - -/* todo items */ - -#item-list { - margin-top: 10px; -} - -#item-list li { - margin: 12px; - font-size: 24px; - line-height: 1.1em; - border-bottom: 1px solid #cccccc; - height: 50px; -} - -#item-list li:after { - content: "\0020"; - display: block; - height: 0; - clear: both; - overflow: hidden; - visibility: hidden; -} - -#item-list .destroy { - float: left; - width: 20px; - height: 20px; - cursor: pointer; - margin-top: 12px; - margin-left: 5px; -} - -#item-list li:hover .destroy { - background: url('/destroy.png') no-repeat 0 0; -} - -#item-list li .destroy:hover { - background-position: 0 -20px; -} - -#item-list .display { - float: left; - margin: 9px; -} - -#item-list .check { - float: left; - margin: 9px; -} - -#item-list .edit { - float: left; -} - -#item-list .todo-text { - float: left; -} - -#item-list li.editing { - padding: 0; -} - -#item-list .editing .display, -#item-list .edit { - display: none; -} - -#item-list .editing .edit { - display: block; -} - -#item-list .editing input { - width: 444px; - font-size: 24px; - font-family: inherit; - margin-left: 38px; - line-height: 1.6em; - border: 0; - outline: none; - border: 1px solid #999999; -} - -#item-list .done .todo-text { - text-decoration: line-through; - color: #777777; -} - -#item-list .item-tags { - float: right; -} - -/* tags */ - -.tag { - float: left; - - color: black; - background: #aaaaaa; - font-size: 16px; - font-weight: bold; - - cursor: pointer; - - border: 1px solid black; - border-radius: 2px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - - padding: 1px 3px 1px 3px; - margin: 4px; -} - -.tag.addtag { - background: lightblue; - border: 1px dashed black; -} - -.tag.edittag { - display: none; -} - -.tag.selected { - background: lightblue; -} - -.tag .name { - float: left; -} - -.tag .remove { - margin-top: 5px; - margin-left: 5px; - float: left; - width: 16px; - height: 16px; - background-image: url("/close_16.png"); -} - - diff --git a/examples/unfinished/todos-underscore/public/close_16.png b/examples/unfinished/todos-underscore/public/close_16.png deleted file mode 100644 index c605b1ce94935a0a26626f365aa22a0607f15be9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF3h)VW{r~@eZfxw%xpODi)-LPq zZ7(ivEi8=k_0>^T{eSZ&P}TaWQ{SIHt*@c+Xq8qXkk3&PM@kLXi`>UR zu|Q83#}JO_5eB1YC2K7@Pc?WQ6g9qaV9R0Nmgs{ACh%<)VPf!{qmehYRp~I$a0X9TKbLh* G2~7Y5F;Dma diff --git a/examples/unfinished/todos-underscore/public/destroy.png b/examples/unfinished/todos-underscore/public/destroy.png deleted file mode 100644 index f44a72e5f9fd2b6fc59f87d06a44cbfde37a5770..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lc!2%>hEQA6W7#LkWT^vI!PEWmj`eciN2i8;8lfJ=ZSJovzY1_h4q@jd@O3f5GZDb_uyRG#u*;#i4_ zd!LGIvef_Un>$QPC(pVl_Uui$&&oG5^%Essicd){Yxh~{qv>?|yJk*i>&;Ex%(_}r zXI{{q>33lJGK<8`au@4Y3tB%+-#bqsm@oX{_g7cW_MVNglRN$G%K__K(%~8+VeM-^ zT}_TC;8@gnbbZZvuJ0Sy7c5LXr0%(NQjKAxE$a`7BLxa>Jqj{O5*>aYb)0zbE^*t^ zYWYhxSflERcLdwTIYn(R6@xW`L>rI(7TLC;Dd(zc<20v=*aNN(r`x#0%T4FVxxHv}YbEMjCmGxbpI8||2c2@g1(7AnMfO!I%p|AyhS Vm|wZxYhbuCc)I$ztaD0e0ssswqVfO$ diff --git a/examples/unfinished/todos-underscore/reset.css b/examples/unfinished/todos-underscore/reset.css deleted file mode 100644 index eaa88eed13..0000000000 --- a/examples/unfinished/todos-underscore/reset.css +++ /dev/null @@ -1,30 +0,0 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-weight: inherit; - font-style: inherit; - font-size: 100%; - font-family: inherit; - vertical-align: baseline; -} -body { - line-height: 1; - color: black; - background: white; -} -ol, ul { - list-style: none; -} -a img { - border: none; -} - diff --git a/examples/unfinished/todos-underscore/server/bootstrap.js b/examples/unfinished/todos-underscore/server/bootstrap.js deleted file mode 100644 index e991e59b1b..0000000000 --- a/examples/unfinished/todos-underscore/server/bootstrap.js +++ /dev/null @@ -1,21 +0,0 @@ -// if the database is empty on server start, create some sample data. -Meteor.startup(function () { - if (Lists.find().length === 0) { - var list1 = Lists.insert({name: 'Things to do'}); - Todos.insert({list_id: list1._id, - text: 'Write Meteor app', tags: ['fun']}); - Todos.insert({list_id: list1._id, - text: 'Drink beer', tags: ['fun', 'yum']}); - - var list2 = Lists.insert({name: 'Places to see'}); - Todos.insert({list_id: list2._id, text: 'San Francisco', - tags: ['yum']}); - Todos.insert({list_id: list2._id, text: 'Paris', - tags: ['fun']}); - Todos.insert({list_id: list2._id, text: 'Tokyo'}); - - var list3 = Lists.insert({name: 'People to meet'}); - Todos.insert({list_id: list3._id, - text: 'All the cool kids'}); - } -}); From 3f3851fa0846117f6927f561f2fcce80be36ace2 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 28 Oct 2020 09:47:02 -0400 Subject: [PATCH 164/326] Update Typescript to 4.0.5 --- packages/babel-compiler/package.js | 4 ++-- packages/ecmascript/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 4534a9cb37..e487b3f4bb 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,11 +6,11 @@ Package.describe({ // isn't possible because you can't publish a non-recommended // release with package versions that don't have a pre-release // identifier at the end (eg, -dev) - version: '7.5.3' + version: '7.5.4-beta1120.0' }); Npm.depends({ - 'meteor-babel': '7.9.0', + 'meteor-babel': '7.10.0', 'json5': '2.1.1' }); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 16cac4465e..51f599a39c 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.14.3', + version: '0.14.4-beta1120.0', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 34928b8d30..01d716264f 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.6", + version: "4.0.5-beta1120.0", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 82a717de51..b23d3695f9 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,8 +14,8 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/a81b0324686e85d22c7688c47629d4009000e8b8", "node-gyp": "6.0.1", "node-pre-gyp": "0.14.0", - typescript: "3.8.3", - "meteor-babel": "7.9.0", + typescript: "4.0.5", + "meteor-babel": "7.10.0", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From 13e0b761456be908cfcafbaf1c805d82ef20bc7d Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 28 Oct 2020 10:06:32 -0400 Subject: [PATCH 165/326] dev-bundle-12.18.4.2 --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 61f0feb7a5..a4eab3ebfd 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=12.18.4.0 +BUNDLE_VERSION=12.18.4.2 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 0bcf0f9ec6222dfe975d370a80eac12a8d2542ac Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 28 Oct 2020 17:38:34 -0400 Subject: [PATCH 166/326] Fixes TS2783 on treeHash --- .../.npm/package/npm-shrinkwrap.json | 573 ++++++++++-------- .../plugin/minifyStdCSS/npm-shrinkwrap.json | 30 +- tools/fs/files.ts | 8 +- 3 files changed, 338 insertions(+), 273 deletions(-) diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 9705d36cb7..8275067801 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -2,181 +2,186 @@ "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==" }, "@babel/core": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", - "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", "dependencies": { "json5": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", - "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==" } } }, "@babel/generator": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", - "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==" }, "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==" }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", - "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==" }, "@babel/helper-builder-react-jsx": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz", - "integrity": "sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz", + "integrity": "sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg==" }, "@babel/helper-builder-react-jsx-experimental": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.0.tgz", - "integrity": "sha512-3xJEiyuYU4Q/Ar9BsHisgdxZsRlsShMe90URZ0e6przL26CCs8NJbDoxH94kKT17PcxlMhsCAwZd90evCo26VQ==" + "version": "7.12.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.4.tgz", + "integrity": "sha512-AjEa0jrQqNk7eDQOo0pTfUOwQBMF+xVqrausQwT9/rTKy0g04ggFNaJpaE09IQMn9yExluigWMJcj0WC7bq+Og==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz", - "integrity": "sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==" }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", - "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz", + "integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==" }, "@babel/helper-define-map": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", - "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==" + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==" }, "@babel/helper-explode-assignable-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", - "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==" }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==" }, "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==" }, "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==" }, "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", + "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==" }, "@babel/helper-module-transforms": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", - "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==" }, "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==" }, "@babel/helper-plugin-utils": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", - "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" }, "@babel/helper-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", - "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==" + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", - "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==" }, "@babel/helper-replace-supers": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", - "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz", + "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==" }, "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==" + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==" }, "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==" + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==" }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" }, "@babel/helper-wrap-function": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", - "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==" + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==" }, "@babel/helpers": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", - "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", + "integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==" }, "@babel/highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", - "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==" }, "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==" + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", - "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz", + "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", - "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", + "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==" }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz", - "integrity": "sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==" }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", + "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==" }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", - "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz", + "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==" }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -184,9 +189,9 @@ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==" }, "@babel/plugin-syntax-class-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz", - "integrity": "sha512-UcAyQWg2bAN647Q+O811tG9MrJ38Z10jjhQdKNAL8fsyPzE3cCN/uT+f55cFVY4aGO4jqJAvmqsuY3GQDwAoXg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==" }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", @@ -194,9 +199,9 @@ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==" }, "@babel/plugin-syntax-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz", - "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==" }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", @@ -219,169 +224,174 @@ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==" }, "@babel/plugin-transform-arrow-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", - "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", + "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", - "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==" }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", - "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", + "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", - "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz", + "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==" }, "@babel/plugin-transform-classes": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz", - "integrity": "sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", + "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==" }, "@babel/plugin-transform-computed-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", - "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", + "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==" }, "@babel/plugin-transform-destructuring": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", - "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", + "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==" }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", - "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", + "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==" }, "@babel/plugin-transform-for-of": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", - "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", + "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==" }, "@babel/plugin-transform-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", - "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", + "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", - "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", + "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==" }, "@babel/plugin-transform-object-super": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", - "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", + "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==" }, "@babel/plugin-transform-parameters": { - "version": "7.9.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz", - "integrity": "sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", + "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==" }, "@babel/plugin-transform-property-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", - "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", + "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==" }, "@babel/plugin-transform-react-display-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz", - "integrity": "sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz", + "integrity": "sha512-cAzB+UzBIrekfYxyLlFqf/OagTvHLcVBb5vpouzkYkBclRPraiygVnafvAoipErZLI8ANv8Ecn6E/m5qPXD26w==" }, "@babel/plugin-transform-react-jsx": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz", - "integrity": "sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.1.tgz", + "integrity": "sha512-RmKejwnT0T0QzQUzcbP5p1VWlpnP8QHtdhEtLG55ZDQnJNalbF3eeDyu3dnGKvGzFIQiBzFhBYTwvv435p9Xpw==" }, "@babel/plugin-transform-react-jsx-development": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.9.0.tgz", - "integrity": "sha512-tK8hWKrQncVvrhvtOiPpKrQjfNX3DtkNLSX4ObuGcpS9p0QrGetKmlySIGR07y48Zft8WVgPakqd/bk46JrMSw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.1.tgz", + "integrity": "sha512-IilcGWdN1yNgEGOrB96jbTplRh+V2Pz1EoEwsKsHfX1a/L40cUYuD71Zepa7C+ujv7kJIxnDftWeZbKNEqZjCQ==" }, "@babel/plugin-transform-react-jsx-self": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.9.0.tgz", - "integrity": "sha512-K2ObbWPKT7KUTAoyjCsFilOkEgMvFG+y0FqOl6Lezd0/13kMkkjHskVsZvblRPj1PHA44PrToaZANrryppzTvQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.12.1.tgz", + "integrity": "sha512-FbpL0ieNWiiBB5tCldX17EtXgmzeEZjFrix72rQYeq9X6nUK38HCaxexzVQrZWXanxKJPKVVIU37gFjEQYkPkA==" }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz", - "integrity": "sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.12.1.tgz", + "integrity": "sha512-keQ5kBfjJNRc6zZN1/nVHCd6LLIHq4aUKcVnvE/2l+ZZROSbqoiGFRtT5t3Is89XJxBQaP7NLZX2jgGHdZvvFQ==" + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz", + "integrity": "sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg==" }, "@babel/plugin-transform-regenerator": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", - "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", + "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==" }, "@babel/plugin-transform-runtime": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz", - "integrity": "sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==" }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", - "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", + "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==" }, "@babel/plugin-transform-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", - "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", + "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==" }, "@babel/plugin-transform-sticky-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", - "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz", + "integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==" }, "@babel/plugin-transform-template-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", - "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", + "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==" }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", - "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz", + "integrity": "sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==" }, "@babel/plugin-transform-unicode-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", - "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", + "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==" }, "@babel/preset-react": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.9.4.tgz", - "integrity": "sha512-AxylVB3FXeOTQXNXyiuAQJSvss62FEotbX2Pzx3K/7c+MKJMdSg6Ose6QYllkdCFA8EInCJVw7M/o5QbLuA4ZQ==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.1.tgz", + "integrity": "sha512-euCExymHCi0qB9u5fKw7rvlw7AZSjw/NaB9h7EkdTt5+yHRrXdiRTh7fkG3uBPpJg82CqLfp1LHLqWGSCrab+g==" }, "@babel/runtime": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", + "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==" }, "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==" }, "@babel/traverse": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", - "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==" }, "@babel/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", - "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==" + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==" }, "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -429,9 +439,9 @@ "integrity": "sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA==" }, "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==" + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==" }, "babel-plugin-minify-builtins": { "version": "0.5.0", @@ -574,15 +584,25 @@ "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==" }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==" }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" }, + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==" + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -599,15 +619,20 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -618,6 +643,36 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" + }, + "is-core-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", + "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==" + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==" + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -634,9 +689,9 @@ "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==" }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "magic-string": { "version": "0.25.7", @@ -644,9 +699,9 @@ "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==" }, "meteor-babel": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.9.0.tgz", - "integrity": "sha512-cJI8Mu8XG0aFh7b6I/PpgfiJV46WKp75o0hgknw9oCQ8X/HhZ8BtQIRVT7WGCirH3ATfmEqRmW00UimAQJOnhw==" + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.10.0.tgz", + "integrity": "sha512-IuVj8dF0pYykchvqUEFPyOBJ7AUY4wUwHm/Xllq8neoDuKvCyiPVVkqi0z8fHHy5Wvo3VD7SMK5DQcCsZyuOZw==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -663,30 +718,30 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", + "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==" }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" - }, "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", + "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==" }, "regenerate-unicode-properties": { "version": "8.2.0", @@ -694,24 +749,24 @@ "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==" }, "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" }, "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==" + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==" }, "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==" + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==" }, "regjsgen": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", - "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==" + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" }, "regjsparser": { "version": "0.6.4", @@ -731,9 +786,9 @@ "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==" }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==" + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==" }, "safe-buffer": { "version": "5.1.2", @@ -755,6 +810,16 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "string.prototype.trimend": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", + "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==" + }, + "string.prototype.trimstart": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", + "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -766,9 +831,9 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "typescript": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", - "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==" + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz", + "integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", diff --git a/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json b/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json index 303fc30167..740cbbcb85 100644 --- a/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json +++ b/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json @@ -2,29 +2,29 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", - "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==" + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", + "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==" }, "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==" + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==" }, "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/tools/fs/files.ts b/tools/fs/files.ts index b5e37a1618..ea9cd7363e 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -373,12 +373,12 @@ export const blankHash = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; // Returns a base64 SHA256 hash representing a tree on disk. It is not sensitive // to modtime, uid/gid, or any permissions bits other than the current-user-exec // bit on normal files. -export function treeHash(root: string, options: { - ignore: (path: string) => boolean; +export function treeHash(root: string, optionsParams: { + ignore?: (path: string) => boolean; }) { - options = { + const options = { ignore() { return false; }, - ...options, + ...optionsParams, }; const hash = require('crypto').createHash('sha256'); From d0591d8093a9683ba233324935233d8e4cd72200 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 28 Oct 2020 18:08:23 -0400 Subject: [PATCH 167/326] modules test app was using a fixed version of typescript for no reason --- tools/tests/apps/modules/.meteor/packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/apps/modules/.meteor/packages b/tools/tests/apps/modules/.meteor/packages index 1aec0f64f8..2f92a7e262 100644 --- a/tools/tests/apps/modules/.meteor/packages +++ b/tools/tests/apps/modules/.meteor/packages @@ -27,4 +27,4 @@ underscore@1.0.10 import-local-json-module akryum:vue-component dummy-compiler -typescript@3.7.5 +typescript From a6c0631b158c0a9d20144cf32ae37644537cf104 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 28 Oct 2020 23:39:14 +0100 Subject: [PATCH 168/326] Move http package into deprecated folder --- packages/{ => deprecated}/http/.gitignore | 0 packages/{ => deprecated}/http/.npm/package/.gitignore | 0 packages/{ => deprecated}/http/.npm/package/README | 0 packages/{ => deprecated}/http/.npm/package/npm-shrinkwrap.json | 0 packages/{ => deprecated}/http/README.md | 0 packages/{ => deprecated}/http/httpcall_client.js | 0 packages/{ => deprecated}/http/httpcall_common.js | 0 packages/{ => deprecated}/http/httpcall_server.js | 0 packages/{ => deprecated}/http/httpcall_tests.js | 0 packages/{ => deprecated}/http/package.js | 0 packages/{ => deprecated}/http/test_responder.js | 0 packages/{ => deprecated}/http/test_static.serveme | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename packages/{ => deprecated}/http/.gitignore (100%) rename packages/{ => deprecated}/http/.npm/package/.gitignore (100%) rename packages/{ => deprecated}/http/.npm/package/README (100%) rename packages/{ => deprecated}/http/.npm/package/npm-shrinkwrap.json (100%) rename packages/{ => deprecated}/http/README.md (100%) rename packages/{ => deprecated}/http/httpcall_client.js (100%) rename packages/{ => deprecated}/http/httpcall_common.js (100%) rename packages/{ => deprecated}/http/httpcall_server.js (100%) rename packages/{ => deprecated}/http/httpcall_tests.js (100%) rename packages/{ => deprecated}/http/package.js (100%) rename packages/{ => deprecated}/http/test_responder.js (100%) rename packages/{ => deprecated}/http/test_static.serveme (100%) diff --git a/packages/http/.gitignore b/packages/deprecated/http/.gitignore similarity index 100% rename from packages/http/.gitignore rename to packages/deprecated/http/.gitignore diff --git a/packages/http/.npm/package/.gitignore b/packages/deprecated/http/.npm/package/.gitignore similarity index 100% rename from packages/http/.npm/package/.gitignore rename to packages/deprecated/http/.npm/package/.gitignore diff --git a/packages/http/.npm/package/README b/packages/deprecated/http/.npm/package/README similarity index 100% rename from packages/http/.npm/package/README rename to packages/deprecated/http/.npm/package/README diff --git a/packages/http/.npm/package/npm-shrinkwrap.json b/packages/deprecated/http/.npm/package/npm-shrinkwrap.json similarity index 100% rename from packages/http/.npm/package/npm-shrinkwrap.json rename to packages/deprecated/http/.npm/package/npm-shrinkwrap.json diff --git a/packages/http/README.md b/packages/deprecated/http/README.md similarity index 100% rename from packages/http/README.md rename to packages/deprecated/http/README.md diff --git a/packages/http/httpcall_client.js b/packages/deprecated/http/httpcall_client.js similarity index 100% rename from packages/http/httpcall_client.js rename to packages/deprecated/http/httpcall_client.js diff --git a/packages/http/httpcall_common.js b/packages/deprecated/http/httpcall_common.js similarity index 100% rename from packages/http/httpcall_common.js rename to packages/deprecated/http/httpcall_common.js diff --git a/packages/http/httpcall_server.js b/packages/deprecated/http/httpcall_server.js similarity index 100% rename from packages/http/httpcall_server.js rename to packages/deprecated/http/httpcall_server.js diff --git a/packages/http/httpcall_tests.js b/packages/deprecated/http/httpcall_tests.js similarity index 100% rename from packages/http/httpcall_tests.js rename to packages/deprecated/http/httpcall_tests.js diff --git a/packages/http/package.js b/packages/deprecated/http/package.js similarity index 100% rename from packages/http/package.js rename to packages/deprecated/http/package.js diff --git a/packages/http/test_responder.js b/packages/deprecated/http/test_responder.js similarity index 100% rename from packages/http/test_responder.js rename to packages/deprecated/http/test_responder.js diff --git a/packages/http/test_static.serveme b/packages/deprecated/http/test_static.serveme similarity index 100% rename from packages/http/test_static.serveme rename to packages/deprecated/http/test_static.serveme From 9812a991d9cf89cc08cfdba5f11716f9aa4da784 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 30 Oct 2020 11:39:34 -0400 Subject: [PATCH 169/326] Starting to review some docs --- DEVELOPMENT.md | 1 + README.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 77b5b74467..16347203d2 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -65,6 +65,7 @@ When `meteor` is run from a checkout, a `dev_bundle` is automatically downloaded * Node.js version * npm version * MongoDB version +* TypeScript version * Packages [used by `meteor-tool`](scripts/dev-bundle-tool-package.js) * Packages [used by the server bundle](scripts/dev-bundle-server-package.js) diff --git a/README.md b/README.md index ef71c238c3..1a88564078 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ Building an application with Meteor? * Deploy on Galaxy hosting: https://www.meteor.com/hosting * Announcement list: sign up at https://www.meteor.com/ -* Having problems? Ask for help at: https://stackoverflow.com/questions/tagged/meteor * Discussion forums: https://forums.meteor.com/ * Join the Meteor community Slack by clicking this [invite link](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc). From 25b857008bf77c95efb1d7b8133b6ad3bde0332d Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 30 Oct 2020 11:40:24 -0400 Subject: [PATCH 170/326] Update meteor-babel to 7.10.1 --- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index e487b3f4bb..8477aad9c3 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.10.0', + 'meteor-babel': '7.10.1', 'json5': '2.1.1' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index b23d3695f9..8e03d17b5c 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -15,7 +15,7 @@ var packageJson = { "node-gyp": "6.0.1", "node-pre-gyp": "0.14.0", typescript: "4.0.5", - "meteor-babel": "7.10.0", + "meteor-babel": "7.10.1", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From b7337a495ebbfb17b24ffbb5c68eb206de54cddd Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 30 Oct 2020 11:41:16 -0400 Subject: [PATCH 171/326] dev-bundle-12.18.4.3 --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index a4eab3ebfd..e7093bda16 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=12.18.4.2 +BUNDLE_VERSION=12.18.4.3 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 6150c6f218e1a66dc0bdaccfe3b43fbb3dca2e5d Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 30 Oct 2020 14:01:58 -0400 Subject: [PATCH 172/326] Starting to review some docs --- CONTRIBUTING.md | 35 ++++++++++------------------------- DEVELOPMENT.md | 11 +++++++++-- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46bba9339e..5172a5de2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,19 +27,17 @@ Are you new here? Please check our issues `good-for-first-contribution`: [core]( We curate specific issues that would make great pull requests for community contributors by applying the `pull-requests-encouraged` label ([bugs](https://github.com/meteor/meteor/issues?q=is%3Aopen+is%3Aissue+label%3Apull-requests-encouraged) / [feature requests](https://github.com/meteor/meteor-feature-requests/issues?q=is%3Aopen+is%3Aissue+label%3Apull-requests-encouraged)). -Issues which *also* have the `confirmed` label ([bugs](https://github.com/meteor/meteor/issues?q=is%3Aissue%20is%3Aopen%20label%3Apull-requests-encouraged%20label%3Aconfirmed) / [feature requests](https://github.com/meteor/meteor-feature-requests/issues?q=is%3Aissue%20is%3Aopen%20label%3Apull-requests-encouraged%20label%3Aconfirmed)) are considered to have their details clear enough to begin working on. +Issues which *also* have the `Stage:Confirmed` label ([bugs](https://github.com/meteor/meteor/issues?q=is%3Aissue%20is%3Aopen%20label%3Apull-requests-encouraged%20label%3Aconfirmed) / [feature requests](https://github.com/meteor/meteor-feature-requests/issues?q=is%3Aissue%20is%3Aopen%20label%3Apull-requests-encouraged%20label%3Aconfirmed)) are considered to have their details clear enough to begin working on. -Any issue which does not have the `confirmed` label still requires discussion on implementation details but input and positive commentary is welcome! Any pull request opened on an issue which is not `confirmed` is still welcome, however the pull-request is more likely to be sent back for reworking than a `confirmed` issue. If in doubt about the best way to implement something, please create additional conversation on the issue. You can also reach Filipe Névola (Meteor Developer Evangelist) and he will help you to find something interesting to work on. - -Please note that `pull-requests-encouraged` issues with low activity will often be closed without being implemented. These issues are tagged with an additional [`not-implemented`](https://github.com/meteor/meteor/issues?utf8=✓&q=label%3Apull-requests-encouraged+label%3Anot-implemented) label, and can still be considered good candidates to work on. If you're interested in working on a closed and `not-implemented` issue, please let us know by posting on that issue. +Any issue which does not have the `Stage:Confirmed` label still requires discussion on implementation details but input and positive commentary is welcome! Any pull request opened on an issue which is not `Stage:Confirmed` is still welcome, however the pull-request is more likely to be sent back for reworking than a `Stage:Confirmed` issue. If in doubt about the best way to implement something, please create additional conversation on the issue. You can also reach Filipe Névola (Meteor Developer Evangelist, @FilipeNevola) and he will help you to find something interesting to work on. ### Project roles -We’ve just begun to create more defined project roles for Meteor. Here are descriptions of the existing project roles, along with the current contributors taking on those roles today. +Here are descriptions of the existing project roles, along with the current contributors taking on those roles today. #### Issue Triager -Issue Triagers are members of the community that meet with us weekly to help triage Meteor’s open issues and bug reports. Once you’ve begun triaging issues regularly on your own, we will invite you to join our dedicated Slack channel to participate in these regular coordination sessions. +Issue Triagers are members of the community that help every week with Meteor’s open issues and bug reports. Current Issue Triagers: - [meteor](https://github.com/meteor/meteor) @@ -56,37 +54,24 @@ Current Reviewers: - [meteor](https://github.com/meteor/meteor) - [@klaussner](https://github.com/klaussner) - [@zodern](https://github.com/zodern) - - [@benjamn](https://github.com/benjamn) - - [@abernix](https://github.com/abernix) - - [@hwillson](https://github.com/hwillson) + - [@StorytellerCZ](https://github.com/StorytellerCZ) + - [@sebakerckhof](https://github.com/sebakerckhof) - [@filipenevola](https://github.com/filipenevola) + - [@renanccastro](https://github.com/renanccastro) - [docs](https://github.com/meteor/docs) / [guide](https://github.com/meteor/guide) - [@lorensr](https://github.com/lorensr) - [@filipenevola](https://github.com/filipenevola) + - [@renanccastro](https://github.com/renanccastro) #### Core Committer The contributors with commit access to meteor/meteor are employees of Meteor Software Ltd or community members who have distinguished themselves in other contribution areas. If you want to become a core committer please start writing PRs. Current Core Committers: -- [@benjamn](https://github.com/benjamn) - [@filipenevola](https://github.com/filipenevola) - -#### Documentation Maintainer - -Documentation Maintainers are regular documentation contributors that have been given the ability to merge docs changes on [meteor/docs](https://github.com/meteor/docs). - -Current Documentation Maintainers: -- [@abernix](https://github.com/abernix) -- [@lorensr](https://github.com/lorensr) - -#### Community Package Maintainer: - -Community package maintainers are community members who maintain packages outside of Meteor core. This requires code to be extracted from meteor/meteor, and entails a high level of responsibility. For this reason, community maintainers generally (and currently) must first become an advanced contributor to Meteor core and have 4-5 non-trivial pull requests merged that went through the proper contribution work-flow. At that point, core contributors may make the case for breaking out a particular core package, and assist in the technical process around doing so. - -Current Community Package Maintainers: -- [@mitar](https://github.com/mitar) for [Blaze](https://github.com/meteor/blaze) +- [@renanccastro](https://github.com/renanccastro) +- [@denihs](https://github.com/denihs) #### Developer Evangelist diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 16347203d2..7a888d74df 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -163,6 +163,13 @@ In a similar way to the method of specifying which tests TO run, there is a way Simply remove the `--list` flag to actually run the matching tests. +#### Avoiding retries + +On CI we want to retry the tests to avoid false failures but in development can take some time if you retry every time a test is failing. So to avoid retries use: + + ./meteor self-test --retries 0 + + #### More reading For even more details on how to run Meteor Tool "self tests", please refer to the [Testing section of the Meteor Tool README](https://github.com/meteor/meteor/blob/master/tools/README.md#testing). @@ -183,7 +190,7 @@ Since Meteor is a free, open-source project, you can run tests in the context of To enable CircleCI for your development: -1. Make sure you have an account with [CircleCI](https://circleci.com) +0. Make sure you have an account with [CircleCI](https://circleci.com) 0. Make sure you have [forked](https://help.github.com/articles/fork-a-repo/) [Meteor](https://github.com/meteor/meteor) into your own GitHub account. 0. Go to the [Add Projects](https://circleci.com/add-projects) page on CircleCI. 0. On the left, click on your GitHub username. @@ -202,7 +209,7 @@ To enable CircleCI for your development: ## Commit messages -Good commit messages are very important and you should make sure to explain what is changing and why. The commit message should include: +Good commit messages are very important and you should make sure to explain what is changing and why. The commit message should include: * A short and helpful commit title (maximum 80 characters). * A commit description which clearly explains the change if it's not super-obvious by the title. Some description always helps! From bac9f90cd2e19aa36129bda975f0bf190e16e293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Sat, 31 Oct 2020 08:06:03 -0400 Subject: [PATCH 173/326] Update stale for new label organization --- .github/stale.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 518a2c5a76..50da813ee1 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -3,8 +3,7 @@ daysUntilStale: 32 daysUntilClose: 8 exemptLabels: - pinned - - security - - confirmed + - Stage:Confirmed staleLabel: stale-bot markComment: > This issue has been automatically marked as stale because it has not had From 1116334793ba0247ce08dae3c3ccf6a6c1a3d7ea Mon Sep 17 00:00:00 2001 From: filipenevola Date: Sat, 31 Oct 2020 10:47:03 -0400 Subject: [PATCH 174/326] Reviewing the stages of a PR/issue --- .github/ISSUE_TEMPLATE.md | 2 +- CONTRIBUTING.md | 32 ++++++++++++++++++++++------ ISSUE_TRIAGE.md | 45 ++++++++++++--------------------------- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 1b0c3cebfc..4cf028179a 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@